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
9ca19599
authored
Mar 09, 2014
by
Dudás Ádám
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: make is_console_available into property
parent
e1a0492c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
circle/vm/models/instance.py
+4
-3
No files found.
circle/vm/models/instance.py
View file @
9ca19599
...
...
@@ -273,6 +273,10 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
return
" "
.
join
([
s
for
s
in
parts
if
s
!=
""
])
@property
def
is_console_available
(
self
):
return
self
.
is_running
@property
def
is_running
(
self
):
return
self
.
state
==
'RUNNING'
...
...
@@ -298,9 +302,6 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
else
:
return
act
.
resultant_state
def
is_console_available
(
self
):
return
self
.
state
in
(
'RUNNING'
,
)
def
manual_state_change
(
self
,
new_state
,
reason
=
None
,
user
=
None
):
# TODO cancel concurrent activity (if exists)
act
=
InstanceActivity
.
create
(
code_suffix
=
'manual_state_change'
,
...
...
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