diff --git a/senlinclient/common/sdk.py b/senlinclient/common/sdk.py index c7461c82..e0ea4334 100644 --- a/senlinclient/common/sdk.py +++ b/senlinclient/common/sdk.py @@ -84,28 +84,6 @@ class Resource(base.Resource): These classes are here because the OpenStack SDK base version is making some assumptions about operations that cannot be satisfied in Senlin. ''' - @classmethod - def list_short(cls, session, path_args=None, **params): - '''Return a generator that will page through results of GET requests. - - This method bypasses the DB session support and retrieves list that - is directly exposed by server. - ''' - if not cls.allow_list: - raise exceptions.MethodNotSupported('list') - - if path_args: - url = cls.base_path % path_args - else: - url = cls.base_path - - resp = session.get(url, service=cls.service, params=params).body - if cls.resources_key: - resp = resp[cls.resources_key] - - for data in resp: - value = cls.existing(**data) - yield value def create(self, session, extra_attrs=False): """Create a remote resource from this instance. diff --git a/senlinclient/v1/client.py b/senlinclient/v1/client.py index 2940c05c..b2d83cab 100644 --- a/senlinclient/v1/client.py +++ b/senlinclient/v1/client.py @@ -47,13 +47,7 @@ class Client(object): def list(self, cls, **options): try: - return cls.list(self.session, **options) - except Exception as ex: - client_exc.parse_exception(ex) - - def list_short(self, cls, options=None): - try: - return cls.list_short(self.session, path_args=None, **options) + return cls.list(self.session, params=options) except Exception as ex: client_exc.parse_exception(ex) diff --git a/senlinclient/v1/shell.py b/senlinclient/v1/shell.py index abe05d65..885db232 100644 --- a/senlinclient/v1/shell.py +++ b/senlinclient/v1/shell.py @@ -37,7 +37,7 @@ def do_build_info(sc, args): def do_profile_type_list(sc, args): '''List the available profile types.''' - types = sc.list_short(models.ProfileType, {}) + types = sc.list(models.ProfileType, paginated=False) utils.print_list(types, ['name'], sortby_index=0) @@ -221,7 +221,7 @@ def do_profile_delete(sc, args): def do_policy_type_list(sc, args): '''List the available policy types.''' - types = sc.list_short(models.PolicyType, {}) + types = sc.list(models.PolicyType, paginated=False) utils.print_list(types, ['name'], sortby_index=0)