54 Commits

Author SHA1 Message Date
Jaume Devesa
64b2d8a01b Fix E129 hacking check
Remove E129 from the ignored checks and fix them

Change-Id: Ibd3a98ceb173e9a1fa106ac6c4ecdebb1a9a1e4f
2014-10-17 13:01:59 +02:00
Jenkins
40c6172f27 Merge "Adds tty password entry for neutronclient" 2014-10-13 22:01:00 +00:00
Jenkins
f333139bb2 Merge "handles keyboard interrupt" 2014-10-13 21:58:06 +00:00
John Schwarz
2eba58adc1 Don't get keystone session if using noauth
This patch tells neutronclient not to open an authentication session
against keystone if using --os-auth-strategy=noauth.

The intended behaviour in bp keystone-v3-api-support was that
--os-auth-strategy will be completely deprecated and that the absence
of --os-auth-url will signify that noauth is needed. This patch does
not intend to deprecate the strategy option, since that seems to be a
much larger change in the client, so a smaller fix is proposed instead.

This is needed for future Neutron integration tests which will be done
in-tree, since we don't want Neutron to depend on other projects
(including Keystone) during these tests.

Closes-bug: #1375765
Change-Id: I9c61e304f75d3d105e1d66782a7495488eefd5e2
2014-10-06 12:11:29 +03:00
Rakesh H S
a1a8a0e2b2 handles keyboard interrupt
When an user intentionally provides an keyboard interrupt, neutronclient
throws the entire traceback on to the terminal instead of handling it.
neutronclient will now handle the keyboard interrrupt and provides an crisp
message on to the terminal.

Change-Id: I55a85cd4bfcbf26d81e5678b6f4aed3d1c288467
Closes-Bug: #1367283
2014-09-25 11:37:37 +05:30
Jenkins
fa5642f155 Merge "Fix Py3 compatibility issues" 2014-09-18 12:56:43 +00:00
Jenkins
ede859ebf6 Merge "Improve help strings" 2014-09-16 15:42:06 +00:00
Ilya Shakhat
9bf8b71e33 Fix Py3 compatibility issues
* Replace of urllib by six urlparse
* Convert dict keys into list to be able to retrieve the first element
* Use integer division for integers
* Use int instead of long in XML serialization/deserialization under Py3

Co-author: Cyril Roelandt <cyril.roelandt@enovance.com>

Change-Id: Ia79c831310775bf1c3dbec06010f8949c3a73887
2014-09-16 12:57:14 +04:00
Jenkins
653a9cc0b3 Merge "Clean-up shell run and run_subcommand methods" 2014-09-15 14:54:40 +00:00
Jenkins
88e8e8f476 Merge "Silence iso8601 debug messages in verbose mode" 2014-09-15 14:54:32 +00:00
Jenkins
df5b4f2ffc Merge "neutronclient shows low-level logs in console screen" 2014-09-15 06:16:41 +00:00
Cedric Brandily
69e7ffc19a Silence iso8601 debug messages in verbose mode
In verbose mode, iso8601 package produces the following useless debug
messages:

DEBUG: iso8601.iso8601 Got u'2014' for 'year' with default None
DEBUG: iso8601.iso8601 Got u'09' for 'monthdash' with default 1
DEBUG: iso8601.iso8601 Got 9 for 'month' with default 9
DEBUG: iso8601.iso8601 Got u'14' for 'daydash' with default 1
DEBUG: iso8601.iso8601 Got 14 for 'day' with default 14
DEBUG: iso8601.iso8601 Got u'16' for 'hour' with default None
DEBUG: iso8601.iso8601 Got u'31' for 'minute' with default None
DEBUG: iso8601.iso8601 Got u'23' for 'second' with default None

This change silences them.

Change-Id: Ibd0c5bb48b1ab86aaee2c8cb4f27b7e5fa8b4bef
2014-09-14 17:45:33 +02:00
Andreas Jaeger
a844d19861 Improve help strings
Improve consistency of help strings: Add missing ".", fix wording.

