Add multi-segment and trunk support to N1KV Neutron client

Change-Id: I7e1f8ffb0c5aadfbfd1b808e49495f27aae4ef12
Implements: blueprint neutron-client-n1000v-multisegment-trunk
Added support for running the tests under PyPy with tox

This is a precursor to having them run under check and gate.

Change-Id: I00db253bae5275d475dd3b1943dbc3673bb54b99
Sync test-requirements with global requirements

requirements.txt in hacking coordinates the installation order
of pep8, flake8 and pyflakes as other projects do.

Change-Id: I3b4e8ee88ba01d0ba917b8e968ebabec74a554ab
Make _test_update_resource honor format

Closes-Bug: #1217759

Partial-Bug: #1217791
Due to the Related-Bug: #1217791, MyComparator does not work
in some cases. We need to use a workaround that serialized body
to mocked self.client.httpclient.request. It is already adopted
in _test_create_resourse and I borrow it.

Change-Id: I746d272bc7ba8542c29e47823f707a761dddb0b1
Makes client always use provided endpoint_url

When nova uses neutron-client and the client needs to authenticate with
keystone it will additionally retrieve the service-catalog. The client will
then ignore the provided endpoint_url parameter given to it during
instantiation because the service-catalog retrieval process overrides that
parameter.

Using the endpoint declared in the service-catalog even though the endpoint is
given is unexpected given the precedent set by glance-client to respect that
parameter. Ensuring the parameter is used will allow users to override the
identity's catalog. This is useful if identity is in error, or if the user is
using a special development configuration.

Unit tests are included to test that said functionality occurs.

Fixes: bug #1212812
Change-Id: Iad2eaf4096fd5278740c3664cc369853814ee2d5
Add 'distributed' option to router-create command

Blueprint nvp-distributed-router

Change-Id: I831da0cc3ff4004549a4e4673eadf2a5920d9573
Move vpn unittest code to neutronclient.tests

Closes-Bug: #1217205

This commit fixes the following bugs which are detected by moving
VPN unittests.

* Raise CommandError instead of Value/KeyError in VPN parameter
  validation (Closes-Bug: #1219192)

* Delete dpd_timeout_less_than_interval test in IPsec site
  connection tests.  CLI does not validate this and it raises
  ConnectionError and results in the test failure.
  (Previously this test catches a general Exception,
   so the unit test does not fail unexpectedly.)
  (Closes-Bug: #1219389)

  There is a confusion on whether dpd_timeout == dpd_interval
  should be accepted in server side code, document and CLI.
  it is important to make VPN related tests enabled, so I decided
  to leave the fix of validation logic in the future work.
  (Filed as Related-bug: #1219440)

Change-Id: Ie4f4e8cdf533a983d0a6d4d564a7267a3323b832
Merge "Makes client always use provided endpoint_url"
Merge "Add 'distributed' option to router-create command"
Merge "Add multi-segment and trunk support to N1KV Neutron client"
Merge "Move vpn unittest code to neutronclient.tests"
Merge "Make _test_update_resource honor format"
Merge "Added support for running the tests under PyPy with tox"
The "arg_value" was not getting checked for empty list

In the _merge_args function it is possible that "arg_value" which is
an instance of a list can be an empty list. We still want to append
"value" which is also an instance of list (passed as part of "_extra_values"
argument) to it. arg_value was not getting checked for empty list.

Fixes bug #1108365

Change-Id: Ief028a3fd1cacefcf1beab408e1117f3e0dd588f
Merge "Sync test-requirements with global requirements"
Merge "The "arg_value" was not getting checked for empty list"