0d646d103590b367c28d1e9588edca610b361e1f,perfkitbenchmarker/providers/rackspace/rackspace_disk.py,RackspaceRemoteDisk,_Exists,#RackspaceRemoteDisk#,127
Before Change
def _Exists(self):
Returns true if the volume exists.
nova_env = os.environ.copy()
nova_env.update(util.GetDefaultRackspaceNovaEnv(self.zone))
getdisk_cmd = [FLAGS.nova_path, "volume-show", self.name]
stdout, _, _ = vm_util.IssueCommand(getdisk_cmd, env=nova_env)
if stdout.strip() == "":
return False
volume = util.ParseNovaTable(stdout)
return "status" in volume and volume["status"] == "available"
After Change
cmd.Issue()
self._WaitForRemoteDiskDeletion()
def _Exists(self):
if self.id is None:
return False
cmd = util.RackCLICommand(self, "block-storage", "volume", "get")
cmd.flags["id"] = self.id
stdout, stderr, _ = cmd.Issue(suppress_warning=True)
if stdout and stdout.strip():
return stdout
return not stderr
def Attach(self, vm):
self._AttachRemoteDisk(vm)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 20
Instances
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: 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: 0d646d103590b367c28d1e9588edca610b361e1f
Time: 2016-02-12
Author: carlos.torres@rackspace.com
File Name: perfkitbenchmarker/providers/rackspace/rackspace_disk.py
Class Name: RackspaceRemoteDisk
Method Name: _Delete
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