Port extended_ips/extended_ips_mac extension to V2.1

This patch port extended_ips/extended_ips_mac extension to V2.1

There are difference between V2 and V3 server show/index &
server address index API response listed below-

'address' field of V2->V3 API response-
"OS-EXT-IPS:type" -> "type"
"OS-EXT-IPS-MAC:mac_addr" -> "mac_addr"

Reverting those attribute same as V2 to work with V2.1

Closes-Bug: #1368495
Partially implements blueprint v2-on-v3-api

Change-Id: I44902b0402115d1b6e833975e6c2f020ac5ab7c3
Ironic: Do not try to unplug VIF if not associated

During instance spawn, Ironic attempts to unplug any plugged VIFs from
ports associated with an instance. If there are no associated VIFs
to unplug, this would raise an exeception that would be logged into
n-cpu. This patch fix that behavior by making the driver check if the
port has an VIF associated with it before trying to remove it.

Change-Id: I5608b9eec625452edda9a0c9eb366ece2a95800f
Closes-Bug: #1292733
Break out quota refresh check code from quota_reserve()

This moves the logic that is checking if a quota refresh is needed into
a private method.

This is part of a larger series to refactor the quota_reserve method.

Partial-Bug: #1369605

Change-Id: I07fa1a5d53708f33b68a49186dbc5db15a1dbf17
Merge "Ironic: Do not try to unplug VIF if not associated"
Merge "Break out quota refresh check code from quota_reserve()"
nova-net: add more useful logging before raising FixedIpLimitExceeded

The OverQuota exception that we get back from the DB API contains some
useful information about the quota limits for the project and resource
and the current usage, so we can log that before raising
FixedIpLimitExceeded. Also logs the actual project ID passed to
quotas.reserve rather than context.project_id since it's possible those
are different.

This should help us figure out if we're leaking resources in gate runs.

Related-Bug: #1353962

Change-Id: Ia8a6d2336ddbbe28178be8d3ce4d97e6d4ab3787
Avoid using except Exception in unit test

Failed assertions raise AssertionError, which is a subclass of Exception.
Catching Exception and ignoring it then ends up ignoring any failed
exceptions caught by the exception handler.

Using a more specific sentinel exception prevents the ignoring of failed
assertions from happening

Change-Id: I93b3725e16adc16457580d5150f3d88a86d614dd
Closes-Bug: 1378088
Merge "nova-net: add more useful logging before raising FixedIpLimitExceeded"
Merge "Avoid using except Exception in unit test"
Merge "Port extended_ips/extended_ips_mac extension to V2.1"