stdout, _, _ = vm_util.IssueCommand(cmd, suppress_warning=True)
try:
json_output = json.loads(stdout)
state = json_output["DBInstances"][0]["DBInstanceStatus"]
logging.info("Instance state: {0}".format(state))
if state == "available":
self._SavePrimaryAndSecondaryZones(json_output)
After Change
pending_values = json_output["DBInstances"][0]["PendingModifiedValues"]
logging.info("Instance state: %s", state)
if pending_values:
logging.info("Pending values: %s", (str(pending_values)))
if state == "available" and not pending_values:
break
except: