3374 Commits

Author SHA1 Message Date
songwenping
80c32f2866 Cleanup py27 support
Remove py2 stanza from setup.py

Change-Id: I7aa67986248fc627c3f36203e0fb653bde2d483f
2020-10-12 17:28:31 +08:00
wu.shiming
4012a88483 Remove the unused coding style modules
Python modules related to coding style checks (listed in blacklist.txt in
openstack/requirements repo) are dropped from lower-constraints.txt
as they are not actually used in tests (other than pep8).

more info: https://github.com/openstack/requirements/blob/master/blacklist.txt

Change-Id: I333bbddf70a4ead1778813a8311969ec372604d3
2020-09-29 18:08:21 +08:00
wu.shiming
015f45b4ab Remove install unnecessary packages
The docs and releasenotes requirements migrated to doc/requirements.txt
we need not install things from requirements.txt.

Change-Id: I9d73c83b0520f724479c0e09b3686d3aab96df71
2020-09-14 11:19:28 +08:00
d47a2d846f 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: Ib43ce1fe7ae66f26b3c37bfaa7b58a0043ee26d6
2020-09-10 09:46:21 +00:00
fd24dc3487 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: I0fdaa5f2095d55221336212332d644d256c0c2c7
Sem-Ver: feature
2020-09-10 09:46:19 +00:00
Luigi Toscano
553257d1b7 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: I7b6d49ea8320e014e2ef444e456f6eea02eca912
victoria-em
2020-08-18 17:03:36 +02:00
Takashi Natsume
2ed34e657c Remove unused code
The code has not been used
since If0161a89877f19f24e91d780cf227fdc48e7e860 .

Change-Id: I106404f9d12814fec2ec2bf16cdd100834085912
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
2020-07-31 11:28:24 +00:00
Takashi Natsume
1ce9edcd73 Add a cleanup for a server in a functional test
A VM instance is created in the following functional test.

* novaclient.tests.functional.v2.test_instance_action.
  TestInstanceActionCLIV262.test_show_actions_with_host

However the VM instance is not deleted after the functional test.
Add a cleanup for the server in the functional test.

Change-Id: I8c2a6f91739d50baa283b37b16de67c542ea691b
Closes-Bug: #1889283
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
2020-07-28 16:36:28 +00:00
Ghanshyam Mann
1322199845 migrate testing to ubuntu 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 below deps which added python3.8 support
Markupsafe==1.1.1
cffi==1.14.0
greenlet==0.4.15
PyYAML==3.13

Story: #2007865
Task: #40200

Closes-Bug: #1886298

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

Change-Id: I9857dc20057b97a2d0bae5b0b3410fa958bdc74f
2020-07-11 00:21:25 +00:00
Zuul
51de7e320a Merge "use stevedore to load extensions" 2020-07-09 19:03:35 +00:00
Takashi Natsume
b7ae8c75cb Switch legacy Zuul jobs to native Zuul v3 jobs
Replace the 'novaclient-dsvm-functional' legacy Zuul job with
the 'python-novaclient-functional' native Zuul v3 job.

See
https://governance.openstack.org/tc/goals/selected/victoria/native-zuulv3-jobs.html
for more details.

Change-Id: I35b5699b8b0814f2d17a37e024286cd440047ec8
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
Co-Authored-By: Andrey Kurilin <andr.kurilin@gmail.com>
2020-07-08 20:33:05 +03:00
Doug Hellmann
109d41e722 use stevedore to load extensions
Importing pkg_resources causes the app to scan the entire import path
for all distributions, not just those providing entry points. The
scanner in stevedore will have a cache of the entry point data, making
it significantly faster. This will be especially useful in command
line programs like python-openstackclient.

Change-Id: Ic5eb9401c8ea3bd9624b818e0ffb8dcc13f61559
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2020-07-08 08:53:07 -04:00
qiufossen
600384fa3b Remove Babel requirement
Babel is not needed as requirement, remove it.
Remove translation sections from setup.cfg.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-April/014227.html

Depends-On: https://review.opendev.org/#/c/730427/
Change-Id: I4d82cfc09d255ad574e44ac303fd187c5348ca47
2020-05-23 04:29:18 +00:00
Andreas Jaeger
45bad61b80 Add link to PDF document
Switch to openstackdocstheme 2.2.0 that can link to PDF document,
enable this with setting openstackdocs_pdf_link.

