flavor = get_flavor_by_name(nova, instance_settings.flavor)
if not flavor:
- raise Exception(
- 'Flavor not found with name - %s',
- instance_settings.flavor)
+ raise NovaException(
+ 'Flavor not found with name - %s', instance_settings.flavor)
image = glance_utils.get_image(glance, image_settings.name)
if image:
return VmInst(name=server.name, inst_id=server.id,
networks=server.networks)
else:
- raise Exception(
+ raise NovaException(
'Cannot create instance, image cannot be located with name %s',
image_settings.name)
"""
vm = get_latest_server_os_object(nova, vm)
vm.add_floating_ip(floating_ip.ip, ip_addr)
+
+
+class NovaException(Exception):
+ """
+ Exception when calls to the Keystone client cannot be served properly
+ """