def __init__(self, auth_attr, region_name=None): super(OpenstackClients, self).__init__() self.keystone_plugin = keystone.Keystone() self.heat_client = None self.keystone_client = None self.region_name = region_name self.auth_attr = auth_attr
def get_mistral_client(self, auth_dict): if not auth_dict: LOG.warning("auth dict required to instantiate mistral client") raise EnvironmentError('auth dict required for' ' mistral workflow driver') return mistral_client.MistralClient( keystone.Keystone().initialize_client('2', **auth_dict), auth_dict['token']).get_client()
def validate_keystone_auth_url(auth_url, verify): keystone_obj = keystone.Keystone() auth_url = utils.get_auth_url_v3(auth_url) try: return keystone_obj.get_version(auth_url, verify) except Exception as e: LOG.error('Keystone Auth URL invalid') raise nfvo.VimConnectionException(message=str(e))
def __init__(self, auth_attr, region_name=None): super(OpenstackClients, self).__init__() self.keystone_plugin = keystone.Keystone() self.heat_client = None self.mistral_client = None self.keystone_client = None self.region_name = region_name if auth_attr: # Note(tpatil): In vnflcm, auth_attr contains region information # which should be popped before creating the keystoneclient. auth_attr = copy.deepcopy(auth_attr) auth_attr.pop('region', None) self.auth_attr = auth_attr
def __init__(self): self.keystone = keystone.Keystone() self.keystone.create_key_dir(CONF.vim_keys.openstack)
def get_mistral_client(auth_dict): return mistral_client.MistralClient( keystone.Keystone().initialize_client('2', **auth_dict), auth_dict['token']).get_client()
def __init__(self, vim_connection_info, version=None): super(OpenstackSdkConnection, self).__init__() self.keystone_plugin = keystone.Keystone() self.connection = self.openstack_connection(vim_connection_info, version)