Change-Id: If9dba459dcbbf695b9057e82525a83371ceebd8b
2014-09-11 18:33:45 +02:00
Stanislav Kudriashev
34e334154c Clean-up shell run and run_subcommand methods
Remove else branch of try-catch block since
it is never executed.

Get rid of passing result to shell clean-up function
since it is not used.

Change-Id: I9360d1e27fc203672ba0511b58172f5c776bdfb6
2014-09-02 11:29:32 +03:00
Kevin Benton
98d2135dbd Rename --timeout param to --http-timeout
The --timeout parameter was already used by the
load balancer subcommand so adding it as a top-level
parameter broke the load balancer commands. This
patch renames the new --timeout top-level command
to --http-timeout so it doesn't conflict with the
existing load balancer commands.

DocImpact

Closes-Bug: #1353536
Change-Id: I3d1dd9537e546191c5905e0aa5415de5308d9c7e
2014-08-18 14:45:29 -07:00
Feng Xi Yan
d9de6b9ecd neutronclient shows low-level logs in console screen
Neutron command lines always display some useless information. This
should be avoided. This commit modifies the default level of console
stream to WARNING.

Closes-bug: #1356735

Change-Id: I997dad9ce3fc3eb795e4e44b27d211fa619c1907
2014-08-14 08:50:17 +00:00
Zang MingJie
8f59a306e2 Print exception when verbose is over DEBUG_LEVEL
Change-Id: I8a2010332be0acfe6762bf3190248fe17f42cadb
Closes-bug: #1353496
2014-08-14 07:21:12 +00:00
John Trowbridge
2840bdbe3d Adds tty password entry for neutronclient
Added functionality from keystoneclient to fallback to the tty for password
entry if no password is given via the environment or the --os-password option.

Closes-Bug: 1356550

Change-Id: I7d0428a8901cae667ef598aa515e108a3a679540
2014-08-13 20:04:54 +00:00
Bradley Klein
2203b013fb Add keystone v3 auth support
This change enables the neutron client to use the keystone v3 API (in
addition to v2).  This allows user domains and tenant/project domains to
be specified.  This is necessary because keystone v2 API is deprecated
as of Icehouse.

The keystone session object (and auth plugin) can now be specified
and are required to use the keystone v3 API.  The existing HTTPClient
is retained for backward compatibility.  See changes in shell.py for
an example of how to construct the session and auth plugin.

Implements: blueprint keystone-api-v3-support

Change-Id: I9d0395d405b9fbe4db08ad3727f9413be7b82811
2014-08-04 15:52:56 -06:00
Jakub Libosvar
65883ba4eb Add option for retry number of connection attempts
This patch adds a new option (-r | --retries) to specify how many times the
client should attempt to connect to the Neutron server when using idempotent
methods (GET, PUT and DELETE). The patch also provides more user-friendly
message when it's impossible to connect to Neutron server from CLI and
ensures that connection-related exceptions are raised to the caller by
default when neutronclient is used as a library.

DocImpact
Closes-Bug: #1312225

Change-Id: Id74d7cf9a0e8c5d2cd3ee4851c883d5286bea19d
2014-07-29 10:41:35 +02:00
Jenkins
fbd7e4f579 Merge "Add a new timeout option to set the HTTP Timeout" 2014-07-28 21:25:28 +00:00
Kevin Benton
5db54ed301 Add a new timeout option to set the HTTP Timeout
Adds a new --timeout option and check to the env
var OS_NETWORK_TIMEOUT to set the HTTP timeout used
for the request to the Neutron backend.

DocImpact

