summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Handle multiple ports in AddFloatingIPqueens-em3.14.3melanie witt2018-11-083-15/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AddFloatingIP refers to an old nova proxy API to neutron that was deprecated in nova. The neutron API for floating IP associate requires a port to be specified. Currently, the code is selecting the first port if the server has multiple ports. But, an attempt to associate the first port with a floating IP can fail if the first port is not on a network that is attached to an external gateway. In order to make the command work better for users who have a server with multiple ports, we can: 1. Select the port corresponding to the fixed_ip_address, if one was specified 2. Try to associate the floating IP with each port until one of the attempts succeeds, else re-raise the last exception. (404 ExternalGatewayForFloatingIPNotFound from neutron) This also fixes incorrect FakeFloatingIP attributes that were being set in the TestServerAddFloatingIPNetwork unit tests, which were causing the tests to use None as parsed args for ip-address and --fixed-ip-address and thus bypassing code in the 'if parsed_args.fixed_ip_address:' block. Task: 27800 Story: 2004263 Change-Id: I11fbcebf6b00f12a030b000c84dcf1d6b5e86250 (cherry picked from commit 013c9a4f3a44cb0b81fc7affe9b933e701cb5dba) (cherry picked from commit e09c358e7b35ac938595aad90c5c42dfe402a42a)
* Merge "Default --nic to 'auto' if creating a server with >= 2.37" into ↵Zuul2018-11-024-7/+66
|\ | | | | | | stable/queens
| * Default --nic to 'auto' if creating a server with >= 2.37Matt Riedemann2018-10-254-7/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compute API version >= 2.37 requires a 'networks' value in the server create request. The novaclient CLI defaults this to 'auto' if not specified, but the novaclient ServerManager.create python API binding code does not, as it wants clients to be explicit. For the purposes of the OSC CLI, we should follow suit and if the user is requesting OS_COMPUTE_API_VERSION>=2.37 without specific nics, we should just default to 'auto'. Change-Id: Ib760c55e31209223338a4086ff1f4fee88dc6959 Closes-Bug: #1750395 (cherry picked from commit 1008544882fbdae16b045abca05cf3e2e8a14787) (cherry picked from commit 4944d4eaa9aaeffdee358680550ac7d7f0c6e8d8)
* | Merge "Allow endpoint filtering on both project and project-domain" into ↵Zuul2018-11-022-1/+42
|\ \ | |/ |/| | | stable/queens
| * Allow endpoint filtering on both project and project-domainJulie Pichon2018-10-152-1/+42
| | | | | | | | | | | | | | | | | | | | | | | | The --project and --project-domain flags are currently mutually exclusive for listing endpoints, however the --project-domain argument is supposed to help with filtering projects with colliding names. They should be allowed together. Story: 2004018 Task: 27006 Change-Id: I7340e01f509e3515f07cb46f175fb603f1ce8b67 (cherry picked from commit 91a2d888625488da3f65ad372b4248e9747b9a3e)
* | Don't sent disk_over_commit if nova api > 2.24Artom Lifshitz2018-10-252-5/+43
|/ | | | | | | | | | | In API microversion 2.25 Nova removed the disk_over_commit parameter to the live migration server action. This patch makes sure that we don't include it in our request if we're running with 2.25 or higher. Story: #2002963 Task: #22966 Change-Id: I1bbdd33be96d82422a05982508e370237c3560f3 (cherry picked from commit d6121782d3aa6a95b883220b27a154e641b61f7f)
* Merge "Fix 'project purge' deleting wrong project's servers and volumes" ↵Zuul2018-10-032-14/+20
|\ | | | | | | into stable/queens
| * Fix 'project purge' deleting wrong project's servers and volumesJulie Pichon2018-09-172-14/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Project purge would delete the servers and volumes for the project the user is currently authenticated for, regardless of the --project flag. Note: This change means that no server at all will be deleted if the logged in user doesn't have the get_all_tenants permission set in the Nova policy (default: admin_api). This doesn't appear to be an issue with Cinder as the default rule appears to be admin_or_owner. Change-Id: If1c54e24e1482438b81c3c32fd5fc9fdd7a7be04 Story: 1747988 Task: 26495 (cherry picked from commit 1b66ad9067cc404ebfdc8569822d226d5bffddd6)
* | Merge "Do not require port argument when updating floating IP" into ↵Zuul2018-09-173-10/+75
|\ \ | |/ |/| | | stable/queens
| * Do not require port argument when updating floating IPyanpuqing2018-08-213-10/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When setting floating ip other properties, port argument is force to use. The patch modifies the command, when setting floating ip other properties, like tags, no need port argument. Change-Id: I908712c8913f32d3dd5fdfefe7347277d72f66de Story: 1751431 Task: 13865 Closes-Bug: #1778666 (cherry picked from commit 402c9a21b347509520be206e28ee7d0ef4004b92) Small changes due to changes in tag handling and how unit tests are working. Conflicts: doc/source/cli/command-objects/floating-ip.rst openstackclient/network/v2/floating_ip.py openstackclient/tests/unit/network/v2/test_floating_ip_network.py
* | import zuul job settings from project-configqingszhao2018-08-211-0/+9
|/ | | | | | | | | | | | | | | | | | | | This is a mechanically generated patch to complete step 1 of moving the zuul job settings out of project-config and into each project repository. Because there will be a separate patch on each branch, the branch specifiers for branch-specific jobs have been removed. Because this patch is generated by a script, there may be some cosmetic changes to the layout of the YAML file(s) as the contents are normalized. See the python3-first goal document for details: https://governance.openstack.org/tc/goals/stein/python3-first.html Change-Id: I802c27530ce5f026fa8872294867885c17a6c833 Story: #2002586 Task: #24320
* Prevent "server migrate --wait" from hangingJulie Pichon2018-06-051-0/+1
| | | | | | | | | | | | | | Migrate uses the same mechanism in the backend than Resize and so the steps and step names are similar. Currently when using the --wait option with 'migrate', we wait forever because the status won't get to active until the user performs an action. This makes it return on verify_resize status just like 'resize' does, so that the user can perform the next manual step. Change-Id: Ie1aeac52506bc8801f88fd6a6eb4f6094cf20050 Story: 2001994 Task: 19620 (cherry picked from commit de9a6fc0700d821f9fca6bf347407eccd87f0064)
* Re-implement novaclient bits removed in 10.03.14.2Dean Troyer2018-04-208-110/+618
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a) /os-floating-ips was removed in Compute API 2.36 and from novaclient's Python API in 10.0 Add to api.computev2: floating_ip_add() floating_ip_remove() Convert add floating IP command to nova-net/neutron split: "server add floating ip" "server remove floating ip" b) /os-hosts was removed in Compute API 2.43 and from novaclient's Python API in 10.0. Add to api.computev2: host_list() host_set() host_show() Convert host commands to use intenal api: "host list" "host set" "host show" c) The introduction of the Network-style commands into the server group broke cliff's autoprogram directive as it executes the get_parser() methods without fully initializing the Command object. NOTE: This is really three reviews squashed to get through the gate in one pass. Closes-Bug: #1745795 Change-Id: I5116086f9a9e4b2b31a744bf8f4558c79f0bfe59 (cherry picked from commit 53e7aab7ed4d6c981ca067c1db8bce290a5f0055)
* Clean up W503 and E402 pep8 errorsSean McGinnis2018-04-2013-255/+232
| | | | | | | | | | | | | pycodestyle 2.40 and later enforce these rules that were not previously enforced. Rather than just skipping them, this cleans up the trivial instances of these violations. This does also include some other updates that were not triggering errors in an attempt to keep some of the style consistent. Change-Id: Id7c0a6b8f1f835e69d844b000e3ed751852ada63 Closes-bug: #1762803 (cherry picked from commit d60141525987bc973802b4ec9a3b027e071d1966)
* neutron: add --mtu for create/set network3.14.1Emilien Macchi2018-03-265-0/+41
| | | | | | | | Support Neutron network mtu configuration with a new argument, --mtu that allows CLI users to set MTU for Neutron networks. Change-Id: I93d23581c7e8c84eaf9bb3b293360036f60f456b (cherry picked from commit 18563b4132f794cc6612c2897795f96a31b565ae)
* Rename python-openstacksdk to openstacksdkMonty Taylor2018-03-231-5/+5
| | | | Change-Id: Ied0d17ce72343bd4f6e0e5f04b217140f13388da
* Merge "Updated from global requirements" into stable/queensZuul2018-03-141-1/+1
|\
| * Updated from global requirementsOpenStack Proposal Bot2018-02-281-1/+1
| | | | | | | | Change-Id: Id75acca8d651c4151c3049a453957ba19b1550d6
* | Handle SDK changesDean Troyer2018-03-131-1/+8
|/ | | | | | | | | | stable/queens allows SDK >=0.9.19 and <=0.11.3. Somewhere in there the return text of an exception changed. Backport portions of Id6de1485bcafb41f238f3e74277094ce64a6acf4 to handle this change, but modify to work with either text form sice both are allowed. Change-Id: Ibfee8e1e2ae4eca763894bbee8747297e0fb350f
* Updated from global requirementsOpenStack Proposal Bot2018-02-131-1/+1
| | | | Change-Id: I06d63b39c169f8b5d62ced0fc94a3dcc31bea5ad
* Update UPPER_CONSTRAINTS_FILE for stable/queensOpenStack Release Bot2018-01-251-3/+3
| | | | Change-Id: If19d291604be46cef82041f89f2d9b426bae9dfe
* Update .gitreview for stable/queensOpenStack Release Bot2018-01-251-0/+1
| | | | Change-Id: I44c7c4bf0627266604e56ddd8e18d02f482c4601
* Updated from global requirements3.14.0OpenStack Proposal Bot2018-01-241-1/+1
| | | | Change-Id: I7b712b41e633f7e3dc40749b5a55706cb32fecee
* Fix use of new openstacksdk connectionMonty Taylor2018-01-231-0/+1
| | | | | | | We store the created conn on the instance, but we never pull it back off if there is already one present. Change-Id: I2d890dd206d4ddf67fa42d798e6fd2c652799785
* Rework Network client config for new SDK ConnectionDean Troyer2018-01-221-19/+26
| | | | | | | | network.client.make_client() has always put a copy of it's SDK Connection directly into ClientManager, the new-style Connection create will move into osc-lib ClientManager, do it here too until then. Change-Id: I1edfd19c9e73320768fb9640931fafe857c980b4
* Merge "Updated from global requirements"Zuul2018-01-221-1/+1
|\
| * Updated from global requirementsOpenStack Proposal Bot2018-01-191-1/+1
| | | | | | | | Change-Id: I72c81c299759b883e316b450716d1528bdb06308
* | Merge "Replace assert with condition"Zuul2018-01-221-3/+1
|\ \
| * | Replace assert with conditionPavlo Shchelokovskyy2018-01-221-3/+1
| | | | | | | | | | | | | | | | | | | | | a piece of code in image client has some business logic behind assert, which can be lost when running python in optimized mode (-O). Change-Id: I2179970df495e1215d691915c51cebe5cb4541a7
* | | Merge "Check that Glance returns image data before processing it"Zuul2018-01-223-0/+64
|\ \ \ | |/ / |/| |
| * | Check that Glance returns image data before processing itMike Fedosin2018-01-053-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now if Glance v2 cannot find image data it returns an empty response with 204 status code, instead of raising an error. Glance client handles this situation and wraps the response with a RequestIdProxy object, whose 'wrapped' attribute is None. But when openstack client tries to parse this object using glanceclient's save_image util function, it fails with "NoneType object is not iterable" message, for the object doesn't contain any data. This patch adds additional check to prevent such behaviour and raises SystemExit exception if no data was returned from the server. Glance v1 is not affected, because it raises an error if can't find an image data. Change-Id: I016a60462ba586f9fa7585c2cfafffd7be38de7b Closes-Bug: #1741223
* | | Corrected spelling mistakeDavid Rabel2018-01-191-1/+1
| |/ |/| | | | | | | | | in quotas -> in quotes Change-Id: I3adb1ccd8f3a9c495f0b9cf688aee5c4c1e63507
* | Merge "Fix indentation in authentication.rst"Zuul2018-01-181-6/+6
|\ \
| * | Fix indentation in authentication.rstDavid Rabel2018-01-171-6/+6
| | | | | | | | | | | | | | | | | | Fix indentation in doc/source/cli/authentication.rst Change-Id: I7d408e9d27a384903680303219f2578be0e2937e
* | | Merge "Updated from global requirements"Zuul2018-01-181-1/+1
|\ \ \
| * | | Updated from global requirementsOpenStack Proposal Bot2018-01-181-1/+1
| |/ / | | | | | | | | | Change-Id: Ic5715c21e19d92c8f3d85091bfa41c28bb271c42
* | | Merge "Partially Revert "Update new documentation PTI jobs""Zuul2018-01-181-2/+1
|\ \ \
| * | | Partially Revert "Update new documentation PTI jobs"Doug Hellmann2018-01-171-2/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The zuul job figures out whether to run "setup.py build_sphinx" or "build-sphinx" based on whether the project is relying on pbr's ability to auto-generate API reference docs. Because we are relying on that, we want local builds to use "setup.py build_sphinx". This reverts commit 42e0037cd055d81d9452f046c347f8e469d27350. Change-Id: Ia01188110fa9c3ccaf3d794fa3a511a6780e683e
* | | Merge "Use Zuul v3 fetch-subunit-output"Zuul2018-01-181-2/+1
|\ \ \ | |/ / |/| |
| * | Use Zuul v3 fetch-subunit-outputAndreas Jaeger2018-01-161-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | We have consolidated the fetch output roles into one fetch-subunit-output, replace useage of old roles with new one. Depends-On: I0cdfc66ee8b046affeb0b071fef38c21cb7a4948 Change-Id: Iae2892d9b4cd870a11579434edc9ee66bd16798c
* | | Updated from global requirementsOpenStack Proposal Bot2018-01-161-1/+1
|/ / | | | | | | Change-Id: I72311597c1b62d985282cef5e219c16cd6745b42
* | Updated from global requirementsOpenStack Proposal Bot2018-01-151-1/+1
| | | | | | | | Change-Id: I90df2e58bb83239f5b041982844516eb34cb5656
* | Merge "Add floating IP qos_policy actions"Zuul2018-01-115-3/+201
|\ \
| * | Add floating IP qos_policy actionsLIU Yulong2018-01-115-3/+201
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now we can associate a qos policy to the floating IP, and dissociate it. The commands are: $ openstack floating ip create --qos-policy ... $ openstack floating ip set --qos-policy ... $ openstack floating ip set --no-qos-policy ... $ openstack floating ip unset --qos-policy These commands are based on the neutron change: I4efe9e49d268dffeb3df4de4ea1780152218633b Partially-Implements blueprint: floating-ip-rate-limit Change-Id: I932b32f78cc5a2b53926feaec1a0b392cf7e8b57
* | Updated from global requirementsOpenStack Proposal Bot2018-01-092-1/+4
| | | | | | | | Change-Id: Ic85eb65f3f143fdfbf2b6fa71d7cdd6961b24c76
* | Allow ports filtering with device_idHongbin Lu2018-01-034-1/+35
|/ | | | | | | | | | Right now, if a neutron port is owned by a container powered by Kuryr, there is no way to list and filter those ports because OSC assumed a neutron port is owned by either a server or router. This patch adds support for that by introducing an option '--device-id' to the 'port list' command. Change-Id: Ib1fd27e8d843a99fb02ccabd8a12a24ac27cec9c
* Merge "Update new documentation PTI jobs"Zuul2018-01-033-5/+15
|\
| * Update new documentation PTI jobsGuoqiang Ding2017-12-283-5/+15
| | | | | | | | | | | | | | | | | | | | For compliance with the Project Testing Interface as described in [1]. For more detailed information, please refer to [2]. [1] https://governance.openstack.org/tc/reference/project-testing-interface.html [2] http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html Change-Id: I7e8c47dead1e019e8705db3ff7559dd39b1d90d9
* | Merge "Allow port list to shown undefined attributes"Zuul2017-12-312-2/+14
|\ \
| * | Allow port list to shown undefined attributesAkihiro Motoki2017-11-242-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At now, OSC command implementation extracts resource attributes based on a predefined column list, so if a user specifies an unknown attribute not defined in the column lists, such attribute will be ignored. In case of 'port list', the neutron port defines many attributes and it is not a good idea to show all attributes even in the long mode from the perspective of user experience. This commit consumes osc_lib.utils.calculate_headers_and_attrs() function to show undefined port attributes if requested in -c option. Closes-Bug: #1707848 Depends-On: I6c6bc3c6e3c769c96869fd76b9d9c1661280850e Change-Id: I130a6aed41d80603698b6cab0c9a1d1dc59df743