From 2ecb39710f1fd9f6e5765e52d29953c2af44e714 Mon Sep 17 00:00:00 2001 From: chenke Date: Wed, 13 Mar 2019 20:27:37 +0800 Subject: [PATCH] Optimize limit option docs string description for novaclient Change-Id: I85ee36b0447869771782d1059957a46447940b59 --- novaclient/v2/flavors.py | 3 +++ novaclient/v2/hypervisors.py | 3 +++ novaclient/v2/instance_action.py | 3 +++ novaclient/v2/keypairs.py | 3 +++ novaclient/v2/migrations.py | 6 ++++++ novaclient/v2/server_groups.py | 3 +++ novaclient/v2/servers.py | 4 ++++ novaclient/v2/usage.py | 8 ++++++-- 8 files changed, 31 insertions(+), 2 deletions(-) diff --git a/novaclient/v2/flavors.py b/novaclient/v2/flavors.py index 9cc2b6433..803e226a0 100644 --- a/novaclient/v2/flavors.py +++ b/novaclient/v2/flavors.py @@ -116,6 +116,9 @@ class FlavorManager(base.ManagerWithFind): :param min_disk: Filters the flavors by a minimum disk space, in GiB. :param min_ram: Filters the flavors by a minimum RAM, in MiB. :param limit: maximum number of flavors to return (optional). + Note the API server has a configurable default limit. + If no limit is specified here or limit is larger than + default, the default limit will be used. :param sort_key: Flavors list sort key (optional). :param sort_dir: Flavors list sort direction (optional). :returns: list of :class:`Flavor`. diff --git a/novaclient/v2/hypervisors.py b/novaclient/v2/hypervisors.py index f457fa084..4b26bfc59 100644 --- a/novaclient/v2/hypervisors.py +++ b/novaclient/v2/hypervisors.py @@ -70,6 +70,9 @@ class HypervisorManager(base.ManagerWithFind): marker must be a UUID hypervisor ID. (optional). :param limit: maximum number of hypervisors to return (optional). + Note the API server has a configurable default limit. + If no limit is specified here or limit is larger than + default, the default limit will be used. """ return self._list_base(detailed=detailed, marker=marker, limit=limit) diff --git a/novaclient/v2/instance_action.py b/novaclient/v2/instance_action.py index 79f1b6173..d84c50f90 100644 --- a/novaclient/v2/instance_action.py +++ b/novaclient/v2/instance_action.py @@ -53,6 +53,9 @@ class InstanceActionManager(base.ManagerWithFind): list than that represented by this action request id (optional). :param limit: Maximum number of actions to return. (optional). + Note the API server has a configurable default limit. + If no limit is specified here or limit is larger than + default, the default limit will be used. :param changes_since: List only instance actions changed later or equal to a certain point of time. The provided time should be an ISO 8061 formatted time. diff --git a/novaclient/v2/keypairs.py b/novaclient/v2/keypairs.py index 08c5ea39e..9b2e73b71 100644 --- a/novaclient/v2/keypairs.py +++ b/novaclient/v2/keypairs.py @@ -185,6 +185,9 @@ class KeypairManager(base.ManagerWithFind): keypair list than that represented by this keypair name (optional). :param limit: maximum number of keypairs to return (optional). + Note the API server has a configurable default limit. + If no limit is specified here or limit is larger than + default, the default limit will be used. """ params = {} if user_id: diff --git a/novaclient/v2/migrations.py b/novaclient/v2/migrations.py index f1954f1ab..ab62f2c5d 100644 --- a/novaclient/v2/migrations.py +++ b/novaclient/v2/migrations.py @@ -70,6 +70,9 @@ class MigrationManager(base.ManagerWithFind): migrations list than that represented by this migration UUID (optional). :param limit: maximum number of migrations to return (optional). + Note the API server has a configurable default limit. If no limit is + specified here or limit is larger than default, the default limit will + be used. :param changes_since: only return migrations changed later or equal to a certain point of time. The provided time should be an ISO 8061 formatted time. e.g. 2016-03-04T06:27:59Z . (optional). @@ -92,6 +95,9 @@ class MigrationManager(base.ManagerWithFind): migrations list than that represented by this migration UUID (optional). :param limit: maximum number of migrations to return (optional). + Note the API server has a configurable default limit. If no limit is + specified here or limit is larger than default, the default limit will + be used. :param changes_since: Only return migrations changed later or equal to a certain point of time. The provided time should be an ISO 8061 formatted time. e.g. 2016-03-04T06:27:59Z . (optional). diff --git a/novaclient/v2/server_groups.py b/novaclient/v2/server_groups.py index e8839ae59..bc66b01a2 100644 --- a/novaclient/v2/server_groups.py +++ b/novaclient/v2/server_groups.py @@ -51,6 +51,9 @@ class ServerGroupsManager(base.ManagerWithFind): :param all_projects: Lists server groups for all projects. (optional) :param limit: Maximum number of server groups to return. (optional) + Note the API server has a configurable default limit. + If no limit is specified here or limit is larger than + default, the default limit will be used. :param offset: Use with `limit` to return a slice of server groups. `offset` is where to start in the groups list. (optional) diff --git a/novaclient/v2/servers.py b/novaclient/v2/servers.py index a37c1b387..44c77ffa3 100644 --- a/novaclient/v2/servers.py +++ b/novaclient/v2/servers.py @@ -832,6 +832,10 @@ class ServerManager(base.BootingManagerWithFind): :param marker: Begin returning servers that appear later in the server list than that represented by this server id (optional). :param limit: Maximum number of servers to return (optional). + Note the API server has a configurable default limit. + If no limit is specified here or limit is larger than + default, the default limit will be used. + If limit == -1, all servers will be returned. :param sort_keys: List of sort keys :param sort_dirs: List of sort directions diff --git a/novaclient/v2/usage.py b/novaclient/v2/usage.py index abbeca692..32fc55085 100644 --- a/novaclient/v2/usage.py +++ b/novaclient/v2/usage.py @@ -87,7 +87,9 @@ class UsageManager(base.ManagerWithFind): later in the instance list than that represented by this instance UUID (optional). :param limit: Maximum number of instances to include in the usage - (optional). + (optional). Note the API server has a configurable + default limit. If no limit is specified here or limit + is larger than default, the default limit will be used. :rtype: list of :class:`Usage`. """ query_string = self._usage_query(start, end, marker, limit, detailed) @@ -120,7 +122,9 @@ class UsageManager(base.ManagerWithFind): later in the instance list than that represented by this instance UUID (optional). :param limit: Maximum number of instances to include in the usage - (optional). + (optional). Note the API server has a configurable + default limit. If no limit is specified here or limit + is larger than default, the default limit will be used. :rtype: :class:`Usage` """ query_string = self._usage_query(start, end, marker, limit)