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
52795ab4
authored
Mar 16, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: add Node.disable(base_activity)
parent
db51287a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
circle/vm/models/node.py
+6
-2
No files found.
circle/vm/models/node.py
View file @
52795ab4
...
@@ -90,10 +90,14 @@ class Node(TimeStampedModel):
...
@@ -90,10 +90,14 @@ class Node(TimeStampedModel):
else
:
else
:
return
'OFFLINE'
return
'OFFLINE'
def
disable
(
self
,
user
=
None
):
def
disable
(
self
,
user
=
None
,
base_activity
=
None
):
''' Disable the node.'''
''' Disable the node.'''
if
self
.
enabled
:
if
self
.
enabled
:
with
node_activity
(
code_suffix
=
'disable'
,
node
=
self
,
user
=
user
):
if
base_activity
:
act_ctx
=
base_activity
.
sub_activity
(
'disable'
)
else
:
act_ctx
=
node_activity
(
'disable'
,
node
=
self
,
user
=
user
)
with
act_ctx
:
self
.
enabled
=
False
self
.
enabled
=
False
self
.
save
()
self
.
save
()
...
...
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