The keystoneclient provides an adapter which maintains the client state
around the session. We should re-use this rather than copy it and it
also means we will get new adapter functions and parameters as they
become available.
Change-Id: I05c0d650dcdd69f7e77a06563d735efe521a41ae
Metadata as a parameter is supported by the underlying cinder driver.
This is not exposed by the python client. It is helpful to store additional information
for snapshots and can be used for decision within cinder driver during snapshot creation.
Similar functionality exists for volume creation in cinder client and cinder driver.
Updating cli(shell) to accomodate the new metadata parameter
Adding above change for v2
Change-Id: I002221efea1b9994da4a8d200544a88b0ed26277
Closes-Bug: #1341424
Provide Cinder client support to manage volume replication.
Cinder-specs available at https://review.openstack.org/#/c/98308/
Change-Id: Id60bacbcc113d42730e822b29b2fa78be94d3276
Implements: blueprint volume-replication
Some tests used incorrect order assertEqual(observed, expected).
The correct order expected by testtools is...
def assertEqual(self, expected, observed, message=''):
"""Assert that 'expected' is equal to 'observed'.
:param expected: The expected value.
:param observed: The observed value.
:param message: An optional message to include in the error.
"""
The string length of the sum of the results of repr(expected) and
repr(observed) is greater than 70, then, MismatchError message is
changed, as below.
Ex.:
raise mismatch_error
MismatchError: !=:
reference = '_123456789_123456789_bar'
actual = '_123456789_123456789_123456789_123456789_123456789'
Change-Id: Id02ddfb2ca03df7f432cff67a7bed182cccc4924
Closes-Bug: #1259292
extra-specs-list used to use the extra-specs cinder extension
to get information on volume type extra specs. This information
is publicly available through the volume-type API [1] thus we
can avoid the extra-lookups of querying the extra-specs extension.
As the extra-spec info is publicly available, remove the part of
the docstring of cinder extra-specs-list that says 'admin only'.
[1] http://docs.openstack.org/api/openstack-block-storage/2.0/content/GET_getVolumeTypes__v2__tenant_id__types_Volume_Types.html
Change-Id: I9a8256a044511ac5233d8170fc57118ccaa1e217
Closes-Bug: 1343876
Since v2 api supports pagination, we should add this support in
cinderclient too.
Change-Id: I9d4cb9e192523c14cf7df043deabe156dbb8e216
Closes-bug: 1325773
This change looks for the use of 'password' in the data that
is sent and uses mask_password() to remove the actual password
text. This change will prevent debug output that is being
saved from saving passwords.
A test case is added to verify that password output is being removed.
Change-Id: I93bde838ea21101df08c0e824d9f9457ed2ad077
Closes-Bug: 1341735
Adding channels to a logger is not the responsibility of a library. This
sort of thing should be handled by an application so move the logging
over to the shell.
Change-Id: Ie11571d428913eba1aae5aa42a6e925228ba6808
Currently, the command reset-state return code is zero if it
failed for any of volumes, it should be nonzero.
Change-Id: Ic6da238861fd003375003399bc6def6bf860a015
Closes-Bug: #1339643
The current developer docs theme used is out of sync with the other
openstack projects. This patch will update the docs to provide a more
consistent look and feel when using developer docs
Change-Id: I9fd11b61d4404ba2627569074dc86ee0ddf0f96a
The python-requests documentation indicates that the
ConnectionError exception can be raised for reasons other than
"connection refused". Let's just say "error" rather than
implying the wrong type of failure.
Change-Id: I2205e27c7c68164db430cdfdc71b57b3002b24be
Add a tox job to make it easier for developers to generate their
own docs before submitting a patch.
Change-Id: Icbfd5ee5556a9c344ebe9ca7f4b579a87ad2d01b
Currently, cinder client does not retry when connections to cinder
service is refused. There are many legitimate scenarios under which
retry should be attempted:
1) cinder service being restarted;
2) cinder service is running on multiple API nodes behind a LB, which
might be temporarily overwhelmed or being maintained.
In any scenario, retry with a backoff timer does not seem to hurt.
Change-Id: I3c290c59fa67262c4a3473815b4380ee39e24332
Closes-Bug: 1347843
Add manage and unmanage commands.
Cinder code: https://review.openstack.org/#/c/72501
See also adding support for "bootable" flag for volume manage,
and changing the LVM backend to use the source-volume-name key
as part of the existing-ref structure, to make the CLI easier
to use:
https://review.openstack.org/#/c/108488/
Implements: blueprint add-export-import-volumes
Change-Id: I27d0d3396d80063a51b0fe56d2d3c92931fa9c6c
This commit syncs the latest strutils code into
python-cinderclient. The motivation for this sync is to get
access to the mask_password function that was added with commit
cb5a804b .
The sync touches both the strutils.py and gettextutils.py files.
The detailed breakdown of the sync is as follows:
Current HEAD in OSLO:
-----------------------------------
commit 5fa2dae429a9e37dfd1a527eb3957cea57a3e8c4
Merge: 5fb12c2 0506d17
Author: Jenkins <jenkins@review.openstack.org>
Date: Tue Jul 15 10:05:12 2014 +0000
Merge "cfgfilter has graduated, remove it"
-----------------------------------
Changes to strutils.py (newest to oldest):
-----------------------------------
cb5a804b Move `mask_password` to strutils
8a0f5678 Remove str() from LOG.* and exceptions
fd18c288 Fix safe_encode(): return bytes on Python 3
302c7c80 strutils: Allow safe_{encode,decode} to take bytes as input
bec3a5eb Implements SI/IEC unit system conversion to bytes
Changest to gettextutils.py (newest to oldest):
-----------------------------------
3d90045d Backport code for i18n to check lazy at runtime
de4adbc4 pep8: fixed multiple violations
9912e5df Add API for creating translation functions
6cc96d05 Fix test_gettextutils on Python 3
fd33d1ea Fix gettextutil.Message handling of deep copy failures
047b2e4e Change lazy translation to retain complete dict
6d55e26a Add support for translating log levels separately
Change-Id: Icc38bc97e47c8236ccb82283c246bf266bc62929
Related-Bug: 1341735
This patch makes optional the parameter size
for creating a volume from a snapshot or other
volume.
The parameter is still required for other
kind of volume creation.
Change-Id: I75dcf0e647f6e82a2407bcf23ef359f5f87323e8
Closes-Bug: #1304463
Replace assertTrue(a in b) with assertIn(a, b)
Replace assertTrue(a in [b, c]) with assertIn(a, [b, c])
Replace assertTrue(a is None) with assertIsNone(a)
Replace assertTrue(a == b) with assertEqual(a, b)
Replace assertFalse(a == b) with assertNotEqual(a, b)
Change-Id: I10c3abce14953b97568a5ce9d45f63af22d71ac3
Passing mutable objects as default args is a known Python pitfall.
We'd better avoid this. This commit changes mutable default args with
None.
Change-Id: I7817c92069d32d1926e185ca0d0ab14e738b8b3d
V3Client support added version discovery and session supports. Most
of the external auth system doesn't support this. This fix bypasses
version discovery if the idenity service doesn't support that. Session
is used only if no external auth plugin is used
Change-Id: Ia84a2ad45940d35c5ef740727f5f7477c72ea9d4
Closes-Bug: #1333961
Add the tenant uuid to the output when running cinder list --all-tenants,
since this is an admin command any way, it would help to list the tenant
UUID so we do not have to run cinder show to see the tenant uuid when we
have further queries to run.
Change-Id: I661789e957fa00947c4d5595f7e0515c27963735
Closes-bug: 1333257