Commit fb5a4750 authored by Jérome Perrin's avatar Jérome Perrin

slapproxy: add missing getComputerPartitionCertificate method

parent a48a9c75
......@@ -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')
......
......@@ -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):
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment