152 Commits

Author SHA1 Message Date
Your Name
c7456c675f Improve share list API filtering
1) Added new params for filtering by:
- share network
- snapshot
- volume type
- host
- limit and offset a la pagination
- project id (useful with '--all-tenants')
- metadata*
- extra-specs*
- direction (asc, desc)*
- key of share*

* requires server-side update

2) Added aliases for params, mostly in perspective to avoid mess of underscore
and dash symbols.

3) Updated utils.print_list func to print results as is without reordering.

Implements  blueprint improve-share-list-filtering

Change-Id: I6fe92c5242f18c900e109271f9182bd5ed287b25
2014-10-09 19:02:04 +00:00
Your Name
5e71ffc159 Handle ambiguous option error for aliases properly
When we have more than one alias for one command option, like
"manila list [--snapshot_id %id%][--snapshot-id %id%]"

We should be ok provided request like following:
"manila list --snapshot %id%"

This change makes above possible.

Also added restriction to use only one alias at a time.

Change-Id: Ibd7de3b75408d50ff97b5b9d19307a5612d7b425
Closes-Bug: #1379472
2014-10-09 19:01:55 +00:00
Jenkins
5bb1e3b3d0 Merge "Work toward Python 3.4 support and testing" 2014-10-09 13:41:12 +00:00
Jenkins
98de50a68f Merge "Add temp files of vim and cover tox job to .gitignore file" 2014-10-08 15:22:09 +00:00
Your Name
fc2cd23a7d Fix endless loop of getattr for share-server instance
Use parent method '__getattr__' to avoid endless loop.

Change-Id: Ia11cfb33dae1b8833c553eb0ead6399601f2137a
Closes-Bug: #1378308
1.0.0
2014-10-07 08:11:33 -04:00
vponomaryov
6266fc86c7 Add temp files of vim and cover tox job to .gitignore file
Without this change git considers temp files of vim and cover tox job as new
files, so add them to .gitignore.

Change-Id: Id1f7b2785b928dedd00f0848aad7ad81718699eb
2014-10-01 14:15:57 +03:00
Jenkins
33b838a4bd Merge "Use oslosphinx" 2014-09-23 04:16:02 +00:00
Jenkins
c3bd5b5a2e Merge "Stop using intersphinx" 2014-09-22 20:09:56 +00:00
Andreas Jaeger
af8a53d087 Use oslosphinx
Since manila is now an incubated project, use oslosphinx together with
the incubated theme.
Unset html_static_path since there's currently no static file and sphinx
warns otherwise.

Change-Id: Icfbf2c0ee214da870c3c711a34b6a649e9878659
2014-09-22 21:51:29 +02:00
Jeremy Stanley
88c7e16e3e Update .gitreview file for move to openstack
Change-Id: Iddb33909002dba91c5e89f3886878f43e87b3f88
2014-09-19 21:10:25 +00:00
Andreas Jaeger
9b99c92c6d 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
Closes-Bug: #1368910
2014-09-13 13:13:18 +00:00
Jenkins
14f8c85800 Merge "Add .venv and subunit.log to .gitignore" 2014-09-11 02:08:24 +00:00
Jenkins
43e0faa696 Merge "Allow search security services by name too" 2014-09-10 15:51:17 +00:00
Valeriy Ponomaryov
620b54ec1f Allow search security services by name too
Manilaclient has functionality of discovering what was provided with identifing
object param, either its id or name.
But manilaclient handle only id's for security-service commands.

Changed APIs:
- security-service-delete;
- security-service-get;
- security-service-update;
- share-network-security-service-add;
- share-network-security-service-remove;

Change-Id: Iaf30c30b09a2a09b11c896f5a6c2bcb5fc28d64e
Closes-Bug: #1346374
2014-09-09 17:43:17 +03:00
Valeriy Ponomaryov
91ec888fd2 Add .venv and subunit.log to .gitignore
If we run unittests there are appear dir .venv and file subunit.log
So, add these files to gitignore.

Change-Id: I64c400d1333e12b87da7fcd2c64772964e3f1b3c
2014-09-09 11:07:56 +00:00
Deepak C Shetty
ce3180d823 Add GlusterFS protocol as a supported Share/NAS type
This patch adds GlusterFS as a supported protocol (in addition
to NFS and CIFS) in the Share/NAS type doc/help string. Since the
Manila server side now support cert based access type which
introduced 'glusterfs' as a new share protocol, this patch
updates the manilaclient help/doc string to reflect the same.

'glusterfs' protocol support was added to server side using:
https://review.openstack.org/116859

