As per code, the 'status', 'user_id' and 'project_id' parameter
is not required to be passed in the request body in case of group
and group_snapshot create APIs. Even if you pass these parameter,
it is silently ignored in the code.
This patch removes those parameters passed in the request body.
Change-Id: I29e7d4c8a3eee52f4ea7278d2edf2c7deec40628
In v3/shell.py do_backup_update(), the metadata through
'args.metadata' is a list, like this: 'metadata': [u'k1=v1'].
But we need a metadata dict like this: 'metadata': {"k1": "v1"}.
So call the right method shell_utils.extract_metadata()
to get metadata from args.
Change-Id: I82cb96b1f89b4009d4b3f4a0e64db076a7a04977
In order for Nova to be able to make use of the code
for shared_targets that has gone into Cinder we need to
bump to API Version to 3.48.
This bumps to 3.48 to match the latest add to the Cinder side:
https://review.openstack.org/#/c/524697/1
Change-Id: Icaa17654bd2810098d02f8074fedb35c5221cd55
This patch adds create volume from backup support
in cinderclient.
Change-Id: I01dbcf6b113d88732c174b848be2127ee7242b3c
Implements: blueprint support-create-volume-from-backup
Depends-On: 58d0fb327f9fc980e0c8b84dcd9f64c093285d13
Bump max version in client directly as
the client changes are not needed.
1. 3.46: support create bootable volume from nova
0 size image.
Change-Id: Ib0cf2d88e55006c10b873327ccc85dca2dd09769
Add 'with_count' parameter in list
volume, snapshot and backup APIs.
Change-Id: I2b7b41b3579c24703a7a67ab5dc6f960a3ccbdc2
Partial-Implements: bp add-amount-info-in-list-api
Remove unnecessary 'end_version' which was
added in patch [1].
[1]: 2255fc99da9752737dcaa96ae4507b646074afb2
Change-Id: If014ba9c12bf662ef23ebf17decfa59273c63944
3.45 has landed, but it's not the expected change.
This reverts commit 664299b235be69ae35670d96fb70e62836b9b5b0.
Change-Id: I39e93c6078871f8652889cf8a46c1af6962288e4
Cinder volume services will perform cleanup on start, but when we have
multiple volume services grouped in a cluster, we may want to trigger
cleanup of services that are down.
This patch adds command `work-cleanup` to trigger server cleanups and
prints service nodes that will be cleaned and those that didn't have an
alternative service in the cluster to do the cleanup.
This command will only work on servers supporting API version 3.24 or
higher.
New command:
cinder work-cleanup [--cluster <cluster-name>] [--host <hostname>]
[--binary <binary>]
[--is-up <True|true|False|false>]
[--disabled <True|true|False|false>]
[--resource-id <resource-id>]
[--resource-type <Volume|Snapshot>]
Specs: https://specs.openstack.org/openstack/cinder-specs/specs/newton/ha-aa-cleanup.html
Change-Id: I1c33ffbffcb14f34ee2bda9042e706937b1147d7
Depends-On: If336b6569b171846954ed6eb73f5a4314c6c7e2e
Implements: blueprint cinder-volume-active-active-support
This patch adds support for API microversion 3.17, which allows us to
pass --cluster optional argument to volume and snapshot manage listings.
Implements: blueprint cinder-volume-active-active-support
Change-Id: I97b5f2e9960d5a1f140fc638804dbc631d63ff9d
This patch adds support for API microversion 3.16, which allows us to
pass --cluster optional argument to migration and manage operations.
For this, a new type of CLI argument is added, the mutually exclusive
arguments that can be used similarly to the utils.arg decorator, but
with utils.exclusive_arg decorator.
Implements: blueprint cinder-volume-active-active-support
Change-Id: If004715b9887d2a0f9fc630b44d6e11a4a8b778d
Constructing the Adapter with the default_microversion kwarg causes the
Adapter to handle setting the appropriate Openstack-API-Version header.
With this change set, SessionClient now uses the api_version kwarg to
set default_microversion instead of setting the header explicitly.
Change-Id: I5de721fa373f5d3adb42ddb4b5598f19aabfff3b
Adding a shared_targets field to Volumes in Cinder. This doesn't
require any changes in the client, however we do need to bump the
MAX MV support value.
Show volumes now returns two new fields that will be displayed in
the show command:
shared_targets: <True|False>
backend_name: <backend-name-of-storage-device>
Change-Id: Ie1291f90756c3752de562f022126af2f6b3e0637
We have a gap in the microversions implemented in the cinderclient
and the MAX version being reported by the client.
One of those is the addition of "user_id" in the snapshot list
response. This patch adds that with the appropriate version
checking. Note that the Max version has already been updated,
but there are a few implementations missing.
Change-Id: Ia8bdb46b46091a89996e404825466430b8906d18
Partial-Bug: #1715759
The attachment-complete method didn't include the version
checking. This patch adds that and adds a couple of tests.
Change-Id: I63dba6ee6d56bb63a79f3ad2ef3412ebd9c1ce07
Closes-Bug: #1715732
We have a gap in the micro versions implemented in the cinderclient
and the MAX version being reported by the client.
This patch addresses the missing changes for micro version 3.43
which adds support for metadata for backup create and update.
Change-Id: I14c7205784c53ec3ab0985a4460a88f59de171fb
Partial-Bug: #1715759
The attachment_ids in the volume info returned by show volume
were incorrect. It was showing the volume_id, not the actual
attachment_id. This fix changes the attachment_ids returned by show
volume to correctly reflect the attachment_id.
Also, added a unit test for this, and added an attachment_id
to the fake volume so that other tests wouldn't now fail.
Closes-Bug: #1713082
Change-Id: I9ec36af5dd460d03d786aeeb3cc36a869c19ff62
The 'message' attribute has been deprecated and removed from Python3.
Use six.text_type(e) instead of e.message. For more details, please
check [1]:
[1] https://www.python.org/dev/peps/pep-0352/
Change-Id: Ibd4e7f5fefa6b1dfb6258c5eacfa53cd3485d22c
F811 is a little noisy with api_versions.wraps()
decorated methods, but opting to disable it in these
cases seems better than missing problems in the rest
of the code.
Change-Id: I9c46938ab2a442e55f96b5ab6c119c4475afaecd
These are caught by F811, but that test is
currently disabled because it fails on
@api_versions.wraps() decorated methods.
Just clean up these errors for now.
Change-Id: I42aed024352f798ebafddeb6f12880d8726360fe
The new attachment_update method in Cinder's API creates an attachment
object and populates it with the provided connector info. In addition,
we set the volumes status to in-use and update the attachment object
status to "attached".
This isn't really accurate though, because we don't know if the volume
is actually attached (connected) by the consumer or not. Also a big
side effect here is that currently all of our tests and automation
use volume-status to determine if a volume is fully connected/ready
for use and that everything went well. It's used as an ack in most
cases.
This change goes back to using multiple states to signify where a
an attachment is in it's life-cycle:
1. attachment_create
We've created an empty attachment record but haven't done anything
with it yet.
2. attachment_update
We provided a connector and set up the TGT so that everything is
ready for a consumer to connect/use it.
3. attachment_complete
An ACK back from the consumer letting us know that they connected
it successfully and are doing their thing.
It would be cool to just key all these checks of the attachment object itself,
and just use attachment_update to do so, maybe in the future?
Change-Id: I3b28d2cb89a8d81c7cdec425f355c78bfdfe3450
Related-Bug: #1710295
Right now only deprecated OS_AUTH_SYSTEM environmental variable works to
set the authentication to noauth, the reason is that we have multiple
arguments writing on the same destination.
This patch fixes this by making both arguments have the same default
value, which is to use environmental variable OS_AUTH_TYPE if it has a
value or deprecated OS_AUTH_SYSTEM if not.
Closes-Bug: #1708687
Change-Id: I478fb0e628d4bebd4a1dc78c2559202916aa051f
get_highest_client_server_version should work with any endpoint type:
cinder-api with eventlet, uWSGI, etc.
This patch is based on python-novaclient patch [1]. In a future, we can
deprecate get_highest_client_server_version in flavor of keystoneauth
descovery feature.
[1] Icba858b496855e2ffd71b35168e8057b28236119
Closes-Bug: #1708188
Change-Id: I9acf6dc84c32b25bfe3254eb0f97248736498d32
Enforce ordering of imports with H306.
For tests, this is mostly done by grouping test
imports after other cinderclient imports.
Change-Id: Ie40fda014d1aedb057e5b4ea1f27f999c84e6373
In the file cinderclient/shell.py, packages requests and six
are double imported. This patch is to clean the redundant code.
Change-Id: I4bade57753a50245df1b4b82c4a8708d3b0acdba
--profile argument can be loaded from OS_PROFILE environment variables
to avoid repeating --profile in client commands.
Co-Authored-By: Hieu LE <hieulq@vn.fujitsu.com>
Change-Id: Ia9b469024395327ec0ee082ddaea3234fc3ca5a6