Update NovaBase model per changes on oslo.db.sqlalchemy

Fixed NovaBase to inherit from models.TimestampMixin
Added metadata attribute
Added db.sqlalchemy to openstack-common.conf

Oslo sync command:
python update.py --modules db.sqlalchemy --base nova --dest-dir ../nova

Change-Id: Ie4ad8e8b235e146ddb946cdf7f15d74e060ee4a3
Create instance with deleting image

If we attempt to create a new instance with an image that has just now
been deleted in glance, (ie. status="DELETED", but deleted=False).

The server should throw a 4XX error rather than a 5XX error.

This commit just adds tests.

Tests bug 1155458
Change-Id: Ifae470e96ddc4526ef67581a1d7171ccc5fd32b7
Remove local variable only used in logging.

Kill off the locals() call as well. Just directly calculate the value.

Change-Id: I6b96d08a16feb125d1eb9162ca186bf37b429cd6
Kill off usage of locals() in the filter_scheduler.

We decided we don't like this syntax, so I figured I'd clean up this
file while I was playing with it.

Change-Id: I861b9bfcb98782a2f0b46ac5bff09664a13d339c
Small whitespace tweak.

A small indentation cleanup to the filter scheduler.

Change-Id: I0dc747e483c46f7e3988f813d52f689510dd481f
Performance optimization for contrib.flavorextraspecs

In method FlavorExtraSpecsController.index():
This method calls FlavorExtraSpecsController._get_extra_specs()
that returns all extra_specs that has flavor.
In db.api layer we are returning already extra_specs as plain object,
so there is no reason to make one more time copy of extra_specs.

In method FlavorExtraSpecsController.show():
This method should return extra_spec that corresponds to specified
key and flavor_id.
Was:
Get all extra_specs by flavor_id and filter by key locally
Now:
Filter by flavor_id and key in db.

Change-Id: I4c39f5f56511e67e37482cda1b4e9771ee9c7d7d
Add delete_net_interface function

This commit adds a new function that deletes a specific
tap device. This bug fix is targeted for Havana.

Change-Id: I26be5d94550db35358caae642fb9000953346826
fixes: bug #1138408
Merge "Update NovaBase model per changes on oslo.db.sqlalchemy"
Add the availability_zone to the volume.usage notifications

The volume.usage notifications are used to enable traffic based billing
on volumes. The availability_zone of the instance is an important piece of
information that can enable more specialized billing of customers.

This makes the volume.usage events consistent with the volume.create.start/end
snapshot.create.start/end, etc. emitted from cinder, which contain the
availability_zone field.

Change-Id: I9b6b03174cd03235d0e6cf01e34a6da13bd9bb70
Merge "Create instance with deleting image"
Merge "Performance optimization for contrib.flavorextraspecs"
Merge "Remove local variable only used in logging."
Merge "Kill off usage of locals() in the filter_scheduler."
Merge "Small whitespace tweak."
Fix attach when running as root without sysfsutils

When someone runs nova as root, and sysfsutils is not installed
an exception was being thrown when a volume attach call was made.
This wouldn't happen when being run as non-root because of the
rootwrap would trap for the missing sysfsutils app (systool).

Change-Id: Icc852fa7fd7a137cc7df86b8b96aeb629639ffad
Fixes: bug 1172486
Merge "Add the availability_zone to the volume.usage notifications"
Merge "Fix attach when running as root without sysfsutils"
import and install gettext in vm_vdi_cleaner.py

importing some nova modules expects _() to be defined, so lets define it
before we start importing them.

Change-Id: I7f951a24c19a53434c090cd2c01eded77c703943
Merge "Add delete_net_interface function"
Merge "import and install gettext in vm_vdi_cleaner.py"