Closes-Bug: #1338932
Change-Id: I0d9687e671f68c4845af2439abfe581c6dcf020c
2014-07-27 03:58:57 -07:00
Jenkins
6d5640c992 Merge "Silences the output in CLI for connection info" 2014-07-25 23:10:41 +00:00
Jenkins
81dab00351 Merge "debug level logs should not be translated" 2014-06-27 04:28:39 +00:00
Andreas Jaeger
a604029380 Improve help strings
Several changes to make help strings consistent:
* End options with "."
* Add missing space between lines
* Capitalize first word of help strings
* Improve wording of text
* Make strings consistent.
* Use "VPN service"

Closes-Bug: #1321871

Change-Id: I8fdc356574d680c222b8a26dcc5ad8e3a2b4e4f1
2014-06-25 18:39:33 +02:00
liu-sheng
85cb530088 Silences the output in CLI for connection info
This change try to reduce the useless urllib3 connection info in
CLI by set the log level of urllib3.connectionpool.

Change-Id: I9d21d29ae0274133099dd05a14e5211d77ffe721
Closes-Bug: #1333485
2014-06-24 09:53:17 +08:00
Christian Berendt
73e608d354 debug level logs should not be translated
According to the OpenStack translation policy available at
https://wiki.openstack.org/wiki/LoggingStandards debug messages
should not be translated. Like mentioned in several changes in
Nova by garyk this is to help prioritize log translation.

Change-Id: I639624cbe64749085654b32ac85596fdae577230
2014-06-23 10:58:36 +00:00
Christian Berendt
99f45d1e61 removed usage of '... can be repeated.'
Thanks to Diane Fleming for the wording.

Change-Id: Ida509a838a76f7484b004d59b2866f4dbf2075b6
2014-06-08 13:25:00 +02:00
Phil Day
ed5ea512ca Allow user ID for authentication
In Keystone V3 user names are no longer necessarily unique
across domains.

A user can still authenticate a user in the non default
domain via the V2 API providng they use IDs instead of names.

Tenant_ID is already supported, this change adds support
for user ID

Closes-Bug: #1299807

Change-Id: I22fdd9a6749f7dfbdd2dc8313fddc81e5ea0b753
2014-04-23 16:17:26 +00:00
Akihiro MOTOKI
320e014eff Support packet_filter extension in NEC plugin
blueprint nec-packet-filter-cli

Also adds common validators.

Change-Id: Ia431c2268e9a654e10dc9cf740288fb746825d13
2014-04-18 18:32:02 +09:00
Jenkins
5613ea7e97 Merge "Enable to select specific network service type" 2014-03-14 18:31:21 +00:00
Salvatore Orlando
fb0650cebc CLI support for NSX gateway devices
Related to blueprint nsx-remote-net-gw-integration

Change-Id: Iedd080a29e281355420ace955fb09d196b54a316
2014-03-07 21:02:18 +01:00
Jenkins
43f7fa4ab2 Merge "Supporting Net-Partition as extension for Nuage plugin" 2014-03-04 00:57:08 +00:00
ronak
1bc00e57d2 Supporting Net-Partition as extension for Nuage plugin
A net-partition provides administrative separation between groups of tenant
routers/networks/subnets. Within a net-partition, subnets can be shared, and
VMs can connect multiple vNICs to subnets within the net-partition.
For security and isolation between organizations, VMs may not connect
VNICs to subnets within more than one net-partition.

This work is in accordance with bp/nuage-networks-plugin which is
under review: https://review.openstack.org/#/c/67272/

Change-Id: Ia9b0304f714c65548cd6b8ce6ff74a3075c4e673
Implements: blueprint nuage-net-partition-extension
2014-03-03 10:07:41 -08:00
Yohei Matsuhashi
1cb7abd3be Enable to select specific network service type
Network service type is selected as 'network' statically.
This will select the service_type from environment variables or CLI options.
The option works like the service type option in the novaclient.

Implements blueprint specify-service-type
Change-Id: If21bd2b5cb35da5bcabca79aa0567870331a3a6f
2014-02-26 17:47:48 +09:00
ZhiQiang Fan
bbcbc5a69c Enable hacking H233 rule
H233: Python 3.x incompatible use of print operator

