Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
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
91f2eb92
authored
Mar 18, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
instance: refactoring Instance.state to status calls
parent
96215507
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
circle/vm/models/instance.py
+4
-4
No files found.
circle/vm/models/instance.py
View file @
91f2eb92
...
...
@@ -249,7 +249,7 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel,
if
message
is
None
:
message
=
(
"The instance's current state (
%
s) is "
"inappropriate for the invoked operation."
%
instance
.
stat
e
)
%
instance
.
stat
us
)
Exception
.
__init__
(
self
,
message
)
...
...
@@ -265,7 +265,7 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel,
@property
def
is_running
(
self
):
return
self
.
stat
e
==
'RUNNING'
return
self
.
stat
us
==
'RUNNING'
@property
def
state
(
self
):
...
...
@@ -950,7 +950,7 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel,
def
sleep
(
self
,
user
=
None
,
task_uuid
=
None
,
timeout
=
60
):
"""Suspend virtual machine with memory dump.
"""
if
self
.
stat
e
not
in
[
'RUNNING'
]:
if
self
.
stat
us
not
in
[
'RUNNING'
]:
raise
self
.
WrongStateError
(
self
)
def
__on_abort
(
activity
,
error
):
...
...
@@ -988,7 +988,7 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel,
queue
=
"localhost.man"
)
def
wake_up
(
self
,
user
=
None
,
task_uuid
=
None
,
timeout
=
60
):
if
self
.
stat
e
not
in
[
'SUSPENDED'
]:
if
self
.
stat
us
not
in
[
'SUSPENDED'
]:
raise
self
.
WrongStateError
(
self
)
def
__on_abort
(
activity
,
error
):
...
...
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