def __init__(self, endpoint): self.endpoint = endpoint self.client = client.RestClient(self.endpoint) self.entities_factory_cls = factory.get_cls_entity_factory( object_name=self.endpoint)
def __init__(self, endpoint): self.endpoint = endpoint self.client = client.RestClient(self.endpoint)
def roles(cls): """Return ACL roles.""" acr_url = "/".join([url.API, url.ACCESS_CONTROL_ROLES]) return client.RestClient("").get_object(acr_url).json()[ "{}_collection".format( url.ACCESS_CONTROL_ROLES)][url.ACCESS_CONTROL_ROLES]
def __init__(self, endpoint): self.endpoint = endpoint self.client = client.RestClient(self.endpoint) self.entities_factory_cls = factory.get_cls_entity_factory( object_name=objects.CUSTOM_ATTRIBUTES if endpoint == objects.EXTERNAL_CUSTOM_ATTRIBUTES else self.endpoint)
def global_roles(): """Get global roles as array of dicts""" global_roles_url = "/".join([url.API, url.GLOBAL_ROLES]) return client.RestClient().send_get(global_roles_url)[ "{}_collection".format(url.GLOBAL_ROLES)][url.GLOBAL_ROLES]