Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Nicolas Wavrant
slapos.core
Commits
fb5a4750
Commit
fb5a4750
authored
10 years ago
by
Jérome Perrin
Browse files
Options
Download
Email Patches
Plain Diff
slapproxy: add missing getComputerPartitionCertificate method
parent
a48a9c75
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
slapos/proxy/views.py
slapos/proxy/views.py
+5
-0
slapos/tests/slapproxy/__init__.py
slapos/tests/slapproxy/__init__.py
+9
-0
No files found.
slapos/proxy/views.py
View file @
fb5a4750
...
...
@@ -730,6 +730,11 @@ def softwareInstanceRename():
def
getComputerPartitionStatus
():
return
xml_marshaller
.
xml_marshaller
.
dumps
(
'Not implemented.'
)
@
app
.
route
(
'/getComputerPartitionCertificate'
,
methods
=
[
'GET'
])
def
getComputerPartitionCertificate
():
# proxy does not use partition certificate, but client calls this.
return
xml_marshaller
.
xml_marshaller
.
dumps
({
'certificate'
:
''
,
'key'
:
''
})
@
app
.
route
(
'/getSoftwareReleaseListFromSoftwareProduct'
,
methods
=
[
'GET'
])
def
getSoftwareReleaseListFromSoftwareProduct
():
software_product_reference
=
request
.
args
.
get
(
'software_product_reference'
)
...
...
This diff is collapsed.
Click to expand it.
slapos/tests/slapproxy/__init__.py
View file @
fb5a4750
...
...
@@ -261,6 +261,15 @@ class TestInformation(BasicMixin, unittest.TestCase):
self
.
app
.
get
,
'/getSoftwareReleaseListFromSoftwareProduct'
)
def
test_getComputerPartitionCertificate
(
self
):
"""
Tests that getComputerPartitionCertificate method is implemented in slapproxy.
"""
rv
=
self
.
app
.
get
(
'/getComputerPartitionCertificate?computer_id=%s&computer_partition_id=%s'
%
(
self
.
computer_id
,
'slappart0'
))
response
=
xml_marshaller
.
xml_marshaller
.
loads
(
rv
.
data
)
self
.
assertEquals
({
'certificate'
:
''
,
'key'
:
''
},
response
)
class
MasterMixin
(
BasicMixin
,
unittest
.
TestCase
):
"""
...
...
This diff is collapsed.
Click to expand it.
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