Commit aafb86eb authored by Łukasz Nowak's avatar Łukasz Nowak

Expose bindings for certificate manipulation.

parent 3cb292c5
......@@ -286,6 +286,12 @@ class Computer(SlapDocument):
'computer_id': self._computer_id,
'message': message})
def getCertificateDict(self):
return {
'key': getattr(self, '_key', None),
'certificate': getattr(self, '_certificate', None)
}
def _syncComputerPartitionInformation(func):
"""
Synchronize computer partition object with server information
......@@ -681,6 +687,17 @@ class slap:
computer = xml_marshaller.loads(xml)
return computer
def revokeComputerCertificate(self, computer_id):
self._connection_helper.POST('/revokeComputerCertificate', {
'computer_id': computer_id})
def getComputerCertificate(self, computer_id):
self._connection_helper.POST('/getComputerCertificate', {
'computer_id': computer_id})
xml = self._connection_helper.response.read()
computer = xml_marshaller.loads(xml)
return computer
def registerComputer(self, computer_guid):
"""
Registers connected representation of computer and
......
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