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
Code dedup in test_libvirt_volume

- externed common assertions to methods
- externed common parts to setUp():
  - test disk info
  - test connector
  - test volume name, location, iqn, data, uuid
  - test user
  - test fake connection

bp nova-tests-code-duplication

Change-Id: I83bfd8b597121c9de091283845b841680e150e76
Code dedup in class ImageXMLSerializationTest

Externed common parts to setUp():
- fixture with test image data
- test image
- dictionary with test images
- test serializer
These parts were equal in the most part of the methods.

bp nova-tests-code-duplication

Change-Id: I8394c7ccbd0d71ffcf5f35c64a5c307dbf579364
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
Fixes wrong action comment 'lock' to 'unlock'

Change-Id: I2f285b405b598d69f80504b040b4a0e32d80020b
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
Create vmware section

Implements blueprint vmware-configuration-section

VMware specific parameters will be moved to a new section. The
change is backward compatible and supports existing
configurations.

DocImpact

Change-Id: Ic9b425a3d9ea2b614643ba8d3db50b065947c806
Allow exceptions to propagate through stevedore map

Allow exceptions to propagate up through the stevedore map
function used by the V3 API servers core extension. This allows
for functionality such as extension specific parsing of client
supplied data formerly required to be handled by the core API to
be handled by the extension itself instead.

This functionality requires stevedore 0.10 or later

Partially implements blueprint nova-v3-api

Change-Id: Ib848147225707f1c7eda27b1ba796022161ba20f
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
Add unique constraint to InstanceTypeExtraSpecs.

Added unique constraint
'uniq_instance_type_extra_specs0instance_type_id0key0deleted'
('instance_type_id', 'key', 'deleted')
to InstanceTypeExtraSpecs model and migrate
scripts.

Exception from UC violation used in method
flavor_extra_specs_update_or_create()
for race condition check.
Get-update-create procedure will be restarted
in case race condition.

blueprint db-enforce-unique-keys

Change-Id: Ie91c6fc19ca01526b5f48f85cbb63a6842f9c890
Merge "Allow exceptions to propagate through stevedore map"
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
Merge "Code dedup in test_libvirt_volume"