Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e82593fc
authored
May 05, 2016
by
Czémán Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage: data store type validation for disk inheritance
parent
5f72d598
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
circle/storage/models.py
+6
-8
No files found.
circle/storage/models.py
View file @
e82593fc
...
...
@@ -441,14 +441,7 @@ class Disk(TimeStampedModel):
}
def
get_disk_desc_for_ceph_block_device
(
self
):
desc
=
self
.
get_disk_desc_for_filesystem
()
# TODO: remove or use them
# desc["hosts"] = self.datastore.get_hosts()
# desc["ceph_user"] = self.datastore.ceph_user
# desc["secret_uuid"] = self.datastore.secret_uuid
return
desc
return
self
.
get_disk_desc_for_filesystem
()
def
get_vmdisk_desc_for_filesystem
(
self
):
...
...
@@ -487,6 +480,11 @@ class Disk(TimeStampedModel):
def
clean
(
self
,
*
args
,
**
kwargs
):
if
(
self
.
size
is
None
or
""
)
and
self
.
base
:
self
.
size
=
self
.
base
.
size
if
self
.
base
is
not
None
and
\
self
.
datastore
.
type
!=
self
.
base
.
datastore
.
type
:
raise
ValidationError
(
_
(
"Forbidden inheritance of disks "
"from different type of data stores."
))
super
(
Disk
,
self
)
.
clean
(
*
args
,
**
kwargs
)
def
deploy
(
self
,
user
=
None
,
task_uuid
=
None
,
timeout
=
15
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment