Commit d37500fe authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

wip: Fix some api calls

parent 5509d61f
...@@ -556,7 +556,7 @@ stderr_logfile_backups=1 ...@@ -556,7 +556,7 @@ stderr_logfile_backups=1
self.computer_partition_list = self.slap.jio_api_connector.allDocs({ self.computer_partition_list = self.slap.jio_api_connector.allDocs({
"portal_type": "Software Instance", "portal_type": "Software Instance",
"compute_node_id": self.computer_id, "compute_node_id": self.computer_id,
}) }).get("result_list", [])
else: else:
try: try:
slap_partition_list = self.computer.getComputerPartitionList() slap_partition_list = self.computer.getComputerPartitionList()
...@@ -1098,7 +1098,7 @@ stderr_logfile_backups=1 ...@@ -1098,7 +1098,7 @@ stderr_logfile_backups=1
if partition_access_status is None or status_error: if partition_access_status is None or status_error:
local_partition._updateCertificate() local_partition._updateCertificate()
if not self.api_backward_compatibility: if not self.api_backward_compatibility:
self.slap.jio_api_connector({ self.slap.jio_api_connector.put({
"portal_type": "Software Instance", "portal_type": "Software Instance",
"reference": computer_partition.get("reference"), "reference": computer_partition.get("reference"),
"reported_state": "started" "reported_state": "started"
...@@ -1349,7 +1349,7 @@ stderr_logfile_backups=1 ...@@ -1349,7 +1349,7 @@ stderr_logfile_backups=1
if not self.force_stop: if not self.force_stop:
self._checkPromiseList(local_partition) self._checkPromiseList(local_partition)
if not self.api_backward_compatibility: if not self.api_backward_compatibility:
self.slap.jio_api_connector({ self.slap.jio_api_connector.put({
"portal_type": "Software Instance", "portal_type": "Software Instance",
"reference": computer_partition.get("reference"), "reference": computer_partition.get("reference"),
"reported_state": "started" "reported_state": "started"
...@@ -1370,7 +1370,7 @@ stderr_logfile_backups=1 ...@@ -1370,7 +1370,7 @@ stderr_logfile_backups=1
local_partition.stop() local_partition.stop()
try: try:
if not self.api_backward_compatibility: if not self.api_backward_compatibility:
self.slap.jio_api_connector({ self.slap.jio_api_connector.put({
"portal_type": "Software Instance", "portal_type": "Software Instance",
"reference": computer_partition.get("reference"), "reference": computer_partition.get("reference"),
"reported_state": "stopped" "reported_state": "stopped"
...@@ -1391,7 +1391,7 @@ stderr_logfile_backups=1 ...@@ -1391,7 +1391,7 @@ stderr_logfile_backups=1
drop_entries=True) drop_entries=True)
try: try:
if not self.api_backward_compatibility: if not self.api_backward_compatibility:
self.slap.jio_api_connector({ self.slap.jio_api_connector.put({
"portal_type": "Software Instance", "portal_type": "Software Instance",
"reference": computer_partition.get("reference"), "reference": computer_partition.get("reference"),
"reported_state": "stopped" "reported_state": "stopped"
...@@ -1964,7 +1964,7 @@ stderr_logfile_backups=1 ...@@ -1964,7 +1964,7 @@ stderr_logfile_backups=1
local_partition._updateCertificate() local_partition._updateCertificate()
try: try:
if not self.api_backward_compatibility: if not self.api_backward_compatibility:
self.slap.jio_api_connector({ self.slap.jio_api_connector.put({
"portal_type": "Software Instance", "portal_type": "Software Instance",
"reference": computer_partition.get("reference"), "reference": computer_partition.get("reference"),
"reported_state": "started" "reported_state": "started"
...@@ -2001,7 +2001,7 @@ stderr_logfile_backups=1 ...@@ -2001,7 +2001,7 @@ stderr_logfile_backups=1
try: try:
if destroyed: if destroyed:
if not self.api_backward_compatibility: if not self.api_backward_compatibility:
self.slap.jio_api_connector({ self.slap.jio_api_connector.put({
"portal_type": "Software Instance", "portal_type": "Software Instance",
"reference": computer_partition.get("reference"), "reference": computer_partition.get("reference"),
"reported_state": "destroyed" "reported_state": "destroyed"
......
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