Depends-On: https://review.opendev.org/728938
Change-Id: I103a90d4fa101fd261b2b1a86d0a42b9591accc9
2020-05-18 18:19:47 +02:00
Andreas Jaeger
553040ed4b Switch to newer openstackdocstheme and reno versions
Switch to openstackdocstheme 2.1.2 and reno 3.1.0 versions. Using
these versions will allow parallelizing building of documents.

Update Sphinx version as well.

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

Depends-On: https://review.opendev.org/728432
Change-Id: Icb604b31150a1ad6c29a9a4a934ed13f8a0b4976
2020-05-15 16:55:53 +02:00
Ghanshyam Mann
5b2e14e109 Bump hacking min version to 3.0.1
hacking 3.0.1 fix the pinning of flake8 to avoid bringing in a new
version with new checks.

bumping the min version for hacking so that any older hacking versions
which auto adopt the new checks are not used.

Change-Id: I43ddb7bac8b7734f6e4fa4632d4524d454931709
2020-05-12 09:50:19 -05:00
Takashi Natsume
6e78eb3539 Remove mock in lower-constraints.txt
This is a follow up patch for I4d45ae17f6f84f945f5dd049a929216ce6b6b58e.

The 'mock' line has already been removed in test-requirements.txt.
So the 'mock' line is removed in lower-constraints.txt.

Change-Id: Ic215d48477cfb7441e3bddba969258157468713c
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
2020-05-02 14:25:28 +09:00
Zuul
11b7d634a3 Merge "Use unittest.mock instead of third party mock" 2020-04-27 18:01:28 +00:00
Zuul
1297cdf71b Merge "Remove future imports" 2020-04-27 15:35:21 +00:00
Takashi Natsume
7ef2c28bf3 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: I4d45ae17f6f84f945f5dd049a929216ce6b6b58e
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
2020-04-26 10:12:09 +00:00
Takashi Natsume
e93a00b24e Remove future imports
These particular imports are no longer needed
in a Python 3-only world.

Change-Id: I405b32c8cdd60fb19270a8f6fe2e2728022f7c6e
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
2020-04-26 07:19:26 +00:00
Takashi Natsume
2c5c30ba01 doc: Update Testing document
The default tox target environments has been changed
from Python 3.7 to 3.8 since
I093085cf6e85a66f80559eba62f9edf684f5dbea.

Update the 'Testing' document.

Change-Id: I33b32eb1d88225ae7ad44cbae28edc5c5f9c4925
2020-04-25 10:56:16 +00:00
Zuul
a132a63d82 Merge "Add py38 package metadata" 2020-04-25 08:14:29 +00:00
Zuul
750d28540a Merge "Bump default tox env from py37 to py38" 2020-04-24 18:55:59 +00:00
Sean McGinnis
ddc4c67422
Bump default tox env from py37 to py38
Python 3.8 is now our highest level supported python runtime.
This updates the default tox target environments to swap out
py37 for py38 to make sure local development testing is
covering this version.

This does not impact zuul jobs in any way, nor prevent local
tests against py37. It just changes the default if none is
explicitly provided.

Change-Id: I093085cf6e85a66f80559eba62f9edf684f5dbea
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-24 10:25:57 -05:00
Takashi Natsume
439912743f Switch to using TOX_CONSTRAINTS_FILE
UPPER_CONSTRAINTS_FILE is deprecated.
So switch to using TOX_CONSTRAINTS_FILE.

See I3f957187ed4f29fcf88db99cb79fb33b21a8dd8d.

Change-Id: I1812eb64b1afa8e90f4de8604f3f26075da6332f
2020-04-24 23:09:09 +09:00
Sean McGinnis
cfcc95d6e8
Add py38 package metadata
Now that we are running the Victoria tests that include a
voting py38, we can now add the Python 3.8 metadata to the
package information to reflect that support.

Change-Id: I3645bf029ee92e9dc93412c522d7694f6a61fc4f
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-24 08:23:18 -05:00
Ghanshyam Mann
812f106612 [Community goal] Update contributor documentation
As the Ussuri goal we have an OpenStack project wide contributing
documentation template [1]. pyhton-novaclient use its own bug or feature
tracking LP and core team is also not exactly same as nova  so adding
its own contributor guide with keeping common links from nova
with python-novaclient specific information.

