Change force_dhcp_release default to True

Historically it was was false because it requires the dnsmasq binary
'dhcp_release' which was not present in all distros.

Related to bug 970893

DocImpact

Change-Id: I4975d85a66fb930d6a56900dd569cec2a1874439
Code dedup in class ServersControllerCreateTest

Externed common parts to setUp():
- request body
- request object
- test image UUID
- test flavor URL
These parts were equal in the most part of the methods.

bp nova-tests-code-duplication

Change-Id: I091f14a9753059d759ba2f7b05ff33f5abea0f00
Make ServersViewBuilderTest DRYer.

Move detail and brief info about server from test methods to setUp()
to expected_detailed_server and expected_server respectively. Every
test modifies the particular fields in the variables to create
appropriate test environment.

Blueprint: nova-tests-code-duplication
Change-Id: I31bf6ed3c266da99c57b128c298cf7beae9a6db4
Fix mig 186 downgrade when using sqlalchemy >= 0.8

This patch fixes an issue that cause tests to break when using
SQLAlchemy 0.8 and newer. The migration was using non-existing column
names in an update query. Referring to a non-existent column in an
insert() or update() construct will raise an error instead of a warning
in SQLAlchemy 0.8.

As an added bonus - this patch adds the downgrade tests for migration
186 (which were missed in the original patch) to ensure there are no
further regressions.

Fixes bug: #1201453

Change-Id: I3c679e95583ee0c1bded5a01ddec6d6212904195
Add validation of available_zone during instance create

When using nova boot command with --availability_zone parameter and only
input the zone without host and node, now will check if the zone is
available, if not, then return an error message directly rather than
create an instance with an Error state

Add a get_only_available option to function get_availability_zones

To disable available zone, one should have to disable both the scheduler
filter and the API extension, if the API extension is not disabled, this
patch will still do the validation of available zone

DocImpact

Change-Id: Ibff117d48b60ac4f4ae33e3b3d2840d7313ce0d4
Fix up trivial license mismatches

This prepares Nova for Hacking 0.6 by fixing all occurences
of H103 - license header does not match Apache 2.x license.

Change-Id: I413d46c6940716fed39542b35a6ddc02a87f5196
Fixing dnsdomain_get call in nova.network.manager

  db.dnsdomain_get() was being passed an availability
  zone instead of a domain.

fixes: bug #1190718

Change-Id: Ia8ccf6e84d4b181adaa3b0475e51e3897ac03bd2
Deduplicate data in TestAddressesXMLSerialization

Extract function which returns test-related data.

Blueprint: api-compute-servers-tests
Change-Id: Ie1b212a2057748a1a067b2af4a30df32e35b672a
Sync latest rpc changes from oslo-incubator

Includes these commits:

 99b7c35 Convert kombu SSL version string into integer
 1a2df89 Enable H302 hacking check
 3969355 Fix exception arg typo
 3006787 Sanitize passwords in _safe_log
 323e465 Add conditional exception reraise
 dea334a Replace sys.exit by a RPCException
 719eba4 Don't reconnect to exclusive fanout consumers.
 22ec8ff Make AMQP based RPC consumer threads more robust
 13650b1 rpc: remove some unused serialization code
 e204885 Optionally reject messages on exception.
 688832f Remove unused zmq relay functionality

The sslutils module is included for its validate_ssl_version() method.

Change-Id: Ic2b64f68bfda0dde365221ab1efbc592b1e5bc6f
Remove hostname param from XenApi after first boot

Removes hostname param from XenApi after first boot.
Hostname being present is causing PV tools to pick
old hostname and revert the hostname changes.

Fixes: bug #1203025
Change-Id: I48d8e43addb8d6cd84ad160cd52427d47a31ff69
Fixed tests for flavor swap extension after merging in core API

flavor_swap extension was merged into core API but tests were not
updated accordinly so this functionality was not tested at all.
This commit adds proper tests for this extension

Related to blueprint nova-v3-api

Change-Id: If5f464302f2efd51d6c48d9c28baa6e0922bfa2c
Sync some of Instance* models with migrations

Update db.models description for:

 * InstanceFault
 * InstanceAction
 * InstanceActionEvent

That brings it in sync with the actual database
schemas.

Blueprint: db-sync-models-with-migrations

Change-Id: I5fae28a86064a0582fd2a53a1a7277947b6a3525
Port migrations extension to v3 API part 1

This is part 1 of the two part commit to port migrations to v3.
As part of this commit the api and test files are copied over to v3
plugins folder. The second changeset will have changes to port
migrations to v3.

Partially implements blueprint nova-v3-api

Change-Id: I94d4ce6903da4c16545092f5618c4d130b700462
Port migrations extension to v3 API part 2

This patch contains changes to port migrations extension to v3.

Partially implements blueprint nova-v3-api

Change-Id: Ie79a0d1eeeee7d4fce7a61d8e0cec90982368cf2
Merge "Sync some of Instance* models with migrations"
Imported Translations from Transifex

Change-Id: I91ebbf4e046c024fab520da97be6dc65dc8d637c
Sync models for AgentBuild, Aggregates, AggregateHost tables.

DB models definition should be up-to-date with DB schema obtained after
applying of migrations. Currently, there are no tests enforcing this and
it's really hard to analyze what indexes should be added, and what indexes
we have at the moment.

So the first step is it to fix all models, and add missing descriptions
about Indexes and UniqueConstraints in __table_args__ and use explicit
'nullable' parameter in columns description.

Add empty __table_args__ parameter to Table

blueprint db-sync-models-with-migrations

Change-Id: I76e064cf11d8b0df473c6085271b48a81fe31702
Merge "Change force_dhcp_release default to True"
Merge "Imported Translations from Transifex"
Add support for volume swap

Adds support for transparently swapping an attached volume with
another volume. Note that this overwrites all data on the new
volume with data from the old volume.

Implements blueprint volume-swap

Change-Id: Iaace71f46acd33cf1531d953d569c0b6d0bbe680