Commit Graph

9 Commits

Author SHA1 Message Date
chenke 2ecb39710f Optimize limit option docs string description for novaclient
Change-Id: I85ee36b0447869771782d1059957a46447940b59
2019-05-17 11:01:30 +08:00
Yikun Jiang 6c398058a6 Microversion 2.64 - Use new format policy in server group
Added support for microversion 2.64, which includes the
following changes:

- The ``--rule`` option is added to the
``nova server-group-create`` CLI that enables user to create
server group with specific policy rules.

- Remove ``metadata`` column in the output of
``nova server-group-create``, ``nova server-group-get``,
``nova server-group-list``.

- Remove ``policies`` column, , add ``policy`` and ``rules``
columns in the output of ``nova server-group-create``,
``nova server-group-get``, ``nova server-group-list``.

Depends-On: 3cd26f1e68b09ba7925e794ac8912566c239b6df
blueprint: complex-anti-affinity-policies

Change-Id: I903f4b5544806b9d3c8bac529448abbc9dd3cee9
2018-07-18 10:30:00 -04:00
Yikun Jiang 50460bddfc Use utils.prepare_query_string instead of duplicated code
There are some duplicated code in nova client for generating
query string.

The 'prepare_query_string' method can convert dict params to
query string(it transforms the dict to a sequence of two-element
tuples in fixed order, then the encoded string will be consistent
in Python 2&3.)

This patch use utils.prepare_query_string instead of these and
plus some notes in the 'prepare_query_string' method.

Change-Id: Idb3c5e97f8bbcd5ec5446f776c10fa8c84b54d5d
Closes-Bug: 1727968
2017-11-22 13:35:27 +00:00
Andrey Kurilin 773aea23b8 Explicitly specify arguments of server_groups creation
Create API call expectes two parameters - name and policies[*]. It is not a
complex structure, so there is no reason to support kwargs. It is better to
specify explicitly all expected parameters.

PS: removing support of kwargs is "backward compatible", since we have
validation at API side and usage of additional parameters was an error
previously.

[*] - https://developer.openstack.org/api-ref/compute/?expanded=create-server-group-detail

Change-Id: I8b40b0db450287bbc5ee8d69834aa764353dbd98
2017-03-28 15:53:44 +03:00
int32bit 50d83a4de2 Add limit and offset to server-groups list
Via `limit` and `offset` arguments, Nova API now support pagination
to display server groups. But our novaclient hasn't implemented yet
in current version. This patch introduce `--limit` and `--offset`
options to `nova server-group-list` subcommand, which can make up for
the above issue.

Change-Id: I371d4c2e74a8e6bfc8a7529de35668490cb0e44d
Closes-Bug: #1648835
2016-12-14 23:46:24 +08:00
Rui Chen 51306fc4c9 Fix ServerGroup.NAME_ATTR
Finding by specify server group name failed in ServerGroupsManager.find(),
ServerGroup.NAME_ATTR is "server_group_name" currently, but NAME_ATTR
should be "name", because only "name" attribute exists in ServerGroup
object, not "server_group_name".

Change-Id: Id6b7676d14e6283d856a069da5ff287dc3228386
Closes-Bug: #1563301
2016-04-01 10:02:11 +00:00
Takashi NATSUME 0414bab3d3 Add return-request-id-to-caller function(3/5)
Add return-request-id-to-caller function to
resources and resource managers in the following files.
The methods in the resource class and resource manager return
a wrapper class that has 'request_ids' property.
The caller can get request ids of the callee via the property.

* novaclient/v2/keypairs.py
* novaclient/v2/limits.py
* novaclient/v2/networks.py
* novaclient/v2/quota_classes.py
* novaclient/v2/quotas.py
* novaclient/v2/security_group_default_rules.py
* novaclient/v2/security_group_rules.py
* novaclient/v2/security_groups.py
* novaclient/v2/server_groups.py
* novaclient/v2/services.py
* novaclient/v2/usage.py
* novaclient/v2/versions.py

Co-authored-by: Ankit Agrawal <ankit11.agrawal@nttdata.com>
Change-Id: I9203f70a0eef5686b590fbff35563f2cf8b6f586
Implements: blueprint return-request-id-to-caller
2016-01-28 11:22:00 +00:00
Rui Chen 9cfecf922a server-group-list support 'all_projects' parameter
Supporting 'all_projects' in server-group-list so that
admin users can list other tenant's server groups.

Change-Id: Ie50288464ebc6585590a1a74efa8804584771ebc
Closes-Bug: #1454523
2015-05-13 16:32:42 +08:00
Andrey Kurilin 0a60aae852 Rename v1_1 to v2
Module novaclient.v1_1 is used as implementation of V1.1, V2 and V3.
Since future development(microversioning) will be done across V2,
implementation should be done in appropriate module(to prevent misleading).

Despite the fact that implementation for all versions are equal, discover
method for contrib path worked only for v1.1. This patch fixes this bug and
modifies shell tests to check all versions.

Change-Id: Ib6798f4dfe177586302141f522dc593560ce6a5b
2015-02-04 17:40:46 +02:00