Also the top level CONTRIBUTING.rst template has been changed in the
cookiecutter repo[2]. So this patch updates the CONTRIBUTING.rst according
to the new template.

[1] https://opendev.org/openstack/cookiecutter/src/branch/master/%7b%7bcookiecutter.repo_name%7d%7d/doc/source/contributor/contributing.rst
[2] https://review.opendev.org/#/c/696001

Change-Id: Idd35fdf54a92a4a000d0d7776884682c8722854b
Story: #2007236
Task: #38541
2020-04-23 16:56:43 +00:00
7d6cf15f8c Add Python3 victoria unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for victoria.

See also the PTI in governance [1].

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

Change-Id: I99e3fc9c5a2d8c627e6e083bee157733065546bc
2020-04-11 10:48:53 +00:00
81f57aabc8 Update master for stable/ussuri
Add file to the reno documentation build to show release notes for
stable/ussuri.

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

Change-Id: I0ef054d7c3d47d4a86dc2a67f2ef0f584cb96ddf
Sem-Ver: feature
2020-04-11 10:48:50 +00:00
Zuul
3ef5b695ca Merge "Microversion 2.87 - Stable device boot from volume rescue" 2020-04-10 22:53:29 +00:00
Lee Yarwood
7ed265bbf5 Microversion 2.87 - Stable device boot from volume rescue
This microversion is used to request a stable device rescue for boot
from volume instances and will only succeed when the compute hosting the
instance reports the COMPUTE_RESCUE_BFV trait.

No changes are required within novaclient so this change only bumps
API_MAX_VERSION.


Depends-On: https://review.opendev.org/#/c/701430/

Change-Id: I7885b8558db7657abbfe1f45877f52e947f5f655
2020-04-10 20:15:05 +00:00
Zuul
9bd1c3d321 Merge "Microversion 2.86 - Extra spec validation" 2020-04-10 09:06:25 +00:00
Zuul
0150204689 Merge "[Trivial] FUP: Enhanced description for 'server list --config-drive' help" 2020-04-10 06:10:06 +00:00
zhangbailin
3ae6ecc9c0 [Trivial] FUP: Enhanced description for 'server list --config-drive' help
This commit mainly address comments in [1].
[1]https://review.opendev.org/#/c/718349/4/doc/source/cli/nova.rst@2321

Change-Id: I6010adbc895b4e2438f9f0729e3c89f37a69c8f8
2020-04-10 11:52:27 +08:00
zhangbailin
c5f29d6833 FUP: Add volume-update CLI pre V285 tests
This commit mainly to fix some comments from [1].

[1]https://review.opendev.org/#/c/712651/19/novaclient/tests/unit/v2/test_shell.py@4001

Blueprint: destroy-instance-with-datavolume
Change-Id: Id809f22d0da2cdedf33a2c0df202f3953fd01673
2020-04-10 08:39:39 +08:00
Lee Yarwood
ca1262daeb Microversion 2.86 - Extra spec validation
This microversion introduces extra spec validation within the API.

No changes are required within novaclient so this change only bumps
API_MAX_VERSION.

Depends-On: https://review.opendev.org/#/c/708436/

Change-Id: Ic8fef7ee363435e9ac728b87d494593fcc6defc0
2020-04-09 20:46:09 +09:00
zhangbailin
4d6c70d25d Microversion 2.85: Change volume-update CLI
This commit add a new CLI
``nova volume-update [--[no-]delete-on-termination]
<server> <src_volume> <dest_volume>`` to update
'delete_on_termination' for an attached volume, that the user can
decide whether to delete attached volumes when destroying the server.

Depends-On: https://review.opendev.org/#/c/711194/

Change-Id: I1fc64fb6e6611c92c6b72265e1bf4b32e9c45f0a
Blueprint: destroy-instance-with-datavolume
2020-04-09 08:52:05 +08:00
Stephen Finucane
ea092b2988 Make 'server list --config-drive' a boolean option
Instead of passing through whatever the user provides and exposing this
bug in the REST API, simply make the opt a boolean one in expectation of
a day where the API issues have been resolved.

This also introduces machinery necessary to use more of these types of
opts in the future.

Change-Id: I9033540ac65ac0ee7337f16bdd002060652092ea
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2020-04-08 17:27:33 +01:00
zhangbailin
d712c0fbc7 Microversion 2.84 - action event fault details
This patch adds support for microversion 2.84
"Expose instance action event details out of the API" [1].

