So yeah, this is not kosher for functional tests, but we're testing the
client interaction, not the raciness of Nova or Neutron. Failure to delete
is not our problem.
Change-Id: I21043f1de0fbacee1aec63110fb12a7cff42e0a0
With the release of os-testr 1.0.0 stestr is used internally and because
of that the repository dir and commands to get subunit are different.
This commit updates the post-test hook to get the subunit stream if
ostestr>=1.0.0 is used.
Change-Id: I2cce7f4780ce418398b17a5848def9072372841e
To ensure project imports are placed after third party import,
we need to specify application-import-names.
Previously flake8-import-check checked only standard imports or not.
Change-Id: Iad7afa456cec7cf5b44955f1ea03c593a4c0e426
In reviews we usually check import grouping but it is boring.
By using flake8-import-order plugin, we can avoid this.
It enforces loose checking so it sounds good to use it.
This flake8 plugin is already used in tempest.
Note that flake8-import-order version is pinned to avoid unexpected
breakage of pep8 job.
Setup for unit tests of hacking rules is tweaked to disable
flake8-import-order checks. This extension assumes an actual file exists
and causes hacking rule unit tests.
Change-Id: I12b596820727aeeb379bee16c2bc993dee9eb637
Previously fucntional tests for network segment feature are skipped
as neutron 'segment' API extension was disabled in the gate.
We now enable neutron 'segment' API extension, so we can safely drop
the check for the segment extension from the test code.
Also setup code in test_network_segment is moved from setUpClass to
setUp. There is no good reason to do them in setUpClass and
having them in setUp simplifies the test code.
no user once this commit is applied.
Change-Id: I183310b94d9b6d7f4311a3859b59dc22d36440db
Specifically, in the py3 jobs Swift is not (yet) properly starting as
a py2 service, so we disabled swift in those OSC jobs and need to
skip the object-store functional tests in that case.
Change-Id: I073551c41b7636f04b3ee97dc6fe69630e207b67
Neutron tag mechanism now supports network, subnet, port,
subnetpool and router. Tag support for more resources is planned.
This commit introduces a common mixin class to implement
tag operation and individual resource consumes it.
To support tag remove, network unset command is added.
Implements blueprint neutron-client-tag
Change-Id: Iad59d052f46896d27d73c22d6d4bb3df889f2352
Use fixtures to restore the API version changes of os.environ
in each functional tests, aims to avoid the following test cases
failing in unexpected context.
And make sure setUpClass/tearDownClass call super class's
corresponding methods first.
Change-Id: Ie248fe9d3a9e25f1b076c9f2c363200f29a83817
Closes-Bug: #1696080
Move all of the dynamic resource naming in Network functional tests into
setUpClass() methods (if they exist) rather than assigning those names
at load-time.
Change-Id: Ic550ff7d40c2b3ca5128cacccbe331790d6ae340
nova api support parameters like 'name', 'server', 'status',
etc in image-list(). So openstackclient should support this too.
DocImpact
Closes-Bug: #1698742
Change-Id: Ice66b409f989e6785aa3b2d42f2fdbf6e23fa0aa
Add a set of exclusive parameters to the Network QoS policy:
--default: makes this policy the default policy for
the project to which the qos policy belongs.
--no-default: unset the property.
Closes-Bug: #1639220
Depends-On: If5ff2b00fa828f93aa089e275ddbd1ff542b79d4
Depends-On: Ibe7b7881cb190bfd5582f35b6de51a8bc21135de
Change-Id: I0269b837dc29bbd8ee2089d847cadb72d800fa30
Some of the available checks are disabled by default, like:
[H203] Use assertIs(Not)None to check for None
Change-Id: I59dafb62cedc5217b6e5eb6efb997a9ee3c29bbb
This patch enables the direction ('ingress'/'egress') field
on the QoS bandwidth limit rule object and CRUD commands.
Closes-Bug: #1614121
Depends-On: Ia13568879c2b6f80fb190ccafe7e19ca05b0c6a8
Depends-On: I90c412a5c8757b3ffe8abfc1165a70bdb8744702
Change-Id: Ic6981474f22efbf294ac11c2e0304b04494a1bbe
Add --default-quota option to subnet pool create and set commands.
Setting default-quota back to None may break the current Neutron
behavior, therefore support for Unset command is not provided in
this patch.
Neutron API:
a0e0e8b668/neutron/api/v2/attributes.py (L239)
Closes-Bug: #1667294
Change-Id: Ia4e7c23a49e91a090133c729353cdb8e62bc5674
Deleting snapshot may take time. The current volume API does not allow
to delete volumes with snapshots, so if deleting snapshot may take time,
a delete request for a parent volume will fail.
This sometimes causes functional test failures in slow environments.
wait_for_status() checks whether volume status is in error statuses
but previously the expected error status was wrong. Cinder API uses
lower case as volume status, so it did not work expectedly.
Change-Id: I095894ba39f23bf81d71351818d24dbb5ca459fb
Current "volume list --name" command use "display_name" as search_opts
to send to cinder API, and show the result table with "Display Name"
column title in osc, cinder list API support "name" as search opts too,
and there is "name" attribute in volume response body, so we can replace
all "Display Name" by "Name" in order to keep "volume list" command
consistent with other commands, like: server list, network list and so
on, only use "Name" attribute for all objects.
Support a mapping for volume list -c "Display Name" (Volume v1 and v2)
and volume create/show -c "display_name" (Volume v1) for minimal
backward compatibility until R release.
Change-Id: I120be0118e7bb30093b4237c5eeb69a9eedef077
Closes-Bug: #1657956
Depends-On: I1fb62219b092346ea380099811cbd082cae5bafe
Both resource ID and name are supported to identify an object
in openstackclient to make user easy to input, for security group,
nova only support security group name in API when launch a new server,
this patch convert ID to name, then pass name to nova API, and check
the security group exist before creating server.
Change-Id: I1ed4a967fb9de3f91c8945a1ef63f6c7b6b2dfb2
Closes-Bug: #1687814
1.keep the column display order consist in extension list with
and without "--long" option.
2.rework for network extentsion list, openstacksdk return object,
so the logic should be same with other service.
3.add some unit test cases, like: extension list --network --long,
extension list --network --compute, to cover regular use cases.
4.raise exact exception when network extension don't exist, avoid
internal TypeError in "extension show" commands.
Change-Id: I2e23ced80d8da8aa1106b22472db850367b351ce
Closes-Bug: #1689233
volume_type and transfer_request func tests have not been
converted into JSON func tests. This commit converts them
into JSON format.
Change-Id: I56820c4e15bda95e911e57657c1ff5437daf83ae
The patch fix the following issues:
1. ValueError is raised if input don't contain "=". Sometimes the whole
"server create" command is very complex, it's difficult to find out root
reason directly.
2. Don't support to add block device from snapshot, like:
--block-device-mapping
vdb=0c8ae9d8-cadc-4a23-8337-4254614d277e:snapshot:1, it's supported by
novaclient, but not in osc.
3. If input "vdb=", not add any mapping information, the server will be
launched successfully, not raise error message to let use add
volume/snapshot id, just ignore "--block-device-mapping" option.
4. The help message of "block-device-mapping" option is so simple, need
to add some details about how to add <type>, <delete_on_terminate>
contains.
Change-Id: Ib7f7a654c3dc2a8272545f168b4c4ced230ce39e
Depends-On: Ib37913891bbf7a31b570404c4668c490d5ac859b
Closes-Bug: #1667266