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
Labels
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Rafael Monnerat
slapos.core
Commits
914d7964
Commit
914d7964
authored
Mar 29, 2013
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do use data retrieval to report the status.
parent
7a1ec4c5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
11 deletions
+7
-11
master/bt5/slapos_slap_tool/TestTemplateItem/testSlapOSSlapTool.py
...5/slapos_slap_tool/TestTemplateItem/testSlapOSSlapTool.py
+6
-4
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
+0
-6
No files found.
master/bt5/slapos_slap_tool/TestTemplateItem/testSlapOSSlapTool.py
View file @
914d7964
...
...
@@ -420,7 +420,8 @@ class TestSlapOSSlapToolComputerAccess(TestSlapOSSlapToolMixin):
def
test_accessed_getComputerStatus
(
self
):
self
.
login
(
self
.
computer_id
)
self
.
portal_slap
.
getComputerInformation
(
self
.
computer_id
)
self
.
portal_slap
.
softwareReleaseError
(
'http://example.org'
,
self
.
computer_id
,
'error log'
)
created_at
=
rfc1123_date
(
DateTime
())
response
=
self
.
portal_slap
.
getComputerStatus
(
self
.
computer_id
)
self
.
assertEqual
(
200
,
response
.
status
)
...
...
@@ -447,7 +448,7 @@ class TestSlapOSSlapToolComputerAccess(TestSlapOSSlapToolMixin):
<unicode>created_at</unicode>
<unicode>%(created_at)s</unicode>
<unicode>text</unicode>
<unicode>#
access %(computer_id)s
</unicode>
<unicode>#
error while installing http://example.org
</unicode>
<unicode>user</unicode>
<unicode>%(computer_id)s</unicode>
</dictionary>
...
...
@@ -1624,7 +1625,8 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
def
test_accessed_getComputerStatus
(
self
):
self
.
login
(
self
.
computer_id
)
self
.
portal_slap
.
getComputerInformation
(
self
.
computer_id
)
self
.
portal_slap
.
softwareReleaseError
(
'http://example.org'
,
self
.
computer_id
,
'error log'
)
self
.
login
(
self
.
person_reference
)
created_at
=
rfc1123_date
(
DateTime
())
response
=
self
.
portal_slap
.
getComputerStatus
(
self
.
computer_id
)
...
...
@@ -1652,7 +1654,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
<unicode>created_at</unicode>
<unicode>%(created_at)s</unicode>
<unicode>text</unicode>
<unicode>#
access %(computer_id)s
</unicode>
<unicode>#
error while installing http://example.org
</unicode>
<unicode>user</unicode>
<unicode>%(computer_id)s</unicode>
</dictionary>
...
...
master/bt5/slapos_slap_tool/bt/revision
View file @
914d7964
21
\ No newline at end of file
22
\ No newline at end of file
master/product/Vifib/Tool/SlapTool.py
View file @
914d7964
...
...
@@ -282,7 +282,6 @@ class SlapTool(BaseTool):
Reuses slap library for easy marshalling.
"""
user
=
self
.
getPortalObject
().
portal_membership
.
getAuthenticatedMember
().
getUserName
()
self
.
_logAccess
(
user
,
user
,
'#access %s'
%
computer_id
)
result
=
self
.
_getComputerInformation
(
computer_id
,
user
)
if
self
.
REQUEST
.
response
.
getStatus
()
==
200
:
...
...
@@ -686,11 +685,6 @@ class SlapTool(BaseTool):
slap_partition
.
_parameter_dict
.
update
(
parameter_dict
)
result
=
xml_marshaller
.
xml_marshaller
.
dumps
(
slap_partition
)
user
=
self
.
getPortalObject
().
portal_membership
.
\
getAuthenticatedMember
().
getUserName
()
self
.
_logAccess
(
user
,
user
,
'#access %s %s'
%
(
computer_reference
,
computer_partition_reference
))
# Keep in cache server for 7 days
self
.
REQUEST
.
response
.
setStatus
(
200
)
self
.
REQUEST
.
response
.
setHeader
(
'Cache-Control'
,
...
...
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