Merge "[nova_helper] get keypair name by every admin users"

This commit is contained in:
Jenkins
2016-05-13 06:33:42 +00:00
committed by Gerrit Code Review

View File

@@ -87,7 +87,6 @@ class NovaHelper(object):
return False return False
else: else:
host_name = getattr(instance, "OS-EXT-SRV-ATTR:host") host_name = getattr(instance, "OS-EXT-SRV-ATTR:host")
# https://bugs.launchpad.net/nova/+bug/1182965
LOG.debug( LOG.debug(
"Instance %s found on host '%s'." % (instance_id, host_name)) "Instance %s found on host '%s'." % (instance_id, host_name))
@@ -532,16 +531,12 @@ class NovaHelper(object):
"Trying to create new instance '%s' " "Trying to create new instance '%s' "
"from image '%s' with flavor '%s' ..." % ( "from image '%s' with flavor '%s' ..." % (
inst_name, image_id, flavor_name)) inst_name, image_id, flavor_name))
# TODO(jed) wait feature
# Allow admin users to view any keypair try:
# https://bugs.launchpad.net/nova/+bug/1182965 self.nova.keypairs.findall(name=keypair_name)
if not self.nova.keypairs.findall(name=keypair_name): except nvexceptions.NotFound:
LOG.debug("Key pair '%s' not found with user '%s'" % ( LOG.debug("Key pair '%s' not found " % keypair_name)
keypair_name, self.user))
return return
else:
LOG.debug("Key pair '%s' found with user '%s'" % (
keypair_name, self.user))
try: try:
image = self.nova.images.get(image_id) image = self.nova.images.get(image_id)