Pushing initial started code based on Glance project and infrstructure work done by the melange team.
Finish off rebranding of the Nicira NVP plugin

Old names are kept for backward compatibility.

Last references to the old NVP plugins are going
to be dropped in Juno.

Completes blueprint nicira-plugin-renaming

Change-Id: Ia1aa4f658891e7ce9469748432c338353195edfd
Merge "Finish off rebranding of the Nicira NVP plugin"
Remove unused 'as e' in exception blocks

Change-Id: I0bd26e1657a4e0ec40405d03d43aee9e10a13636
Closes-bug: #1287031
Remove nvplib and move utility methods into nsxlib

This patch completes the process of moving code from nvplib
to nsxlib. Utility methods such as do_request and get_all_query_pages
are transferred into nsxlib, so that nvplib can be safely removed.

Partially implements blueprint nicira-plugin-renaming

Change-Id: I43be18c89ac908ebae32b39a8508a7006b5fe328
Merge "Remove nvplib and move utility methods into nsxlib"
Fix NVP/Nicira nits

Some references to NVP or Nicira went overlooked during
the rebranding exercise. This patch kills the last ones.

Implements blueprint nicira-plugin-renaming

Change-Id: I9f5e4f38246adbd6f821310a0bcfc3ad40c3ad38
Merge "Remove unused 'as e' in exception blocks"
Merge "Fix NVP/Nicira nits"
Add support for tenant-provided NSX gateways devices

Add a new API resource specific to the NSX plugin for registering
tenant-owned NSX gateway devices with the NSX controller.
This API also allows tenants for managing gateway devices on the
NSX backend.

The behaviour of the net-gateway extension is mostly unchanged with
the only difference that newly created network gateways can now only
refer exlusively gateway devices registered using the API resource
introduced with this patch.

Implements blueprint nsx-remote-net-gw-integration

Change-Id: Ia2bdd0164498fe46a027b1d8f5a9d9f4e37558a4
Merge "Add support for tenant-provided NSX gateways devices"
NSX: Make replication mode configurable

The replication mode on switches and routers should have been configurable
to use source replication if one did not want to deploy service node(s).
This patch fixes that by making this option configurable.

Change-Id: Id9e8043c602b5e9349c10247eab993e59db5a52c
Closes-bug: #1285383
NSX: Propagate name updates for security profiles

...All the way to the controller.

Change-Id: I4740f632eeafdd165dbd0208e37acc85ff883925
Closes-bug: #1285845
Merge "NSX: Propagate name updates for security profiles"
NSX: Ensure gateway devices are usable after upgrade

The gateway device database migration upon an upgrade creates
gateway devices objects from references in network gateway
objects.
While these gateway devices are perfectly usable
in network gateways, they are not directly visible to tenants
and also cannot be updated to change details such as name,
connector type or ip as well as the client certificate.

This patch fixes the DB migration in order to ensure tenant
have access to gateway devices created after an upgrade.
This patch also modifies the l2 gateway nsxlib module to
ensure request bodies are correctly created even when not all
the attributes of a gateway device are specified.

Change-Id: I7077e9884adc739fb75e64a6e9a17a124d79fb6b
Closes-Bug: 1293617
Merge "NSX: Ensure gateway devices are usable after upgrade"
Use save_and_reraise_exception when reraise exception

This fixes reraise in pluign codes.

Closes-Bug: #1279813
Change-Id: Iee174d94c0ce69eb01eb86eea1a903eceb7569d5
Merge "NSX: Make replication mode configurable"
Merge "Use save_and_reraise_exception when reraise exception"
NSX plugin: return 400 for invalid gw certificate

Gateway certificates are validated by the NSX backend.
The code currently treats a failure in certification
validation as a backend failure and therefore returns
a 500 status code.

This patch changes this behaviour by returning a 400
status code and an appropriate error description.
To this aim a handler for 400 errors has been added to
the NSX API client.

Closes-Bug: #1293508

Change-Id: I196f14337e47cd40710a6d8a30bbe1cac5ffe05b