Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gutyán Gábor
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
dfd97c16
authored
Apr 16, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage: rename ready to is_ready
parent
568cb143
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
circle/storage/models.py
+4
-4
No files found.
circle/storage/models.py
View file @
dfd97c16
...
@@ -122,7 +122,7 @@ class Disk(AclBase, TimeStampedModel):
...
@@ -122,7 +122,7 @@ class Disk(AclBase, TimeStampedModel):
self
.
disk
=
disk
self
.
disk
=
disk
@property
@property
def
ready
(
self
):
def
is_
ready
(
self
):
""" Returns True if the disk is physically ready on the storage.
""" Returns True if the disk is physically ready on the storage.
It needs at least 1 successfull deploy action.
It needs at least 1 successfull deploy action.
...
@@ -310,7 +310,7 @@ class Disk(AclBase, TimeStampedModel):
...
@@ -310,7 +310,7 @@ class Disk(AclBase, TimeStampedModel):
self
.
destroyed
=
None
self
.
destroyed
=
None
self
.
save
()
self
.
save
()
if
self
.
ready
:
if
self
.
is_
ready
:
return
True
return
True
with
disk_activity
(
code_suffix
=
'deploy'
,
disk
=
self
,
with
disk_activity
(
code_suffix
=
'deploy'
,
disk
=
self
,
task_uuid
=
task_uuid
,
user
=
user
)
as
act
:
task_uuid
=
task_uuid
,
user
=
user
)
as
act
:
...
@@ -505,7 +505,7 @@ class Disk(AclBase, TimeStampedModel):
...
@@ -505,7 +505,7 @@ class Disk(AclBase, TimeStampedModel):
raise
self
.
WrongDiskTypeError
(
self
.
type
)
raise
self
.
WrongDiskTypeError
(
self
.
type
)
if
self
.
is_in_use
:
if
self
.
is_in_use
:
raise
self
.
DiskInUseError
(
self
)
raise
self
.
DiskInUseError
(
self
)
if
not
self
.
ready
:
if
not
self
.
is_
ready
:
raise
self
.
DiskIsNotReady
(
self
)
raise
self
.
DiskIsNotReady
(
self
)
if
not
disk
:
if
not
disk
:
base
=
None
base
=
None
...
@@ -551,7 +551,7 @@ class Disk(AclBase, TimeStampedModel):
...
@@ -551,7 +551,7 @@ class Disk(AclBase, TimeStampedModel):
if
self
.
is_in_use
:
if
self
.
is_in_use
:
raise
self
.
DiskInUseError
(
self
)
raise
self
.
DiskInUseError
(
self
)
if
not
self
.
ready
:
if
not
self
.
is_
ready
:
raise
self
.
DiskIsNotReady
(
self
)
raise
self
.
DiskIsNotReady
(
self
)
# from this point on, the caller has to guarantee that the disk is not
# from this point on, the caller has to guarantee that the disk is not
...
...
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