Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Tyagov
slapos.core
Commits
1ccbc60a
Commit
1ccbc60a
authored
Jun 18, 2013
by
Romain Courteaud
🐸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Instance bang now returns "OK"
parent
2823ac8b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
+5
-6
master/bt5/slapos_slap_tool/TestTemplateItem/testSlapOSSlapTool.py
...5/slapos_slap_tool/TestTemplateItem/testSlapOSSlapTool.py
+2
-2
master/bt5/slapos_slap_tool/bt/revision
master/bt5/slapos_slap_tool/bt/revision
+1
-1
master/product/Vifib/Tool/SlapTool.py
master/product/Vifib/Tool/SlapTool.py
+2
-3
No files found.
master/bt5/slapos_slap_tool/TestTemplateItem/testSlapOSSlapTool.py
View file @
1ccbc60a
...
@@ -1373,7 +1373,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
...
@@ -1373,7 +1373,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSSlapToolMixin):
error_log
=
'Please bang me'
error_log
=
'Please bang me'
response
=
self
.
portal_slap
.
softwareInstanceBang
(
self
.
computer_id
,
response
=
self
.
portal_slap
.
softwareInstanceBang
(
self
.
computer_id
,
partition_id
,
error_log
)
partition_id
,
error_log
)
self
.
assertEqual
(
'
None
'
,
response
)
self
.
assertEqual
(
'
OK
'
,
response
)
created_at
=
rfc1123_date
(
DateTime
())
created_at
=
rfc1123_date
(
DateTime
())
response
=
self
.
portal_slap
.
getComputerPartitionStatus
(
self
.
computer_id
,
response
=
self
.
portal_slap
.
getComputerPartitionStatus
(
self
.
computer_id
,
partition_id
)
partition_id
)
...
@@ -2143,7 +2143,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
...
@@ -2143,7 +2143,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
error_log
=
'Please bang me'
error_log
=
'Please bang me'
response
=
self
.
portal_slap
.
softwareInstanceBang
(
self
.
computer_id
,
response
=
self
.
portal_slap
.
softwareInstanceBang
(
self
.
computer_id
,
partition_id
,
error_log
)
partition_id
,
error_log
)
self
.
assertEqual
(
'
None
'
,
response
)
self
.
assertEqual
(
'
OK
'
,
response
)
created_at
=
rfc1123_date
(
DateTime
())
created_at
=
rfc1123_date
(
DateTime
())
response
=
self
.
portal_slap
.
getComputerPartitionStatus
(
self
.
computer_id
,
response
=
self
.
portal_slap
.
getComputerPartitionStatus
(
self
.
computer_id
,
partition_id
)
partition_id
)
...
...
master/bt5/slapos_slap_tool/bt/revision
View file @
1ccbc60a
30
31
\ No newline at end of file
\ No newline at end of file
master/product/Vifib/Tool/SlapTool.py
View file @
1ccbc60a
...
@@ -933,16 +933,15 @@ class SlapTool(BaseTool):
...
@@ -933,16 +933,15 @@ class SlapTool(BaseTool):
'#error bang called'
)
'#error bang called'
)
timestamp
=
str
(
int
(
software_instance
.
getModificationDate
()))
timestamp
=
str
(
int
(
software_instance
.
getModificationDate
()))
key
=
"%s_bangstamp"
%
software_instance
.
getReference
()
key
=
"%s_bangstamp"
%
software_instance
.
getReference
()
result
=
"OK"
transition
=
self
.
getPortalObject
().
portal_workflow
.
getInfoFor
(
transition
=
self
.
getPortalObject
().
portal_workflow
.
getInfoFor
(
software_instance
,
'action'
,
wf_id
=
'instance_slap_interface_workflow'
)
software_instance
,
'action'
,
wf_id
=
'instance_slap_interface_workflow'
)
if
(
self
.
_getLastData
(
key
)
!=
timestamp
)
and
\
if
(
self
.
_getLastData
(
key
)
!=
timestamp
)
and
\
(
transition
!=
'bang'
):
(
transition
!=
'bang'
):
result
=
software_instance
.
bang
(
bang_tree
=
True
,
comment
=
message
)
software_instance
.
bang
(
bang_tree
=
True
,
comment
=
message
)
self
.
_storeLastData
(
key
,
str
(
int
(
software_instance
.
getModificationDate
())))
self
.
_storeLastData
(
key
,
str
(
int
(
software_instance
.
getModificationDate
())))
return
result
return
"OK"
def
_getAccessStatus
(
self
,
context_reference
):
def
_getAccessStatus
(
self
,
context_reference
):
memcached_dict
=
self
.
_getMemcachedDict
()
memcached_dict
=
self
.
_getMemcachedDict
()
...
...
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