547 Commits

Author SHA1 Message Date
Jenkins
4162c9ff5c Merge "Add client support in Cinder for volume replication" 2014-09-05 03:32:33 +00:00
Jamie Lennox
84af49ce97 Use adapter from keystoneclient
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
2014-09-02 12:38:03 +10:00
Subhadeep De
4a7014a46e Ability to pass metadata during snapshot create
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
2014-08-29 00:09:43 -07:00
Jenkins
8e87c0b600 Merge "Updated from global requirements" 2014-08-29 01:25:54 +00:00
Jenkins
7bd8eb2aac Merge "convert availability zone tests to requests-mock" 2014-08-28 20:00:46 +00:00
Jenkins
3113ce8d23 Merge "Fix order of arguments in assertEqual" 2014-08-28 16:47:27 +00:00
OpenStack Proposal Bot
dc8e21da3d Updated from global requirements
Change-Id: I8d7b21b4ac55e9f02f067e31ad09a99b95180c4e
2014-08-28 05:42:05 +00:00
Ronen Kat
953ac3ec6d Add client support in Cinder for volume replication
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
2014-08-27 06:38:50 +03:00
Jamie Lennox
49c2c64304 convert availability zone tests to requests-mock
Blueprint: http-mock-testing
Change-Id: Ib02db9b9e24808d2f5eac42cf6f5b3c5ca123e9b
2014-08-25 16:15:26 +10:00
Jamie Lennox
8f23885ca3 Convert snapshot tests to requests-mock
Blueprint: http-mock-testing
Change-Id: I06eae25cda6de9c266d34947471675fd95359739
2014-08-25 16:15:26 +10:00
Jamie Lennox
44f842b1b9 Replace httpretty with requests-mock
Blueprint: http-mock-testing
Change-Id: I0cc96b54be6f32436e3c3b6a2edd0fc50e98d8e3
2014-08-25 16:15:26 +10:00
Jenkins
0c5f0a92b4 Merge "Avoid extra lookups in extra-specs-list" 2014-08-23 15:27:05 +00:00
Jenkins
09422b600e Merge "Support pagination for volume list" 2014-08-21 11:47:55 +00:00
KIYOHIRO ADACHI
f3ec081497 Fix order of arguments in assertEqual
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
2014-08-18 13:41:21 +09:00
Jenkins
b8e6ad0108 Merge "Reuse Resource from oslo" 2014-08-16 13:58:18 +00:00
Jenkins
6603a40db6 Merge "Use suitable assert" 2014-08-06 04:26:39 +00:00
JordanP
6565e275fd Avoid extra lookups in extra-specs-list
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
2014-08-05 11:28:09 +02:00
Jenkins
d77b6f8287 Merge "Update theme for docs" 2014-08-04 08:10:00 +00:00
Jenkins
c9e7818f3f Merge "Change "Connection refused" to "Connection error"" 2014-08-03 18:41:37 +00:00
Jenkins
eb49204980 Merge "Add a tox job for generating docs" 2014-08-03 17:14:08 +00:00
Jenkins
88ee3b385c Merge "Fix the return code of the command reset-state" 2014-08-03 17:14:06 +00:00
Jenkins
d5c5bacb67 Merge "Mask passwords in client debug output" 2014-08-02 16:31:32 +00:00
liyingjun
f7e9ece40b Support pagination for volume list
Since v2 api supports pagination, we should add this support in
cinderclient too.

Change-Id: I9d4cb9e192523c14cf7df043deabe156dbb8e216
Closes-bug: 1325773
2014-08-02 00:08:08 +08:00
Jenkins
6823b18404 Merge "sync latest strutils to python-cinderclient" 2014-07-30 20:45:21 +00:00
Jenkins
172d0ea018 Merge "Add tenant uuid when running cinder list --all-tenants" 2014-07-30 19:01:34 +00:00
Jay S. Bryant
80582f2b86 Mask passwords in client debug output
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
2014-07-30 13:43:32 -05:00
Jamie Lennox
b4acbd2586 Move debug logging to shell
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
2014-07-29 12:26:33 -06:00
Juan Manuel Olle
02b32c8aed Quotaset update does not return result
This patch adds the updated quota values to the output shell

Closes-Bug: #1316474
Change-Id: I95bbefa5fdee316a3a3ba77a5b3067345da3344f
2014-07-29 17:56:07 +00:00
Zhengguang
bf8fa0b606 Fix the return code of the command reset-state
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
2014-07-28 09:08:36 -04:00
Steve Martinelli
34adf358ca Update theme for docs
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
2014-07-24 20:45:01 -04:00
Jenkins
14a5aa045a Merge "Retry when connection to cinder is refused" 2014-07-25 00:31:28 +00:00
Eric Harney
20060b102a Change "Connection refused" to "Connection error"
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
2014-07-24 17:40:03 -04:00
Steve Martinelli
a4f290374a Add a tox job for generating docs
Add a tox job to make it easier for developers to generate their
own docs before submitting a patch.

Change-Id: Icbfd5ee5556a9c344ebe9ca7f4b579a87ad2d01b
2014-07-24 17:24:04 -04:00
Jenkins
ba826fbf3c Merge "Add commands for managing and unmanaging volumes" 2014-07-24 19:06:06 +00:00
Jenkins
15cbd66138 Merge "Optional size parameter for volume creation" 2014-07-24 16:01:34 +00:00
Xu Chen
fd8aa39458 Retry when connection to cinder is refused
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
2014-07-24 11:31:13 -04:00
Geraint North
4d3b9bcea3 Add commands for managing and unmanaging volumes
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
2014-07-24 11:16:57 +01:00
Matt Thompson
cebd81ef9b Fix comment in tearDown()
This minor change fixes two typos in the tearDown() method.

Change-Id: Ie99c671cbfdaed01715046ea65d49e09114b1e08
2014-07-23 12:35:33 +00:00
Jenkins
0c4010e7fb Merge "Add set-bootable command" 2014-07-16 22:30:28 +00:00
Jay S. Bryant
2274089dc6 sync latest strutils to python-cinderclient
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
2014-07-16 16:51:30 -05:00
Jenkins
da4117f71c Merge "Mark cinderclient as being a universal wheel" 2014-07-13 23:25:42 +00:00
Jenkins
37879ba13f Merge "Remove dependent module py3kcompat" 2014-07-11 05:10:20 +00:00
Juan Manuel Olle
bd361644f7 Optional size parameter for volume creation
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
2014-07-08 17:51:15 -03:00
liuqing
32373cc5fb Use suitable assert
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
2014-07-09 00:07:48 +08:00
liuqing
31a7ae54f6 Use immutable arg rather mutable arg
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
2014-07-03 15:06:51 +08:00
Haneef Ali
b4906c855f Fix version discovery and auth_plugins
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
2014-07-01 09:22:06 -07:00
liuqing
05d92328f0 Add CONTRIBUTING.rst
There is no CONTRIBUTING.rst file, so i add it.

Change-Id: I92150e79f76559f90dd0341fdd6f5b0fa2d54e32
2014-07-01 14:53:54 +08:00
Jenkins
67a5f72378 Merge "Remove deprecated command-line args" 2014-07-01 04:51:12 +00:00
Jenkins
9485337b0e Merge "Use region_name in service catalog" 2014-06-30 09:31:23 +00:00
liyingjun
ae04b4b099 Add tenant uuid when running cinder list --all-tenants
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
2014-06-27 03:29:27 +08:00