| Commit message (Collapse) | Author | Age | Files | Lines |
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In the recent commit, True/False of boolean argument
became case-insensitve and this code is copy-and-paste'ed
in several places.
Now there are several number of patches which add explicit
arguments for *-update or *-list and the code of boolean
argumetns like below will be used more than now.
This commit add a utility method to register such boolean opt.
parser.add_argument(
'--enabled',
dest='enabled', metavar='{True,False}',
choices=['True', 'true', 'False', 'false'],
help=_('Whether to enable or disable this rule.'),
default=argparse.SUPPRESS)
Change-Id: I9575eeef32154a8b92589c2cc7889803216bddb2
|
| |/
|
|
|
| |
Change-Id: Ib0d668a6ddadb0fec60c964dc5e1e1bd83b74be4
Closes-Bug: #1408529
|
| |
|
|
|
|
|
|
| |
* all modules are using function of _ from oslo.i18n
* remove the definition of _ from openstack.common.__init__.py for safety
Change-Id: Ice2f8be1190fd13e8991a8c7fa55ca636341e875
Closes-Bug: #1382476
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following libraries have been graduated:
- gettextutils -> oslo.i18n
- jsonutils -> oslo.serialization
- strutils, timeutils -> oslo.utils
Add neutronclient.i18n module as oslo.i18n adapter.
Remove openstack.common related files completely
because neutronclient no longer use any oslo-incubator modules.
Closes-Bug: #1382017
Change-Id: Ib7ebcb691a12858049baab3b122f95bf43038f18
|
| |
|
|
|
|
| |
Remove E129 from the ignored checks and fix them
Change-Id: Ibd3a98ceb173e9a1fa106ac6c4ecdebb1a9a1e4f
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When posting an 'attach interface' request to Nova with an invalid
ip for defined network, Nova returns an HTTP 500 error. In fact,
Neutron returns 'InvalidInput' error, but Neutron client is not able
to translate this error to a specific exception. So that a general
'BadRequest' exception is thrown. Neutron client and Nova need a more
specific Neutron error type, in order to address and translate the
error in to a proper Nova exception.
Change-Id: Idd964c33476d7559f642287d577f8a6122d7674c
Partial-Bug: 1369871
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This patch allows us to drop our version of import_class in favor
of openstack.common.importutils version's.
Change-Id: Ia96f06e2dc7dfb9824377e3a7381da2732dd2c15
Closes-bug: 1365273
|
| |/
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |\ |
|
| | |
| |
| |
| | |
Change-Id: If6cf2caeae294db30a8988ab861441211b651580
|
| |\ \
| |/ |
|
| | |
| |
| |
| | |
Change-Id: Ifa8974f2cbdac4fdc0cbd47d7ad9910a5bd31cb7
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This patch removes our own home brewed json helper functions and leverages
the ones from openstack.common.jsonutils instead.
Change-Id: Idc5ee0fec56b0a0f337433a830647d4f421a8283
Closes-bug: 1365263
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modifying passed arguments inadvertently is an easy pitfall in python.
Even more serious is modifying the default value to a function, since
that modification will be preserved across future function calls.
The typical defense against the latter is to avoid using mutable default
values.
This change replaces several def foo(bar=[]) with bar=() or similar, and
then fixes a few cases that were exposed where the argument was indeed
permanently modified.
Change-Id: I3d04dcb39e3816942f8e80ce499c47d774a773c6
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |\ \ |
|
| | | |
| | |
| | |
| | | |
Change-Id: Ia671cacbf1852984c41b374986cc2e9581247b99
|
| |\ \ \
| |/ /
| | /
| |/
|/| |
|
| | |
| |
| |
| | |
Change-Id: I9d86dd948bc2241bbb69a04c0024f90b805d7cc8
|
| |\ \ |
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Nova needs a specific client exception defined for the server's
MacAddressInUse exception when allocating ports so it can handle the
exception properly, otherwise the NeutronClientException with a 409 can
be confused with other errors.
Partial-Bug: #1347778
Change-Id: Ia02dbc8fe32a43adeb229e3b640b9b33ec0dd6c7
|
| |\ \
| |/
|/| |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |/
|
|
|
|
|
| |
Like Lana Brindley mentioned in https://review.openstack.org/#/c/102900/
'xml' should be 'XML' instead.
Change-Id: If500ec9325eff98d58810b69c6fc84211e20638a
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |\ \
| |/
|/| |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
nova contains plenty of code like:
except neutron_client_exc.NeutronClientException as e:
if e.status_code == 409:
...
This change declares a fallback of 0 for exceptions without a more
explicit status code. This was the behaviour prior to Change-Id
I99b9560b3afaf5884fd00353323267da450338fa
Change-Id: Ib736205066fd5cd9738fd3fb3b64f6590803cf39
|
| |\ \
| |/
|/| |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In nova, there is no way to explictly knows whether the neutron
fails due to over quota or no more floating ips and fixed ips.
so nova need to check whether the return value is 409 in order to
raise an over quota exception. It's easier in neutronclient to
raise the exception then nova will handle it.
Related-Bug: #1210598
Change-Id: I8788993578ac872da9f676fe3e2fb8f98414289d
|
| |\ \
| |/
|/| |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In Python 3, this is not a valid syntax:
def _encode_item((k, v)): ...
Pass a single parameter to the function, and start by unpacking.
Change-Id: I73743073113a4696b9adc79bdb646575794c1e2b
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| |/ /
| |
| |
| |
| |
| |
| |
| |
| | |
This change introduces the use of requests in lieu of httplib2
to ensure proper handling of SSL termination.
Implements: blueprint tls-verify
Change-Id: If182f2addf26421873b8c3d2b60f8cba9b7a9450
|
| | |
| |
| |
| |
| |
| |
| |
| | |
blueprint nec-packet-filter-cli
Also adds common validators.
Change-Id: Ia431c2268e9a654e10dc9cf740288fb746825d13
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Can't receive empty session_persistence dict to update the vip.
It would raise the following error:
$ neutron lb-vip-update vip --session_persistence type=dict ""
usage: neutron [--session_persistence SESSION_PERSISTENCE]
neutron: error: argument --session_persistence: invalid str2dict value: u''
Change-Id: Ice43bbe19138be6af85b47c2090359d22c70b29f
Closes-Bug: #1262582
|
| | |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Map exceptions from neutron server into corresponding client
exceptions automatically (without exception mapping dict).
An exception from Neutron server 'SomeException' will be
mapped to an exception 'SomeExceptionClient' ('Client' suffix)
if it is defined.
- If no corresponding exception is defined in client side,
an exception per response code will be used. Previously
NeutronClientException was used for all cases and a user
of client library cannot know exception type without
checking exception.status_code. It allows client lib users
(such as Horizon) to handle exceptions more easily.
- All exceptions from client libarry inherit NeutronClientException
and all CLI related exceptions inherits NeutronCLIError now.
- Remove unused exceptions (including Quantum v1 related)
- MalformedRequestBody is renamed to MalformedResponseBody
because it is raised in deserializer and deserializer is
used to parse not request but response.
Closes-Bug: #1296148
Change-Id: I99b9560b3afaf5884fd00353323267da450338fa
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| |\ \ \ |
|
| | |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Certain scenarios into the neutron client will not specify the
auth_url. This is typically when a token is specified. However, when
the token is expired the neutron client will attempt to refresh the
token. Users of this may not have passed in all of the required
information for this reauthentication to properly occur.
This code fixes an error that occurs in this flow where the auth_url
(which is None) is appended to another string. This results in a core
Python error.
The update will provide a more targetted error message specifying to
the user that the auth_url needs to be specified. An associated unit
test is also included to validate this behavior.
Change-Id: I577ce0c009a9a281acdc238d290a22c5e561ff82
Closes-Bug: #1241275
|
| |/ /
| |
| |
| |
| |
| |
| | |
In Python 3, ugettext() does not exist and gettext() should be used instead.
Closes-Bug: 128485
Change-Id: Id9f51f0d630ef0c92fc315253c45d3abba356cd1
|
| | |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |/
|
|
|
|
|
|
| |
Use new naming scheme to reflect rebranding.
Partial-implements blueprint nicira-plugin-renaming
Change-Id: I694fbda1c228e92a0b910358523787fa742d9ab2
|