Commit ec61f6b4 authored by Gabriel Monnerat's avatar Gabriel Monnerat

Refactor code to convert the xml properties from slave instance to dictionary

parent 25f65d09
...@@ -374,15 +374,20 @@ class SlapTool(BaseTool): ...@@ -374,15 +374,20 @@ class SlapTool(BaseTool):
slap_partition._software_release_document = SoftwareRelease( slap_partition._software_release_document = SoftwareRelease(
software_release=software_release_document.getUrlString(), software_release=software_release_document.getUrlString(),
computer_guid=computer_id) computer_guid=computer_id)
parameter_dict = self._getSalePackingListLineAsSoftwareInstance( parameter_dict = self._getSalePackingListLineAsSoftwareInstance(
movement) movement)
# software instance has to define an xml parameter # software instance has to define an xml parameter
slap_partition._parameter_dict = self._instanceXmlToDict( slap_partition._parameter_dict = self._instanceXmlToDict(
parameter_dict.pop('xml')) parameter_dict.pop('xml'))
slap_partition._connection_dict = self._instanceXmlToDict( slap_partition._connection_dict = self._instanceXmlToDict(
parameter_dict.pop('connection_xml')) parameter_dict.pop('connection_xml'))
for slave_instance_dict in parameter_dict.get("slave_instance_list", []):
if slave_instance_dict.has_key("connection_xml"):
slave_instance_dict.update(self._instanceXmlToDict(
slave_instance_dict.pop("connection_xml")))
if slave_instance_dict.has_key("xml"):
slave_instance_dict.update(self._instanceXmlToDict(
slave_instance_dict.pop("xml")))
slap_partition._parameter_dict.update(parameter_dict) slap_partition._parameter_dict.update(parameter_dict)
# Apply state and buildout run conditions # Apply state and buildout run conditions
......
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