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
18
Merge Requests
18
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
nexedi
slapos.core
Commits
fb5a4750
Commit
fb5a4750
authored
Jan 02, 2015
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapproxy: add missing getComputerPartitionCertificate method
parent
a48a9c75
Changes
2
Show 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():
...
@@ -730,6 +730,11 @@ def softwareInstanceRename():
def
getComputerPartitionStatus
():
def
getComputerPartitionStatus
():
return
xml_marshaller
.
xml_marshaller
.
dumps
(
'Not implemented.'
)
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'
])
@
app
.
route
(
'/getSoftwareReleaseListFromSoftwareProduct'
,
methods
=
[
'GET'
])
def
getSoftwareReleaseListFromSoftwareProduct
():
def
getSoftwareReleaseListFromSoftwareProduct
():
software_product_reference
=
request
.
args
.
get
(
'software_product_reference'
)
software_product_reference
=
request
.
args
.
get
(
'software_product_reference'
)
...
...
slapos/tests/slapproxy/__init__.py
View file @
fb5a4750
...
@@ -261,6 +261,15 @@ class TestInformation(BasicMixin, unittest.TestCase):
...
@@ -261,6 +261,15 @@ class TestInformation(BasicMixin, unittest.TestCase):
self
.
app
.
get
,
'/getSoftwareReleaseListFromSoftwareProduct'
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
):
class
MasterMixin
(
BasicMixin
,
unittest
.
TestCase
):
"""
"""
...
...
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