3140 Commits

Author SHA1 Message Date
Glenn Van de Water
7741347041 Fix service discovery in functional tests
If a required service is not enabled then we skip the test.
The discovery is done by tests/functional/base.py:is_service_enabled
but this method is broken, credentials are not passed to the
'openstack service show' command so every call will fail and every test
that relies on it will be skipped. This commit fixed that method and
the issues that popped up when re-enabling tests.

Network segment range:
 - issue where we assumed network-segment-range extension is always
   present
 - issue where we compare integers and string representations of numbers

Subnet:
 - issue where we try to deepcopy an uncopyable object in UnsetSubnet

Change-Id: Id3cc907c1ed2a25b49cf6f4a7233e0401a02383a
Story: 2005169
Task: 29908
2019-03-13 16:16:24 +01:00
Kailun Qin
28c06d0688 Fix: set invalid None project_id on range creation
"project_id" attribute should not be set to None on shared network
segment range creation since it is not a valid string type which is
required for the API.

Change-Id: Ia2bab12e39b4bb7e05ff2acfffb851252c100651
Story: 2005205
Task: 29975
2019-03-13 01:48:46 +08: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
Zuul
c305ac2896 Merge "Mention compute API 2.50 in openstack quota show --class" 2019-03-07 23:19:16 +00:00
Zuul
e59b9f4261 Merge "Add note about version 2.5 when listing servers using --ip6" 2019-03-07 21:05:01 +00:00
Zuul
b83c6dc26a Merge "Mention 2.51 in help for openstack server event show" 2019-03-07 21:03:53 +00:00
Matt Riedemann
626a3a021c Mention compute API 2.50 in openstack quota show --class
There is a bug in the compute API until microversion 2.50
where the server-groups and server-group-members class
quota fields aren't returned. This just mentions that
microversion in the command help text.

Change-Id: I029a614a922d642c578618c478c4d0a29a394fc2
Task: 21490
Story: 2002194
2019-03-07 14:41:09 -05: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
Zuul
1d16eed45a Merge "Paginate over usage list to return all usages" 2019-03-06 19:37:36 +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
Zuul
f5980f9508 Merge "Typo fix" 2019-03-06 01:24:18 +00:00
Zuul
303cb4735d Merge "Add --attached / --detached parameter to volume set" 2019-03-06 00:58:17 +00:00
Pavlo Shchelokovskyy
c79de8a90b Paginate over usage list to return all usages
since nova api 2.40 the os-simple-tenant-usage API supports pagination
and will by default return a number of entities configured internally in
Nova.
This means that when there are many enough projects,
the single call to usage.list() will not return usages for all projects.

This patch effectively copy-pastes the logic to paginate over usage list
results from novaclient/v2/shell.py code.

Change-Id: I1b639fe386b7b7db3223f6965495094b9d51533a
Story: #2005099
Task: #29713
2019-02-28 20:27:04 +02:00
Zuul
3599ebe933 Merge "Fix: Restore output 'VolumeBackupsRestore' object is not iterable" 2019-02-28 17:52:37 +00: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
whoami-rajat
24255ad0dd Fix: Restore output 'VolumeBackupsRestore' object is not iterable
VolumeBackupsRetore object has '_info' attribute
which contains the output data of the restore
command which should be returned instead of the
'VolumeBackupsRestore' object.

Change-Id: I64b75649c1ac9c24e05a197f7280975564b4d386
Story: 2004740
Task: 28811
2019-02-27 22:28:09 +00:00
Zuul
3d7772e34a Merge "Partially Revert "Add command to unset information from Subnet-pools"" 2019-02-27 22:15:48 +00:00
Zuul
1ea988e5c6 Merge "This fix removes an erroneous underscore found within the function named test_snapshot_delete within test_snapshot.py found in both volume v1 and v2 of python-openstackclient." 2019-02-27 22:15:46 +00:00
Zuul
462a087bfb Merge "Remove str() when setting network objects names" 2019-02-27 22:15:41 +00:00
Christian Schneemann
6475882fd8 Typo fix
Just a typo fix.

Change-Id: I1d1fe6eb95c0b167265b3664314d764e3c316fe2
2019-02-27 09:06:18 +01: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
David Rabel
55cbbbe469 Fix help message of image add project
Only with the admin role you can use the project name with
'image add project'. With the normal member role you have to
use the project id instead. If you try to use the name, you
don't receive an error, but it won't work.

Change-Id: I2d11c07a256917d12c46a7c302c5a5e8752a1df0
Task: 29543
Story: 2002535
2019-02-19 12:49:18 +01:00
Bernard Cafarelli
05521bf84c
Remove str() when setting network objects names
Most network commands use str() on name argument, which fails on python
2 with Unicode characters. This comes from parsed arguments so does not
actually need this call.

