Пример #1
0
 def roles(cls):
     """Return ACL roles."""
     acr_url = "/".join([url.API, url.ACCESS_CONTROL_ROLES])
     return RestClient("").get_object(acr_url).json()[
         "{}_collection".format(
             url.ACCESS_CONTROL_ROLES)][url.ACCESS_CONTROL_ROLES]
Пример #2
0
def global_roles():
    """Get global roles as array of dicts"""
    global_roles_url = "/".join([url.API, url.GLOBAL_ROLES])
    return RestClient().send_get(global_roles_url)["{}_collection".format(
        url.GLOBAL_ROLES)][url.GLOBAL_ROLES]
Пример #3
0
 def __init__(self):
     self.client = RestClient(self.ENDPOINT)
     self._relationship = objects.get_singular(url.RELATIONSHIPS)
     self._object_owner = objects.get_singular(url.OBJECT_OWNERS)
     self._count = templates.COUNT
Пример #4
0
 def __init__(self):
   self.client = RestClient(self.ENDPOINT)
Пример #5
0
 def __init__(self, endpoint):
     self.endpoint = endpoint
     self.client = RestClient(self.endpoint)
     self.entities_factory_cls = factory.get_cls_entity_factory(
         object_name=self.endpoint)
Пример #6
0
 def __init__(self, endpoint):
     self.endpoint = endpoint
     self.client = RestClient(self.endpoint)