38184fca0234ef4da34b84497b2cd0f4009a9c5b,perfkitbenchmarker/providers/aws/aws_managed_relational_db.py,AwsManagedRelationalDb,_IsInstanceReady,#AwsManagedRelationalDb#Any#Any#,480
Before Change
True if the resource was ready in time, False if the wait timed out
or an Exception occurred.
cmd = util.AWS_PREFIX + [
"rds",
"describe-db-instances",
"--db-instance-identifier=%s" % instance_id,
"--region=%s" % self.region
]
start_time = datetime.datetime.now()
while True:
if (datetime.datetime.now() - start_time).seconds >= timeout:
logging.exception("Timeout waiting for sql instance to be ready")
return False
stdout, _, _ = vm_util.IssueCommand(cmd, suppress_warning=True)
try:
json_output = json.loads(stdout)
state = json_output["DBInstances"][0]["DBInstanceStatus"]
After Change
state = json_output["DBInstances"][0]["DBInstanceStatus"]
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:
logging.exception("Error attempting to read stdout. Creation failure.")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 38184fca0234ef4da34b84497b2cd0f4009a9c5b
Time: 2018-03-08
Author: nathante@google.com
File Name: perfkitbenchmarker/providers/aws/aws_managed_relational_db.py
Class Name: AwsManagedRelationalDb
Method Name: _IsInstanceReady
Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 4da37abc3937edf62249daa010f5e522c6c04fd4
Time: 2018-03-07
Author: tohaowu@google.com
File Name: perfkitbenchmarker/providers/aws/aws_managed_relational_db.py
Class Name: AwsManagedRelationalDb
Method Name: _IsInstanceReady
Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 4a66d8672dce4d4859f03dea572833eaa003ede6
Time: 2017-10-30
Author: ehankland@google.com
File Name: perfkitbenchmarker/windows_virtual_machine.py
Class Name: WindowsMixin
Method Name: RemoteCommand