Add support for router scheduling in Cisco N1kv Plugin

Added functionality for router and network scheduling
in Cisco N1kv Plugin.

Change-Id: I1a8d27670d10ca26fb62a8d02230a1aaf3e7bbca
Closes-Bug: #1286412
Log configuration values for OFA agent

When other agents start up, they log the configuration values
to their logs. This patch adds the same feature to the
Openflow agent.

fixes bug 1289139

Change-Id: Ibab20154805a12ec265a2499cbfd6c376c376130
Correctly inherit __table_args__ from parent class

Where unique constraints are added to certain tables by populating
__table_args__, we need to ensure we inherit the top level
__table_args__ that define the default storage engine to use when
creating tables.

Change-Id: Ib886b84922830b60282b4f882591e43f5041e713
Fixes: bug 1288358
Fix _validate_mac_address method

The method _validate_mac_address previously used: netaddr.EUI(data)
which would convert data passed in to the correct mac_address representation.
For example if data=123 it would return: EUI('00-00-00-00-00-7B'). To fix
this issue I used netaddr.valid_mac() instead which returns a bool if a mac is
valid or not and does not raise. Note this file needs some improvements to
improve how exception handling is done that will come later.

Change-Id: I4fb868e40abbad9e743028cc768f47ca9b3e0e70
Closes-bug: 1291163
Advanced Services documentation

Adds the beginnings of documentation for the Firewall as a Service,
Loadbalancer as a Service, and VPN as a Service.

Part of blueprint developer-documentation

Change-Id: I5e46df2dc4f87f961490ee75791a7e825ea94e1e
De-duplicate unit tests for ports in Big Switch

This eliminates the separate classes that existed
for the VIF type testing. Each class was going
through all of the port tests when none of the
logic those tests were exercising was affected by
the VIF types.

This cut the number of tests run in test_restproxy_plugin
by close to 44% without a reduction in code coverage.

Closes-Bug: #1295448
Change-Id: I8c84e1599568fad36b6dd3d51e4ba8a3c012c6c5
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
Cisco VPN driver correct reporting for admin state chg

Depends on reference implementation change (81124 review) that will pass VPN
service admin up/down changes to the service driver (for subsequent passing
to the device driver).

This change will save the runtime state of the IPSec connections that have
been removed due to a VPN service down change, so that this can be reported
to the plugin properly. Otherwise, without the change, there is no info
on the downed connection and no change report so the plugin thinks the
connection is still active.

In addition, the status for the VPN service will reflect whether there are
any IPSec connections ACTIVE. If one or more are acive, the service will
be active, otherwise it will be DOWN.

Updated UT to add tests for admin state and status reporting. Also changed
some IPSec create UTs because they were not cleaning up correctly upon test
failures (only seen with a live CSR).

In the future, when the Cisco CSR REST API supports admin up/down support,
the IPSec connections will not be deleted, but instead will be shut down, in
response to an admin down event (and then brought up, for admin up). During
the down time, the state will be reported correctly and no run-time state
recording needed.

Change-Id: I294bfb400c31ef36dfe5d9e85b34845e5aef8515
Closes-Bug: 1291619
Fixed TypeError when creating MlnxException

MlnxException expect a 'err_msg' keyword argument.

Change-Id: I4570219c0a6a466391b43cbdaa5372b85566c421
Closes-Bug: #1283990
Signe-off-by: Roey Chen <roeyc@mellanox.com>
Changed the message line of RouterInUse class

Implements: Changed the message line of RouterInUse class,
so user will not get confused with active or inactive ports
while deleting the router.

Closes-Bug: #1236372
Change-Id: I7a82550e2c6051f9e4940a8f1dd4401059e0a8d8
ML2 Cisco Nexus MD: Support portchannel interfaces

Port of port-channel interface support that was implemented for the cisco
core plugin - https://review.openstack.org/#/c/42037

Note that additional port-channel UT already existed. (Created during
initial cisco core nexus subplugin -> ml2 cisco nexus md port.)
See test_cisco_nexus.py module, NEXUS_PORTCHANNELS references.

Closes-Bug: 1294900
Change-Id: Ifc64f605e5783ee1e85d66c87f422f64b47fa996
Deals with fails in update_*_postcommit ops

It makes all mechanism drivers called even when one
of the mechanism drivers fails during a post commit
operation for updating network/subnet/port. This is
a stopgap measure until a more comprehensive approach
is adopted and implemented.

Change-Id: Ia9080a91ce768d4007b0525548acfe7443a2973c
Partial-Bug: 1227336
Update BigSwitch Name to its correct name

Update Neutron documentation and code comments to replace
"BigSwitch" name to "Big Switch"

Closes-Bug: #1299145
Change-Id: I7c14f6170871b361c8929898ee6af5d1a1f41714
Only send notifications on uuid device_id's

Neutron assumes that all ports with the device_owner that start with
'compute:' are ports created by nova compute. Thus, when the debug agent
creates a port with device_owner = compute:probe the nova notifier
feature tells nova when this port is wired even though nova does not know
about it (doesn't really matter we just log an error). This patch adds a check
to make sure the device_id is a uuid as nova only uses uuids and the debug
agent uses the hostname for device_id.

Change-Id: I04e7195a1fb30bc37e1c0141315c053174f8722c
Closes-bug: #1288582
Fix quota_health_monitor opt name in neutron.conf

Reasons:
- quota_healt_monitor does not exist

Changes:
- Use quota_health_monitor instead of quota_health_monitors

Change-Id: I31d6a0394a786d26f7a063afbd3b6e07fae49b9b
Remove last parts of Quantum compatibility shim

Goodbye Quantum!

Change-Id: Idbd0384a892beaff3a937444f04cfc433cb805eb
Closes-Bug:1299046
Restore NOT NULL constraint lost by earlier migrations

Bring back nullable=False for columns in tables poolstatisticss
and ipsec_site_connections that disapeared because of
migrations abc88c33f74f and 338d7508968c correspondingly.

Closes-bug: #1288681

Change-Id: Idc4608616c2b4c06e7404157b2f708d46e91accc
Removing vim header lines

Simply removes the vim header line and the empty line
following it (when present) for files in the api, db, and
extenssions base directories. In one single _init_ file in
this patchset, all comment lines are removed.

Change-Id: I81b7168dc2ad74b8c30a87e50a531e157851499e
Partial-Bug: 1229324
NSX: Fix pagination support

Add pagination support to the base plugin,
leaving the service plugin unaltered.

Minor tweaks to the UT where required to
avoid intermittent failures caused by random
ordering.

Closes-bug: 1295854

Change-Id: I03e9e104967716046909d6120426e879f714a5c8
Stop using portbindings_db in BSN ML2 driver

Avoids using the portbindings_db in the Big Switch
ML2 driver since ML2 has deprecated that database for
its own version that tracks the same information.

Also eliminates unnecessary 'binding_host' field since
it is now always the same as as the 'portbinding:host_id'
field.

Closes-Bug: #1300628
Change-Id: I17d47cb446cdd2e989c3e0d01b797a81309faaa7