diff --git a/openstack/resource.py b/openstack/resource.py index 3f410f64..022eee0d 100644 --- a/openstack/resource.py +++ b/openstack/resource.py @@ -706,7 +706,7 @@ class Resource(collections.MutableMapping): more_data = False @classmethod - def page(cls, session, limit, marker=None, path_args=None, **params): + def page(cls, session, limit=None, marker=None, path_args=None, **params): """Get a one page response. This method gets starting at ``marker`` with a maximum of ``limit`` @@ -714,7 +714,8 @@ class Resource(collections.MutableMapping): :param session: The session to use for making this request. :type session: :class:`~openstack.session.Session` - :param limit: The maximum amount of results to retrieve. + :param limit: The maximum amount of results to retrieve. The default + is to retrieve as many results as the service allows. :param marker: The position in the list to begin requests from. The type of value to use for ``marker`` depends on the API being called. @@ -724,7 +725,7 @@ class Resource(collections.MutableMapping): :param dict params: Parameters to be passed into the underlying :meth:`~openstack.session.Session.get` method. - :return: An array of :class:`Resource` objects. + :return: A list of dictionaries returned in the response body. """ filters = {} diff --git a/openstack/tests/test_resource.py b/openstack/tests/test_resource.py index cd4b0a59..0c9aca3c 100644 --- a/openstack/tests/test_resource.py +++ b/openstack/tests/test_resource.py @@ -361,7 +361,7 @@ class ResourceTests(base.TestTransportBase): path = fake_path session.get.assert_called_with(path, params={}, service=None) - objs = FakeResource.page(session, None, None) + objs = FakeResource.page(session) self.assertEqual(records, objs) path = fake_base_path