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
Make session.py reusable

This patch get_engine() into a creation part (create_session())
and a singletonization part (get_session()). create_session() can
be used from code that connects to a DB other than nova-DB.

Change-Id: Ia4ee4336871f22cfcdb67a0417fcfb76d78b6fa3
make QuantumV2 support requested nic ordering

fixes bug 1064524

The QuantumV2 did not honor nic ordering, so nics were attached in
Quantum's db natural order.  This patch sorts the networks honor requested nic
ordering when Nova calls the V2Quantum API.  Unit tests have been updated to
confirm ordering is honored.

Change-Id: I44a6a4736c78e86e83b6e682e63f93a5b47652da
Remove nova-volume scheduling support

Continuation of I0b540e54dbabd26901a7530035a38583bb521fda

* delete scheduler.simple
* modify scheduler.multi instead of delete to continue supporting
  I753e87fc8979fd0b62529974f00cf11fa55b3d63
* update scheduler.multi docstring
* scheduler.rpcapi bumped to 2.3
* change default scheduler to scheduler.filter_scheduler

DocImpact

part of bp delete-nova-volume

Change-Id: Ie9d9b46742b2d92cd1e9ffe982ef658907a1d411
Fix copy-paste bug in block_device_info_generation

Change-Id: If45a20d9e7cc0c332e3a3df1eaf22457f505acea
Read deleted flavors when using to_xml()

Fixes bug 1073736

Extend get_instance_type to accept an optional flag to return inactive
flavors and use this within to_xml().

Change-Id: Id01724a85d9aff3b32b3502be06a84578fa8f4df
Move to a more canonicalized output from qemu-img info.

Move to a form that is all lower cased, dashes->underscores, underscores
instead of spaces which allows for better integration with python. Also
make the parser more robust to failures when encountering new fields such
as snapshot lists. Provide a new qemu img info object that can be used
to do the parsing and access the underlying attributes.

Change-Id: Ie098dbd9f06dd4ef966768e2caa128f1d09b019c
Increased MAC address range to reduce conflicts

Increased the 4th octet range from 7f to ff, making it consistent with
Quantum. This also reduces the probability of a MAC address conflict.

Fixes LP: #1050924

Change-Id: I801a852110c0a35e5a6a31f359df75475a21fd4a
Improve EC2 describe_security_groups performance

The current implementation of EC2 describe_security_groups makes one
query per grantee group rule in _format_security_group. This will
dramatically slow down response time if users make strong use of
grantee group rules.

This patch uses just one DB query to get security groups with joined
grantee_group rules to improve the performance.

Fixes bug 1073024.

Change-Id: I34f3253bfef0eabfea39819de03a274dd6f6aaa8
Ability to specify a host restricted to admin.

Fixes bug 1070880

There is functionality in place, which uses the
format "az:host" on the --availability_zone
parameter to a create request to force scheduling
of an instance onto a specific host. However,
this is limited to users with Admin context.

This fix alters this behaviour to use a specific
policy action allowing fine-grained control over
which users have access to this functionality.

Change-Id: Ibb0e43492dfa2699ab26318736ca55a60b7b4468
Merge "Fix copy-paste bug in block_device_info_generation"
Make bdms primitive in rpcapi.terminate_instance

This patch converts bdms (a list of block device mappings) passed to
nova.compute.rpcapi.terminate_instance to primitive types that are
safe to be sent to the rpc backend.

Also fixes the fake BDM classes used in:
* nova.tests.api.ec2.test_cloud
* nova.tests.api.openstack.compute.test_server_actions
to pass through josnutils.to_primitive properly and not confuse it due
to wrongly delegated dotted lookups

fixes bug #1073240

Change-Id: I329a48c1a53dde5895a329b39f32854c286de071
refactor: extract _attach_mapped_block_devices

Extract method to remove code duplication.

Change-Id: I032883984ec33051034a30caf3c56520edf58f12
Merge "Make bdms primitive in rpcapi.terminate_instance"
Merge "Move to a more canonicalized output from qemu-img info."
Add xenapi host_maintenance_mode() test

This bit of code is currently untested (except for the most
basic stubbed-out case).

Change-Id: I7193152480ed678c89be7b7dda5edf034f5dad2e
xenapi: Make agent optional

Related to blueprint xenapi-config-drive

As config drive and agent are doing similar operations, this change
makes it possible to disable agent, thus config drive could perform
these operations.

Change-Id: I3fa536cb0fb3b60ff5bc035be9d86afe35905240
Fix backwards compat of rpc to compute manager

Commit dcabd6159abcdccd99e55495ec005926465007a8 changed compute
manager in a way that it will fail to respond to the older 2.X rpc
message for reserve_block_device_name. This fixes it by making
the volume_id parameter optional.

Change-Id: Ia2d353d5b195e5687917ef5f928c0c835ffe3d3a