27 Commits

Author SHA1 Message Date
Jenkins
700c0b4057 Merge "Fix using wrong status code in some tests" 2017-04-16 12:14:59 +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
Jenkins
465a89246f Merge "Fixed a bunch of spacing" 2017-03-05 22:22:31 +00:00
Rodion Tikunov
cc1d3fdd35 Added --enable-snat option for router-gateway-set
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
2016-11-08 17:56:09 +03:00
Kevin Benton
afe3c8389d Add flavor argument to router
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
2016-08-28 10:44:17 -07:00
reedip
fc2950c2bb Change try..except to assertRaises in UT
Following patch changes the try..except condition for
testing to assertRaises.

Change-Id: I2253b4e75f778ad077bd905487ede075a430a1fa
2016-04-11 07:06:05 +00:00
Kevin Benton
2db432fbf5 Add parser options for description on resources
This adds the description field to the parsers for all
of the resources that gained description fields in the
dependent patch.

Change-Id: I939b517c5320ea9dd3f387c12adee1ed8876adec
Related-Bug: #1483480
Depends-On: I6e1ef53d7aae7d04a5485810cc1db0a8eb125953
2016-03-08 19:12:58 +00:00
Brandon Palm
1b765bda39 Fixed a bunch of spacing
Nothing too crazy here.  Just changed some spacing problems that
I encounted in the neutronclient.

Change-Id: I236a4af738851508681f595cb9233c2cfbc52899
2016-02-29 08:56:22 -06:00
Ukesh Kumar Vasudevan
3a4d49d9df Enhance the help info of "neutron router-gateway-set"
The help info of "neutron router-gateway-set" is not much
complete.

Below is the help message of "neutron router-gateway-set":

usage: neutron router-gateway-set [-h] [--request-format {json,xml}]
       [--disable-snat] [--fixed-ip FIXED_IP]
       ROUTER EXTERNAL-NETWORK
neutron router-gateway-set: error: too few arguments

Modified the help message and added unit test.
Usage should be as below,

usage: neutron router-gateway-set [-h] [--request-format {json,xml}]
       [--disable-snat] [--fixed-ip subnet_id=SUBNET,ip_address=IP_ADDR]
       ROUTER EXTERNAL-NETWORK
neutron router-gateway-set: error: too few arguments

Change-Id: I2a0bbd147803108e4001ffe86594e1201b9c388b
Closes-Bug: 1527129
2016-01-10 12:04:48 +00:00
shu-mutou
ec4e482731 Fix H405 violations
There are a lot of H405 violation codes.
We need to fix the code for avoiding more violations.

Change-Id: Iaa83626b81a3d8369b16e2b4f394e2bc4628998a
Closes-Bug: #1521899
2015-12-13 05:48:42 +09:00
Jenkins
2d5b6e6699 Merge "Remove XML support" 2015-12-11 18:21:14 +00:00
Elena Ezhova
54a4aea969 Remove XML support
As XML support has been removed from neutron, there is no need
to keep it in client.

Dropped XML serializer and deserializer and deprecated "request-format"
CLI option, making JSON the default and the only supported request
format.

DocImpact

Change-Id: I88b0fdd65a649694252d5ff43a174e75026df5b1
Closes-Bug: #1380787
2015-12-09 11:09:26 +03:00
Hirofumi Ichihara
709928b550 Add availability_zone CLI
This patch adds the availability_zone support for CLI.

Change-Id: I13faf6d90e84f401f07376c517c643ba9eda2295
Co-Authored-By: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Partially-implements: blueprint add-availability-zone
2015-12-08 22:36:58 +09:00
Richard Theis
2941b0c74a Add route options to neutron router-update
Add the --route and --no-routes options to neutron router-update.
This will make it easier for CLI users to add or remove routes
associated with a router.

Change-Id: If0e3125420afe3609633cd6c133edaa5a172357d
Closes-Bug: #1452229
2015-11-17 07:44:23 -06:00
Jenkins
6281aba974 Merge ""neutron help router-update" help info updated" 2015-07-28 08:47:42 +00:00
Cedric Brandily
9e6977de58 Allow setting router's external ip(s)
This change allows to set external_fixed_ips in router-gateway-set
command using --fixed-ip option:

  neutron router-gateway-set $router $extnet\
      --fixed-ip ip_address=10.0.0.4
  neutron router-gateway-set $router $extnet\
      --fixed-ip subnet_id=extsubnet

