141 Commits

Author SHA1 Message Date
Jenkins
700c0b4057 Merge "Fix using wrong status code in some tests" 2017-04-16 12:14:59 +00:00
Jenkins
15889916da Merge "Don't decode empty response body" 2017-04-16 11:41:09 +00:00
Hirofumi Ichihara
4d4e4decc3 Fix using wrong status code in some tests
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
2017-04-16 04:05:46 -07:00
Édouard Thuleau
f2ace0415d Add BGP VPN OSC commands
Change-Id: Ib1ba356e994a98712e00a11ff045df67fbe4c7ea
Closes-Bug: #1650204
2017-02-09 12:17:19 +01:00
Abhishek Kekane
1e9ab9efb5 x-openstack-request-id logged twice in logs
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
2017-01-23 11:28:05 +05:30
QunyingRan
5031501283 Modify key for 'qos-minimum-bandwidth-rule-list' reponse
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
2017-01-07 11:47:30 -08:00
Yushiro FURUKAWA
0a721cf576 Add FWaaS V2 commands for OSC plugin
This commit supports FWaaS v2 CLI as OSC plugin[1].
[1] http://specs.openstack.org/openstack/neutron-specs/specs/newton/fwaas-api-2.0.html

Partial-Implements: blueprint fwaas-api-2.0
Depends-On: I7b4108772e8370e8f51971caf40ecd23e9f977e9
Change-Id: I57504f97ac39b5b7d301fd5cc88228a121f0677e
Closes-Bug: #1609686
2016-12-27 22:02:42 +09:00
Monty Taylor
b8a05333dd Handle keystoneauth exceptions in retry logic
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
2016-09-20 13:08:28 +00:00
Jenkins
796438f0ad Merge "fix one spelling mistake" 2016-09-01 22:53:44 +00:00
gecong1973
01afaa7b0b fix one spelling mistake
availibility should be availability

Change-Id: I691e8b39eea2dc7a865d91bd17bcb8f401387458
2016-08-29 05:41:34 +00:00
Rodolfo Alonso Hernandez
a6cdd1dace Add QoS egress minimum bandwidth rule to neutronclient
The following patch implements the QoS egress minimum
bandwidth assurance in neutronclient.

Change-Id: I025522f73a9a8e3a9f69f097cedaeba330b9914a
Depends-On: I6b619a96a2bfde164646c71409b671352bc6ce7d
Depends-On: I13c54be22f35ac7eb5835d8424a919d0b61a8e95
Partial-Bug: #1560963
2016-08-28 10:59:06 +00:00
Jenkins
93b6fe1d4f Merge "Fix the problem of "qos-bandwidth-limit-rule-show"" 2016-08-29 11:51:54 +00:00
Jenkins
244f4c5848 Merge "Fix the problem of "qos-dscp-marking-rule-show"" 2016-08-29 10:42:56 +00:00
SongmingYan
d875cb34b9 Fix the problem of "qos-bandwidth-limit-rule-show"
Add a arg "**_params" in show_bandwidth_limit_rule() to use the
"-F" option.

Change-Id: I1bee877a2e83801527bcccffe404053b6aafe012
Partial-Bug: #1587291
2016-08-29 09:21:18 +00:00
Armando Migliaccio
ee6b6eafb7 Provide client bindings for DELETE method of auto-allocated-topology extension
DocImpact: Add documentation for auto-allocate-topology-delete CLI

Partial-bug: #1614872

Depends-on: I2fba51bdf8c781fcc0449e1e9947de976c96eec4
Change-Id: I07ef85e4a0c43613351820bd56e429d0155c9fa5
2016-08-25 21:07:48 +00:00
Jenkins
aa7a3dbff2 Merge "Add support to expose default quotas for tenants" 2016-08-12 15:57:20 +00:00
Hirofumi Ichihara
c91f9f2ccd Don't decode empty response body
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
2016-08-09 10:47:42 +09:00
Jenkins
5da767d36e Merge "Add trunk commands to openstackclient" 2016-08-03 07:41:27 +00:00
Jenkins
b8de23d80c Merge "Make find_resourceid_by_id public in python binding class" 2016-08-02 18:38:10 +00:00
Jenkins
343696a997 Merge "Log request-id for each api call" 2016-08-02 18:37:28 +00:00
Akihiro Motoki
092c3e5e91 Make find_resourceid_by_id public in python binding class
This is a regression of Iec3e9b379255111f5390325778a1d07bf73b29d.
The unit test coverage was missing.

Change-Id: I0fc5d6dedf469ea70854a53b4e79f3b8bf9206a6
Closes-Bug: #1608403
2016-08-02 05:09:41 +00:00
Armando Migliaccio
449a1f7d13 Add trunk commands to openstackclient
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
2016-07-28 05:16:27 -07:00
Akihiro Motoki
84c42160e9 Move find_resource family to API binding layer
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
2016-07-28 00:30:50 +00:00
Hirofumi Ichihara
53e2ad1ba9 Log request-id for each api call
This patch adds support to log 'X-Openstack-Request-Id' for each api call.

Change-Id: Ia17d6c4cc021246316a7317011596e0e2efa37be
Closes-Bug: #1604306
2016-07-20 01:06:03 +00:00
Abhishek Raut
d45442b3d4 Add support to expose default quotas for tenants
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
2016-07-15 20:47:51 +00:00
dongwenshuai
c5c705120a Fix the problem of "qos-dscp-marking-rule-show"
Add an arg "**_params" in show_dscp_marking_rule() to use the
"-F" option.

