Change SFC CLI to use SDK instead of deprecated neutronclient
python bindings.
Add possibility to delete multiple resources as it is common
for other delete commands.
Bump SDK minimum version to 1.5.0.
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/887387
Actually the new SDK release is the dependency.
Related-Bug: #1999774
Change-Id: Ic22b8163155904113db8a4acf1fe7d75ae100a84
This has been deprecated for ages and generates an annoying warning when
building OSC docs. Time to cull it.
Change-Id: I76e4c7ab742d0bf27fecfda8fab41035618a4e24
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This project no longer provides CLI support. All code has been
removed. Please use openstack CLI instead
This patch removes entry point for neutron CLI too, bash completion
script and CLI related functional and unit tests but it
still keeps neutronclient/neutron/v2_0 module as this is used by e.g.
Nova.
Co-Authored-By: Slawek Kaplonski <skaplons@redhat.com>
Closes-Bug: #2003861
Change-Id: I5b6c735d1ff931d7991a42b262e7faa47b75edeb
This warning was added in [1]. This patch is partially reverting it
but we keep the release note. This warning message could be a bit
intrusive for those users still using it. In any case, the
recommendation to move to OSC is something already known and
publicly requested.
[1]https://review.opendev.org/c/openstack/python-neutronclient/+/862371
Change-Id: I0c2fba3e45a9de1eba09efcf8919661a855c7e89
On the 2023.1 (Antelope) PTG we discussed the status of the python
binding (SDK) code in python-neutronclient and decided to not allow new
features to this repo (see [1]), and make users to use openstacksdk.
Let's add a warning log message and a releasenote to make it visible.
[1]: https://etherpad.opendev.org/p/neutron-antelope-ptg#L163
Change-Id: I03317179bd0d30a69b91eef6e451b8e40eb28191
To extend Horizon to allow users to create
port forwarding rules for their floating ips,
we need to extend this client to allow it,
as Horizon uses this client.
This patch is the one of a series of patches
to implement floating ip port forwarding with
port ranges.
The specification is defined in:
https://github.com/openstack/neutron-specs/blob/master/specs/wallaby/port-forwarding-port-ranges.rst
Implements: blueprint floatingips-portforwarding-ranges
Related-Bug: #1885921
Change-Id: I3f616dba5e2ebe301cf6ce4bed8c2e6e4da2da9b
With the introduction of QoS minimum packet rate rule in Neutron,
it's important to ensure that tools like Heat support it as well.
Unfortunately, Heat still depends on python-neutronclient instead
of python-openstackclient. So even though QoS minimum packet rate
rule support have been proposed for python-openstackclient [1] and
openstacksdk [2], it's still necessary to extend python-neutronclient
code. Since Heat uses only the client part, can skip CLI support.
[1] https://review.opendev.org/c/openstack/python-openstackclient/+/810559
[2] https://review.opendev.org/c/openstack/openstacksdk/+/810364
Partial-Bug: #1922237
See-Also: https://review.opendev.org/785236
Change-Id: I4f16b963a202a476cd3cd2b69c1dd4e4ee6f0fc7
The 'smart-nic' vnic_type was added in the Train time frame in
I91f63810626ce4e054e358f5de5e46434c4da131. This vnic_type will
also be used to support off-path SmartNIC port binding with OVN,
and it is expected that the user will create ports with this
vnic_type as part of the workflow.
As such the client must allow users to interact with this
vnic_type and this patch addresses that.
Partial-Bug: #1932154
Change-Id: I7f80bb47db7f8608db4d6a646b0f4b0ef6d6fb48
The method is deprecated since Python 3.2[1] and shows the following
DeprecationWarning.
/usr/lib/python3.9/unittest/case.py:1134: DeprecationWarning:
assertDictContainsSubset is deprecated
warnings.warn('assertDictContainsSubset is deprecated',
[1] https://docs.python.org/3/whatsnew/3.2.html#unittest
Closes-Bug: #1938103
Change-Id: I1d0ee6c77476707a7e4fe4fbf2b979bf34550d05
Since PyYAML 5.1, yaml.load without specifying the Loader option is
deprecated and shows the following warning.
YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated,
as the default Loader is unsafe.
Please read https://msg.pyyaml.org/load for full details.
This change replaces usage of yaml.load by yaml.safe_load, to get rid
of that warning message.
Change-Id: Ibe25c4aaf3aa7226f28ec60b8a929ecc143face1
After default backend change to OVN, some client tests related to DHCP
or L3 agents are not working fine. Switch the job to ML2/OVS, as it was
done in openstack-client in changeset
Idf6466a59c6cf96be2f1d53e696f0564584fa233
test_neutron_dhcp_agent_list_hosting_net was skipped temporarily
to pass the gate in the parent commit. It is re-enabled now.
Change-Id: I91d03d13adcd38d46ba1b042239a290ae2c99ea4
Closes-Bug: #1936965
[1] was the last missing bit in OSC to have feature parity between
OpenStack client and Neutronclient CLI tools.
So now as [1] is merged we can really deprecate and specify that in Z
cycle we will remove neutronclient CLI.
This patch changes deprecation message to reflect that.
[1] https://review.opendev.org/c/openstack/python-openstackclient/+/768210
Change-Id: Ia68af29ea15bda7330fda1b18416798a0f4cb7a4
Neutron-dynamic-routing has the bgp_4byte_asn extension which allows
4byte ASNs to be used, increasing the range of valid AS numbers. Since
we cannot easily tell beforehand whether that extension is available,
allow for the maximal interval to be used by clients and let the API
validate the input.
Change-Id: Ib4695272784b4a5ebbcb792cfec82dac3ef6f3cf
The name argument for bgp speaker set defines the new name for the speaker,
make the description more clear about this.
Change-Id: I29a0c87214c3c60084d0541f8b9a7abc72ff987f
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we can use the
standard lib unittest.mock module instead.
Change-Id: Ia7226d968b8594677fc8dea664b58a80ba193ac5
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.
Change-Id: I12e1a2a4a22116cabd09a3b808f871d98e4bd1f2
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
With python3.x, classes can use 'metaclass=' instead of
'six.add_metaclass', 'six.iteritems' and 'six.iterkeys' can
be replaced by 'items' and 'keys', 'six.moves.urllib.parse'
can be replaced by 'urllib.parse', 'six.StringIO' and
'six.moves.cStringIO' can be replaced by 'io.StringIO',
'six.text_type' and 'six.string_type' are just 'str'.
Change-Id: I357968c6a1932856b1600f6c191966bc90cbc258
The phase1 negotiation mode adds support for aggressive mode,
which can be selected when creating an ikepolicy.
Change-Id: I8148011558094db07b5f9eba70b16cfe6eeaf98f
Partial-Bug: #1701413
In order to follow other agent related commands in OSC, it is more
appropriate and friendly to replace 'bgp speaker show dragents' with
'bgp dragent list'. this patch uses 'openstack bgp dragent list' to
show the list of dragents, and the optional parameter 'bgp-speaker'
shows the list of dragents hosting a specific bgp speaker.
Change-Id: I9e0703fccf535b1e1a2055ed917336055b7395f5
Closes-Bug: #1858377
The port bindings API has been around since Pike but has never been
exposed via neutronclient. We still use this in nova so it would be nice
to avoid having to create a KSA client manually for this stuff. We don't
need to expose things via the UI, just the client itself, so do that.
Change-Id: Ied1a057186f0819166df84725b09ded314930a1d
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Sem-Ver: feature
Before this change, neutronclient was passing in a raw exception
as a kwarg to the ConnectionFailed exception. This caused an
exception to be raised in _safe_decode_dict() due to the exception
not being a text type.
Now, we explicitly convert the raw exception to a string before
passing it as a kwarg.
Closes-bug: 1859068
Change-Id: I323b3aceec0a937874eabf770fbc82995202f6d6