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
Fixes snapshot instance failure on libvirt.

Fixed the failure during snapshotting instance (on libvirt) due to incorrect
attribute access.

Fixes LP: #1075556

Change-Id: I079467d38aef5071488084f9bfa080a2a5af2609
Include hostname in notification payloads.

Moniker is going to want this in order to autogenerate
certain DNS records.

Change-Id: I3a9a6afb88712a297397493d310d55abcc63897e
'BackupCreate' rotation parameter >= 0

In the extension 'admin-actions' of OpenStack Compute API, the action
create backups should only accept rotation parameter greater than or
equal to zero.

If the 'rotation' parameter is negative, OS API returns a badRequest
400 HTTP error.

Fixes LP bug #1071168

Change-Id: I6ef08fbecb0f88942cdb16193e9d2c3831866fe9
Make HostManager.get_all_host_states() return an iterator

Change the method's returning from a dictionary {host: HostState}
to an iterator for HostState, because the only caller of the method
(in filter_scheduler.py) is not interested in its key.

Change-Id: I84f649795a422e392a4c0d555c6cb29a01fae2d9
Yield in between hash runs for the image cache manager.

This should stop the cache manager from locking up nova-compute for
long periods of time.

Change-Id: Icc510a55282b479b3ba673ac68aee793da1714fb
Fix verification in test_api_samples.py

Some regexps are corrected.

Change-Id: I77bb6503352083254d8887b6cb513c45bcfae99c
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
Limit formatting routes when adding resources

By default, routes.mapper.Mapper.resource adds a bunch of formatted
routes that accept anything after a '.'. Our spec says only .xml
and .json are accepted so limit the formatting to those valuse.

This allows identifiers with a '.' in urls. A few tests were added
to the extensions test to prove that .xml and .json are stripped
but other values are not.

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

bug 1076308

Change-Id: I30a6447f005e708107dc01578664a4cb2bb14439
Sync rpc from openstack-common.

Change-Id: I49771b9bb741f95ccc3ab0e8e8f7ce82849120e2
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
Merge "Sync rpc from openstack-common."
Merge "Fix verification in test_api_samples.py"
Merge "Make HostManager.get_all_host_states() return an iterator"
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