added getter methods for quantumv2 api

Change-Id: Ie2b7ba698c232f55e112b978d7a548b48462fca3
Add methods to Host operations to fake hypervisor

This patch implements some features present in os-hosts extension that are not
implemented in fake hypervisor:
    - Power Actions: Shutdown/Reboot/Startup a host
    - Change host status: enable or disable
    - Set/Unset the host into maintenance mode
With this patch we're able to get full api samples for this extension

Change-Id: I3b76e3070e326b39a67b9d4d25b5e3d91a3c102f
Cells: Re-add DB model and calls

Implements blueprint nova-compute-cells

Change-Id: I5e254988f3dd17cd1147b6c2d0372e3bb6fe6937
adjust rootwrap filters for recent file injection changes

Removed filters for guestmount, fusermount and cp.
Adjusted comment paths as per the recent refactoring.

Change-Id: I643554b89862225d16456e47daf6c11828f602d2
Fix HostDeserializer to enable multiple line xml

Fixes bug: 1082132

The current HostDeserializer wasn't able to deal with multiple line xml inputs.
Since the HostDeserializer is used only on the update operation this patch
renames it to HostUpdateDeserializer, and parses only the valid options (status
and maintenance_mode).

Change-Id: I9ec3b296a07e0fc903da1c005cf7bd5dcb08fd1b
Complete API samples for Hosts extension

The API samples for Hosts extension missed power operations (shutdown, reboot
and startup) and maintenance/status operations.

Complete fix to bug 1070167

Change-Id: I07fd34e071eae9afc82f9320634df24f48623e0b
Allow multi_host compute nodes to share dhcp ip

This adds a new flag: share_dhcp_address which if enabled in
multihost mode will allow all compute nodes to share an ip on
guest network. The code will isolate the address using iptables
and ebtables so it is only visible to the vms.

This patch has two benefits:

a) we don't have to use an ip address from every network for each
compute node. This is especially valuable in vlan mode where the
networks are generally small

b) we can improve security by blocking all access to the ip on the
guest network from outside the compute node. While we could do similar
blocking using a different ip for each node, it makes dhcp setup
much more complicated if a vm is migrated to another node.

Implements blueprint shared-dhcp-ip

Change-Id: Iaf84c0ad2848921122866956105eb44c074450dc
Provide better error message for aggregate-create

For an InvalidAggregateAction exception:
Before: 'ERROR: There was a conflict when trying to complete your request (HTTP 409)'
After: 'ERROR: Cannot perform action 'create_aggregate' on aggregate 'N/A'. Reason: invalid zone. (HTTP 400)'

Fix bug 1083353

Change-Id: I26e30059fe5bbc30eecc52cccec4eba2a57d00db
Add exceptions to baremetal/db/api

Raise exceptions from baremetal/db/sqlalchemy/api.py
  following the precedents from nova/db/sqlalchemy/api.py.
Fixes tests to expect the new exceptions.
Adds __init__ so that baremetal tests work in isolation.

blueprint general-bare-metal-provisioning-framework

Change-Id: Ic8ef66e8f3180460a7bf117fccbfe15078905d8b
Respect the base_dir_name flag in imagebackend.

Resolves bug 1083447.

Change-Id: Ie23c9f46bbbcd2b87dfa7b3ac767ad7c4a4c6397
Display errors when running nosetests

During Ubuntu builds we run the run_test.sh script
during the package build process, so that we can catch
regressions in our packaging before uploading to the archive.

However a recent change writes the output of the nosetests
to an error log so we don't see why the package fail to build.

This patch also displays the output of the nosetests so we
can see why the tests fail without having to look at the nosetests.log.

This patch add the '-v', for a verbose display of nosetests.

Change-Id: Id21d53df356de344a8577282c5a82f3ff927bc11
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Validate rxtx_factor as a float.

Updates the rxtx_factor validations in the instance_types modules so
that rxtx_factor is validated as a float. Given that rxtx_factor is stored
as a float in the database this makes sense... and also adheres
to some of the extension documentation as well (although some of
the extension docs were incorrect as well).

Previously rxtx_factor was being cast into an int which caused it to
be stored and displayed incorrectly via the API.

This patchset adds a test which fails with the old code.

Additionally some of the API docs are corrected so that rxtx_factor is
listed as a float in all examples.

Fixes LP Bug #1081287.

Change-Id: Iae98522a1f2ed63cbd2497b0b0af5ac2d9bb935c
Add version to conductor migration_update message.

I forgot to add the minimum version requirement for the conductor rpc
call to do a migration update.  This fixes that mistake.

Part of blueprint no-db-compute.

Change-Id: I377a3c1d213abf203127eabd91095061156febc3
Migration model update for multi-node resize fix.

Adds source_node and dest_node to Migration model records for
compatibility with multi-node resizes.

The accompanying database migration:
* Adds source and dest node information to existing Migration records
* Fixes the node field on Instance records that have been resized.

bug 1081355

Change-Id: I4b58821174a262ed7885aba1fc79b3b67c9aa859
Make resize and multi-node work properly together

Added node support to migrations and update node properly in
'resize_instance'.

bug 1081355

Change-Id: I003d34e3f7ed9ce2feda19ee5ce210ed4ba7eaa1
RetryFilter checks 'node' as well as 'host'

FilterScheduler and RetryFilter use "(host, node)" instead of "host" to
filter candidates. It makes rescheduling on different nodes in the same
host possible.

Fix bug 1081370

Change-Id: Id51b262de7b47b5f9215463eca5ae07a29109c3f
Use flags() helper method to override config in tests

Setting config option values using setattr() is dangerous because the
value remains set even after the particular test finishes, so you can
end up with other tests relying on it and being unable to run tests
in isolation.

We have a helper method for doing this, just use it.

Change-Id: I872d7a4f70eceb9ff64f56901cb45552f237c733
Move imagecache code from nova.virt.libvirt.utils

The imagecache related code in libvirt.utils uses the base_dir_name
config option.

If we move the imagecache utils into imagecache, then we can move
the base_dir_name option into that module since there are no other
users of it.

Having all the imagecache code in the imagecache module seems like
a sensible thing to do anyway.

blueprint: scope-config-opts
Change-Id: I1e154aa4de1628d40964207bdcbe5b3b55076442
Move ec2 config opts to nova.api.ec2.cloud

Only ec2_dmz_host and ec2_port are used outside of ec2.cloud and in
both cases pipelib is the other module that uses them.

Move all the ec2 options to ec2.cloud and make pipelib explicitly
depend on the ones it needs.

blueprint: scope-config-opts
Change-Id: Ib187ec3421a25bdd86b13dfeae1dc9a07873eb43
Remove default_image config option

The value of this option hasn't been used outside of the tests since
the very early days of the project. There's no particular reason
to have a config option for this test value, so just delete it.

blueprint: scope-config-opts
Change-Id: I00a08d4dc539f92f4fa4bd8c3c8756e5029d193f