Add virtual interface before add fixed IP on nova-network

nova allow user to add fixed IP to an instance when the instance
is running. This action will fail due to no virtual interface
will be created before create fixed ip.
TypeError: 'NoneType' object is unsubscriptable will be reported.

Change-Id: I5885806d1965022816633d0105606e7aaf763b3a
Closes-Bug: #1294939
Document the upgrade plans

This covers the plan for zero downtime upgrades. It looks at all the
building blocks we have in place, and a few we have planned for kilo and
pulls that into a process that we hope will deliver zero downtime
upgrades.

This is just an initial stake in the ground to help drive the upgrade
efforts during kilo.

Change-Id: I3974d18f79ba655257dcac49208821bc191d8cc5
initialize objects with context in flavors

These changes aim to clean up the pattern of passing a context in
object member functions create/destroy/refresh/save and instead
initialize the object with the context when it's constructed.

Related to blueprint kilo-objects

Change-Id: Ib3e9a05c50c0fdf3e4b9cfe2770a3ba707755367
initialize objects with context in network manager tests

These changes aim to clean up the pattern of passing a context in
object member functions create/destroy/refresh/save and instead
initialize the object with the context when it's constructed.

Related to blueprint kilo-objects

Change-Id: Ia27e0952d396f1a4c9c520faeeb18517a394ab9b
Add count and limit_check methods to quota object

This allows the quota object to pass through count() and
limit_check() methods to the quota engine, removing the
need for importing the quota module directly

Change-Id: Id8c10c606693d4149913d7cec2e88fc1809bbddb
Make nova-api use quotas object for count() and limit_check()

This commit converts nova-api to using the quotas object
for the count() and limit_check() calls.

Change-Id: I4e0462d3fdc385bf815862fa0d8fe891665e1b14
Make nova-api use quotas object for create_security_group

This converts create_security_group in nova-api to using the
quotas object -- this is the last of the nova-api calls still
using the quota module.

Change-Id: I160e617ed108e3db0ea167b0a57b9305098179e6
Hyper-V: Removes redundant utilsfactory tests from test_hypervapi

The Hyper-V driver oldest tests (test_hypervapi.py) are proving hard to
maintain.

The tests in test_hypervapi.py in particular can also be refactored and
split in separate TestCases, one of each *ops module.

This commit removes redundant utilsfactory unit tests from
test_hypervapi.

Partially implements: blueprint hyper-v-test-refactoring

Change-Id: I5ebc338005e2a25eab695dc10492febed506c86d
Hyper-V: Adds LiveMigrationOps unit tests

The Hyper-V driver oldest tests (test_hypervapi.py) are proving hard to
maintain.

The tests in test_hypervapi.py in particular can also be refactored and
split in separate TestCases, one of each *ops module.

This commit refactors the LiveMigrationOps test cases.

Co-Authored-By: Robert Tingirica <rtingirica@cloudbasesolutions.com>

Partially implements: blueprint hyper-v-test-refactoring

Change-Id: Idb7bd254103a02df314ccfc99af44cd246fa899a
Eventlet green threads not released back to pool

Presently, the wsgi server allows persist connections hence even after
the response is sent to the client, it doesn't close the client socket
connection.
Because of this problem, the green thread is not released back to the pool.

In order to close the client socket connection explicitly after the
response is sent and read successfully by the client, you simply have to
set keepalive to False when you create a wsgi server.

Add a parameter to take advantage of the new(ish) eventlet socket timeout
behaviour. Allows closing idle client connections after a period of
time, eg:

$ time nc localhost 8776
real    1m0.063s

Setting 'client_socket_timeout = 0' means do not timeout.

DocImpact:
Added wsgi_keep_alive option (default=True).
Added client_socket_timeout option (default=900).

SecurityImpact

Closes-Bug: #1361360
Change-Id: I399b812f6d452226fd306c423de8dcea8520d2aa
add abandon_old_reviews script

This is an automated script to abandon the reviews that we agreed as a
community are beyond stale.

No activity for 4w with a -2 on them or No activity for 4w and Jenkins
doesn't have a +1 or better on it.

Can be run by any core reviewer.

Change-Id: I19636f04b691c0b74af306709d54b26978c19282
Remove unused network_api.get_floating_ips_by_fixed_address()

Last usage was removed in 61e5b8e7da3b36db9a09f80d62ebf2e276bbe88b

Change-Id: I55626e7174b2380369b80fbced15093c2105aec1
Hyper-V: Adds Hyper-V SnapshotOps tests

The Hyper-V driver oldest tests (test_hypervapi.py) are proving hard to
maintain.

The tests in test_hypervapi.py in particular can also be refactored and
split in separate TestCases, one of each *ops module.

This commit refactors the SnapshotOps test cases.

Co-Authored-By: Robert Tingirica <rtingirica@cloudbasesolutions.com>

Partially implements: blueprint hyper-v-test-refactoring

Change-Id: I5e6cf64d47959cf348b4cacfa931da8630a995ee
Hyper-V: Refactors Hyper-V VMOps unit tests

The Hyper-V driver oldest tests (test_hypervapi.py) are proving hard to
maintain.

The tests in test_hypervapi.py in particular can also be refactored and
split in separate TestCases, one of each *ops module.

This commit refactors some unit tests from VMOps, necessary for the
next commits..

Partially implements: blueprint hyper-v-test-refactoring

Change-Id: I82a60c85d9d70b83c79d8cc031c2cd86813ea8d6
Fix API samples/templates of multinic-add-fixed-ip

API samples and templates of multinic-add-fixed-ip are malformed and
one parameter name is wrong now.
This patch fixes them.

Change-Id: I997584fdcf0b57220280b554ab9da9782d3d0250
Added db API layer for CRUD operations on instance tags

Added database API layer which allow following:
- add tag to the instance
- replace set of instance tags with new set of tags
- get all instance tags
- remove specified tag from instance
- remove all tags from instance

Implements: blueprint tag-instances
Change-Id: I43b5b22dff79b14f352ff511f8815fc81b14b923
remove test.ReplaceModule from test.py

The ReplaceModule fixture is buggy and very sensitive to the sequence
things are imported in. It was only used in 3 places until the
functional test split landed (and had to be removed from there).

This removes the use of ReplaceModule for fake_ldap. Unwinding the
xenapi test code is a bit more challenging especially given how
spidery all that code is. So instead of fixing that move the
ReplaceModule into the xenapi test code where it's used and leave it
as an exercise for the xenapi folks to move to more real mocks or
monkey patching.

This gets it out of test.py so that no one else will accidentally use
it.

Change-Id: I2398a83039ef50a926c1adecbb680c935bae7ed8
VMware: enable VMware driver to use new BDM format

This patch makes the necessary changes in the driver to enable
it to use some of the features of the new block device mapping format.

After this patch it will be possible to set the bus, and device_type per
block device.

Change-Id: Idcf3dd97c3baacd77d03616b5b2dd768acf46de4
Catch ComputeServiceUnavailable on v2 API

currently nova catch ComputeServiceUnavailable when doing
host API function only on v3, this patch add it for v2.

Change-Id: I557ed212f5b9afa1274a6e6c6343754c7e89b17f
Remove blanks before ':'

A space before ":" is unnecessary because of JSON.
So this patch removes the blanks before ':' for
v2 os-virtual-interfaces integrated test.

Change-Id: I20965a183a6a00e263cd0fdd91a3337162ecbe9b