Change-Id: I94cbecd55fabbfd1bb7c06184e4679c7531d0214
Closes-Bug: #1367205
2014-09-09 10:39:56 +00:00
Jenkins
d70dee0923 Merge "Warn against sorting requirements" 2014-09-07 05:16:43 +00:00
Andreas Jaeger
3a714c6795 Warn against sorting requirements
Mark pbr/hacking as first projects.

For background see mail thread starting at:
http://lists.openstack.org/pipermail/openstack-dev/2014-September/044736.html

Change-Id: I64ae9191863564e278a35d42ec9cd743a233028e
Closes-Bug: 1365061
2014-09-05 11:08:06 +02:00
Deepak C Shetty
157ddd088d Add support for cert-based access type
This patch adds support for cert-based access type.
The access_to parameter represents certificate's CN
(aka common name) to which access is denied or allowed
by the backend.

Partially-implements blueprint cert-based-access-type

Change-Id: I70c21397028e642bcf018ff254466046e38dcc3a
2014-09-04 14:43:28 +00:00
Jeremy Stanley
02dbfc1137 Work toward Python 3.4 support and testing
Change-Id: Ia45f84ae1068eae2384a27a8182ac14cc5a46daa
2014-09-03 19:07:36 +00:00
Andreas Jaeger
542b59e891 Improve help strings
Make help strings consistent, following oslo.config recommendations:
* Capitalize properly
* Fix grammar and language
* Add "." at end of help string

Change-Id: I412eca2ee67c5e6152f0a70b2a5073ebd190796d
2014-08-22 19:20:43 +02:00
Jenkins
eb81b0f4be Merge "Print delete errors to stderr" 2014-08-22 01:21:07 +00:00
Valeriy Ponomaryov
0b22b3715a Rename 'sid' to 'user' in access rules and sec services
Rename 'sid' (secure identifier) to 'user' for better understanding by user.
Changed parts:
- share access rule type
- security services

Change-Id: I75eceab6ef6d91cebb9143abeaa8a5400c72848b
2014-08-14 13:26:38 +03:00
Pete Zaitcev
aecd7b4f90 Print delete errors to stderr
Sending errors to stderr is just the right thing to do.
And, in addition, it's consistent with the existing code
in manilaclient/client.py:main().

Change-Id: Ib482fe8b29d3ab9f1af6a23b2ab54aea6e9e88bc
2014-08-13 15:28:52 -06:00
Jenkins
9c2269c803 Merge "Cleanup manilaclient.utils module (part 2)" 2014-08-13 20:50:47 +00:00
Jenkins
c758492ec9 Merge "Cleanup manilaclient.utils module (part 1)" 2014-08-13 20:47:02 +00:00
Valeriy Ponomaryov
7a819f9fe4 Fix deletion of nonexistent share
When we try delete share that does not exist, we get following error:
UnboundLocalError: local variable 'share_ref' referenced before assignment

Change-Id: I2aca0874e76d1145825b89e34bcd9a53fe7a2b1d
Closes-Bug: #1353466
2014-08-06 08:49:30 -04:00
vponomaryov
4a7e7cf089 Cleanup manilaclient.utils module (part 2)
Remove functions 'arg', 'env' and 'add_arg' from
manilaclient.utils and use same functions from cliutils instead.

Partially implements: blueprint use-common-code

Change-Id: Ib41250d527c5949cdfb7c6956703ff4b371a062b
2014-08-04 11:06:28 -04:00
vponomaryov
b11f5d78a2 Cleanup manilaclient.utils module (part 1)
First part of manilaclient.utils module cleanup,
where usage of deleted functions replaced with functions
from common code.

Partially implements: blueprint use-common-code

Change-Id: Iefe7da601cdaf030787c6d7588dd0c1706e309cd
2014-08-04 10:52:10 -04:00
Valeriy Ponomaryov
1cc313e5cf Use Resource class from common code
Replace own implementation of 'Resource' class with
same one from common apiclient code.

Partially implements: blueprint use-common-code

Change-Id: I87ac06931a23721fc8cc2d58b5a9473618073f32
2014-08-04 05:26:28 -04:00
Jenkins
ec10415dc4 Merge "Add new option to the 'list' shell command" 2014-07-31 21:42:10 +00:00
Valeriy Ponomaryov
2b48b35c68 Use getid func from common code
Delete own implementation of 'getid' func and
use same one from common apiclient code.

Partially implements: blueprint use-common-code

Change-Id: I833def921aaf105740e429453ee6b017012e7303
2014-07-21 13:58:41 +00:00
vponomaryov
09b82536c6 Add new option to the 'list' shell command
Manila API that is used by 'list' command is going to support
new key 'share_server_id'.

Partially implements bp add-admin-api-list-shares-for-share-server

Change-Id: I70822d2e6bfc16b8407f3bf917119dcb9a551bf0
2014-07-21 12:04:18 +03:00
Jenkins
4c550a9534 Merge "Reuse exceptions from common apiclient code" 2014-07-17 18:04:57 +00:00
Valeriy Ponomaryov
ab702bcce3 Fix run_tests.sh
With merge of commit:
ce35f9b847

File run_tests.sh became broken, it tries to use old names of renamed files with dependencies:
tools/pip-requires → requirements.txt
tools/test-requires → test-requirements.txt

Change-Id: Id83f55201ef01a9c3f7ee37406ac6070c4b14c5e
Closes-Bug: #1342538
2014-07-16 09:08:23 +03:00
Valeriy Ponomaryov
73e29db968 Reuse exceptions from common apiclient code
apiclient package from common code has 'exceptions' module,
so, lets reuse its exceptions and leave defined only one
exception that is absent there - NoTokenLookupException.

Partially implements: blueprint use-common-code

Change-Id: I024a90c407e2bd8f25f58935ab8a4241e038f3a8
2014-07-15 09:28:17 +03:00
Jenkins
627deb7c87 Merge "Update requirements and fix pep issues after it" 2014-07-14 10:03:10 +00:00
Jenkins
6086f5fb55 Merge "Fix and enable F811 pep8 rule (redefinitions)" 2014-07-14 10:02:54 +00:00
Jenkins
5c29cf021d Merge "Fix and enable H102 pep8 rule (apache license header)" 2014-07-14 09:58:11 +00:00
Jenkins
66bac712b8 Merge "Fix and enable E12 pep8 rule (indentation issues)" 2014-07-14 09:55:40 +00:00
Jenkins
db9a6f18e7 Merge "Fix docstring in manilaclient.v1.client module" 2014-07-14 09:55:35 +00:00
Valeriy Ponomaryov
dde2da3d13 Sync common modules from Oslo
Oslo version:
commit  569979adfd4237869bb50c7aaa02bc3fd4f0b413
Author: Author: Romain Soufflet <romain@soufflet.io>
Date:   Wed Jul 9 10:45:59 2014 +0200
Name:   Fix tests.unit.reports.test_base_report with python3.4

Except update of oslo code updated file 'openstack-common.conf'
that is used for automated update, see following:
https://wiki.openstack.org/wiki/Oslo#Syncing_Code_from_Incubator

Change-Id: I659d0ceee14d69b02743c829e27fec042a38d7e5
2014-07-13 10:22:47 +03:00
vponomaryov
8f11b0bc62 Update requirements and fix pep issues after it
sync requirements with requirements project:
https://github.com/openstack/requirements/blob/master/global-requirements.txt

With update of hacking dependency fixed pep issues,
appeared with new version.

Change-Id: I90bd1a2b62161a8df40a7ce935c36f3f358924c7
2014-07-10 16:38:42 +03:00
vponomaryov
3d09e37aa0 Fix and enable F811 pep8 rule (redefinitions)
Change-Id: I4578a6ee77e2c875fa0be03763a5176fc0075198
Related-Bug: #1333290
2014-07-10 05:34:47 -04:00
vponomaryov
bd9c27914b Fix and enable H102 pep8 rule (apache license header)
Related-Bug: #1333290

Change-Id: I8c8794b06c604be36e632308e8c8c85aed6065ec
2014-07-10 09:25:04 +00:00
vponomaryov
900b660618 Fix and enable E12 pep8 rule (indentation issues)
Change-Id: I500d2cacba09f2a4337ff325ae658f61b64e4b7a
Related-Bug: #1333290
2014-07-10 05:22:37 -04:00
vponomaryov
bbe8900aba Fix docstring in manilaclient.v1.client module
Change-Id: Ibb5e0ad5d510baed0b37cc2f3c3ce9897c7590c0
2014-07-07 18:45:25 +03:00
Julia Varlamova
02fb7a62d1 Add an ability to cache auth token
Add option --os-cache, which defaults to OS_CACHE variable
(by default - False). When this option is specified, manilaclient
will use auth token saved in keyring. First time when command will
be called, auth token and user password will be saved in keyring.
Using --os-reset-cache option password and auth_token stored in the
keyring can be deleted.

Implements bp cache-auth-token

Change-Id: Ia8959655528acce726baa616e66901c7a96fd35c
2014-07-07 17:22:28 +04:00
Valeriy Ponomaryov
3332d01391 Add support for share-server-delete API
Partially-implements blueprint add-admin-api-delete-share-server

Change-Id: Ia63a8f4a75d84aa9c3273c90e86d6570594c691c
2014-07-01 13:19:52 -04:00
Jenkins
ab376d2de1 Merge "Add .testrepository to .gitignore" 2014-07-01 09:19:16 +00:00