def detail(self, status=None, marker=None, limit=None, sort_key='id', sort_dir='asc', fields=None, project=None): """Retrieve a list of boards. :param status: Optional string value to get only board in that status. :param marker: pagination marker for large data sets. :param limit: maximum number of resources to return in a single result. This value cannot be larger than the value of max_limit in the [api] section of the ironic configuration, or only max_limit resources will be returned. :param sort_key: column to sort results by. Default: id. :param sort_dir: direction to sort. "asc" or "desc". Default: asc. :param project: Optional string value to get only boards of the project. :param fields: Optional, a list with a specified set of fields of the resource to be returned. """ cdict = pecan.request.context.to_policy_values() policy.authorize('iot:board:get', cdict, cdict) # /detail should only work against collections parent = pecan.request.path.split('/')[:-1][-1] if parent != "boards": raise exception.HTTPNotFound() return self._get_boards_collection(status, marker, limit, sort_key, sort_dir, project=project, fields=fields)
def detail(self, marker=None, limit=None, sort_key='id', sort_dir='asc', fields=None, with_public=False, all_plugins=False): """Retrieve a list of plugins. :param marker: pagination marker for large data sets. :param limit: maximum number of resources to return in a single result. This value cannot be larger than the value of max_limit in the [api] section of the ironic configuration, or only max_limit resources will be returned. :param sort_key: column to sort results by. Default: id. :param sort_dir: direction to sort. "asc" or "desc". Default: asc. :param with_public: Optional boolean to get also public pluings. :param all_plugins: Optional boolean to get all the pluings. Only for the admin :param fields: Optional, a list with a specified set of fields of the resource to be returned. """ cdict = pecan.request.context.to_policy_values() policy.authorize('iot:plugin:get', cdict, cdict) # /detail should only work against collections parent = pecan.request.path.split('/')[:-1][-1] if parent != "plugins": raise exception.HTTPNotFound() return self._get_plugins_collection(marker, limit, sort_key, sort_dir, with_public=with_public, all_plugins=all_plugins, fields=fields)