Change-Id: I7634d205430ce01de28ac1ecf571696d84d865d3
Partial-Bug: #1587291
2016-06-21 09:40:46 +08:00
zhurong
8585c140de Trivial Fix: Fix typo
Change-Id: I05f5abf619016a48babedf1f108430d470d8870e
2016-06-20 14:32:22 +00:00
Dariusz Smigiel
343e4b186f Update for API bindings
All occurrences of tenant replaced with project (where applicable).

Partially Implements blueprint: keystone-v3

Change-Id: I4919745aa59863f99c7740e730d8cbfd91c2f646
2016-05-26 08:48:18 -05:00
Thomas Herve
4012d8b73b Remove APIParamsCall decorator
Removes the APIParamsCall decorator around client method, as requesting
a different format is not supported anymore.

Change-Id: I758693898dc87d0e3dd26487b5625004ba3d152a
Closes-Bug: #1554496
2016-03-18 15:21:49 +01:00
Jenkins
23ba812ffd Merge "Adding DSCP marking changes to neutronclient" 2016-03-18 14:05:30 +00:00
Vic Howard
8ff7d5caba Adding DSCP marking changes to neutronclient
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
2016-03-03 12:41:59 -05:00
Henry Gessau
d3f13f4c20 Support dry-run option for auto-allocated-topology
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
2016-03-02 17:56:47 -05:00
Hirofumi Ichihara
f67f4af8bd Add tags support
This patch adds the tag support for CLI.

Change-Id: Ia84b873e3916e7b9668181fe14c1448ef608bf1d
Partial-Implements: blueprint add-tags-to-core-resources
Related-Bug: #1489291
2016-03-02 21:10:38 +09:00
Jenkins
e9560866f7 Merge "Add commands for Network IP Availability" 2016-03-02 09:33:00 +00:00
Manjeet Singh Bhatia
8910471df3 Add commands for Network IP Availability
This patch adds commandline for getting details about
networks IP availability.

Change-Id: Ie02c01ed8c4e291f91ed4cfd8781f4ec6a612cc7
Co-Authored-By: Brandon Logan <brandon.logan@rackspace.com>
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
2016-03-02 06:57:02 +00:00
Jenkins
8ca2e0d3e9 Merge "Add wrapper classes for return-request-id-to-caller" 2016-03-01 09:19:41 +00:00
Evgeny Fedoruk
a64aad2c0f Reflecting L7 content rules capability in LBaaS
Adds CLI commands for L7 policies and rules

Change-Id: I3617c7ecd2a3ac0cae555893235e34d6c2135b81
Implements: blueprint lbaas-l7-rules
Co-Authored-By: Evgeny Fedoruk <evgenyf@radware.com>
Co-Authored-By: Stephen Balukoff <stephen@balukoff.com>
2016-02-29 14:18:48 -08:00
Jenkins
82ec2abb22 Merge "BGP Dynamic Routing: neutronclient changes" 2016-02-29 19:09:09 +00:00
Jenkins
2bf12749bc Merge "Ensure to use exception per status code for all cases" 2016-02-28 18:01:22 +00:00
Hirofumi Ichihara
65118c09eb Add wrapper classes for return-request-id-to-caller
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
2016-02-26 16:16:55 +09:00
vikram.choudhary
3c26455a03 BGP Dynamic Routing: neutronclient changes
This patch adds neutronclient support for BGP routing functionality.

Partially-Implements: blueprint bgp-dynamic-routing

Co-Authored-By: Ryan Tidwell <rktidwell85@gmail.com>
Co-Authored-By: Numan Siddique <nusiddiq@redhat.com>
Co-Authored-By: Jaume Devesa <devvesa@gmail.com>

Change-Id: I5b20bcbf6c837495d81c395f600498d2c8f3495c
2016-02-25 12:22:27 +05:30
Akihiro Motoki
af1a55bfd2 Ensure to use exception per status code for all cases
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
2016-02-24 10:23:46 +00:00
Brandon Palm
0dd54a08c6 Use instanceof instead of type
Adjusted conditional statements to use instanceof when
comparing variables. Instanceof supports inheritance type
checking better than type.

Change-Id: I873ef7d5e283ee70f1548f040f1c1d9a675c7159
Closes-Bug: 1548974
2016-02-23 14:06:12 -06:00
cshahani
53195f7018 Fix typos in the docstrings
Fixed some typos in the docstrings for methods and corrected the
docstring for a method.

Change-Id: I33860de72988e2160ec65d96c9e118f7c9861788
2016-02-11 10:34:18 -08:00
Henry Gessau
da57c86a53 Client bindings for Get-me-a-network
Add client bindings for auto-allocated-topology.

Add the 'auto-allocated-topology-show' CLI.

Partially-implements: blueprint get-me-a-network

Depends-On: Ia35e8a946bf0ac0bb085cde46b675d17b0bb2f51
Change-Id: I67a30ce552fd0310e051ac39dda0a763ee29ef6e
2016-02-05 19:03:31 -05:00
Jenkins
9c203d2bb7 Merge "Add code for load balancer status tree" 2016-01-22 19:27:34 +00:00
minwang
a97f28f187 Add code for load balancer status tree
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
2016-01-19 10:01:58 -08:00
Irina
2f08273be9 Fix typo in docstrings
Change 'formating' to 'formatting'.

Change-Id: If48e47a674dbb454f41ee429b310d26e8404f8a2
2016-01-19 03:08:21 +00:00
Jenkins
4cb4851908 Merge "Support pagination listing in client extension" 2016-01-16 02:40:04 +00:00
Jenkins
1f0b2b1efa Merge "Add method to retrieve loadbalancer stats" 2016-01-04 21:09:28 +00:00