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
Commit
e5276242
authored
Mar 16, 2015
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: fix ResetNodeOperation
Closes
#390
parent
cb4e68fd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
circle/vm/operations.py
+5
-4
No files found.
circle/vm/operations.py
View file @
e5276242
...
...
@@ -1093,16 +1093,17 @@ class ResetNodeOperation(NodeOperation):
"You cannot reset a disabled or online node."
),
Exception
())
def
_operation
(
self
,
activity
,
user
):
if
self
.
node
.
enabled
:
DisableOperation
(
self
.
node
)
.
call
(
parent_activity
=
activity
,
user
=
user
)
for
i
in
self
.
node
.
instance_set
.
all
():
name
=
create_readable
(
ugettext_noop
(
"
migrate
%(instance)
s (
%(pk)
s)"
),
instance
=
i
.
name
,
pk
=
i
.
pk
)
"
redeploy
%(instance)
s (
%(pk)
s)"
),
instance
=
i
.
name
,
pk
=
i
.
pk
)
with
activity
.
sub_activity
(
'migrate_instance_
%
d'
%
i
.
pk
,
readable_name
=
name
):
i
.
redeploy
(
user
=
user
)
self
.
node
.
enabled
=
False
self
.
node
.
schedule_enabled
=
False
self
.
node
.
save
()
@register_operation
class
FlushOperation
(
NodeOperation
):
...
...
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