[1] https://review.opendev.org/#/c/694430/

No changes are required in the novaclient side,
so just increment the microversion.

Depends-On: https://review.opendev.org/#/c/694430/

Implements blueprint action-event-fault-details
Change-Id: I1d71284de9a5f25f4554dd2ec7291d5706381de7
2020-04-08 04:10:35 +00:00
Victor Coutellier
9ee74d3ac6 Microversion 2.83 - Add more filters for the nova list command
Add these new filters, admin-only until microversion 2.82:

- availability-zone
- config-drive
- key-name
- power-state
- task-state
- vm-state
- progress

Existing user filter will be available to non admin since microversion
2.83.

Part of blueprint non-admin-filter-instance-by-az

Change-Id: Id2b5e600c0a41790830823031b20983808cb5ace
2020-04-07 18:34:13 +02:00
Andreas Jaeger
0722e80886 Update to hacking 3.0
Hacking 3.0 was just released with minor changes, update to the new
version.

Change-Id: Id3c08f718899343b3ec12a8b53e1e08a5eba42f8
2020-03-31 12:20:38 +02:00
Takashi Natsume
0ab746b4d1 Microversion 2.82 - nova cyborg interaction
This patch adds support for microversion 2.82
"Define Cyborg ARQ binding notification event" (*).

*: I7a626544d8221dc0eeb5672986ca897ce4718be8

No changes are required in the novaclient side,
so just increment the microversion.

Change-Id: I3a8a2f8b5ced5519082f0b7609702d4f62be88ac
Implements: blueprint nova-cyborg-interaction
2020-03-12 23:49:23 +09:00
Stephen Finucane
03dca4bc82 Don't print user_data for 'nova show'
User data is a blob of data that the user can specify when they launch
an instance. It's generally binary data, which means it's not something
we should show by default on the CLI. Stop doing that.

Change-Id: If8f6cc040d0077a7902a5fd425e67d74d7925a46
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Closes-Bug: #1669140
2020-02-26 13:48:11 +00:00
Stephen Finucane
b9a7e03074 Random cleanups
Remove some cruft from Sphinx config files, drop the use of 'u' prefixed
strings, which are unnecessary in Python 3, and generally tidy stuff up.

Change-Id: Ib0f33576e160ec842d7fc82b4fcfee99829623d7
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-02-21 09:56:37 +00:00
Stephen Finucane
8f50f84981 Bump to hacking 2.x
This is compatible with Python 3-only syntax.

Change-Id: I462f4242b9a5f8d8cd6b0cb3d328dfd9d93ba200
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-02-21 09:48:38 +00:00
Stephen Finucane
c4c44bcb2d Remove six
Mostly a find-replace job. Let's do this now so we don't have to carry
it for the next decade.

Change-Id: I7bef9fb7c6895f746cee1aca6522786f38b9857c
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-02-21 09:48:38 +00:00
Stephen Finucane
9dee28ae6c tox: Configure 'ignore_basepython_conflict'
Resolves the following warning:

  UserWarning: conflicting basepython version (set 37, should be 36) for
  env 'py36';resolve conflict or set ignore_basepython_conflict

and makes sure we're testing with what we should be.

Some random indentation is fixed while we're here.

Change-Id: I6f3e98cc33731f528a3a755300f1fcc65c6b53ff
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-02-21 09:48:38 +00:00
Stephen Finucane
1e05dec589 setup.cfg: Various Python 3 fixes
Now that we've dropped Python 2 support, we shouldn't be stating that we
support universal (Python 2 and 3) wheels. We should also use the proper
setuptools machinery to prevent people accidentally installing
novaclient in a Python 2.7 environment. Resolve both issues, removing an
unused 'upload_sphinx' section in the process.

Change-Id: Icee145f44a42c233008b3328f52a3eec933101e0
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-02-21 09:47:59 +00:00
Stephen Finucane
0f7d723c46 trivial: Remove 'u' prefix from string
It looks like nova is using 'repr()' in some validation error logging.
On Python 2.7, this would result in unicode strings (which most web apps
use) being output as "u'foo'", while in Python 3 these would just be
"'foo'". Since nova only supports Python 3 now, we only have to support
the Python 3 string formatting variant in our tests too.

Change-Id: I546c06a3251e86f39e2e7db48e04ec382c8da854
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-02-21 09:43:13 +00:00