Multiple subnets with the same name are occasionally created when
running tests in parallel.
Change-Id: Ifb85e39ee53b529e2b97abf782c7fba93d48e9e2
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
Use cliff formattable columns not to convert complex fields
into a string when a machine readable format like JSON or YAML
is requested.
Partial-Bug: #1687955
Partially implement blueprint osc-formattable-columns
Change-Id: I9878f327e39f56852cc0fb6e4eee9105b7141da9
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>
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
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
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
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
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
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
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
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
We're getting about 1-in-6 failures on qos policy delete now, with the message
that the policy is in use by a network. It shouldn't be, this is possibly
due to the small window where the policy is set as the default. Let's
remove that and shore up the test using --share instead.
Change-Id: I8d669bd3c5c88dadd2927aee89e5ef72cf4001c4
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
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
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
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
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
Regualr expresstions were an interesting diversion, get rid of them
from the functional tests. It did lead to better structure...
Change-Id: I1ff32ad7715ebd88401925ce3f6c412a66e82566
* network segment
* network service
* port
* router
* security group
* security group rule
* subnet
* subnet pool
* extension
The extension tests were duplicated to have both compute and network
extensions tests so the nova-net case will still exercise the extension
commands.
Also clean up formatting from previous reviews to make the Network functional
tests look and act consistently.
Change-Id: I286c40572faa31ddcef595cec740da933b2defc1
* address scope
* network agent
* network flavor
* network flavor profile
* network meter
* network meter rule
Also create a new common network functional test class
NetworkTests to house the setting of haz_network in a single place.
The individual test skipping stays in the final classes to re-enforce
the idea that some tests work with both Nova-net and Neutron.
Change-Id: Ie3910231c6fc9e2031438c599afa904f43c874a7
In cleaning up functional tests for nova-net, I discovered some
problems in network create:
* --subnet option is required in network create command
* Switch API to use /os-networks rather than /os-tenant-networks as this
is what we were actually using via novaclient
* Fix functional tests for nova-net
* Normalize some private function names in network/v2/network.py
Change-Id: I426b864406756d58d140575a3a45ee9aee67ce84
An error in network func test broke our CI,
looks like the "is_default" should be "False"
by default for now.
Change-Id: I021eb8abd9bdf55c7c06031152c107312f104b34
Implements Neutron feature of floating ip associate/disassociate
into OpenStack Client.
Previously, network.find_ip() function only supported to
search floating ip by UUID. Hence, _find_floating_ip()
function is used in floating_ip.py, to search fip both by UUID
and ip_address. [1] adds the ability to find fip object using both UUID
and ip_address. This functionality however, won't be available until
the SDK is released. Hence, we continue to use _find_floating_ip()
method, which was cleaned up by [2] to remove the use of ip_cache.
Once, the SDK is released, we will remove all the usage of
_find_floating_ip() method and instead only use network.find_ip().
[1] https://review.openstack.org/#/c/449879/2
[2] https://review.openstack.org/#/c/447938/
Change-Id: I6c5222287c46ca42365917d2deae70bdb626347
Co-Authored-By: Reedip<reedip.banerjee@nectechnologies.in>
Co-Authored-By: RuiChen<chenrui.momo@gmail.com>
Closes-Bug: #1560297
This patch introduces network flavor associate and disassociate to
OSC. The following neutron equivalent commands are implemented in OSC:
- neutron flavor-associate
- neutron flavor-disassociate
Change-Id: Icba4dbf7300a36353142586359059cd6784049dc
Use a common pattern to handle option pairs --XYZ and --no-XYZ for managing
lists of attributes. This pattern looks at the presence of the option
in parsed_args first and branches as necessary.
Some specific steps are included for the SDK Network resources to reliably
set the 'dirty' flag for changed attributes via one or both of the following:
* iterate over lists of original resource attributes to force the creation
of a new list object
* use [].extend() rather than += to add to the existing list (substitute
{}.update() for dicts)
Change-Id: I0c3f9a52ffe1ae2b5b230cb13d6376dd9131aaf9
Implement Neutron feature of Network Flavor Profile
into OpenstackClient
This patch implements the following commands:
network flavor profile create
network flavor profile delete
network flavor profile list
network flavor profile show
network flavor profile set
SDK Version needed: 0.9.9
Change-Id: Ie6fe5e53122cfb2eda8d326851d54562739a8386
Partially-Implements: blueprint neutron-client-flavors
openstackclient does not allow the update of a port's MAC address.
However this is possible in neutron API (though by default policy
it is an admin-only operation). Allow it in openstackclient too.
Change-Id: Ibd9e0a6fbd1d0d461b8a8daee24dbb7c3f929df6
Closes-Bug: #1670707