6a3988c73af1b0fc8c9a880eb26f8606ebd32ad2,perfkitbenchmarker/rackspace/rackspace_virtual_machine.py,RackspaceVirtualMachine,CreateKeyPair,#RackspaceVirtualMachine#,79

Before Change


                                         prefix="key-metadata") as tf:
            tf.write("%s\n" % (public_key))
            tf.flush()
            key_cmd = [FLAGS.nova_path]
            key_cmd.extend(util.GetDefaultRackspaceNovaFlags(self))
            key_cmd.extend(["keypair-add",
                           "--pub-key", tf.name])
            key_cmd.append(self.key_name)
            vm_util.IssueRetryableCommand(key_cmd)

    def DeleteKeyPair(self):
        Deletes the imported keyfile for an account.

After Change


          "There was a problem while retrieving machine_type"
          " information from the cloud provider.")

  def CreateKeyPair(self):
    Imports the public keyfile to Rackspace.
    with open(self.ssh_public_key) as f:
      public_key = f.read().rstrip("\n")

    with tempfile.NamedTemporaryFile(dir=vm_util.GetTempDir(),
                                     prefix="key-metadata") as tf:
      tf.write("%s\n" % public_key)
      tf.flush()
      env = os.environ.copy()
      env.update(util.GetDefaultRackspaceNovaEnv(self.zone))
      key_cmd = [
          FLAGS.nova_path, "keypair-add",
          "--pub-key", tf.name, self.key_name]

      vm_util.IssueRetryableCommand(key_cmd, env=env)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 12

Instances


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 6a3988c73af1b0fc8c9a880eb26f8606ebd32ad2
Time: 2015-07-01
Author: carlos.torres@rackspace.com
File Name: perfkitbenchmarker/rackspace/rackspace_virtual_machine.py
Class Name: RackspaceVirtualMachine
Method Name: CreateKeyPair


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 6a3988c73af1b0fc8c9a880eb26f8606ebd32ad2
Time: 2015-07-01
Author: carlos.torres@rackspace.com
File Name: perfkitbenchmarker/rackspace/rackspace_disk.py
Class Name: RackspaceDisk
Method Name: Attach


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 6a3988c73af1b0fc8c9a880eb26f8606ebd32ad2
Time: 2015-07-01
Author: carlos.torres@rackspace.com
File Name: perfkitbenchmarker/rackspace/rackspace_virtual_machine.py
Class Name: RackspaceVirtualMachine
Method Name: _Create