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
Work toward Python 3.4 support and testing

Change-Id: I5ba556b1abb65050cffed76e354c164754552232
Fix to ensure endpoint_type is used by make_client()

This will fix an issue where neutronclient is ignoring the endpoint_type
passed to the client for v2 auth.

* make_client for '2.0' will now pass on the endpoint_type variable

Change-Id: I917ebee51254bc3e144f09573fa628d4ca192d13
Closes-Bug: #1368676
Replace httpretty with requests_mock

The httpretty library has poor Py3 support, currently the only
working version is 0.8.0, all later minor versions are pinned.

Requests-mock library provides mocking layer for requests package. It is
written in such a way that it is fairly simple to convert existing
httpretty test suites to requests-mock. The library is hosted at Stackforge
and gated as usual OpenStack project.

Change-Id: If7f4baefb53976571efc47dda17a7b543112d555
Updated from global requirements

Change-Id: I2e275bda23033034ed356e012147ce7a701d4695
Use six.moves cStringIO instead of cStringIO

to keep Python 3.x compatibility, use six.moves.cStringIO to
replace StringIO

Change-Id: Ib6dcd06ca8c9342d26f3b7b738c99d23433d7f30
Closes-Bug: #1280964
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
Change ipsecpolicies to 2 separate words: IPsec policies

In the help text for vpn-ipsecpolicy-list, change ipsecpolicies to
2 separate words, IPsec policies.

Change-Id: I5f49991945c8e638d35e7267b2de81eeaf7ea9bf
Closes-Bug: #1373622
Correct 4xx/5xx response management in SessionClient

Currently SessionClient raises an exception when status code >= 400
unlike HTTPClient. neutronclient.v2_0.client expects HTTPClient
behavior.

This change disables exception raise when status code >= 400 in
SessionClient (more precisely in keystoneclient.session).

Change-Id: Ic96cb9326842f0b6a180fd8f94293da9fa0f6b2f
Closes-Bug: #1376171
Change "healthmonitor" to "health monitor" in help info

Change "healthmonitor" to "health monitor" in help info for the
following commands:
   lb-healthmonitor-create
   lb-healthmonitor-delete
   lb-healthmonitor-list
   lb-healthmonitor-show
   lb-healthmonitor-update

Change-Id: Icbb219d9e4a2d88e00c5734acc30b1c7609d02fc
Closes-Bug: 1377516
Bump hacking to 0.9.x series

In order to sync global-requirements, this patch bumps hacking to 0.9.x
series. This patch just add new and stricter hacking rules added by
hacking 0.9.x to the ignore list. Fixing up the code and turning these on
is out of scope of this patch and is for future patches.

Change-Id: I47544f911f21c55705e7832237bb33557f288972
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
Fix E128 hacking check

Remove E128 from the ignored checks and fix them.

Change-Id: I5e0dd1026803af065a99615e947a145bfc0810f2
Merge "Don't get keystone session if using noauth"
Remove extraneous vim editor configuration comments

Change-Id: I792f24c28063bb57dc2fd295903a7d73c43578d9
Partial-Bug: #1229324
Leverage neutronclient.openstack.common.importutils import_class

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
Add missing parameters to Client's docstring

Client's constructor receives keyword arguments (**kwargs), which are
then passed to an HTTPClient. Since HTTPClient receives numerous
parameters, Client's docstring describes which parameters are expected
and their meanings. This patch adds 2 parameters which HTTPClient
receives but weren't previously documented in Client's docstring.

Change-Id: I12e520f6e26c3aa7c76b190c3e2125d77c71a19a
Add InvalidIpForNetworkClient exception

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
Merge "Fix to ensure endpoint_type is used by make_client()"
Merge "Replace httpretty with requests_mock"