Reuse Resource from oslo

Class Resource from oslo is equal to code from cinderclient.
In the process of unification of the clients code we should
reuse common functionality from Oslo.

Related to blueprint common-client-library-2

Change-Id: If39e49ff739d659d145725966192acf81975c90c
Quotaset update does not return result

This patch adds the updated quota values to the output shell

Closes-Bug: #1316474
Change-Id: I95bbefa5fdee316a3a3ba77a5b3067345da3344f
Support pagination for volume list

Since v2 api supports pagination, we should add this support in
cinderclient too.

Change-Id: I9d4cb9e192523c14cf7df043deabe156dbb8e216
Closes-bug: 1325773
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
Merge "Reuse Resource from oslo"
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
Merge "Support pagination for volume list"
Merge "Avoid extra lookups in extra-specs-list"
Replace httpretty with requests-mock

Blueprint: http-mock-testing
Change-Id: I0cc96b54be6f32436e3c3b6a2edd0fc50e98d8e3
Convert snapshot tests to requests-mock

Blueprint: http-mock-testing
Change-Id: I06eae25cda6de9c266d34947471675fd95359739
convert availability zone tests to requests-mock

Blueprint: http-mock-testing
Change-Id: Ib02db9b9e24808d2f5eac42cf6f5b3c5ca123e9b
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
Updated from global requirements

Change-Id: I8d7b21b4ac55e9f02f067e31ad09a99b95180c4e
Merge "Fix order of arguments in assertEqual"
Merge "convert availability zone tests to requests-mock"
Merge "Updated from global requirements"
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
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
Merge "Add client support in Cinder for volume replication"
Cinder Client for Consistency Groups

This patch implements CLI commands for the Consistency Groups
feature. Only snapshots for CGs will be implemented in phase 1.

Change-Id: I447555fd8a92bceecf6f40be59030d65461e4cbb
Implements: blueprint consistency-groups