add xml api sample tests to os-tenant-network

Change-Id: Ib79defe49c82a175cb8605aa3a65ccd2c48d68f7
Fix msg version type sent to cells RPC API

Regression fix from 6b16c8731c44e4a6c80b803f3e8afdd88386d577, cannot
build instances through cells.

The RPC dispatcher dislikes floats for version numbers.

bug 1190371

Change-Id: I18994ce8a524f88910cfe37c9b302296ce30102f
Fix nova-compute fails to start if quantum is down

When nova-compute starts it needs to check the state of instances that
were previously running and needs to query quantum. Previously, if
it queried quantum and quantum raised an error or was unreachable
nova-compute would terminate. This patch adds a retry loop to prevent
this from happening.

Fixes bug 1186357

Change-Id: I0d865e464f7bf60a0b6dc4ca8a42436d16e29790
Add notes about how doc generation works.

Change-Id: I562c743798aeae5e49bd2f96944c3cacd776a53d
Fix a race where a soft deleted instance might be removed by mistake

When a soft deleted instance is restored there is a tiny risk that it
might be deleted if the reclaim periodic task runs at the same time.
This happens because the restore operation sets deleted_at to None
which makes the reclaim job think it is ok to delete the instance.

This can be resolved by restricting reclaims to only those instances
whose task_state is None.

Resolves bug 1186243.

Change-Id: Ia138e2d504b7482c46900583f019a32c70513245
Enhance unit test code coverage for availability zone

In current unit test code for availability zone, the update and
delete operation for AZ is missing. So this review submits two
test methods to test AZ update and delete.

Change-Id: Id98756351f0ecdf5405b9dfea2602a9aee0c5522
Add missing exception to cell_update()

Add missing CellNotFound exception to
cell_update() in db.sqlalchemy.api,
which expected from this method.

Change-Id: I25699a08b581922b13ae62708486bdee6f8b0ac6
Skip ipv6 tests on system without ipv6 support

On system without ipv6 support, CONFIG_IPV6 disabled kernel for
instance, WSGI service testcases for ipv6 would fail for "[Errno 97]
Address family not supported by protocol".

Since there is no easy way to detect actual ipv6 support,
socket.has_ipv6 not working for this case, simply skip ipv6 tests if
errno.EAFNOSUPPORT happens.

Fixes: bug 1174404

Change-Id: I9fa8653f5ccfbcb8c31c51bfda137cb58388afde
Fixes test_config_drive unittest

Fixes test_detail_servers in the config drive unittest where the wrong db
stub was set which resulted in an empty server list being returned.
Fixes asserTrue typo which was never executed because of the empty server
list bug

Change-Id: I160e91c55e60e3636804b4d2b31800386a21538d
Use Instance Objects for Start/Stop

This patch makes the start and stop operations use the Instance
object instead of passing SQLA-derived dicts over RPC. Until
something more sophisticated is needed (and developed), it also
adds a nova.object.register_all() function which just triggers
imports of all the object models so that they are registered.
When adding a new object type, that register function should be
updated appropriately.

Related to bp/unified-object-model

Change-Id: I3c8d9cba07d34097a279502062906de802d19d1f
Add Instance.info_cache

This adds our first nested object: the InstanceInfoCache at
Instance.info_cache.

Related to blueprint unified-object-model

Change-Id: I2dd8727bbe38eadd080e9ea1ef9feabc2fa50520
Use InstanceList object for init_host

Related to blueprint unified-object-model

Change-Id: Idcc4da2a6807a58966e267c62a7f134ce58c890a
Make xenapi/host use instance objects for _uuid_find

This is the one and only use of instance_get_all_by_host() in the
nova/virt tree. Converting it to objects immediately eliminates the
need for that method in the virtapi.

Related to blueprint unified-object-model

Change-Id: I21dfd5a34fb1eef4d442c0711f37e5ef6b18e5bb
Make xenapi use Instance object for host_maintenance_mode()

This makes xenapi grab an Instance object in host_maintenance_mode()
instead of calling into virtapi. This removes the one and only use
of instance_get_by_uuid() in nova/virt.

The existing tests for host_maintenance_mode() need no changes
since they just stub out the database call that eventually gets
called in the same way.

Related to blueprint unified-object-model

Change-Id: Iff4b5de1741653fad8c59e311341aeb3d0bb3539
Remove unused methods from VirtAPI

The instance_get_all_by_host() and instance_get_by_uuid() methods are
no longer needed by any virt drivers, so remove them from the virtapi..

Related to blueprint unified-object-model

Change-Id: Ib51bf3b3e068d69e7a75f7312f03db6c85e7cf49
Remove unused method in VMware driver.

list_interface method in VMware  driver isn't used any where.

Fix bug #1187251

Change-Id: Idc7cee5ab1d0c5b4ebf57ca28511e3b7b4a85240
Fix db.models.ComputeNode description

DB models definition should be up-to-date with DB schema obtained after
applying of migrations. Currently, there are no tests enforcing this and it's
really hard to analyze what indexes should be added, and what indexes we have
at the moment.

So the first step is it to fix all models, and add missing descriptions about
Indexes and UniqueConstraints in __table_args__ and use explicit 'nullable'
parameter in columns description.

Add missing 'nullable' parameters to all Columns

Add empty __table_args__ parameter to Table

There is no indexes in ComputeNode model definition.

blueprint db-sync-models-with-migrations

Change-Id: I13c92bdd33eede97bb7b2fc45cbedca556992060
Fix db.models.ComputeNodeStats description

DB models definition should be up-to-date with DB schema obtained after applying of
migrations. Currently, there are no tests enforcing this and it's really hard to
analyze what indexes should be added, and what indexes we have at the moment.

So the first step is it to fix all models, and add missing descriptions about
Indexes and UniqueConstraints in __table_args__ and use explicit 'nullable'
parameter in columns description.

Add missing 'nullable' parameters to all Columns

Add empty __table_args__ parameter to Table

Add 2 missing indexes in ComputeNodeStats model definition.

blueprint db-sync-models-with-migrations

Change-Id: I10761a6c1b32a457c855aff9603bf2edec44de17
Fix db.models.Certificate description

DB models definition should be up-to-date with DB schema obtained after applying of
migrations. Currently, there are no tests enforcing this and it's really hard to
analyze what indexes should be added, and what indexes we have at the moment.

So the first step is it to fix all models, and add missing descriptions about
Indexes and UniqueConstraints in __table_args__ and use explicit 'nullable'
parameter in columns description.

Add missing 'nullable' parameters to all Columns

Add empty __table_args__ parameter to Table

Add 2 missing indexes in Certificate model definition.

blueprint db-sync-models-with-migrations

Change-Id: Ida607c2b8899e145116d46cffdc49b7176b05550
Fix db.models.Instance description

DB models definition should be up-to-date with DB schema obtained after
applying of migrations. Currently, there are no tests enforcing this and it's
really hard to analyze what indexes should be added, and what indexes we have
at the moment.

So the first step is it to fix all models, and add missing descriptions about
Indexes and UniqueConstraints in __table_args__ and use explicit 'nullable'
parameter in columns description.

Add missing 'nullable' parameters to all Columns

Add empty __table_args__ parameter to Table

Add 6 missing indexes in Instance model definition.

blueprint db-sync-models-with-migrations

Change-Id: I01025789f00dcf058754ee1def726e3b48ec7fda