def __init__(self, **kwargs): """Initialize a new client for the Keystone v2.0 API.""" if not kwargs.get('session'): warnings.warn( 'Constructing an instance of the ' 'keystoneclient.v2_0.client.Client class without a session is ' 'deprecated as of the 1.7.0 release and may be removed in ' 'the 2.0.0 release.', DeprecationWarning) super(Client, self).__init__(**kwargs) self.certificates = certificates.CertificatesManager(self._adapter) self.endpoints = endpoints.EndpointManager(self._adapter) self.extensions = extensions.ExtensionManager(self._adapter) self.roles = roles.RoleManager(self._adapter) self.services = services.ServiceManager(self._adapter) self.tokens = tokens.TokenManager(self._adapter) self.users = users.UserManager(self._adapter, self.roles) self.tenants = tenants.TenantManager(self._adapter, self.roles, self.users) # extensions self.ec2 = ec2.CredentialsManager(self._adapter) # DEPRECATED: if session is passed then we go to the new behaviour of # authenticating on the first required call. if not kwargs.get('session') and self.management_url is None: self.authenticate()
def __init__(self, *args, **kwargs): super(V2IdentityClient, self).__init__(*args, **kwargs) self.endpoints = v2endpoints.EndpointManager(self) self.roles = v2roles.RoleManager(self) self.services = v2services.ServiceManager(self) self.tenants = v2tenants.TenantManager(self) self.tokens = v2tokens.TokenManager(self) self.users = v2users.UserManager(self)
def __init__(self, http_client, **kwargs): """ Initialize a new client for the Keystone v2.0 API. """ super(IdentityAdminClient, self).__init__(http_client) self.endpoints = endpoints.EndpointManager(self) self.roles = roles.RoleManager(self) self.services = services.ServiceManager(self) self.tenants = tenants.TenantManager(self) self.tokens = tokens.TokenManager(self) self.users = users.UserManager(self) # extensions self.ec2 = ec2.CredentialsManager(self)
def __init__(self, endpoint=None, **kwargs): """ Initialize a new client for the Keystone v2.0 API. """ super(Client, self).__init__(endpoint=endpoint, **kwargs) self.roles = roles.RoleManager(self) self.services = services.ServiceManager(self) self.tenants = tenants.TenantManager(self) self.tokens = tokens.TokenManager(self) self.users = users.UserManager(self) # NOTE(gabriel): If we have a pre-defined endpoint then we can # get away with lazy auth. Otherwise auth immediately. if endpoint is None: self.authenticate() else: self.management_url = endpoint
def __init__(self, **kwargs): """ Initialize a new client for the Keystone v2.0 API. """ super(Client, self).__init__(**kwargs) self.endpoints = endpoints.EndpointManager(self) self.roles = roles.RoleManager(self) self.services = services.ServiceManager(self) self.tenants = tenants.TenantManager(self) self.tokens = tokens.TokenManager(self) self.users = users.UserManager(self) # extensions self.ec2 = ec2.CredentialsManager(self) if self.management_url is None: self.authenticate()
def __init__(self, **kwargs): """Initialize a new client for the Keystone v2.0 API.""" super(Client, self).__init__(**kwargs) self.endpoints = endpoints.EndpointManager(self) self.roles = roles.RoleManager(self) self.services = services.ServiceManager(self) self.tenants = tenants.TenantManager(self) self.tokens = tokens.TokenManager(self) self.users = users.UserManager(self) # extensions self.ec2 = ec2.CredentialsManager(self) # DEPRECATED: if session is passed then we go to the new behaviour of # authenticating on the first required call. if not kwargs.get('session') and self.management_url is None: self.authenticate()
def __init__(self, **kwargs): """Initialize a new client for the Keystone v2.0 API.""" if not kwargs.get('session'): warnings.warn( 'Constructing an instance of the ' 'keystoneclient.v2_0.client.Client class without a session is ' 'deprecated as of the 1.7.0 release and may be removed in ' 'the 2.0.0 release.', DeprecationWarning) # NOTE(knasim-wrs): As per US76645, the Keystone adminURL # is no longer an internal address since it needs to be # accessible via remote Openstack client. Things get # complicated with HTTPS where the internal keystone client # gets this adminURL and cannot connect to Keystone server # as it cannot verify the SSL certificate. # We will check for this condition here, if OS_ENDPOINT_TYPE # is not publicURL then this is an internal access scenario and # Keystone client will be set to SSL insecure mode if os.environ.get('OS_ENDPOINT_TYPE') == 'internalURL': kwargs['insecure'] = True # disable verbose insecurity warnings urllib3_disable_warnings(InsecureRequestWarning) super(Client, self).__init__(**kwargs) self.certificates = certificates.CertificatesManager(self._adapter) self.endpoints = endpoints.EndpointManager(self._adapter) self.extensions = extensions.ExtensionManager(self._adapter) self.roles = roles.RoleManager(self._adapter) self.services = services.ServiceManager(self._adapter) self.tokens = tokens.TokenManager(self._adapter) self.users = users.UserManager(self._adapter, self.roles) self.tenants = tenants.TenantManager(self._adapter, self.roles, self.users) # extensions self.ec2 = ec2.CredentialsManager(self._adapter) # DEPRECATED: if session is passed then we go to the new behaviour of # authenticating on the first required call. if not kwargs.get('session') and self.management_url is None: self.authenticate()