Commit Graph

7 Commits

Author SHA1 Message Date
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
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
LiuNanke 6d023a6bc2 Replace assertTrue(isinstance()) by optimal assert
assertTrue(isinstance(A, B)) or assertEqual(type(A), B) in tests
should be replaced by assertIsInstance(A, B) provided by testtools.

Change-Id: Ie4fe7b40e3f4350db94b350395269340ee6acf11
Related-bug: #1268480
2016-01-07 02:55:45 +08: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