Some client tests uses status code 204 although it expects the
API returns a body with status code 200, for instance,
test_add_interface_by_subnet, test_add_peer_to_bgp_speaker, and so on.
This patch makes the tests use correct status code and also changes
default status code into 200 because it's an usual code of PUT operation.
Change-Id: I5dbcad8769a32e8834347fb57695db72b313b0a5
Closes-bug: #1611167
In the recent release of keystoneauth1 2.18.0 provision is made to log
x-openstack-request-id for session client. Once this new library is synced
in openstack projects, the x-openstack-request-id will be logged twice
on the console if session client is used.
For example,
$ neutron --debug port-list
DEBUG: keystoneauth.session GET call to network for
http://10.232.48.204:9696/v2.0/ports.json used request id
req-da75468a-2855-4e59-b308-d2a91776b927
DEBUG: neutronclient.v2_0.client GET call to neutron for
http://10.232.48.204:9696/v2.0/ports.json used request id
req-da75468a-2855-4e59-b308-d2a91776b927
Above log will be logged twice on the console.
Removed logging of x-openstack-request-id in case of SessionClient as it
is already logged in keystoneauth1. x-openstack-request-id will only be
logged once on console if HTTPClient is used.
Depends-On: I63fb5e5486670bc369abc5339a2da8e65ba2ec6f
Closes-Bug: #1657351
Change-Id: I8efefd69a1ba4a214b1a30b20b9c1e5bd96b19d4
The result of 'qos-minimum-bandwidth-rule-list' response is wrong,
because the key in response information is
'minimum_bandwidth_rules' and not 'qos_minimum_bandwidth_rules'
Change-Id: Ic87fffd60f004a9b989f43e93aaeee2dc5cb300c
Closes-Bug:#1643849
The retry_logic in do_request catches neutronclient errors, but if a
SessionClient is being used, nothing throws neutronclient errors -
instead keystoneauth Session throws keystoneauth exceptions.
Add the keystoneauth.exceptions.ConnectionError to the things that
handle the error and retry.
Change-Id: If16e50ee53279652fbdfc2d13d5509f46a54124a
The following patch implements the QoS egress minimum
bandwidth assurance in neutronclient.
Change-Id: I025522f73a9a8e3a9f69f097cedaeba330b9914a
Depends-On: I6b619a96a2bfde164646c71409b671352bc6ce7d
Depends-On: I13c54be22f35ac7eb5835d8424a919d0b61a8e95
Partial-Bug: #1560963
Add a arg "**_params" in show_bandwidth_limit_rule() to use the
"-F" option.
Change-Id: I1bee877a2e83801527bcccffe404053b6aafe012
Partial-Bug: #1587291
Some neutron POST and PUT APIs don't return response body,
for instance, dhcp-agent-network-add and l3-agent-router-add.
This patch add a check for response body.
Change-Id: Ia772927a28cb83c4c88680b5add925b12978dc5d
Related-Bug: #1555921
This is a regression of Iec3e9b379255111f5390325778a1d07bf73b29d.
The unit test coverage was missing.
Change-Id: I0fc5d6dedf469ea70854a53b4e79f3b8bf9206a6
Closes-Bug: #1608403
This patch introduces the client bindings for the trunk
extension. It uses the openstackclient framework, and
thus requires the openstack client to work.
New commands introduced are as follows:
"openstack network trunk create" to create a trunk.
"openstack network trunk set" to update/add subports to a trunk.
"openstack network trunk unset" to remove subports from trunk.
"openstack network trunk list" to list all trunks.
"openstack network trunk delete" to delete trunks.
"openstack subport list --trunk <name>" to list all subports
belonging to a trunk.
DocImpact: Openstackclient now supports CLIs to configure
trunk resource via OSC plugin for neutronclient
Change-Id: I6fe1dbd81813fae234801a61c0e3d89f9e7c791e
Co-authored-by: SongmingYan <yan.songming@zte.com.cn>
Co-authored-by: Abhishek Raut <rauta@vmware.com>
Partial-implements: blueprint vlan-aware-vms
find_resource variants are also used by OSC plugin.
It looks reasonable to move them to the API binding layer.
This commit does not touch the related unit tests
to ensure backward compatibility.
Related-Bug: #1521291
Change-Id: Iec3e9b379255111f5390325778a1d07bf73b29d6
Neutron client should be able to show the default quotas
set for tenants. This patch adds support for the same and
introduces a new CLI to retrieve default quotas.
Sample usage:
neutron quota-default-show
+-----------------------+-------+
| Field | Value |
+-----------------------+-------+
| floatingip | 50 |
| l2-gateway-connection | -1 |
| network | 10 |
| port | 50 |
| rbac_policy | 10 |
| router | 10 |
| security_group | 10 |
| security_group_rule | 100 |
| subnet | 10 |
| subnetpool | -1 |
+-----------------------+-------+
Change-Id: Ie92c22862d2b8ace32a2cf4cb642a6d0bac7932d
Closes-Bug: #1204956
All occurrences of tenant replaced with project (where applicable).
Partially Implements blueprint: keystone-v3
Change-Id: I4919745aa59863f99c7740e730d8cbfd91c2f646
Removes the APIParamsCall decorator around client method, as requesting
a different format is not supported anymore.
Change-Id: I758693898dc87d0e3dd26487b5625004ba3d152a
Closes-Bug: #1554496
The following patch implements the DSCP QoS support
in neutronclient. This patch also removes some
hardcoded values from bandwidth limit rule.
Supporting CLI/Network guide docs are located here:
I881b8f5bc9024c20275bc56062de72a1c70c8321
Co-Authored-By: Margaret Frances <margaret_frances@cable.comcast.com>
Change-Id: I25ad60c1b9a66e568276a772b8c496987d9f8299
Depends-On: Ic3baefe176df05f049a2e06529c58fd65fe6b419
Partial-Bug: #1468353
Add the ability to pass fields with the
auto-allocated-topology-show command to support the
dry-run validation option of the API.
With dry-run the CLI result is "Pass" or the error message
from the response.
Rename the client binding from show_ to get_. Also provide a
client binding for validating the auto-allocation requirements.
Partially-Implements: blueprint get-me-a-network
DocImpact: Add info about dry-run to the auto-allocate section
in the networking guide.
Change-Id: Ieba6f3cde23a8a93067b8239b096d5103f6a3128
This patch adds the tag support for CLI.
Change-Id: Ia84b873e3916e7b9668181fe14c1448ef608bf1d
Partial-Implements: blueprint add-tags-to-core-resources
Related-Bug: #1489291
Added wrapper classes which are inherited from base data types tuple, dict
and str. Each of these wrapper classes contain a 'request_ids' attribute
which is populated with a 'x-openstack-request-id' received in a header
from a response body.
This change is required to return 'request_id' from client to log
request_id mappings of cross projects[1].
[1]: http://specs.openstack.org/openstack/openstack-specs/specs/return-request-id.html
Change-Id: I55fcba61c4efb308f575e95e154aba23e5dd5245
Implements: blueprint return-request-id-to-caller
Previously, only when an exception has a content with
{'NeutronError': {'type': xxxx, 'message': xxxx}},
exception per status code is raised from neutronclient library.
There are cases where this kind of message is not contained
in exception messages, for example, some extension is loaded.
Library users expect an exception is raised based on response
status code and it should not depend on an exception message.
This commit applies a fallback logic to map generic per-status
exception to all exception types from the neutron server.
Closes-Bug: #1513879
Change-Id: Ib3d0a8359aed444b12217b3404d40443d61fc2c0
Adjusted conditional statements to use instanceof when
comparing variables. Instanceof supports inheritance type
checking better than type.
Change-Id: I873ef7d5e283ee70f1548f040f1c1d9a675c7159
Closes-Bug: 1548974
So far the feature of retrieving a specific Load Balancer's Status Tree
is not implemented in the neutronclient code, we need to add feature
code and related tests.
DocImpact Add loadbalancer-status-tree feature in CLI
Change-Id: Ia7804ab6baac674830c6834f67cfd411ebf4d14f