17 Commits

Author SHA1 Message Date
ji-xuepeng
b831f1899a remove unused LOG
This is to remove unused LOG to keep code clean.

Change-Id: I60706c20fff4c82761be21cf2487c03a69160c41
2016-07-10 00:07:47 +08: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
Monty Taylor
2eed8ea24a Use os-client-config and keystoneauth1 in shell
keystoneauth1 is the new auth-only library for getting keystone
Sessions, which is lighter-weight and does not require the entire
keystoneclient library. It also handles all of the keystone
version discover and plugin selection so that code doesn't have to
live in neutronclient.

Additionally, use os-client-config to process options and get the
Session from keystoneauth1. This adds support for reading clouds.yaml
files and supporting the OS_CLOUD env var for selecting named clouds
from a list of them.

This is a step towards bug#1503428 but is not the whole picture.

Remove the auth tests - since they are covered inside of ksa.

Closes-Bug: #1507384
Change-Id: Ic4f9fd8f231c33513fd74da58ab1b4a3fb00d9f4
2015-10-28 08:01:13 +09:00
Stanislav Kudriashev
48da7226c0 Unify doc-strings format
Change-Id: If6cf2caeae294db30a8988ab861441211b651580
2014-08-28 11:42:12 +03: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
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
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
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
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
a8c5c650ea Merge "Change copyright headers from LLC to Foundation" 2013-10-21 19:27:02 +00:00
Gary Kotton
1dd88b9564 Fix stable/grizzly gating for Neutron (aka Quantum)
The quantum-debug commands would result in:
'ClientManager' object has no attribute 'quantum'

Fixes bug: #1234550

Change-Id: I7f5551c724cfe6d75855eee3433b66bb5ce9b1a4
2013-10-06 03:51:15 -07: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
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
Roman Podolyaka
499ed84bd7 Handle host side SSL certificates validation
- add --os-cacert option which allows to set a file containing
   certificates of root CAs (certificate authorities) that are
   required for validation of HTTPS servers SSL certificates

 - wrap httplib2 SSL certificates validation errors with a
   custom quantumclient exception

Blueprint: quantum-client-ssl

Change-Id: I4e6a7d177ba14314ba9bed613ec2684bffc35222
2013-07-23 16:15:19 +03:00
Phil Day
037497da52 Allow tenant ID for authentication
Under the Keystone v3 API Tenant names are not necessarily uniques
across Domains for a User, so the client should also allow
authentication by tenant_id

Fixes bug 1196486

Change-Id: I3f385a19c1d3d66f5539f901796bbaa22d315762
2013-07-08 15:59:49 +00:00
Mark McClain
93ac15bfeb Rename quantumclient to neutronclient
Implements Blueprint: remove-use-of-quantum

Change-Id: Idebe92d56d277435ffd23f292984f9b8b8fdb2df
2013-07-03 11:56:44 -04:00