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
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
3f0b123b
authored
Feb 28, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage: fix Disk.is_in_use docstring
parent
b2b04289
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
circle/storage/models.py
+5
-1
No files found.
circle/storage/models.py
View file @
3f0b123b
...
@@ -150,7 +150,11 @@ class Disk(AclBase, TimeStampedModel):
...
@@ -150,7 +150,11 @@ class Disk(AclBase, TimeStampedModel):
return
any
((
not
i
.
is_deletable
()
for
i
in
self
.
derivatives
.
all
()))
return
any
((
not
i
.
is_deletable
()
for
i
in
self
.
derivatives
.
all
()))
def
is_in_use
(
self
):
def
is_in_use
(
self
):
"""Returns True if disc is attached to an active VM else False"""
"""Returns if disk is attached to an active VM.
'In use' means the disk is attached to a VM which is not STOPPED, as
any other VMs leave the disk in an inconsistent state.
"""
return
any
([
i
.
state
!=
'STOPPED'
for
i
in
self
.
instance_set
.
all
()])
return
any
([
i
.
state
!=
'STOPPED'
for
i
in
self
.
instance_set
.
all
()])
def
get_exclusive
(
self
):
def
get_exclusive
(
self
):
...
...
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