Sample command failing with current code:
openstack network create test_unicode™

Change-Id: Ie10b67864c912ee5c33e90b10c3d9705ee8307e7
Story: 2004356
Task: 27955
2019-02-13 10:43:11 +01:00
Jeremy Houser
811b001234 This fix removes an erroneous underscore found within the function named
test_snapshot_delete within test_snapshot.py found in both volume v1 and
v2 of python-openstackclient.

Story: 2004977
Change-Id: Iae29ba7992dcf8596f4fb4333d8bcf1889ecd7e6
2019-02-11 18:06:32 +00:00
Dean Troyer
1a0bef2b46 More state handling in volume transfer requests functional tests
Using addCleanup() for removing the pending volume transfer request
has no way to wait for the volume status to become available before
cleaning up the volume and gets racy when the tests are run with
slow performance in the volume backend.  So we pause at the end of
the test after either accepting the transfer request or explicitly
deleting it so the cleanup can delete the volume.

Change-Id: I04862069cab28bc76eeafd60ba32be646f478d86
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-02-06 15:40:25 -06:00
Zuul
dcff1012fd Merge "fix multiple server delete produce multiple new lines" 2019-01-16 22:39:56 +00:00
Noam Angel
7276610595 fix multiple server delete produce multiple new lines
Closes-Bug: #1809874
Change-Id: Ib988b189b41af03d3d871b660bb5b5cc090c3f30
2019-01-16 19:33:56 +00:00
Zuul
dd1118e966 Merge "Add floating IP filter to floating IP list command" 2019-01-15 07:48:25 +00:00
Johannes Kulik
b8438adbbf Add floating IP filter to floating IP list command
Add a parameter ``--floating-ip-address`` to ``floating ip list``
because it's supported by the API and also more efficient than the
current ``floating ip show``. This also works as a work-around for
pagination issues ``floating ip show`` might run into with an IP
parameter.

Change-Id: I113e3fa2495e1e86bb553c55c44f71a3f9f49d23
2019-01-14 10:27:07 +01:00
Monty Taylor
2dd5393167
Use os-cloud instead of OS env vars for functional tests
In order to support switching auth contexts, such as for registered_limits
which take a system scoped token, switch the functional tests to using
the --os-cloud command line parameter. However, honor the OS_CLOUD env var
as a way that someone can select a different cloud, including 'envvars',
to use.

Use devstack-system-admin cloud for limit tests

Keystone requires these to have system scope now.

Change-Id: Ia81eebd3e00ae986cf3ba7e3d98f3e8a1647b622
2019-01-10 14:21:03 +00:00
Zuul
2ab3396f19 Merge "trivial: remove commented-out code" 2018-12-30 14:30:28 +00:00
Zuul
7b72fb816f Merge "Support enable/disable uplink status propagation" 2018-12-24 12:00:03 +00:00
Zuul
4eab836441 Merge "More volume functional test fixes" 2018-12-21 23:59:11 +00:00
Dean Troyer
f9df3ce3cd More volume functional test fixes
Remove the use of class setup/teardown from volume transfer functional tests
as that just doesn't work too well here. Also wait for volume status before
attempting transfer request operations, some test nodes take a while to
create the volumes.

Change-Id: Ib9378ab5c973deb2aa86c9b9ed31408f3a05115a
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2018-12-18 22:32:16 -06:00
Zuul
ea2e6d6bfb Merge "Modify the help message for 'registered limit set'" 2018-12-18 07:17:25 +00:00
Zuul
235999b995 Merge "Supports router gateway IP QoS" 2018-12-12 13:07:29 +00:00
Zuul
955f22314a Merge "Replace assertEqual(True/False, expr) with assertTrue/assertFalse" 2018-12-12 04:38:19 +00:00
Zuul
6fec6d625f Merge "Don't display router's is_ha and is_distributed attributes always" 2018-12-10 20:09:24 +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
Zuul
9100e56d08 Merge "Updated the take_actions for unified limits" 2018-11-29 07:54:07 +00:00
liuyamin
5bec3b7e3b Replace assertEqual(True/False, expr) with assertTrue/assertFalse
In some cases, If the result of expr is a boolen value, we shoud
use assertTrue/assertFalse to instead. Because it is clear and simple.

Change-Id: I53b345fc3915a7b0e737e9dd4d58fe09c746d61c
2018-11-14 14:50:05 +08:00
liuyamin
4f66f66b6c Fix i18n issue
This patch fix some i18n issues in the files vapi/compute_v2.py.

Change-Id: Ic4da472ca585a35ce64512cf0e72e2fe9d4c9d6e
2018-11-13 17:05:05 +08: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