From 2f922aec05eedfc8849d559e6a11175e8a29fc9c Mon Sep 17 00:00:00 2001 From: "M. David Bennett" Date: Thu, 10 Jul 2014 15:40:46 -0500 Subject: [PATCH] Load novaclient modules --- pyrax/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyrax/__init__.py b/pyrax/__init__.py index 75b3f41e..b63526e5 100755 --- a/pyrax/__init__.py +++ b/pyrax/__init__.py @@ -56,6 +56,7 @@ from novaclient import exceptions as _cs_exceptions from novaclient import auth_plugin as _cs_auth_plugin + from novaclient.shell import OpenStackComputeShell as _cs_shell from novaclient.v1_1 import client as _cs_client from novaclient.v1_1.servers import Server as CloudServer @@ -660,10 +661,12 @@ def connect_to_cloudservers(region=None, context=None, **kwargs): # Service is not available return insecure = not get_setting("verify_ssl") + cs_shell = _cs_shell() + extensions = cs_shell._discover_extensions("1.1") cloudservers = _cs_client.Client(context.username, context.password, project_id=context.tenant_id, auth_url=context.auth_endpoint, auth_system=id_type, region_name=region, service_type="compute", - auth_plugin=auth_plugin, insecure=insecure, + auth_plugin=auth_plugin, insecure=insecure, extensions=extensions, http_log_debug=_http_debug, **kwargs) agt = cloudservers.client.USER_AGENT cloudservers.client.USER_AGENT = _make_agent_name(agt)