Пример #1
0
 def list(cls, api=None):
     """Return a :class:`ChefQuery` with the available objects of this type.
     """
     api = api or ChefAPI.get_global()
     cls._check_api_version(api)
     names = [
         name for name, url in six.iteritems(api[cls.url])
         if Group.include(name)
     ]
     return ChefQuery(cls, names, api)
 def list(cls, api=None):
     api = api or ChefAPI.get_global()
     names = [name for name, url in api[cls.url].iteritems()]
     return ChefQuery(cls, names, api)
Пример #3
0
 def list(cls, api=None):
     api = api or ChefAPI.get_global()
     names = [name for name, url in six.iteritems(api[cls.url])]
     return ChefQuery(cls, names, api, data=self.keys)