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
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
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
Older hacking depends on pep8, but pep8 module is replaced by
pycodestyle. This can be resolved by updating hackinng version.
This commit also fixes E117 (over-indented) and
W605 (invalid escape sequence) warnings.
pep8 is dropped from lower-constraints.txt as it is no longer used.
Change-Id: I3a8e3b0dedf9422e4db02b525b333d12ce012a95
The neutron client does not work with recent openstacksdk versions
(>=0.18.0): http://paste.openstack.org/raw/734040/
This change addresses a mismatch in the api version format.
The neutron client passes a dict while the openstack sdk expects a
string.
Change-Id: I33c868f1c1e40d7673ba6651abedf3dfe0850660
Closes-Bug: #1801360
Fix situation when with pagination enabled, neutronclient failed
to read subnets information due to too long URI.
Change-Id: I53240c536d77a95510b5c83b81e21782f29d886a
Closes-Bug: 1775922
In neutronclient we use a eval function for processing
CLI neutron arguments. This function possible insecure because
eval get argument from client side. Instead of it we can use
a dict with allowed types which is more secure.
Closes-Bug: #1762938
Change-Id: Idde55d1b9206e9ef8742464825709f098d488a8e
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
pycodestyle 2.4.0 which is updated along with pep8
introduces new checks and they hit neutronclient.
Change-Id: Ic417aee3239c46f1e989c50b9814adfd75cff175
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: I61e683ab0119e4ae90b7107f0690528d789e3875
NeutronClientException is an exception raised from API bindings
and it should not be used in CLI layer.
TrivialFix
Change-Id: I3df4c7352c96f10388df65bd16016b3ceb221248
Added a check if the tag values is empty or not before adding that tag
to the network.
Change-Id: I92659da97fe829a7715d0bef5570a4d9c5db95da
Closes-Bug: #1603292
Neutron supports adding tags for several resources:
network, port, subnet, subnetpool, router,
but neutronclient only support to add tags for network,
support for others .
Change-Id: Iae8da2fa0e18e14ba27ce5232db8da5fe6eb0b86
Closes-Bug: #1676697
Both SessionClient and HTTPClient set content-type as application/json,
so there is no need to append ".json" as a format specifier.
This commit also cleans up 'format' attribute in various client class
and unit tests.
Also hide --request-format opiton from the command line help as it is
just ignored. We need to keep the option to keep backward-compatibility.
Closes-Bug: #1678488
Change-Id: I5fc69b9dfed9b7b6350a4aad06417a914a80d090
Previously tenant_id option was ignored in subnetpool-create.
--tenant-id option is supported in all create commands in neutron CLI
and it is important to keep this consistency for good user experience.
Change-Id: Ifab51d623f8f3519523b284fc04e5b28301b5928
Closes-Bug: #1667279
CLI reference is still generated from neutron CLI.
It looks better to fix the output of CLI.
Change-Id: Icf676730b53044fa0a14c4101eb52a792ea4cc4f
Closes-Bug: #1669974
The documentation about UpdateQuota is misleading.
This makes it seem like you can only update a quota when it is currently
the default quota values.
Trivial Fix
Change-Id: I5dae7b38d388f4abae5d927998e809839e8ef879
If enable_snat_by_default option set to false and disable snat via cli
it becomes unavailable to enable snat again.
This commit allows to enable snat after disabling it.
Change-Id: I01009d5cd5edd5be3eead615c37d6aa2e3224442
Closes-Bug: #1598171
Commit I87b257ee6500c424fc273955a6d89d972a2823e9 had supported
sha2-384 and sha2-512 in VPNaaS side, this patch add those support
in CLI side.
Change-Id: Ie1842acd830e9b8c624cf099491ed5ff46304b8d
Closes-Bug: #1639990
Health Monitors could not be updated using
the `neutron quota-update` CLI.
This patch fixes the same.
Change-Id: Ie9eefcd9042f3d09b3ba88a9bd195463302dd5c0
Closes-Bug: #1624225
Due to [1] , the return code which was expected from
NeutronClient changed if a particular CLI failed to
find an object belonging to the resource to be deleted.
The following patch fixes it.
[1]: https://review.openstack.org/#/c/263609/
Change-Id: I19b4328361157fbca3e557e02797ed0c895e924b
Closes-Bug:#1623169
LBaaS v2 Pools consist of lb_algorithm, but
ListPool still tries to show lb_method (which
was not a part of LBaaS v2 but LBaaS v1).
Change-Id: I0630fafc1c555c9110bee11def873dce8ecf4770
Closes-Bug: #1620639
This allows the router to take a flavor argument that can
be either the ID or the name of a flavor to use when creating
a router.
Partially-Implements: blueprint multi-l3-backends
Change-Id: I100fc75de6d41900f6452f356f0b7b741cd177ce
If no arguments are provided while executing neutron quota-update
instead of printing the current quota values it will throw an error
message "Must specify new values to update quota"
Added unit test to verify that the exception is raised when no
arguments are provided to quota update
Includes release notes.
DocImpact
Closes-Bug: #1597552
Change-Id: I476991c39eafa16148f0cc3252ae5c26b9c8cbfc
The following patch implements the QoS egress minimum
bandwidth assurance in neutronclient.
Change-Id: I025522f73a9a8e3a9f69f097cedaeba330b9914a
Depends-On: I6b619a96a2bfde164646c71409b671352bc6ce7d
Depends-On: I13c54be22f35ac7eb5835d8424a919d0b61a8e95
Partial-Bug: #1560963
With the introduction of Lowercase/Uppercase conversion
functions in the utils.py, the following patch removes the
dependancy of the current code on character casing.
utils.convert_to_lowercase is called where the code expects
the input to be in lower case while utils.convert_to_uppercase
will be called where the code expects the input to be in
CAPITAL casing only.
Change-Id: I1c5c3c87f343fc2731469b9a0c38d278f6018a11