[Erp5-report] r42572 luke - /erp5/trunk/products/Vifib/Tool/SlapTool.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Jan 21 13:33:19 CET 2011
Author: luke
Date: Fri Jan 21 13:33:19 2011
New Revision: 42572
URL: http://svn.erp5.org?rev=42572&view=rev
Log:
- implement server side getComputerPartitionCertificate
Modified:
erp5/trunk/products/Vifib/Tool/SlapTool.py
Modified: erp5/trunk/products/Vifib/Tool/SlapTool.py
URL: http://svn.erp5.org/erp5/trunk/products/Vifib/Tool/SlapTool.py?rev=42572&r1=42571&r2=42572&view=diff
==============================================================================
--- erp5/trunk/products/Vifib/Tool/SlapTool.py [utf8] (original)
+++ erp5/trunk/products/Vifib/Tool/SlapTool.py [utf8] Fri Jan 21 13:33:19 2011
@@ -151,6 +151,17 @@ class SlapTool(BaseTool):
self._convertToSlapPartition(slave_partition_document, computer_id))
return xml_marshaller.xml_marshaller.dumps(slap_computer)
+ security.declareProtected(Permissions.AccessContentsInformation, 'getComputerPartitionCertificate')
+ def getComputerPartitionCertificate(self, computer_id, computer_partition_id):
+ self.REQUEST.response.setHeader('Content-Type', 'text/xml')
+ software_instance = self._getSoftwareInstanceForComputerPartition(
+ computer_id, computer_partition_id)
+ certificate_dict = dict(
+ key=software_instance.getSslKey(),
+ certificate=software_instance.getSslCertificate()
+ )
+ return xml_marshaller.xml_marshaller.dumps(certificate_dict)
+
####################################################
# Public POST methods
####################################################
More information about the Erp5-report
mailing list