298 Commits

Author SHA1 Message Date
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
Dean Troyer
99c3be93c8 Serialize more aggregate functional tests
These tests are showing signs of problems running in parallel
so serialse the create/delete/list/set/unset tests.  They all
used two aggregates each anyway...

Change-Id: Iba4b52c179e6914eaeefea1da0f7eaefcdcf1f87
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-05-17 19:15:28 -05:00
Dean Troyer
bb659cf438 Aggregate functional test tweak
This seems to still be racy, lengthen the timeout to wait for
agregate creation.

Change-Id: I3601c5baee03745ae21714b9dff0e278ad016877
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-05-16 07:43:55 -05:00
Dean Troyer
4f3cda730f Tweak network segment range fiunction tests
We seem to be having occasional overlaps in the ranges, as they were
identical in all tests, change each test to not overlap the others
so running in parallel is not racy.

Change-Id: I7ea467a3aa2e4a4b4a334c10ea6ba21409c46af0
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-04-12 13:52:46 -05:00
Dean Troyer
589026cdd4 Volume backup functional test tweak
Waiting for status in all the wrong places...

Change-Id: I531ee6e0c00b623c6fd30d40df1f1f36bf86233f
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-04-02 08:39:23 -05:00
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
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
f992617f79 Merge "Add support for get details of Quota" 2019-03-07 00:34:18 +00:00
Zuul
3599ebe933 Merge "Fix: Restore output 'VolumeBackupsRestore' object is not iterable" 2019-02-28 17:52:37 +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
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
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
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
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
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
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
Zuul
0fa3c84b4f Merge "Default --nic to 'auto' if creating a server with >= 2.37" 2018-10-26 03:20:17 +00:00
Fan Zhang
def83a0e94 Fix broken gate jobs
This patch aims at fixing the broken gate jobs because of
cinder and glance patches [1], [2], [3] and [4].

* Remove parameter `--source-replicated` to drop volume
  replication v1 support
* Address some timing issues with volume transfer requests
* Only run Image v1 tests when the test cloud has v1 available
* Get tolerant of unexpected additional attributes being
  returned in Image data

[1].https://review.openstack.org/#/c/586293/
[2].https://review.openstack.org/#/c/532503/
[3].https://review.openstack.org/#/c/533564/
[4].https://review.openstack.org/#/c/578755/

Co-Authored-By: Dean Troyer <dtroyer@gmail.com>
Co-Authored-By: Monty Taylor <mordred@inaugust.com>
Depends-on: https://review.openstack.org/588664
Change-Id: I2a785750e92155185d3344e6116c7f5c6fdd3cbe
Signed-off-by: Fan Zhang <zh.f@outlook.com>
2018-08-07 09:32:00 +00:00
Zuul
7ae49c5b02 Merge "Add command to show all service versions" 2018-07-25 17:57:44 +00:00
Zuul
6469d86522 Merge "Implement support for project limits" 2018-07-25 00:52:42 +00:00
Zuul
d177727a6e Merge "Implement support for registered limits" 2018-07-25 00:52:41 +00:00
Monty Taylor
9ece632f96
Add command to show all service versions
Knowing what services and what versions of those services exist on a
cloud isn't always a spectacular experience. Add a command that will use
get_all_version_data from keystoneauth to produce a report of the
available services and the version info for each service.

Depends-On: https://review.openstack.org/584944
Change-Id: I84751c175d0c5f6d857a5473d2db6d5f1b41f946
2018-07-23 16:58:30 -05:00
Lance Bragstad
735896eb1a Implement support for project limits
This commit let's users manage limits via the command line.

bp unified-limits

Change-Id: I7c44bbb60557378b66c5c43a7ba917f40dc2b633
2018-07-23 21:52:00 +00:00
Lance Bragstad
641a4faac1 Implement support for registered limits
This commit adds support for users to manage registered limits via
the command line.

bp unified-limits

Depends-On: https://review.openstack.org/#/c/574391/
Change-Id: Id8377363f7a3248b45aeeba21d2acc02684a0305
2018-07-23 21:18:50 +00:00
Dean Troyer
26c268a910 Slow down and retry aggregate create/delete to lessen race
Change-Id: I676894c1bfd3156313d88e6457250b9ff226118b
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2018-07-06 13:15:59 -05:00
Zuul
c5a0c3ad5d Merge "Retry floating IP tests" 2018-07-06 14:04:38 +00:00
Dean Troyer
83a9db280d Retry floating IP tests
test_server_attach_detach_floating_ip() has a test for server
add/remove floating IP that seems to be racy, add a retry loop
to let neutron and nova do their thing before calling it bad.

Change-Id: I999a0d7dae1706d746053bafb7ab4e3b791d0042
2018-07-06 10:24:16 +00:00
Zuul
7d7a429685 Merge "Add ability to filter image list by tag" 2018-06-29 02:47:41 +00:00
Adam Harwell
9edbab8c90 Add ability to filter image list by tag
Change-Id: I2e222d3e69df9d8d7cd472663caaee31bedd848c
2018-06-28 16:17:14 +00:00
Sami MAKKI
08dbd154e5 Fix the role implies list command.
The code was calling an unexisting function which never existed.
The module refers now to the correct `InferenceRuleManager`. It
also allows the compatibility with the future python-keystoneclient
in which the compatibility method will be removed from the
RoleManager.

