Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
circlestack
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
f6a5980b
authored
Apr 25, 2014
by
Dudás Ádám
Committed by
Őry Máté
Apr 28, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
operations: remove unnecessary parameters
parent
83756cde
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
circle/vm/operations.py
+10
-10
No files found.
circle/vm/operations.py
View file @
f6a5980b
...
...
@@ -89,7 +89,7 @@ class DeployOperation(InstanceOperation):
def
on_commit
(
self
,
activity
):
activity
.
resultant_state
=
'RUNNING'
def
_operation
(
self
,
activity
,
user
,
system
,
timeout
=
15
):
def
_operation
(
self
,
activity
,
timeout
=
15
):
# Allocate VNC port and host node
self
.
instance
.
allocate_vnc_port
()
self
.
instance
.
allocate_node
()
...
...
@@ -125,7 +125,7 @@ class DestroyOperation(InstanceOperation):
def
on_commit
(
self
,
activity
):
activity
.
resultant_state
=
'DESTROYED'
def
_operation
(
self
,
activity
,
user
,
system
):
def
_operation
(
self
,
activity
):
if
self
.
instance
.
node
:
# Destroy networks
with
activity
.
sub_activity
(
'destroying_net'
):
...
...
@@ -163,7 +163,7 @@ class MigrateOperation(InstanceOperation):
name
=
_
(
"migrate"
)
description
=
_
(
"Live migrate running VM to another node."
)
def
_operation
(
self
,
activity
,
user
,
system
,
to_node
=
None
,
timeout
=
120
):
def
_operation
(
self
,
activity
,
to_node
=
None
,
timeout
=
120
):
if
not
to_node
:
with
activity
.
sub_activity
(
'scheduling'
)
as
sa
:
to_node
=
self
.
instance
.
select_node
()
...
...
@@ -193,7 +193,7 @@ class RebootOperation(InstanceOperation):
name
=
_
(
"reboot"
)
description
=
_
(
"Reboot virtual machine with Ctrl+Alt+Del signal."
)
def
_operation
(
self
,
activity
,
user
,
system
,
timeout
=
5
):
def
_operation
(
self
,
timeout
=
5
):
self
.
instance
.
reboot_vm
(
timeout
=
timeout
)
...
...
@@ -223,7 +223,7 @@ class ResetOperation(InstanceOperation):
name
=
_
(
"reset"
)
description
=
_
(
"Reset virtual machine (reset button)."
)
def
_operation
(
self
,
activity
,
user
,
system
,
timeout
=
5
):
def
_operation
(
self
,
timeout
=
5
):
self
.
instance
.
reset_vm
(
timeout
=
timeout
)
register_operation
(
ResetOperation
)
...
...
@@ -328,7 +328,7 @@ class ShutdownOperation(InstanceOperation):
def
on_commit
(
self
,
activity
):
activity
.
resultant_state
=
'STOPPED'
def
_operation
(
self
,
activity
,
user
,
system
,
timeout
=
120
):
def
_operation
(
self
,
timeout
=
120
):
self
.
instance
.
shutdown_vm
(
timeout
=
timeout
)
self
.
instance
.
yield_node
()
self
.
instance
.
yield_vnc_port
()
...
...
@@ -346,7 +346,7 @@ class ShutOffOperation(InstanceOperation):
def
on_commit
(
self
,
activity
):
activity
.
resultant_state
=
'STOPPED'
def
_operation
(
self
,
activity
,
user
,
system
):
def
_operation
(
self
,
activity
):
# Shutdown networks
with
activity
.
sub_activity
(
'shutdown_net'
):
self
.
instance
.
shutdown_net
()
...
...
@@ -383,7 +383,7 @@ class SleepOperation(InstanceOperation):
def
on_commit
(
self
,
activity
):
activity
.
resultant_state
=
'SUSPENDED'
def
_operation
(
self
,
activity
,
user
,
system
,
timeout
=
60
):
def
_operation
(
self
,
activity
,
timeout
=
60
):
# Destroy networks
with
activity
.
sub_activity
(
'shutdown_net'
):
self
.
instance
.
shutdown_net
()
...
...
@@ -419,7 +419,7 @@ class WakeUpOperation(InstanceOperation):
def
on_commit
(
self
,
activity
):
activity
.
resultant_state
=
'RUNNING'
def
_operation
(
self
,
activity
,
user
,
system
,
timeout
=
60
):
def
_operation
(
self
,
activity
,
timeout
=
60
):
# Schedule vm
self
.
instance
.
allocate_vnc_port
()
self
.
instance
.
allocate_node
()
...
...
@@ -470,7 +470,7 @@ class FlushOperation(NodeOperation):
name
=
_
(
"flush"
)
description
=
_
(
"Disable node and move all instances to other ones."
)
def
_operation
(
self
,
activity
,
user
,
system
):
def
_operation
(
self
,
activity
,
user
):
self
.
node
.
disable
(
user
,
activity
)
for
i
in
self
.
node
.
instance_set
.
all
():
with
activity
.
sub_activity
(
'migrate_instance_
%
d'
%
i
.
pk
):
...
...
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