750 Commits

Author SHA1 Message Date
Stephen Finucane
7561e062eb Add 'openstack server resize (confirm|revert)' commands
These are currently exposed as flags on the 'openstack server resize'
command but they are in fact operation and should be exposed as commands
in their own right.

The old flag-based variants are deprecated for removal in 4.0.

Change-Id: I733796d3bda6c3755a3d3548bbe695abb474a6a0
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-08-09 15:48:15 +00:00
Zuul
57dec524c8 Merge "Batch up minor cleanups for release" 2019-06-06 23:19:12 +00:00
Zuul
25ccca4063 Merge "Deprecate openstack server migrate --host option" 2019-06-06 19:05:46 +00:00
Zuul
86d7490f77 Merge "Add changes-before attribute to server list" 2019-06-06 17:40:48 +00:00
Zuul
95626f1acb Merge "Compute: Add description support for server" 2019-06-05 03:25:46 +00:00
zhangbailin
ef1fd38815 Add changes-before attribute to server list
Closes-Bug: #1827844
Part of bp support-to-query-nova-resources-filter-by-changes-before

Change-Id: I4f28168188973730247bcbcb70ba0e70eb81e3be
2019-05-31 05:39:29 +00:00
Matt Riedemann
3057989714 Deprecate openstack server migrate --host option
Per the discussion at the Train Forum [1] this deprecates
the problematic --live option on the server migrate command
which, depending on the compute API version used, forcefully
bypasses the scheduler and also does not allow you to live
migrate a server and let the scheduler pick a host.

The --live option is replaced here with two new options:

* --live-migration: this simply tells the command you want to
  perform a live rather than cold migration; if specified with
  --live the --live-migration option takes priority.

* --host: when specified, this will request a target host for
  the live migration and will be validated by the scheduler;
  if not specified, the scheduler will pick a host. This option
  is mutually exclusive with --live.

We can build on the --host option by supporting cold migrations
with a specified host when using compute API version 2.56 or
greater but that will come in a separate change.

If the --live option is ever used we log a warning.

Note there are several related changes for this issue:

- https://review.openstack.org/#/c/628334/
- https://review.openstack.org/#/c/626949/
- https://review.openstack.org/#/c/627801/
- https://review.openstack.org/#/c/589012/
- https://review.openstack.org/#/c/460059/

This change allows us to deprecate the --live option and provide
a replacement which is backward compatible without having to use
something potentially error-prone like nargs='?'.

Closes-Bug: #1411190

[1] https://etherpad.openstack.org/p/DEN-osc-compute-api-gaps

Change-Id: I95d3d588e4abeb6848bdccf6915f7b5da40b5d4f
2019-05-24 15:57:54 -04:00
Dean Troyer
6f1f44d422 Batch up minor cleanups for release
Change-Id: Id45788e17c5388cee54e79cab1c120cfcc8f9f62
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-05-20 08:41:28 -05:00
Zuul
e90b79be4c Merge "Fix RuntimeError when showing project which has extra properties" 2019-05-17 23:07:57 +00:00
Zuul
8ee23fe917 Merge "Fix bug in endpoint group deletion" 2019-05-17 21:33:34 +00:00
Chen
c77a9621be Compute: Add description support for server
This patch adds functionality to configure server's description with:
1 server create
2 server set
3 server unset
4 server rebuild

Change-Id: Ic06d97b29e51828b29d7ac5172645c288e4ada9e
Story: 2002005
Task: 19640
2019-05-17 20:56:45 +00:00
Zuul
ba66cdfcfa Merge "Fix --limit option in image list sub-command" 2019-05-08 23:25:16 +00:00
Jose Castro Leon
04e03b2a1f Fix bug in endpoint group deletion
There is a typo in the endpoint group deletion, due to this you
can't remove endpoint groups once assigned. I am adding also the
unit tests to avoid this kind of issues in the future

