mixcoatl/admin/role.py
def all(cls, keys_only=False, endpoint=None, **kwargs):
        """Get all roles

        .. note::

            The keys used to make the request determine results visibility

        :param keys_only: Only return :attr:`role_id` instead of :class:`Group` objects
        :type keys_only: bool.
        :param detail: The level of detail to return - `basic` or `extended`
        :type detail: str.
        :param account_id: List roles with mappings to groups in the specified account
        :type account_id: int.
        :param group_id: Provides the role associated with the specified group
        :type group_id: int.
        :returns: `list` of :attr:`role_id` or :class:`Role`
        :raises: :class:`RoleException`
        """
        r = Resource(cls.PATH, endpoint=endpoint)
        params = {}

        if 'detail' in kwargs:
            r.request_details = kwargs['detail']
        else:
            r.request_details = 'basic'

        if 'account_id' in kwargs:
            params['account_id'] = kwargs['account_id']

        if 'group_id' in kwargs:
            params['group_id'] = kwargs['group_id']

        x = r.get(params=params)
        if r.last_error is None:
            if keys_only is True:
                return [i[camelize(cls.PRIMARY_KEY)] for i in x[cls.COLLECTION_NAME]]
            else:
                return [type(cls.__name__, (object,), i) for i in uncamel_keys(x)[cls.COLLECTION_NAME]]
        else:
            raise RoleException(r.last_error)
Get all roles

        .. note::

            The keys used to make the request determine results visibility

        :param keys_only: Only return :attr:`role_id` instead of :class:`Group` objects
        :type keys_only: bool.
        :param detail: The level of detail to return - `basic` or `extended`
        :type detail: str.
        :param account_id: List roles with mappings to groups in the specified account
        :type account_id: int.
        :param group_id: Provides the role associated with the specified group
        :type group_id: int.
        :returns: `list` of :attr:`role_id` or :class:`Role`
        :raises: :class:`RoleException`
        
Get all roles
note:.

The keys used to make the request determine results visibility
Get all roles note : . The keys used to make the request determine results visibility
def all(cls, keys_only=False, endpoint=None, **kwargs):
        r = Resource(cls.PATH, endpoint=endpoint)
        params = {}
        if 'detail' in kwargs:
            r.request_details = kwargs['detail']
        else:
            r.request_details = 'basic'
        if 'account_id' in kwargs:
            params['account_id'] = kwargs['account_id']
        if 'group_id' in kwargs:
            params['group_id'] = kwargs['group_id']
        x = r.get(params=params)
        if r.last_error is None:
            if keys_only is True:
                return [i[camelize(cls.PRIMARY_KEY)] for i in x[cls.COLLECTION_NAME]]
            else:
                return [type(cls.__name__, (object,), i) for i in uncamel_keys(x)[cls.COLLECTION_NAME]]
        else:
            raise RoleException(r.last_error)
def all ( cls , keys_only = False , endpoint = None , ** kwargs ) : r = Resource ( cls . PATH , endpoint = endpoint ) params = { } if 'detail' in kwargs : r . request_details = kwargs [ 'detail' ] else : r . request_details = 'basic' if 'account_id' in kwargs : params [ 'account_id' ] = kwargs [ 'account_id' ] if 'group_id' in kwargs : params [ 'group_id' ] = kwargs [ 'group_id' ] x = r . get ( params = params ) if r . last_error is None : if keys_only is True : return [ i [ camelize ( cls . PRIMARY_KEY ) ] for i in x [ cls . COLLECTION_NAME ] ] else : return [ type ( cls . __name__ , ( object , ) , i ) for i in uncamel_keys ( x ) [ cls . COLLECTION_NAME ] ] else : raise RoleException ( r . last_error )
Get all roles
.. note::
Get all roles .. note ::
"""Get all roles

        .. note::

            The keys used to make the request determine results visibility

        :param keys_only: Only return :attr:`role_id` instead of :class:`Group` objects
        :type keys_only: bool.
        :param detail: The level of detail to return - `basic` or `extended`
        :type detail: str.
        :param account_id: List roles with mappings to groups in the specified account
        :type account_id: int.
        :param group_id: Provides the role associated with the specified group
        :type group_id: int.
        :returns: `list` of :attr:`role_id` or :class:`Role`
        :raises: :class:`RoleException`
        """
`list` of :attr:`role_id` or :class:`Role`
` list ` of : attr : ` role_id ` or : class : ` Role `
None
cls
keys_only
Only return :attr:`role_id` instead of :class:`Group` objects
Only return : attr : ` role_id ` instead of : class : ` Group ` objects
endpoint
detail
The level of detail to return - `basic` or `extended`
The level of detail to return - ` basic ` or ` extended `
account_id
List roles with mappings to groups in the specified account
List roles with mappings to groups in the specified account
group_id
Provides the role associated with the specified group
Provides the role associated with the specified group