summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Complete "Drop python2 support" goal"5.0.0Zuul2020-02-053-7/+8
|\
| * Complete "Drop python2 support" goalMonty Taylor2020-02-053-7/+8
| | | | | | | | | | | | | | | | | | | | We stopped testing python2, but there are more things to be cleanup. - Remove python2 entries from setup.cfg - Add releasenotes - remove universal wheel since this is only python 3 now Change-Id: Ie2bbb4d34b8411939ad5cfd750fc76c933779542
* | Merge "Remove mention of meetings from docs"Zuul2020-02-051-6/+5
|\ \
| * | Remove mention of meetings from docsKendall Nelson2020-01-281-6/+5
| |/ | | | | | | | | | | | | | | Since the OpenStackClient team doesn't meet anymore, I removed the mention of meetings and added mention of the IRC channel in the communication section of the docs.. Change-Id: Iefa95878f95bf84bd9fc22ea4c914effc30dffa7
* | Use 'KeyValueAppendAction' from osc-libStephen Finucane2020-02-031-31/+1
| | | | | | | | | | | | | | | | Does what it says on the tin. This action was added to osc-lib in change If73cab759fa09bddf1ff519923c5972c3b2052b1. Change-Id: I51efaa096bb26e297d99634c5d9cca34c0919074 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | Stop silently ignoring invalid 'server create --hint' optionsStephen Finucane2020-02-032-12/+61
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The '--hint' option for 'server create' expects a key-value pair like so: openstack server create --hint group=245e1dfe-2d0e-4139-80a9-fce124948896 ... However, the command doesn't complain if this isn't the case, meaning typos like the below aren't indicated to the user: openstack server create --hint 245e1dfe-2d0e-4139-80a9-fce124948896 Due to how we'd implemented this here, this ultimately results in us POSTing the following as part of the body to 'os-servers': { ... "OS-SCH-HNT:scheduler_hints": { "245e1dfe-2d0e-4139-80a9-fce124948896": null } ... } Which is unfortunately allowed and ignored by nova due to the use of 'additionalProperties' in the schema [1] Do what we do for loads of other options and explicitly fail on invalid values. This involves adding a new argparse action since none of those defined in osc-lib work for us. This is included here to ease backporting of the fix but will be moved to osc-lib in a future patch. [1] https://github.com/openstack/nova/blob/19.0.0/nova/api/openstack/compute/schemas/servers.py#L142-L146 Change-Id: I9e96d2978912c8dfeadae4a782c481a17cd7e348 Signed-off-by: Stephen Finucane <sfinucan@redhat.com> Story: #2006628 Task: #36840 Related-Bug: #1845322
* Add support for app cred access rulesColleen Murphy2020-01-1711-11/+548
| | | | | | | | | | This commit introduces the --access-rules option for 'application credential create' as well as new 'access rule' commands for listing, showing, and deleting access rules. bp whitelist-extension-for-app-creds Change-Id: I04834b2874ec2a70da456a380b5bef03a392effa
* Switch to using osc_lib.utils.tagsMichael Johnson2020-01-1410-153/+9
| | | | | | | | | | | | This patch updates the network modules to use the new osc_lib.utils.tags module and removes the in tree _tag.py version. A previous patch[1] moves the _tag.py code to osc-lib to allow other projects to leverage the code. [1] https://review.opendev.org/662859 Change-Id: Id0c34029e327de50c5fd2732bae5fbf45bbd16ee
* Merge "Show correct name for resource with quota set to zero"Zuul2020-01-141-1/+1
|\
| * Show correct name for resource with quota set to zeroAlex Katz2020-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case quota for the resource is set to zero "openstack quota show" command will not map the resource name according to one of the following dicts: - COMPUTE_QUOTAS - NOVA_NETWORK_QUOTAS - VOLUME_QUOTAS - NETWORK_QUOTAS For example: $ openstack quota set --secgroups 10 admin $ openstack quota show admin -f json|egrep "(secgroups|security_groups)" "secgroups": 10, $ openstack quota set --secgroups 0 admin $ openstack quota show admin -f json|egrep "(secgroups|security_groups)" "security_groups": 0, Change-Id: I94ed9e6b41b1cc692297c01e6c7582998dcacfda
* | Merge "Create Volume v3 functional tests"Zuul2020-01-135-11/+1031
|\ \
| * | Create Volume v3 functional testsDean Troyer2019-11-185-11/+1031
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now-ish Volume v3 has been a pass-through to v2. In order to prepare to make the Volume v3 commands stand-alone copy the v2 functional tests to v3. This is the first of a series of reviews to completely separate Volume v2 and v3 commands. Once these are split we can begin to implement v3 microversion support and/or start using the OpenStack SDK as the REST library. Change-Id: Iefd78d8ef6bb851d7360596337a88ee8f8476767 Signed-off-by: Dean Troyer <dtroyer@gmail.com>
* | | Merge "Remove redundant OpenStackShell.prepare_to_run_command"Zuul2020-01-131-26/+0
|\ \ \
| * | | Remove redundant OpenStackShell.prepare_to_run_commandEric Fried2019-10-311-26/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | osc-lib's OpenStackShell.prepare_to_run_command has been a superset of python-openstackclient's since at least osc-lib 1.4.0. We require 1.14.0 now, so the redundant override can be removed. Change-Id: I5658e3df5af1100e139623505d0375588edae63c
* | | | Merge "Add dns_publish_fixed_ip attribute to subnets"Zuul2020-01-131-0/+26
|\ \ \ \
| * | | | Add dns_publish_fixed_ip attribute to subnetsJens Harbott2019-09-111-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the subnet_dns_publish_fixed_ip extension Neutron has added a new attribute to subnets, allowing to select whether DNS records should be published for fixed IPs from that subnet. Add support for this when creating and updating subnets. [0] https://bugs.launchpad.net/neutron/+bug/1784879 [1] https://review.opendev.org/662405 [2] https://review.opendev.org/662409 Depends-On: https://review.opendev.org/679833 Change-Id: Ia804e878acfd1f05e1f00c2ac9202c1d260827f4
* | | | | Merge "Raise flake8-import-order version to latest"Zuul2020-01-13103-163/+145
|\ \ \ \ \
| * | | | | Raise flake8-import-order version to latestSean McGinnis2020-01-10103-163/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We had this library capped at a release that is a few years old. Now that we have dropped py2 testing, we can pick up the latest version. This uncovered a few things to clean up. Mostly the fact that mock is now a part of the StdLib unittest since Python 3.3. Change-Id: I27484dd4c25378413ff16e97a35a1a46062357bc Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* | | | | | Raise hacking to more recent 2.0.0Sean McGinnis2020-01-102-2/+2
|/ / / / / | | | | | | | | | | | | | | | | | | | | Change-Id: I3cf36ed4d8fb5d003acae762820a8d80f75a11e9 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* | | | | Replace six.iteritems() with .items()lihaijing2020-01-0976-222/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. As mentioned in [1], we should avoid using six.iteritems to achieve iterators. We can use dict.items instead, as it will return iterators in PY3 as well. And dict.items/keys will more readable. 2. In py2, the performance about list should be negligible, see the link [2]. [1] https://wiki.openstack.org/wiki/Python3 [2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html Co-Authored-By: Akihiro Motoki <amotoki@gmail.com> Change-Id: I4b9edb326444264c0f6c4ad281acaac356a07e85 Implements: blueprint replace-iteritems-with-items
* | | | | Merge "Bump tox minversion"Zuul2020-01-081-1/+1
|\ \ \ \ \
| * | | | | Bump tox minversionMonty Taylor2020-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ignore_basepython_conflict was introduced in tox 3.1.0. Change-Id: I7a6049b6a4fd3ee376a3478e94837c0afe89d4df
* | | | | | Merge "Stop testing python 2 in tox and zuul."Zuul2020-01-072-35/+7
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Stop testing python 2 in tox and zuul.Daniel Bengtsson2019-12-062-35/+7
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove python 2 from envlist parameter. Check the link: https://etherpad.openstack.org/p/drop-python2-support The plan is drop the python 2 support from OpenStack in Ussuri release. Remove the zuul jobs. Note that the (non-voting) openstackclient-check-plugins job is still running under py2 at this time. That will need to be fixed in the python/openstackclient repository where the job is defined. Change-Id: I3148db053b9ef0fcf7dc88e5cc075d974c93d819
* | | | | Merge "Fix router create/show if extraroute not supported"Zuul2020-01-072-1/+19
|\ \ \ \ \
| * | | | | Fix router create/show if extraroute not supportedÉdouard Thuleau2019-12-042-1/+19
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If neutron does not support extraroute l3 extension, the route column formatter fails. Change-Id: I7b89c4f818865073947e0850e86c18d0d2415a51
* | | | | Fix openstack server list --deleted --marker optionKeithMnemonic2020-01-023-3/+63
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes using the "name" option for a marker when --deleted is also used. The find_resource() function that is being called does not correctly handle using the marker as the "name" in the search when also using deleted=True. One simple way to fix this is force the marker to only be an ID when --deleted is used. This is how the nova client works. Using the --deleted option is available to users with the admin role by default. If you're an admin listing --deleted servers with a marker by name, find_resource() is going to fail to find it since it doesn't apply the --deleted filter to find_resource(). The find_resource() function is trying to find the marker server by name if it's not found by id, and to find it by name it's listing servers with the given marker as the name, but not applying the --deleted filter so it doesn't get back any results. In the story it was suggested modifying find_resource to include the deleted query param when it's specified on the command line but that didn't work because it still results in something like this: http://192.168.1.123/compute/v2.1/servers?deleted=True&name=4cecd49f-bc25-4a7e-826e-4aea6f9267d9 It seems like there are bugs in find_resource(). Restricting the marker to be the server ID when listing deleted servers is probably OK since if you're using --deleted you're an admin and you could be listing across all projects and if you're filtering by a server across all projects anyway (not that you have to, I'm just saying if you are), or even showing a server in another project, you have to do it by id rather than name because find_resource() won't find the server in another project by name, only ID. story: 2006761 Task: 37258 Change-Id: Ib878982b1d469212ca3483dcfaf407a8e1d2b417
* | | | Provide stderr in exception when check_parser failsMatt Riedemann2019-11-202-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For negative tests that are asserting an argparse failure it would be useful to assert the specific reason for the failure in the test rather than just getting an exception, especially to avoid false positives in the tests when what is being tested and failing isn't the actual expected reason for the failure. This wraps the check_parser code that parses the args and mocks sys.stderr so we can trap that output and put it in the exception message that gets raised to the test. As a result, we can tighten up a test that was passing before for the wrong reason [1]. [1] https://review.opendev.org/#/c/673725/12/openstackclient/tests/unit/compute/v2/test_server.py@605 Change-Id: I0f1dc1215bdfb3eba98ccaf66a0041d220b93812
* | | | Microversion 2.79: Add delete_on_termination to volume-attach APIzhangbailin2019-11-195-3/+223
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added ``--disable-delete-on-termination`` and ``--enable-delete-on-termination`` options to the ``openstack server add volume`` command that enables users to mark whether to delete the attached volume when the server is destroyed. Depends-On: https://review.opendev.org/#/c/681267/ Part of blueprint support-delete-on-termination-in-server-attach-volume Change-Id: I6b5cd54b82a1135335a71b9768a1a2c2012f755b
* | | Merge "Refactor AggregateTests"Zuul2019-11-061-41/+19
|\ \ \
| * | | Refactor AggregateTestsEric Fried2019-11-051-41/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While investigating the referenced story/bug I noticed that wait_for_status in openstackclient.tests.functional.compute.v2.test_aggregate.AggregateTests was doing a lot more than it should ever need to (it probably got copied in from somewhere). The two places calling it only need to a) check the output of `openstack aggregate show`, and b) try once -- since they just got done creating the aggregate synchronously, there should never be a need to delay/retry. So this commit removes the helper method and just inlines the check. At the same time, the addCleanup(aggregate delete) directives are moved above their respective creates. This is a defensive best practice which makes sure cleanup happens even if something fails very soon after the actual back-end create (as was in fact the case with the referenced bug/story). It is unknown whether this will impact the referenced bug. Change-Id: I0d7432f13642fbccd5ca79da9c76adfcbabb5fa9 Story: 2006811 Related-Bug: #1851391
* | | | Deflate .htaccessEric Fried2019-11-052-16/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use some regexes to reduce the number of lines in .htaccess and hopefully make it slightly clearer which groupings of files redirect to which new locations. Also collapse one redundant double-redirect. Change-Id: I65c4960856985d71076291f175df17f27a5ab8cc
* | | | Add redirect testingEric Fried2019-11-053-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a dependency on and invocation of the `whereto` command to validate redirects in the .htaccess file during doc builds. Change-Id: Ib6cc2953f0fd774de3c3a0c8a2bd6cff49667c14
* | | | compute: autogenerate docsEric Fried2019-11-0513-875/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $namespace = openstack.compute.v2 The subcommand documents for $namespace were hardcoded and thus prone to drift over time. This commit removes the hardcoded content and uses the autoprogram-cliff directive to generate them automatically from the subcommand configuration classes. Many of these were already being generated. Some were missing a few sub-subcommands, so those are added. Change-Id: I1aa4b2655bafd2f6a5d83b658742f65d180eb128
* | | | openstack.cli: autogenerate docsEric Fried2019-11-052-29/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $namespace = openstack.cli The subcommand documents for $namespace were hardcoded and thus prone to drift over time. This commit removes the hardcoded content and uses the autoprogram-cliff directive to generate them automatically from the subcommand configuration classes. Change-Id: I1f7e9d0e5748f887dbc35200c3c8b4407da43e0b
* | | | common: autogenerate docsEric Fried2019-11-059-494/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $namespace = openstack.common The subcommand documents for $namespace were hardcoded and thus prone to drift over time. This commit removes the hardcoded content and uses the autoprogram-cliff directive to generate them automatically from the subcommand configuration classes. This incorporates a correction to `openstack versions show`: The command `openstack versions show --help` showed a copy/paste error, using <region-name> for the metavar for both --service and --status. Fix. Change-Id: I7658fed40d71f4c20ee27908ade433534657cfe5 Co-Authored-By: Pierre Prinetti <pierreprinetti@redhat.com> Co-Authored-By: Matt Riedemann <mriedem.os@gmail.com>
* | | | Update a stale doc reference to use :neutron-doc:Eric Fried2019-11-052-3/+5
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The help page for network auto allocated topology had a link to a newton-era networking guide document that has been superseded and is now maintained in the neutron repository. This commit adds 'neutron' to the openstackdocstheme configuration so that the :neutron-doc: role works, and updates the link to point to the modern version therein. Change-Id: I5bcb40e265b22f15ff2f5ca4936160e231bb4075
* | | Merge "neutron: autogenerate docs"Zuul2019-11-0532-4904/+525
|\ \ \
| * | | neutron: autogenerate docsEric Fried2019-11-0132-4904/+525
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $namespace = openstack.network.v2 The subcommand documents for $namespace were hardcoded and thus prone to drift over time. This commit removes the hardcoded content and uses the autoprogram-cliff directive to generate them automatically from the subcommand configuration classes. This one turned out to be quite involved, because we support both neutron and nova-network. When running in a real cloud, the command classes detect whether the neutron service is present, assume nova-network if that service is not found, and only add parser options relevant to the detected service. But the docs need to present both sets of options. This was easy enough when they were hardcoded, but required a bit of additional infrastructure for generated docs. Change-Id: I426261eb1d86bcc68656aabd61f10b7f082da402
* | | | Merge "Use autoprogram-cliff for remaining plugin docs"Zuul2019-11-048-44/+17
|\ \ \ \
| * | | | Use autoprogram-cliff for remaining plugin docsEric Fried2019-10-288-44/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sphinx errors have been fixed in the plugin projects for octavia, rsd, trove, watcher, and zun, so we can now use autoprogram-cliff to generate the docs for those. Change-Id: Ia7790c5e86957afd0aec8f9a04ffc7aa968b4eeb Story: #1735016 Task: #37241
* | | | | Merge "Use SDK to get compute API extensions"Zuul2019-11-042-15/+10
|\ \ \ \ \ | |_|/ / / |/| | | |
| * | | | Use SDK to get compute API extensionsMatt Riedemann2019-10-312-15/+10
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | python-novaclient 16.0.0 removed the deprecated list_extensions module [1] so this changes the extensions command to use openstacksdk to get the compute API extensions. The functional test ExtensionTests.test_extension_list_compute ensures this works. [1] https://review.opendev.org/686516/ Change-Id: I9894bc395c0474aaa6494ac4534862efe4ea7984 Story: #2006769 Task: #37284
* | | | versions: Fix 'versions show' help messagePierre Prinetti2019-11-012-3/+13
|/ / / | | | | | | | | | | | | | | | | | | The command `openstack versions show --help` shows a copy-paste nit. Change-Id: I9e4e86429ffd630c566bbdf2929e7995c9b0dbe1 Signed-off-by: Pierre Prinetti <pierreprinetti@redhat.com>
* | | Fix functional tests for py3Eric Fried2019-10-315-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix various things so the functional tests will work under python3: - A hashlib.md5() can only be update()d with an encoded string in py3. - There's no dict.iteritems(), change to dict.items() (which is already an iterator). - Open temp files with 'w+' mode rather than the default 'w+b' (as an alternative to encoding all the write and expected-read payloads as bytes). - (This is a weird one) Explicitly raise SkipTest from unittest (rather than unittest2, which is where cls.skipException landed). Not sure why this is busted, but this moves the ball. Change-Id: Ic9b2b47848a600e87a3674289ae7ae8c3e091fee
* | | Merge "Doc: launchpad => storyboard"Zuul2019-10-223-12/+10
|\ \ \
| * | | Doc: launchpad => storyboardEric Fried2019-10-223-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A few docs still referred to launchpad, which osc hasn't used in a couple of years. Cut over to storyboard. Change-Id: Ic9abf0fe1e52c255976bd7a019e999a8e610455e
* | | | Merge "Remove plugin projects from test-requirements.txt"Zuul2019-10-221-23/+0
|\ \ \ \
| * | | | Remove plugin projects from test-requirements.txtEric Fried2019-10-211-23/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Plugin projects were listed in test-requirements.txt ostensibly to pull them in for autodoc building. However, test-requirements.txt wasn't being used for that purpose -- doc/requirements.txt was, so [1] added them there. So this commit removes them from test-requirements.txt where they're unused. [1] Id9be39971110fd2eb4519a0582c9bf2514cdcacd Change-Id: Ia89888ee05e17da636ee46894232624e0178d6bc
* | | | | Merge "Link to (some) plugin doc pages"Zuul2019-10-224-0/+15
|\ \ \ \ \ | | |_|/ / | |/| | |