Commit 1e90baee authored by Yingjie Xu's avatar Yingjie Xu

Add possibility to fetch single instance parameter.

parent 322cd76c
......@@ -493,6 +493,14 @@ class ComputerPartition(SlapDocument):
'connection_xml': xml_marshaller.dumps(connection_dict),
'slave_reference': slave_reference})
@_syncComputerPartitionInformation
def getInstanceParameter(self, key):
parameter_dict = getattr(self, '_parameter_dict', None) or {}
if key in parameter_dict:
return parameter_dict[key]
else:
raise NotFoundError("%s not found" % key)
@_syncComputerPartitionInformation
def getConnectionParameter(self, key):
connection_dict = getattr(self, '_connection_dict', None) or {}
......
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