def _get_barbicanclient(self): if not self.barbican_client: self.barbican_client = barbican_client_v1.Client( session=self._get_keystone_session(PLATFORM_CONFIG), interface='internalURL', region_name=cfg.CONF[OPENSTACK_CONFIG].barbican_region_name) return self.barbican_client
def _create(self): interface = self._get_client_option(CLIENT_NAME, 'endpoint_type') client = barbican_client.Client(session=self.context.keystone_session, service_type=self.KEY_MANAGER, interface=interface, region_name=self._get_region_name()) return client
def _get_barbicanclient(self): if not self.barbican_client: self.barbican_client = barbican_client_v1.Client( session=self._get_keystone_session(), auth_url=self.auth_url, endpoint_type='internalURL', region_name=cfg.CONF.KEYSTONE_AUTHTOKEN.barbican_region_name) return self.barbican_client
def _get_barbicanclient(self, service_config=PLATFORM_CONFIG): client = self._get_cached_barbican_client(service_config) if not client: client = barbican_client_v1.Client( session=self._get_keystone_session(service_config), interface='internalURL', region_name=cfg.CONF[OPENSTACK_CONFIG].barbican_region_name) self._set_cached_barbican_client(service_config, client) return client
def barbican(self): if self._barbican: return self._barbican endpoint_type = self._get_client_option('barbican', 'endpoint_type') region_name = self._get_client_option('barbican', 'region_name') endpoint = self.url_for(service_type='key-manager', interface=endpoint_type, region_name=region_name) session = self.keystone().session self._barbican = barbicanclient.Client(session=session, endpoint=endpoint) return self._barbican