478 Commits

Author SHA1 Message Date
git-harry
ac9ef2bd12 Remove cinderclient/tests from coverage report
Currently coverage reports on coverage of the tests themselves. This
makes the percentage coverage higher than if they are excluded and
therefore distorts the reports values for the codes as a whole.

This commit updates the .coveragerc files to remove
cinderclient/tests/* from the coverage report.

Change-Id: If7f1765017f3f0d55975219b12ff7bf149146931
2014-11-25 15:14:09 +00:00
Jenkins
d6f4ab3c96 Merge "Fixed typos found by RETF rules" 2014-11-25 03:02:01 +00:00
Jenkins
f5a4e59467 Merge "Adds tty password entry for cinderclient" 2014-11-20 05:30:24 +00:00
Jenkins
9c53495d0a Merge "Don't git ignore .mailmap and .testr.conf" 2014-11-18 16:06:57 +00:00
Jenkins
331ddfd379 Merge "Remove Python 2.4 compat shim" 2014-11-18 16:06:48 +00:00
Rushi Agrawal
542a675568 Remove unused methods from utils.py
Most of these methods were imported when we forked away from
python-novaclient, but over the course of time, their existence
became redundant as no file seems to be importing them. Such
methods are removed in this change.

Change-Id: Ic93fc92ce624eefaeaca6de5c8fd965e88159030
2014-11-17 16:33:07 +05:30
Christine Wang
a6b434ee05 cinderclient does not retry with TimeoutException
Added retry support when encounter requests.exceptions.Timeout
during HTTP request.

Closes-Bug: #1379505

Change-Id: I6253a109c3a76dd2f15c96a349da68936f9bfff4
2014-10-24 11:57:42 -04:00
John Trowbridge
122bf5bdcc Adds tty password entry for cinderclient
Added functionality from keystoneclient to fallback to the tty for password
entry if no password is given via the environment or the --os-password option.

Change-Id: If5b27cb8c67712860faa24d543ed48eaa542f28b
Closes-Bug: 1357559
2014-10-24 15:43:04 +00:00
Jenkins
8428ffd099 Merge "Fix volume name support of unmanage and replication commands" 2014-10-14 20:31:35 +00:00
Jenkins
5502db716c Merge "Stop using intersphinx" 2014-10-14 20:20:10 +00:00
Eric Harney
d202875661 Don't git ignore .mailmap and .testr.conf
These should have been whitelisted in the prior
gitignore change.

Change-Id: I21dce6256991c773f7a167f8e15499763db5eb3c
2014-10-09 15:22:49 -04:00
Jenkins
f5d090844a Merge "gitignore /.*" 2014-10-09 01:11:18 +00:00
Eric Harney
e76f06b83a gitignore /.*
Ignore all dotfiles in the base dir of the tree except for
.gitignore.

This should solve the "ignore my IDE's files" problem in a
general way.

Change-Id: I689220b303d24c65c5fe9523eadc8ad48a93737f
2014-10-08 17:00:51 -04:00
Boris Pavlovic
6f5fd37ee9 Add profiling support to cinderclient
To be able to create profiling traces for Cinder, client should be
able to send special HTTP header that contains trace info.

This patch is as well important to be able to make cross project
traces. (Typical case nova calls cinder via python client, if
profiler is initialized in nova, cinder client will add extra
header, that will be parsed by special osprofiler middleware in cinder
api)

Don't worry no security issue here, trace information is signed by HMAC
key that is setted in api-paste.ini. So only person that knows HMAC key
is able to send proper header.

Main patch (in Cinder) is:
https://review.openstack.org/#/c/103415/

Change-Id: I53bb1b92e62841a02f941bdafaed7f8ed5db7ce1
2014-10-08 19:30:10 +04:00
Jenkins
892b739f4a Merge "Add swap and it's variants to gitignore" 2014-10-03 01:33:26 +00:00
Mitsuhiro Tanino
20df1cb7a7 Fix volume name support of unmanage and replication commands
Volume not found error occurs when running these commands via cinderclient
with volume name as an argument.
unmanage, replication-promote, replication-reenable

However in their help text, it is described that Name and ID are supported.
Therefore, this patch fixes volume name support to their argument.

Closes-bug: #1374211
Change-Id: I8b90523d8e79a65eb27ff4e99820e8cb3feb3120
2014-10-02 15:24:01 -04:00
John Griffith
1cb1350d16 Simplify cinder manage command args
The 'cinder manage' command argumenst are kind of a disaster.
The positionals are <host> <id> where <id> is undefined/free form
K/V pairs.  On top of it we then have --source-name and --source-id
optional arguments available.  There absolutely no way to tell from
the help what one should be entering here without referring to the
code, and even then it's not quite clear how the options work and
which one will be used.

To clean this up, change the positionals to <host> <identifier>
where both are strings.  Remove --source-name and --source-id
and consolidate those options with --id-type.

id-type will allow a user to specify the type of identifier
(source-name, source-id, or whatever), but defaults to
source-name which is most commonly used currently.

* NOTE *
Ideally we'd just do away with the designator source-name/source-id
altogether and just have an <identifier> positional arg.  Each driver
would then be responsible for figuring out what was passed an how to
deal with it.  This however requires changes in all of the drivers and
broader changes on the Cinder side which I don't think are warranted
during RC.

During Kilo we should clean all of this up, but for now at least the
syntax is somewhat ready for human consumption and a bit easier than
what we introduced.

Change-Id: I07696648ae647f17ab9180cd87b25f8cb888f5d6
Closes-Bug: 1376311
2014-10-02 14:58:19 +00:00
John Griffith
41f5835475 Add swap and it's variants to gitignore
^^  Nuf said

Change-Id: I5d62cf5fb09a997923acbe4d847da7d171b3ce3f
2014-10-01 14:34:13 -06:00
Jenkins
26e19ff186 Merge "Docstring of unmanage subcommand is missing" 2014-10-01 15:24:48 +00:00
Jenkins
5922af5441 Merge "Ability to pass metadata during snapshot create" 2014-09-30 03:47:30 +00:00
Mitsuhiro Tanino
1dc808124b Docstring of unmanage subcommand is missing
cinder unmanage is missing docstring.
This patch adds description of unmanage to python-cinderclient.

Closes-Bug: #1373662
Change-Id: I3ae8ee714507b82c661360e86136dab5ef461ce3
2014-09-24 20:03:58 -04:00
John Griffith
ac9b091390 Update version to 1.1.1 in index
Prep for new tag

Change-Id: I49f8f7fcc2647dc09e38fee1fa5068df714a8d83
2014-09-23 18:18:26 -06:00
Eric Harney
5bf13e1e2b Remove Python 2.4 compat shim
It's clear that we aren't testing against Python 2.4 (not
supported by dependencies like six) and no other client
projects have this, so we should drop it.

Change-Id: I14108964c0261d9144ced16cee7101d14ca7e644
2014-09-19 10:35:35 -04:00
git-harry
36dd138aa6 Enables debug mode for keystone session object
This fixes the lack of debug messages introduced by commit 84af49c.

Change-Id: I7bf3e98c21f09bd4f3c2d5d3bc372f60d717c9d5
Closes-bug: #1370152
2014-09-18 17:14:19 +01:00
Andreas Jaeger
b03d1e1f4c Stop using intersphinx
Remove intersphinx from the docs build as it triggers network calls that
occasionally fail, and we don't really use intersphinx (links other
sphinx documents out on the internet)

This also removes the requirement for internet access during docs build.

This can cause docs jobs to fail if the project errors out on
warnings.

Change-Id: I71e941e2a639641a662a163c682eb86d51de42fb
Related-Bug: #1368910
2014-09-13 09:40:00 +02:00
Jenkins
4c8464114f Merge "Update index file for release of 1.1.0" 2014-09-12 09:36:23 +00:00
Jenkins
d904b6509a Merge "Make <volume-types> required option for create cg" 2014-09-12 08:41:57 +00:00
Xing Yang
40f06b8be5 Make <volume-types> required option for create cg
Change-Id: I101ec89ab95cedd8b55247301c1c3b9cba2645c5
2014-09-10 13:58:46 -04:00
John Griffith
6055e2d7ec Update index file for release of 1.1.0
Change-Id: I75bbf1cf88fb516409f0ed30b962af7e5ac6236e
2014-09-10 08:55:38 -06:00
Jenkins
9bd8c5dff9 Merge "Use adapter from keystoneclient" 2014-09-09 16:01:33 +00:00
Jenkins
6f6d828795 Merge "Cinder Client for Consistency Groups" 2014-09-09 07:17:30 +00:00
Jenkins
42d13be346 Merge "Quotaset update does not return result" 2014-09-08 20:26:05 +00:00
Xing Yang
9fc64a52b1 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
2014-09-08 10:37:04 -04:00
Christian Berendt
17e4d6c381 Fixed typos found by RETF rules
Rules are available at
https://en.wikipedia.org/wiki/Wikipedia:AutoWikiBrowser/Typos

Change-Id: I8de0631346b703870ce8ebe9ce728a0360f1ba7f
2014-09-08 11:31:22 +00:00
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