Change-Id: I08f785dc9e840da2e16915683eecfe49189c44b3
2018-06-24 02:17:02 +02:00
Dean Troyer
15a079faa6 Fix volume type functional tests
Convert functional VolumeTypeTests to not use class methods for setup.

Depends-On: https://review.openstack.org/577147
Change-Id: I855583ad1a50bf5f5046acdb85e977ab9e3c45d2
2018-06-22 10:05:28 -05:00
Sławek Kapłoński
9b6d02d5f9 Make max_burst_kbps option as optional for bw limit QoS rule
Attribute max_burst_kbps of QoS bandwidth limit rule in Neutron's
is optional in API so it should be also optional on client's side.

Change-Id: Ie085b73fa885ff12f9ac080666cf3ca6a09b632a
Related-Bug:#1770622
Task: 19658
Story: 2002017
2018-05-25 12:54:41 -07:00
Monty Taylor
f7e4d31820
Update command test for volume.v3
The default cinder version in devstack changed to v3 in
https://review.openstack.org/#/c/566747/which breaks this
test. Change the test to test what's going to happen.

Change-Id: Iff4d8b47812a86d21bf5dbdddbd642b9d63ff8fe
2018-05-18 07:12:04 -05:00
Dongcan Ye
b776f7099a Fix functional job failed
After Neutron patch I3c93818002c2d7753454547231ba08544b6fa1c0 merged,
the default value of segment description is an empty string.

This patch will determine whether the Neuron shim extension
standard-attr-segment supported.

Change-Id: I68a3c018f03e5bb53bd637844ac9d7742a765db0
2018-04-20 01:47:17 +00:00
Sean McGinnis
d601415259 Clean up W503 and E402 pep8 errors
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
2018-04-15 12:23:06 +09:00
Matt Riedemann
1008544882 Default --nic to 'auto' if creating a server with >= 2.37
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
2018-03-21 01:44:29 +00:00
Zuul
e78c9bc00d Merge "Add CRUD support for application credentials" 2018-03-14 02:16:35 +00:00
Matthew Treinish
e5d60b220f Cleanup error messages on failure
When test_server_commands_main_help() fails it dumps a ton of
unformatted text on an exception message. This commit attempts to clean
it up to make it easier to read.

Change-Id: I793e6337728a22302a5a87938dbec60d7f2320d8
2018-02-28 11:39:18 -05:00
Monty Taylor
07014e09c9
Make osc-functional-devstack-tips actually use tips
The base job has tox_install_siblings: false - which we want. But
that means we need tox_install_siblings: true on the tips job.

While we're at it - add fetch-tox-output so that we have tox log files
in the fetched build output for easier verification of what wound up
installed.

Don't look for ResourceNotFound string in test

The string ResourceNotFound is not in the error string anymore. Look for
the text that is.

Depends-On: https://review.openstack.org/541033
Change-Id: Id6de1485bcafb41f238f3e74277094ce64a6acf4
2018-02-05 17:00:08 -06:00
Colleen Murphy
375964f270 Add CRUD support for application credentials
Add support for creating, retrieving, and deleting application
credentials. Application credentials do not support updates.

In order to provide a positive user experience for the `--role` option,
this patch also includes an improvement to the
`identity.common._get_token_resource()` function that allows it to
introspect the roles list within a token. This way there is no need to
make a request to keystone to retrieve a role object, which would fail
most of the time anyway due to keystone's default policy prohibiting
unprivileged users from retrieving roles.

bp application-credentials

Change-Id: I29e03b72acd931305cbdac5a9ff666854d05c6d7
2018-01-30 21:50:01 +01:00
Zuul
e157365d86 Merge "Allow port list to shown undefined attributes" 2017-12-31 13:00:26 +00:00
Masayuki Igawa
bafe5357c2
Switch to use stestr directly
This commit makes to use stestr instead of ostestr
directly. ostestr>1.0.0 has started to use stestr instead of
testrepository. So there is no reason to use ostestr anymore.

Change-Id: I6327d50c9f6dd19f1de24b9b51532104fb3e916e
2017-12-27 16:18:49 +09:00
Zuul
21b656ca4a Merge "Add support for endpoing filter commands" 2017-12-13 02:18:43 +00:00
Akihiro Motoki
0626f95579 Allow port list to shown undefined attributes
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
2017-11-24 22:45:06 +00:00
Jose Castro Leon
12ee186108 Add support for endpoing filter commands
Implements the commands that allow to link and endpoint to
a project for endpoint filter management.

Implements: blueprint keystone-endpoint-filter

Change-Id: Iecf61495664fb8413d35ef69f07ea929d190d002
2017-11-21 07:58:48 +01:00
Dean Troyer
7d85ecaa33 Prepare for os-clinet-config to go away
We used that module in a test functional for module list, it is being absorbed
into python-openstacksdk and having it listed in this test breaks -tips jobs.

Change-Id: I98fdf5a5d1b3c6e30cb4c5f5fec3dd8e43e53145
2017-11-16 12:38:17 -06:00
Zuul
e8a87e1478 Merge "Display Network QoS rule type details" 2017-11-06 04:04:54 +00:00
Sławek Kapłoński
07f0c7aa55 Display Network QoS rule type details
Neutron API now supports getting details of supported
QoS rule type.
This patch adds support for this feature to OpenStack client.

Change-Id: I74d16563ce2236a7c899f5994f1dab43ace02138
Depends-On: I448b5d4f8e4ef42eafe50d9d6c63d0be666f98fc
Related-Bug: #1686035
2017-11-05 17:52:08 -06:00