# The uuid of the admin nova tenant
# nova_admin_tenant_id =
+# The name of the admin nova tenant. If the uuid of the admin nova tenant
+# is set, this is optional. Useful for cases where the uuid of the admin
+# nova tenant is not available when configuration is being done.
+# nova_admin_tenant_name =
+
# Password for connection to nova in admin context.
# nova_admin_password =
secret=True),
cfg.StrOpt('nova_admin_tenant_id',
help=_('The uuid of the admin nova tenant')),
+ cfg.StrOpt('nova_admin_tenant_name',
+ help=_('The name of the admin nova tenant')),
cfg.StrOpt('nova_admin_auth_url',
default='http://localhost:5000/v2.0',
help=_('Authorization URL for connecting to nova in admin '
def __init__(self):
# TODO(arosen): we need to cache the endpoints and figure out
# how to deal with different regions here....
- bypass_url = "%s/%s" % (cfg.CONF.nova_url,
- cfg.CONF.nova_admin_tenant_id)
+ if cfg.CONF.nova_admin_tenant_id:
+ bypass_url = "%s/%s" % (cfg.CONF.nova_url,
+ cfg.CONF.nova_admin_tenant_id)
+ else:
+ bypass_url = None
+
self.nclient = nclient.Client(
username=cfg.CONF.nova_admin_username,
api_key=cfg.CONF.nova_admin_password,
- project_id=None,
+ project_id=cfg.CONF.nova_admin_tenant_name,
tenant_id=cfg.CONF.nova_admin_tenant_id,
auth_url=cfg.CONF.nova_admin_auth_url,
cacert=cfg.CONF.nova_ca_certificates_file,