Commit 2d9ec16f by Bach Dániel

storage: fix incorrect state in Disk.is_in_use()

parent f9c10050
...@@ -117,7 +117,7 @@ class Disk(AclBase, TimeStampedModel): ...@@ -117,7 +117,7 @@ class Disk(AclBase, TimeStampedModel):
}[self.type] }[self.type]
def is_in_use(self): def is_in_use(self):
return any([i.state != 'SHUTOFF' 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):
"""Get an instance of the disk for exclusive usage. """Get an instance of the disk for exclusive usage.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment