1712 Commits

Author SHA1 Message Date
Zuul
df32f94add Merge "Bump pylint to 2.6.0" 2021-03-03 23:38:58 +00:00
Zuul
a22a54e8ee Merge "Stop configuring install_command in tox." 2021-02-27 03:09:15 +00:00
Luigi Toscano
755dabdc92 Bump pylint to 2.6.0
The current version does not work anymore with the current
testing stack.
Due to the bump, the wrapper needed a few changes
(maybe it could be dropped at some point?

Version 2.3.0 (used by cinder right now) was considered too,
but it requires a specific version of isort:
https://github.com/PyCQA/isort/issues/1273

Change-Id: I07fa32e7f49bde041d101a2d09860d0bc27acda0
2021-02-19 17:30:14 +01:00
Wander Way
f1236e0940 Uncap PrettyTable
This is now maintained as a Jazzband project [1].

[1] https://github.com/jazzband/prettytable

Change-Id: I71ace4c2857b9e12e9023aadaf72bbe97c2fda1c
2021-02-18 07:04:07 -06:00
tushargite96
2c43d65238 Stop configuring install_command in tox.
It turns out that this is the the default value provided by tox:

https://tox.readthedocs.io/en/latest/config.html#conf-install_command

So we can remove the line and simply use the default value.

Change-Id: I7a703e0ee91b73b7ab736712756caaba6981f8e4
2021-02-03 22:00:49 +05:30
Alan Bishop
7e3566ed04 Support backup-restore to a specific volume type or AZ
Enhance the 'backup-restore' shell command to support restoring a
backup to a newly created volume of a specific volume type and/or in a
different AZ. New '--volume-type' and '--availability-zone' arguments
leverage the existing cinder API's ability to create a volume from a
backup, which was added in microversion v3.47.

The shell code is a new v3 implementation, and it drops support for the
v2 command's deprecated '--volume-id' argument.

Change-Id: Ic6645d3b973f8487903c5f57e936ba3b4b3bf005
2021-01-11 13:05:11 -08:00
Alan Bishop
1abc1b5d40 Update requirements and lower-constraints
Sync the versions with cinder's, which were recently updated by
I42af21b1c4247d04d479f1fc1ecd6f9baac0cfc9. Also increased the
minimum version of tempest to the most recent release.

Also added indirect dependencies to test-requirements.txt in order
to limit the number of versions considered by the resolver.

Change-Id: I7b4bc7b392b2192e0c832c4f0148546a5920b9e2
2020-12-23 08:01:06 -05:00
Eduardo Santos
d92f15a09e Fix undesirable raw Python error
Using the cinderclient without a subcommand while
passing an optional argument triggers the raw Python
error `ERROR: 'Namespace' object has no attribute
'func'`. This bug can be reproduced by issuing the
command `cinder --os-volume-api-version 3.40`.
Added a default value to `func` and an empty value to
`command` as placeholders so that a help message is
shown instead of the Python error.

Change-Id: Idb51e8635b97f0da2976f3268d5e19100ec77203
Closes-Bug: #1867061
2020-10-29 15:09:26 +00:00
Zuul
1e7c24a9c4 Merge "Add Python3 wallaby unit tests" 2020-10-22 23:28:36 +00:00
Zuul
edf13bc87a Merge "doc: Update Py37 instead of py27" 2020-10-15 16:23:27 +00:00
tushargite96
da9728b15b doc: Update Py37 instead of py27
Examples in this section should use a Python 3 environment and not py27.

Change-Id: If082b92e089af980e411b4b4c1319e462862a55f
Closes-Bug: #1866375
2020-09-17 10:43:01 +05:30
5558ba7fdc Add Python3 wallaby unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for wallaby.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: I4aed8f56609dea21a8170bd5f5d242cfac045dde
2020-09-16 18:35:23 +00:00
0b3e99731a Update master for stable/victoria
Add file to the reno documentation build to show release notes for
stable/victoria.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/victoria.

Change-Id: Ia36030fb2858ddf4c6672173cde510dd8f8b7a53
Sem-Ver: feature
2020-09-16 18:35:18 +00:00
Zuul
f605cca163 Merge "Add functional-py38 job" 2020-09-16 18:03:23 +00:00
Zuul
40d8bc4c6c Merge "Add note for Victoria release" 2020-09-16 15:16:49 +00:00
Zuul
9bd87c5ce9 Merge "Add commands for default type overrides" 2020-09-16 15:16:48 +00:00
Brian Rosmaita
3600121929 Add functional-py38 job
The openstack-python3-victoria-jobs template is running unit tests
for py36 and py38.  We should do the same for our functional test
jobs.  So replace the functional-py37 job with a functional-py38
job.

Change-Id: Icb338611169975be04bb27b86b5b3de0a37a6f5f
2020-09-16 08:51:59 -04:00
Brian Rosmaita
5026a8add3 Add note for Victoria release
Change-Id: If948b069a52f3a4fc9d2464b86652fc523e8af53
2020-09-16 12:35:46 +00:00
whoami-rajat
7ee7d376a1 Add commands for default type overrides
This patch adds command for set,get and delete default volume types
for projects.

This patch adds 3 commands :

1) Set
Set a default volume type for a project
cinder --os-volume-api-version 3.62 default-type-set <vol-type-id> <project-id>

2) Get
Get the default volume type for a project
cinder --os-volume-api-version 3.62 default-type-list --project-id <project-id>
Get all default types
cinder --os-volume-api-version 3.62 default-type-list

3) Unset
Unset default volume type for a project
cinder --os-volume-api-version 3.62 default-type-unset <project-id>

Implements: Blueprint multiple-default-volume-types

Change-Id: Id2fb00c218edbb98df3193577dba6a897c6e73f6
2020-09-16 12:31:54 +00:00
tushargite96
7397f70957 Python API in python-cinderclient
"myvol.delete" should be "myvol.delete()"

Change-Id: Iadddfed8deec1f0dee2b71effb3b4de2689d6ada
Closes-Bug: #1866374
2020-09-15 23:05:15 +05:30
Zuul
d0f10e3350 Merge "Use importlib to take place of imp module" 2020-09-09 18:07:18 +00:00
Zuul
76f2b91d9a Merge "[goal] Migrate python-cinderclient jobs to focal" 2020-09-04 02:45:47 +00:00
Brian Rosmaita
9dc1d61d32 Remove excess whitespace in ignore-path
Some extra whitespace is present in the ignore-path in the [doc8]
testenv, so remove it.

Change-Id: Ibd1b5f8259ec174b2bbb233b270f0e09daa67bc2
2020-09-03 11:53:27 -04:00
zhoulinhui
aebb6011e6 Use importlib to take place of imp module
The imp module is deprecated[1] since version 3.4, use importlib to
instead

[1]: https://docs.python.org/3/library/imp.html

Change-Id: Ie250592bc183e8db1758b6cfa4681a45f4c489ab
2020-09-02 15:59:36 +00:00
Zuul
12a6dc2ea5 Merge "Add support for Cinder API mv3.61" 2020-09-02 15:50:21 +00:00
Zuul
24e8d7129c Merge "zuul functional job: drop the custom playbooks" 2020-08-26 15:47:05 +00:00
Zuul
0a4d3c77b4 Merge "Add doc linting to pep8 target" 2020-08-26 15:02:50 +00:00
Zuul
9a6c4253d6 Merge "Clean up some old v1 API references" 2020-08-21 14:40:55 +00:00
Luigi Toscano
3228111af3 zuul functional job: drop the custom playbooks
The base devstack-tox-functional* jobs now set the required
environment (OS_* vars set by devstack) before calling tox.

Depends-On: https://review.opendev.org/746235
Change-Id: If58a6088f92c4be5edd53f0f5cd9a093d4cbc5f1
2020-08-18 17:03:18 +02:00
Ghanshyam Mann
f85896af2b [goal] Migrate python-cinderclient jobs to focal
As per victoria cycle testing runtime and community goal[1]
we need to migrate upstream CI/CD to Ubuntu Focal(20.04).

Fixing:
- bug#1886298
Bump the lower constraints for required deps which added python3.8 support
in their later version.
- pep8 error
- Set bionic nodeset for py36 and py37 job.


[1] https://governance.openstack.org/tc/goals/selected/victoria/migrate-ci-cd-jobs-to-ubuntu-fo$

Story: #2007865
Task: #40179

Change-Id: Ibab96807a7747738282732fe0069b9bc197da0ee
2020-08-17 14:14:46 +00:00
Zuul
92f700f508 Merge "trivial: Drop references to os-testr" 2020-08-07 14:22:47 +00:00
Zuul
02faa2a407 Merge "Fix pygments style" 2020-08-07 02:20:24 +00:00
Zuul
20cfe02dc1 Merge "use stevedore to load util plugins" 2020-08-05 09:16:42 +00:00
Zuul
578744aca3 Merge "Stop to use the __future__ module." 2020-08-05 08:31:00 +00:00
Ivan Kolodyazhny
a9e9b762fd Add support for Cinder API mv3.61
Microversion 3.61 adds cluster_name attribute to volume details output
for admin users.

Change-Id: I13f85c8ddd4cb238a245c263151123fd271a9927
Depends-On: https://review.opendev.org/742991
2020-07-24 23:31:52 +03:00
Eric Harney
1dc592a6fd Bump hacking to 3.1.0
pycodestyle does not know about "importutils.try_import"
calls, so we have to either
  a) put them inside a "try" block
or
  b) add "# noqa: E402" to each import after the
     try_import call

Change-Id: Ia545bb689cfdfb57962d74e3957dfb372fd3782b
2020-07-16 10:51:55 -04:00
Stephen Finucane
8ecbbcd7a1 trivial: Drop references to os-testr
os-testr is dead. Long live stestr.

Change-Id: Ie37f00e2f5ef2230adcff0d662e2d0b214b8c74c
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-07-09 11:22:06 +01:00
Doug Hellmann
37f6a30794 use stevedore to load util plugins
Importing pkg_resources has a side-effect of scanning all of the
installed python modules looking for entrypoints to build an in-memory
cache. Stevedore will be adding an on-disk cache to speed that process
up, which should provide significant performance benefits for client
applications such as python-openstackclient. This change introduces
stevedore to replace pkg_resources.

Change-Id: I66decf6d5a4f79ddaa6617737e9334a56dbbbad4
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2020-07-05 15:51:53 -04:00
Zuul
b6b308ed23 Merge "Use unittest.mock instead of third party mock" 2020-06-22 22:34:30 +00:00
Zuul
9268d3101b Merge "Add py38 package metadata" 2020-06-18 16:58:18 +00:00
Luigi Toscano
718474a092 Fix typo: dow -> down
Closes-Bug: #1883674
Change-Id: I4f4468b23d04ecf74fb6347bfb518377127b563d
2020-06-16 11:04:08 +02:00
Sean McGinnis
d6530c48d9 Add doc linting to pep8 target
This adds doc8 to the pep8 job to lint the docs. Also fixes a few issues
it highlighted.

Change-Id: Id0f4b9bee1f6a0103ec581b20037a9b74201aaca
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-06-05 14:53:12 +00:00
Sean McGinnis
4e24fd614b Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: Ia41326a601dfd72750bd81c3ebee9ec5884ad91b
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-06-05 09:52:09 -05:00
Sean McGinnis
1021aee31f
Add directive to document CLI
Our CLI docs are very out of date. These used to be generated by the
docs team with some tooling they had. Since the docs moved in-repo, that
tooling has gone away, and for the most part no one has done any updates
to the CLI docs.

This adds a sphinx directive that will generate these docs every time
the docs are built. This way, whenever someone makes a CLI change, they
do not need to have to know to also edit a documentation file to match
their change. Any code changes will automatically be picked up and
reflected in the docs.

Change-Id: I4406872ab6e9335e338b710e492171580df74fa5
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-06-03 22:19:10 -05:00
Sean McGinnis
2d3bcebf7f
Clean up some old v1 API references
This removes some code that was still pointing to the V1 API. No need to
add release note or additional announcements since this was all removed
long ago, and if anyone would have gone down this code path it would
have just blown up trying to import the v1 code that is no longer there.

Change-Id: I7d239d3fe3d879e4c391e83cae1e394cf1f5e6eb
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-06-02 17:35:53 -05:00
Hervé Beraud
b649d7f4f4 Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: Id785793c36b3a6819a7522525252c3fef15ebe2b
2020-06-02 20:46:48 +02:00
Zuul
185aa9471f Merge "Add py38 package metadata" 2020-05-27 13:18:45 +00:00
Zuul
74f0c935a5 Merge "Switch to newer openstackdocstheme and reno versions" 2020-05-22 20:42:13 +00:00
Andreas Jaeger
1a81faf86a Switch to newer openstackdocstheme and reno versions
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems

Update Sphinx version as well.

openstackdocstheme renames some variables, so follow the renames. A
couple of variables are also not needed anymore, remove them.

Set openstackdocs_auto_name to use project as name.

Set openstackdocs_pdf_link to link to PDF file. Note that
the link to the published document only works on docs.openstack.org
where the PDF file is placed in the top-level html directory. The
site-preview places the PDF in a pdf directory.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: I2cc022495b162bec1424ec69611acb879900c005
2020-05-22 17:25:19 +00:00
zhangboye
67d992b07f Add py38 package metadata
Change-Id: I3a0df4c9886465238bb62c1c24b3cafb9bc5aeb1
2020-05-22 15:21:12 +08:00