Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gyuricska Milán
/
cloud
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
adb2d8e2
authored
Sep 11, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: add os_boot subactivity to operations that boot a vm
parent
5887df63
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
circle/vm/operations.py
+16
-6
No files found.
circle/vm/operations.py
View file @
adb2d8e2
...
@@ -299,16 +299,20 @@ class DeployOperation(InstanceOperation):
...
@@ -299,16 +299,20 @@ class DeployOperation(InstanceOperation):
"deploy network"
)):
"deploy network"
)):
self
.
instance
.
deploy_net
()
self
.
instance
.
deploy_net
()
try
:
self
.
instance
.
renew
(
parent_activity
=
activity
)
except
:
pass
# Resume vm
# Resume vm
with
activity
.
sub_activity
(
with
activity
.
sub_activity
(
'booting'
,
readable_name
=
ugettext_noop
(
'booting'
,
readable_name
=
ugettext_noop
(
"boot virtual machine"
)):
"boot virtual machine"
)):
self
.
instance
.
resume_vm
(
timeout
=
timeout
)
self
.
instance
.
resume_vm
(
timeout
=
timeout
)
try
:
if
self
.
instance
.
has_agent
:
self
.
instance
.
renew
(
parent_activity
=
activity
)
activity
.
sub_activity
(
'os_boot'
,
readable_name
=
ugettext_noop
(
except
:
"wait operating system loading"
),
interruptible
=
True
)
pass
register_operation
(
DeployOperation
)
register_operation
(
DeployOperation
)
...
@@ -425,8 +429,11 @@ class RebootOperation(InstanceOperation):
...
@@ -425,8 +429,11 @@ class RebootOperation(InstanceOperation):
required_perms
=
()
required_perms
=
()
accept_states
=
(
'RUNNING'
,
)
accept_states
=
(
'RUNNING'
,
)
def
_operation
(
self
,
timeout
=
5
):
def
_operation
(
self
,
activity
,
timeout
=
5
):
self
.
instance
.
reboot_vm
(
timeout
=
timeout
)
self
.
instance
.
reboot_vm
(
timeout
=
timeout
)
if
self
.
instance
.
has_agent
:
activity
.
sub_activity
(
'os_boot'
,
readable_name
=
ugettext_noop
(
"wait operating system loading"
),
interruptible
=
True
)
register_operation
(
RebootOperation
)
register_operation
(
RebootOperation
)
...
@@ -499,8 +506,11 @@ class ResetOperation(InstanceOperation):
...
@@ -499,8 +506,11 @@ class ResetOperation(InstanceOperation):
required_perms
=
()
required_perms
=
()
accept_states
=
(
'RUNNING'
,
)
accept_states
=
(
'RUNNING'
,
)
def
_operation
(
self
,
timeout
=
5
):
def
_operation
(
self
,
activity
,
timeout
=
5
):
self
.
instance
.
reset_vm
(
timeout
=
timeout
)
self
.
instance
.
reset_vm
(
timeout
=
timeout
)
if
self
.
instance
.
has_agent
:
activity
.
sub_activity
(
'os_boot'
,
readable_name
=
ugettext_noop
(
"wait operating system loading"
),
interruptible
=
True
)
register_operation
(
ResetOperation
)
register_operation
(
ResetOperation
)
...
...
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