Commit 74feb1de authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

wip slapgrid add update Related Instance List

parent af23c67d
......@@ -813,10 +813,16 @@ stderr_logfile_backups=1
if os.path.exists(transaction_file_path):
with open(transaction_file_path, 'r') as tf:
try:
# XXX CLN
computer_partition.setComputerPartitionRelatedInstanceList(
[reference for reference in tf.read().split('\n') if reference]
)
if not self.api_backward_compatibility:
self.slap.jio_api_connector.put({
"portal_type": "Software Instance",
"reference": computer_partition.get("reference"),
"requested_instance_list": [reference for reference in tf.read().split('\n') if reference],
})
else:
computer_partition["slap_partition"].setComputerPartitionRelatedInstanceList(
[reference for reference in tf.read().split('\n') if reference]
)
except NotFoundError as e:
# Master doesn't implement this feature ?
self.logger.warning("NotFoundError: %s. \nCannot send requested instance "\
......@@ -1507,7 +1513,7 @@ stderr_logfile_backups=1
# even if something is terribly wrong while processing an instance, it
# won't prevent processing other ones.
if not self.api_backward_compatibility:
computer_partition = self.slap.jio_connector.get({
computer_partition = self.slap.jio_api_connector.get({
"portal_type": "Software Instance",
"reference": computer_partition["reference"]
})
......@@ -1590,7 +1596,7 @@ stderr_logfile_backups=1
promise_error_partition_list = []
for computer_partition in computer_partition_list:
if not self.api_backward_compatibility:
computer_partition = self.slap.jio_connector.get({
computer_partition = self.slap.jio_api_connector.get({
"portal_type": "Software Instance",
"reference": computer_partition["reference"]
})
......
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