a08e235ce3b4f01780897e90ac44832052c3858d,perfkitbenchmarker/providers/openstack/os_virtual_machine.py,OpenStackVirtualMachine,_CheckImage,#OpenStackVirtualMachine#,169

Before Change


  def _CheckImage(self):
    Tries to get image, if found continues execution otherwise aborts.
    cmd = os_utils.OpenStackCLICommand(self, "image", "show", self.image)
    stdout, stderr, _ = cmd.Issue()
    if stderr:
      raise errors.Config.InvalidValue(" ".join(
          ("Image %s could not be found." % self.image,
           "For valid image IDs/names run "openstack image list".",)))

  def _CheckFlavor(self):
    Tries to get flavor, if found continues execution otherwise aborts.
    cmd = os_utils.OpenStackCLICommand(self, "flavor", "show",
                                       self.machine_type)

After Change


  def _CheckImage(self):
    Tries to get image, if found continues execution otherwise aborts.
    cmd = os_utils.OpenStackCLICommand(self, "image", "show", self.image)
    msg = " ".join(
        ("Image %s could not be found." % self.image,
         "For valid image IDs/names run "openstack image list".",))
    self._IssueCommandCheck(cmd, msg)

  def _CheckFlavor(self):
    Tries to get flavor, if found continues execution otherwise aborts.
    cmd = os_utils.OpenStackCLICommand(self, "flavor", "show",
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 6

Non-data size: 12

Instances


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: a08e235ce3b4f01780897e90ac44832052c3858d
Time: 2016-06-29
Author: victor.estrada@rackspace.com
File Name: perfkitbenchmarker/providers/openstack/os_virtual_machine.py
Class Name: OpenStackVirtualMachine
Method Name: _CheckImage


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 1dd13ccb1798662b155d1d33367f4d9d433fab0c
Time: 2016-06-29
Author: victor.estrada@rackspace.com
File Name: perfkitbenchmarker/providers/openstack/os_virtual_machine.py
Class Name: OpenStackVirtualMachine
Method Name: _CheckImage


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: a08e235ce3b4f01780897e90ac44832052c3858d
Time: 2016-06-29
Author: victor.estrada@rackspace.com
File Name: perfkitbenchmarker/providers/openstack/os_virtual_machine.py
Class Name: OpenStackVirtualMachine
Method Name: _CheckFlavor


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 1dd13ccb1798662b155d1d33367f4d9d433fab0c
Time: 2016-06-29
Author: victor.estrada@rackspace.com
File Name: perfkitbenchmarker/providers/openstack/os_virtual_machine.py
Class Name: OpenStackVirtualMachine
Method Name: _CheckFlavor


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: a08e235ce3b4f01780897e90ac44832052c3858d
Time: 2016-06-29
Author: victor.estrada@rackspace.com
File Name: perfkitbenchmarker/providers/openstack/os_virtual_machine.py
Class Name: OpenStackVirtualMachine
Method Name: _CheckNetworkExists


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 1dd13ccb1798662b155d1d33367f4d9d433fab0c
Time: 2016-06-29
Author: victor.estrada@rackspace.com
File Name: perfkitbenchmarker/providers/openstack/os_virtual_machine.py
Class Name: OpenStackVirtualMachine
Method Name: _CheckNetworkExists