Change-Id: I7acd664b888c0ba049524e5f519c72038d79495b
2014-02-19 20:12:10 +08: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
Jenkins
a7e2bd3324 Merge "Rename Nicira NVP to VMware NSX in neutronclient" 2014-02-09 14:11:23 +00: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
Aaron Rosen
24bd404ac5 Combine debug and verbose commandline options
Most of the openstack clients (for example nova) when --debug is specified it
shows the api calls the client is making. However, when debug is passed into
the neutronclient it shows exceptions that have occurred inside the
neutronclient. This patch combines verbose and debug to do the samething.

Change-Id: I6f2e0b17ffbe8fbfa77e26222dae32f5ab1e8866
Closes-bug: #1260489
2014-01-20 13:48:11 -08:00
Sergio Cazzolato
6d937f3e85 Fix i18n messages in neutronclient
Using tools/check_i18n.py to scan source directory, and fix most of
the errors.
    - Message internationalization
    - First letter must be capital
    - Using comma instead of percent in LOG.xxx

Partial-Bug: #1217100
Change-Id: I312f999f97e33d84c3f06fa1caacf32affc26a78
2013-11-29 19:16:22 -05:00
Sean Winn
1b36606b39 Change copyright headers from LLC to Foundation
Closes-Bug: #1214176
Change-Id: I8c8095860f6e17652bb5f52583008774180337f6
2013-10-04 02:37:37 +09:00
Sylvain Afchain
944333b1e6 Client for metering extension
blueprint bandwidth-router-label

Change-Id: I4d55c0f950d380c89e0d17c08facfe9ed078dd8e
2013-09-16 11:58:21 +02:00
Swaminathan Vasudevan
653c4b1949 VPN as a Service (VPNaaS) Client API
Implements:blueprint VPNaaS-Python-API

This provides the basic Neutron Client
CLI for configuring:
* VPNService
* IKEPolicy
* IPsecPolicy
* IPsecSiteConnection

Change-Id: I72ab670d23109a4bb1174acf48e4b77958e855e1
2013-08-26 09:11:44 -07:00
Abhishek Raut
f146fa0cd5 Add credentials and profile support to Neutron client
Add support to the Neutron client for credentials and profiles to allow
for working with Nexus 1000V. These are in support of the Nexus 1000V
Cisco plugin work.

Change-Id: I63e7ea09b1da027e308e32ae9a8e0400ab5965f2
Implements: blueprint cisco-n1k-neutron-client
2013-08-19 11:45:07 -07:00
Jenkins
c49066be35 Merge "FWaaS Client and Cli" 2013-08-07 04:54:23 +00:00
Stanislaw Pitucha
f273e1b751 Don't log the credentials by default
Even in case of DEBUG level logging credentials (especially those that
give admin level access) should not be saved into log files.

This way of handling it has the side effect that if someone uses
password "password", it will be replaced in another place too... but
password "password" or some other keyword that can be found in the
request itself was a pretty bad idea to begin with.

Shell utilities are not affected and the verbose mode will still
display the passwords to make debugging easy.

Implements: blueprint limit-credentials-logging
Change-Id: I50d0ebbfbd44c7a5b162d9334b4fdbda67e5c28d
2013-08-02 13:15:34 +00:00
KC Wang
d04f3822b5 FWaaS Client and Cli
Change-Id: Ie7faeb604e0813401e5d1816a8f7c6791a16b001
Implements: blueprint fwaas-client-cli
2013-08-02 02:08:37 -07:00
Eugene Nikanorov
93f0630e3d Add command for listing available service providers
implements blueprint service-types-cli

Add command service-provider-list - lists service providers available
in neutron configuration

Change-Id: I2ea25abc6d54b93fd9d11e8c494d7e3f77f25c53
2013-08-01 14:12:44 +04:00
Jenkins
a07551fe6c Merge "Handle host side SSL certificates validation" 2013-07-31 02:04:00 +00:00