0d646d103590b367c28d1e9588edca610b361e1f,perfkitbenchmarker/providers/rackspace/rackspace_disk.py,RackspaceRemoteDisk,_Create,#RackspaceRemoteDisk#,103
Before Change
def _Create(self):
Creates the volume.
nova_env = os.environ.copy()
nova_env.update(util.GetDefaultRackspaceNovaEnv(self.zone))
create_cmd = [
FLAGS.nova_path,
"volume-create",
"--display-name", self.name,
"--volume-type", DISK_TYPE[self.disk_type],
str(self.disk_size)]
stdout, _, _ = vm_util.IssueCommand(create_cmd, env=nova_env)
volume = util.ParseNovaTable(stdout)
if "id" in volume and volume["id"]:
self.id = volume["id"]
else:
After Change
self.media = media
self.id = None
def _Create(self):
cmd = util.RackCLICommand(self, "block-storage", "volume", "create")
cmd.flags["size"] = self.disk_size
cmd.flags["name"] = self.name
cmd.flags["volume-type"] = REMOTE_TYPES_TRANSLATION[self.media]
stdout, stderr, _ = cmd.Issue()
resp = json.loads(stdout)
self.id = resp["ID"]
def _Delete(self):
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: _Create
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: _PostCreate
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: _Create
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: AddMetadata