Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
 def __init__(self, endpoint):
     self.endpoint = endpoint
     self.client = client.RestClient(self.endpoint)
Exemplo n.º 3
0
 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]
Exemplo n.º 4
0
 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)
Exemplo n.º 5
0
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]