Task: 30640
Story: 2005521
Change-Id: Ie938f2c9894bb39b4c0ed1f7aa3a6a751a303058
2019-05-08 16:22:27 -05:00
Tim Burke
415b48056d Before writing object data to stdout, re-open it in binary mode
Otherwise, you can hit TypeErrors on Python3.

Change-Id: I9a891508886feddac3982ce593bd95130392e035
Closes-Bug: 1775482
2019-04-10 14:34:40 -05:00
Zuul
c36e75d986 Merge "Add 'security_group' type support to network rbac commands" 2019-03-11 02:41:39 +00:00
Zuul
6868499ad9 Merge "Add network segment range command object" 2019-03-08 02:27:37 +00:00
Kailun Qin
d52920b387 Add network segment range command object
Add network segment range command object in support of network segment
range management.

This patch set includes documentation, unit tests and functional tests
(currently skipped unit network segment range enabled in Neutron by
default) for the following new commands:
  - "os network segment range create"
  - "os network segment range delete"
  - "os network segment range list"
  - "os network segment range set"
  - "os network segment range show"

Co-authored-by: Allain Legacy <Allain.legacy@windriver.com>

[depends on removed by dtroyer as those are all +W and 
trying to pass the gate, OSC has it's freeze dealine looming]
 Depends: https://review.openstack.org/624708
 Depends: https://review.openstack.org/624709
 Depends: https://review.openstack.org/638386

Partially-implements: blueprint network-segment-range-management
Change-Id: I335692f2db5be07c1c164f09b13f1abb80b7ba33
2019-03-07 19:39:17 +00:00
Zuul
7feb9d38d0 Merge "API microversion 2.69: Handles Down Cells" 2019-03-07 08:01:45 +00:00
Zuul
f992617f79 Merge "Add support for get details of Quota" 2019-03-07 00:34:18 +00:00
Zuul
8159fc216d Merge "Add possibility to filter images using member_status" 2019-03-07 00:34:17 +00:00
Surya Seetharaman
239b103849 API microversion 2.69: Handles Down Cells
This patch explicitly points out the change needed while
forming the detailed lists for servers. In those cases
where the server response for ``openstack server list``
has the flavor and image keys missing for the instances
in the down cell, the servers will be skipped from being
processed.

Depends-On: https://review.openstack.org/591657/
Related to blueprint handling-down-cell
Change-Id: Ibcfe9febdc45db1cb86c6e88f65976feceb01c02
2019-03-06 08:35:25 +00:00
Doug Wiegley
be7a75814c
Add 'security_group' type support to network rbac commands
Partial-Bug: #1817119
Depends-On: https://review.openstack.org/635311
Change-Id: I5f132fa54714514d8dae62df8bc494f3f6476768
2019-03-05 21:02:03 -07:00
David Rabel
e776a4f026 Add --attached / --detached parameter to volume set
As to reflect cinder reset-state --attach-status functionality,
this patch adds --attached / --detached parameter to OSC's volume set
command.

Change-Id: Ic8ee928c9ab0e579512cfb7608f63bfcc2993c7b
Closes-Bug: #1745699
2019-02-28 15:48:34 +00:00
Artem Goncharov
444a40c656 Add possibility to filter images using member_status
In order to see image sharing membership it is required to additionally
pass member_status filter to API. Otherwise only those with status 'all'
will be returned. Thus adding possibility to see images shared with
project to be approved or rejected.

Change-Id: Ifd6e13e5a4ef09fbc29e76d464c93fbdbb178ae4
2019-02-26 11:13:25 +01:00
Sławek Kapłoński
75cba9d1cb Add support for get details of Quota
With passing "--detail" argument to "openstack quota list", details
about current usage should be returned.
It is currently supported by Nova and Neutron so details of
resources from those projects can be returned.

Change-Id: I48fda15b34283bb7c66ea18ed28262f48b9229fe
Related-Bug: #1716043
2019-02-24 10:41:53 +00:00
Radoslaw Smigielski
aaf73cbf6d Fix --limit option in image list sub-command
Client site fix of --limit option.

This bugfix makes client "image list" command working again with
"--limit" option. This option was ignored and even if user specified it,
still list of all available images was returned.

Story: 2004314
Change-Id: I30a78d65a644c9b7d23706a6637ce77bca2c2386
Depends-On: https://review.openstack.org/#/c/634776/
2019-02-04 18:52:13 +00:00
Zuul
7b72fb816f Merge "Support enable/disable uplink status propagation" 2018-12-24 12:00:03 +00:00
Zuul
279546736a Merge "Update the URL in doc" 2018-12-21 00:26:47 +00:00
LIU Yulong
fd23025227 Supports router gateway IP QoS
Adds --qos-policy and --no-qos-policy to `openstack router set`:
    --qos-policy <qos-policy> Attach QoS policy to router gateway IPs
    --no-qos-policy Remove QoS policy from router gateway IPs

Adds --qos-policy to `openstack router unset`:
  --qos-policy Remove QoS policy from router gateway IPs

Partially-Implements blueprint: router-gateway-ip-qos
Closes-Bug: #1757044
Change-Id: Ifec3b2cf9bdb59513c8bcd7bd60305506a071192
2018-12-10 17:20:38 +00:00
Hongbin Lu
c82f4237e5 Support enable/disable uplink status propagation
Add options to enable/disable uplink status propagation on creating
a neutron port.

Related patches:
* neutron: https://review.openstack.org/#/c/571899/
* openstacksdk: https://review.openstack.org/#/c/586687/

Depends-On: https://review.openstack.org/#/c/586687/
Change-Id: I095a98fc5f5aee62d979a16b3cd79d91ec3b9ddb
Related-Bug: #1722720
2018-12-05 21:07:07 +00:00
Sean McGinnis
b90c780d2b
Add volume backup import/export commands
This adds commands to import and export volume backup records so they
can be imported and restored on other Cinder instances or to the
original instance if the service or database has been lost and had to be
rebuilt.

I know this is a commonly used process by some users, so it would be
good to have this functionality in osc so they do not have to switch
clients.

More details about the export and import process can be found here:

https://docs.openstack.org/cinder/latest/admin/blockstorage-volume-backups-export-import.html

Change-Id: Ic95f87b36a416a2b50cb2193fd5759ab59336975
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2018-11-10 02:11:04 -06:00
Zuul
097b45686e Merge "Add project param in LimitList parser" 2018-11-08 23:27:05 +00:00
Zuul
51986b1eae Merge "Remove invalid 'unlock-volume' migration arg" 2018-11-08 19:11:06 +00:00
Zuul
c3a60e1173 Merge "Add --name-lookup-one-by-one option to server list" 2018-11-08 19:07:02 +00:00
Vishakha Agarwal
0d764cdb5a Add project param in LimitList parser
when doing openstack limit list --project xyz_id,
CLI raising error unrecognized arguments, whereas
in api-ref document [1], user can pass project_id
as query param.This addresses the above issue, by
adding param --project in parser of LimitList.

[1] https://developer.openstack.org/api-ref/identity/v3/index.html

Change-Id: If4644cc99a3803f61f4a688b828aeb73977fc0dd
Closes-Bug: #1798744
2018-11-08 11:19:24 -06:00
Zuul
9b1e5f052e Merge "image/v2: support multiple property filters" 2018-11-08 05:40:17 +00:00
Sven Wegener
21e4c87bde
image/v2: support multiple property filters
Change-Id: I8ba40cb8ca647ec24b80c2824bb64e84430535d4
Signed-off-by: Sven Wegener <sven.wegener@inovex.de>
2018-11-07 14:55:51 +01:00
melanie witt
013c9a4f3a Handle multiple ports in AddFloatingIP
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
2018-11-06 20:18:13 +00:00
Zuul
1894a3cb17 Merge "Add --key-name and --key-unset option for server rebuild API." 2018-11-02 19:41:24 +00:00
Zuul
9ab8143179 Merge "Address issues from volume backend commands" 2018-11-02 18:00:32 +00:00
Pavlo Shchelokovskyy
e782f49927 Add --name-lookup-one-by-one option to server list
usually in a big cloud there are many images and flavors,
while each given project might use only some of those.

This patch introduces '--name-lookup-one-by-one' argument to
server list command (mutually exclusive with '--no-name-lookup')

When provided (or either '--image' or '--flavor' is specified) to the
`server list` command, name resolving for
corresponding entity is now using targeted GET commands instead of
full entities list.

In some situations this can significantly speedup the execution of the
`server list` command by reducing the number of API requests performed.

Change-Id: I59cbf3f75c55e5d3747654edcc9be86ad954cf40
Story: #2002039
Task: #19682
2018-11-02 12:01:36 -05:00
Sean McGinnis
f00ffebea6
Remove invalid 'unlock-volume' migration arg
There is an optional flag that can be passed in to a
volume migration to tell Cinder to 'lock' a volume so
no other process can abort the migration. This is
reflected correctly with the --lock-volume argument
flag to `openstack volume migrate`, but there is
another --unlock-volume flag that is shown in the help
text for this command that does not do anything and is
not used anywhere.

Since there is no action to "unlock" a volume, this
just causes confusion - including for Cinder developers
that know this API. To avoid confusion, this invalid
flag should just be removed from the command.

Change-Id: I5f111ed58803a1bf5d34e828341d735099247108
2018-10-26 12:02:58 -05:00
Zuul
ac9877de46 Merge "Add volume backend pool list command" 2018-10-12 22:41:43 +00:00
Zuul
5ad925b600 Merge "Add volume backend capability show command" 2018-10-12 22:41:41 +00:00
Sean McGinnis
e0615e8d69
Address issues from volume backend commands
This fixes some minor issues in release notes and the command list for
the new volume backend commands.

Also sorts the fakes used for volume unit tests to allow for multiple
command update patches to hopefully reduce the odds of merge conflicts.

Change-Id: Ic6e40f4c639368338cf085c68c17038f81da5361
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2018-10-12 15:54:02 -05:00
Sean McGinnis
9647d43bd5
Add volume backend pool list command
Adds an equivalent for "cinder get-pools" with "volume backend pool list"
and "cinder get-pools --detail" with "volume backend pool list --long".

Story: 1655624
Task: 136949

Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Change-Id: I826c9946ffe11340d44ad57914f72fc2a72b6938
2018-10-09 15:56:58 -05:00
Sean McGinnis
4039d0d94f
Add volume backend capability show command
Adds and equivalend for "cinder get-capabilities" command to show the
capabilities supported by a Cinder backend.

Story: 1655624
Task: 26947

Change-Id: I38686a26cd503e45ce0102705a6632994ef10274
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2018-10-09 15:31:35 -05:00
Fan Zhang
f82c5b85ce Add --key-name and --key-unset option for server rebuild API.
Change-Id: I6d4793a8e961080ea1d6d414cef8d6bbed0c53e7
Story: 2002609
Task: 22228
Signed-off-by: Fan Zhang <zh.f@outlook.com>
2018-10-09 14:34:44 +08:00
Ruby Loo
e3dc30fe8c Add --property option to 'server rebuild' command
Add '--property' option to the 'server rebuild' command, to provide
the ability to specify properties of the rebuilt instance.

This is equivalent to the '--meta' option of the compute's
'nova rebuild' command.

Change-Id: I25ea6622e970416090109316e1e28fab8b0b3f07
Story: #2003979
Task: #26922
2018-10-05 16:33:48 -04:00
melissaml
341333b7c3 Update the URL in doc
Change-Id: I1c0c58dada83a930fafc7141d5446c754ca5c80c
2018-09-23 23:06:48 +08:00