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
Forbid resizing instance to deleted instance types

Sets read_deleted="no" while get_instance_type_by_flavor_id to forbid
resizing instance to deleted instance types

Fixes bug 1068539

Change-Id: I3859f63a33391a840e041f06f08af361b6d64157
Fix bandwidth polling exception.

When the bandwidth polling task tries to update bw usage for an
instance that does not have an entry for the last two periods already
in the bw_usage_cache table, it will throw an exception in the
polling task. This was just a misses 'if' statement.

Also:
xenserver: fix swapped bw data in xs plugin.

This fixes bug 1075255

Change-Id: I44bb143039fcdfc8dacb13b67ae8f79dc5f38777
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
Fix quota updating during soft delete and restore

Fixes bug 1075716

Quotas were not properly updated when soft deletes were enabled. This
patch fixes quotas for soft deletes and restores.

Change-Id: I77fd3ff76caa9eba3e2180c1abcfb390ea7857d6
Include hostname in notification payloads.

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

Change-Id: I3a9a6afb88712a297397493d310d55abcc63897e
libvirt: Regenerates xml instead of using on-disk

The libvirt.xml file is written on initial boot of the instance and
may not reflect the current state of the vm if volumes have been
attached. If the libvirt definition of the vm has been lost, it is
safer to regenerate it rather than attempt to load it from the
outdated file. This should properly bring back vms with attached
volumes.

Fixes bug 1073720

Change-Id: Iaa754700a149f09fc0c022fa664c06ad17f505f5
Decouple EC2 API from using instance id

Continuation of 0dc32690fe158e4cb11c2c9bcc65acaf73b94a7a

Some code in ec2 api use Instance.id rather than InstanceIdMapping.id
directly while converting ec2 id to an instance object. This is very
dangerous if Instance.id is not equal to InstanceIdMapping.id for the
same instance uuid.

To avoid the id mapping confusion, this patch:

 * uses instance_id_mappings.id instead of instances.id
 * uses instance_uuid in ec2utils.id_to_ec2_inst_id
 * removes ec2utils.ec2_instance_id_to_uuid

Change-Id: I22638f667c18eefe542b03e31f1a3aa2ce782db7
Map NotAuthorized to 403 in floating ips extension

When a NotAuthorized exception is raised in the network
manager, it would be presented as an HTTP 401 exception
through the floating ips extension. This patch presents it
as a 403 instead.

Fixes bug 1074505

Change-Id: Idb45c78755a182635ef353bb9ec8b557c8ea9b16
Switch from FLAGS to CONF in nova.console

Use the global CONF variable instead of FLAGS. This is purely a cleanup
since FLAGS is already just another reference to CONF.

We leave the nova.flags imports until a later cleanup commit since
removing them may cause unpredictable problems due to config options not
being registered.

Change-Id: I155d363e26260aa402bb918b4d0726502e7e8758
Merge "Fix quota updating during soft delete and restore"
Merge "Forbid resizing instance to deleted instance types"
Merge "Map NotAuthorized to 403 in floating ips extension"
Corrects usage of db.api.network_get

Sets project_only='allow_none' to get the network whose project_id
is None or not.

Fixes bug 1075215

Change-Id: I80622b1f5ccf194b4810bd0560bd0cdb077370df
Merge "libvirt: Regenerates xml instead of using on-disk"
'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
Switch from FLAGS to CONF in nova.virt

Use the global CONF variable instead of FLAGS. This is purely a cleanup
since FLAGS is already just another reference to CONF.

We leave the nova.flags imports until a later cleanup commit since
removing them may cause unpredictable problems due to config options not
being registered.

Change-Id: Icb61d67965628dca65bda393d4373beab5c5c64a
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