Let VlanManager keep network's DNS settings.

Lost piece of https://review.openstack.org/14560

Change-Id: I0376767f66041e2647fc2319ab3b2a339cdf7a19
Fix getattr usage

Class 'object' has no '__getattr__' member as pylint pointed out.
Use the getattr function.

Change-Id: I38c6075ac477e2fe33870bed64b0e5e986175305
Validate is-public parameter to flavor creation

Check that the is-public parameter to flavor creation is either a
boolean or a string representing a boolean, and raise an error
otherwise.

Fixes bug 1059414

Change-Id: Ic0764f0ee407d40bb5d14c1e92de4bf033bd657f
Removes unnecessary db query for instance type

The instance type information is already available in the instance
hash. This removes a db query and also reduces the likelyhood of a
race condtion where the instance type could change between the
point where boot API call was made and the request hits the compute
node.

blueprint no-db-compute

Change-Id: I8372a8c88049a8dacef86a7034c6df94c40c3001
Fix incorrect LOG.error usage in _compare_cpu

bug 1076308

Change-Id: I30a6447f005e708107dc01578664a4cb2bb14439
Simplify topic handling in network rpcapi.

rpc.queue_get_for() can now handle host=None.  Simplify some of the
topic handling logic in the network rpcapi to take advantage of this.

Change-Id: I1fc5b2e7370f7c5440bd4beaae007a2126e9f645
Move host aggregate operations to VirtAPI

This patch moves the following virt driver host aggregate
operations to the VirtAPI:

  aggregate_get_by_host()
  aggregate_metadata_get()
  aggregate_metadata_add()
  aggregate_metadata_delete()

In the process, a bug was found in the xenapi/host.py code
that raises an AggregateHostNotFound error in such a way that
a KeyError is generated. This changes that behavior to raise
a NotFound instead, since the former expects you to already
know the aggregate_id, which we do not. This patch extends the
XenAPI host_maintenance_mode test to exercise this error path,
as well as the one where a host is not found within the returned
aggregate.

Related to bp/no-db-compute

Change-Id: I006665bfb27774d2eeb713b79c188ca53f6fb00b
Move security groups and firewall ops to VirtAPI

This patch moves the following network security-related
methods to VirtAPI:

  security_group_get_by_instance()
  security_group_rule_get_by_security_group()
  provider_fw_rule_get_all()

In order to make this change, the _provider_rules() method
of the FirewallDriver was changed from being a staticmethod
to a regular instance method. All uses of it were in the
context of an actual instance, so I saw no reason to keep
it static, which would have complicated the use of the VirtAPI
methods.

Related to bp:no-db-compute

Change-Id: I260c96b6aa4bbab694b74087f704b6405360b0bf
Add some xenapi Bittorrent tests

When the bittorrent support was added to the xenapi driver, no
tests were added. This patch adds a few, specifically around the
use of instance_system_metadata fetches from the database.

Change-Id: I165acd002e35e30c46fc60fc4de1ca6e07bb8845
Make instance_system_metadata load with instance

Right now, instance['system_metadata'] is demand-loaded at the
first use. This adds the necessary db fu to make it load at
instance_get_*() time.

Change-Id: Id29342fd34fe710b797b23558ef0fde8809231bc
Avoid unnecessary system_metadata db lookup

The bittorrent code in the xenapi driver added a specific database
query for the instance_system_metadata. This query is unnecessary,
as the system_metadata is available in the instance object itself.
This patch removes the queries and adds the small amount of
format translation required.

Change-Id: If72593289e18d2c45db8e782972eb9051e10d740
Remove nova-volume DB

*  Remove volume calls from nova.db.api
*  Remove volume calls from nova.db.sqlalchemy.api
*  Remove tables from nova/db/sqlalchemy/models.py
*  Remove Xen Storage Manager Volume Driver code
*  No migration to preserve data in unused tables
*  Remove quota support for volumes

DocImpact

part of bp delete-nova-volume

Change-Id: I2c82c96d67f3746e5de28f917dd8ceb0c8037e27
powervm: failed spawn should raise exception

fixes bug #1065295

On a failed spawn instance, we should run our cleanup on
the host and then re-raise the exception to inform
ComputeManager of a failure

Change-Id: Ia9ce8360117e94d10d53278d4c9a16931dea70f2
Remove generic topic support from filter scheduler

The only topic that we do scheduling on is 'compute', so clean up all of
the cases where we were checking this.

Change-Id: If16eaf48a89342ca99a741c25679389e706e0e48
Another case of dictionary access

Fixes bug 1076114 which was using the old dictionary
access for getting the qemu image info 'file format'
attribute which now should be through direct attribute
access to 'file_format' instead.

Change-Id: Id4c12b43b389b2fd2300d02743db17cf48b38e8f
Make utils.mkfs() set label when fs=swap

And add some tests for utils.mkfs()

Change-Id: I6bf439f2076d401259f07aef26720cd0f7dac61e
Merge "Make utils.mkfs() set label when fs=swap"
clean up dnsdomain_unregister

remove unneeded transaction from dnsdomain_unregister

Change-Id: Idbe2ef3c005ed269c7bc14255fc7835373d94b22
add missing opts to test_db_api.py

import two missing options so that test_db_api.py can be called in isolation.
fix bug 1076535

Change-Id: Ic2eca62e08a6f74dda332ee92cdda50ca1d8e005
Fix import ordering in /bin scripts.

Fix a couple hacking violations in Nova's bin scripts.

Change-Id: I5cab72a5a94f761f429ad45f94a95cd4bc7e30e8