0d646d103590b367c28d1e9588edca610b361e1f,perfkitbenchmarker/providers/rackspace/rackspace_virtual_machine.py,RackspaceVirtualMachine,_Exists,#RackspaceVirtualMachine#,195

Before Change


    if stdout.strip() == "":
        return False
    instance = util.ParseNovaTable(stdout)
    return (instance.get("OS-EXT-STS:task_state") == "deleting" or
            instance.get("status") == "ACTIVE")

  def _GetFlavorDetails(self):
    Retrieves details about the flavor used to build the instance.

After Change


    Returns true if the VM exists otherwise returns false.
    if self.id is None:
      return False
    get_cmd = util.RackCLICommand(self, "servers", "instance", "get")
    get_cmd.flags["id"] = self.id
    stdout, _, _ = get_cmd.Issue(suppress_warning=True)
    try:
      resp = json.loads(stdout)
    except ValueError:
      return False
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 0d646d103590b367c28d1e9588edca610b361e1f
Time: 2016-02-12
Author: carlos.torres@rackspace.com
File Name: perfkitbenchmarker/providers/rackspace/rackspace_virtual_machine.py
Class Name: RackspaceVirtualMachine
Method Name: _Exists


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 0d646d103590b367c28d1e9588edca610b361e1f
Time: 2016-02-12
Author: carlos.torres@rackspace.com
File Name: perfkitbenchmarker/providers/rackspace/rackspace_disk.py
Class Name: RackspaceRemoteDisk
Method Name: _Exists


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: af164f572888a7ebdd2e6d297f6e35d98d598e53
Time: 2021-03-15
Author: tohaowu@google.com
File Name: perfkitbenchmarker/providers/gcp/gce_virtual_machine.py
Class Name: GceVirtualMachine
Method Name: UpdateInterruptibleVmStatus