Change-Id: Ifa37aee0bbf8e2ee1eb37020924f13af73ad35cc
Related: blueprint specify-router-ext-ip
2015-05-11 22:22:53 +02:00
watsalya
ada1568809 "neutron help router-update" help info updated
Initially we were unable to see complete help
info for "neutron router-update" command.
Now, with this patch complete help info is
displayed to the user. Apart from the existing
information, the following information will
also be displayed:-
    --name
    --admin-state-up
    --distributed

Change-Id: I149855e86a2d874c10f1ff315a2627e0f0f306c7
Closes-Bug: #1401030
2015-03-04 16:28:19 +05:30
Swaminathan Vasudevan
4beadef8b5 Fix True/False to accept Camel and Lower case
There are couple of inconsistency in using
the Camelcase and Lower case for 'True/False'
options in the python-neutronclient.

With this fix it will be consistent across all
CLI commands.

Change-Id: Ifc08ac326e8130f69f864b05781076951a306fa0
2014-12-22 16:39:32 -08:00
Swaminathan Vasudevan
66612c9de8 Router create distributed accepts lower case
Neutron router-create optional argument distributed
does not accept "true/false" anymore.
It only accepts value with Camel case "True/False".

This patch will allow the users to provide both
True/true or False/false.

Change-Id: I79577bd70a796543b9dea53b4839512eb8944d7c
Closes-bug: #1368934
2014-12-04 13:06:27 -08:00
Assaf Muller
9660c7da27 Add L3 HA / VRRP support to CLI
Change-Id: Ia1f758f5536780a3170d624d61a3b2fa66eff76e
Partially-implements: blueprint l3-high-availability
2014-09-11 21:40:48 +03:00
Assaf Muller
deb850b728 Fix CLI support for DVR, take 2
Previously --distributed was displayed as positional
argument in the help text, but acted as an optional
argument with the -- semantics. It now behaves like
any other optional argument.

A side-effect is that previously you could:
1) neutron router-create --distributed r1
2) neutron router-create --distributed=True r1
3) neutron router-create --distributed=False r1

While now only options 2 and 3 are viable.

DocImpact
Partially-implements: blueprint neutron-ovs-dvr
Closes-Bug: #1346121
Change-Id: I60675b4f60fe8154af4ab6d8f0e93867cf362a59
2014-08-26 19:50:01 +00:00
liu-sheng
e955a1fc80 Remove vi modelines
We don't need to have the vi modelines in each source file,
it can be set in a user's vimrc if required.

Change-Id: Ic30e91df1b0e25beda9b8d8c19be58573cdae4f6
Closes-Bug: #1229324
2014-02-10 17:00:28 +08:00
armando-migliaccio
9235f83d68 Rename Nicira NVP to VMware NSX in neutronclient
Use new naming scheme to reflect rebranding.

Partial-implements blueprint nicira-plugin-renaming

Change-Id: I694fbda1c228e92a0b910358523787fa742d9ab2
2014-01-28 17:21:06 -08:00
Jenkins
c8880f8efc Merge "neutron router-gateway-set failed for non-admin users" 2013-09-03 17:48:33 +00:00
Salvatore Orlando
52e2c79c86 Add 'distributed' option to router-create command
Blueprint nvp-distributed-router

Change-Id: I831da0cc3ff4004549a4e4673eadf2a5920d9573
2013-08-31 18:33:20 +09:00
Stephen Ma
5ae7b02385 neutron router-gateway-set failed for non-admin users
Fixed the neutron router-gateway-set command regression:
"neutron router-gateway-set <router> <public-net>"
is failing for non-admin users.

Changed the behavior to pass the enable_snat attribute to
the server only when the --disable-snat option is specified.

bug 1209027

Change-Id: Iec55a17ed7966ee15bf05982d98540fe6884fa20
2013-08-26 17:37:36 -07:00
Monty Taylor
e34a06adf0 Move tests back to neutronclient package
Neutron itself has all of its tests in neutron/tests, as do 2/3 of
the projects in OpenStack. There are a wealth of reasons to put
them in the package, not the least of which that tests/__init__.py
implies a code living in a global namespace called tests.

Change-Id: I2aaacfe59d6790648aa4587e89e6dd28a9149a6c
2013-08-22 09:10:36 -04:00