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
port baremetal_nodes API into v3 part1

This changeset only copies the v2 files into the appropriate v3
directories unchanged. The copy as-is will not be loaded by either
the v2 or v3 extension loaders. The second changeset will then
make the changes required for it to work as a v3 extension.

This is being tried in order to make reviewing of extension
porting easier as gerrit will display only what is actually
changed for v3 rather than entirely new files.

Change-Id: I180bbf7306e7d3bffa4d6093fedfd52e4baf5215
port BaremetalNodes API into v3 part2

This patch contains the changes required to adapt the BaremetalNodes
extension and the corresponding unittest to the v3 framework

Change-Id: Iceef736a3821a4628afc34be29a04766421d3e47
Add expected_errors for extension extended_volumes v3

Partially implements bp v3-api-extension-versioning

Change-Id: I724cf10f23eead727ad3a91ab0b313524f68ca52
Fixes wrong action comment 'lock' to 'unlock'

Change-Id: I2f285b405b598d69f80504b040b4a0e32d80020b
Add rpcapi tests for shelving calls

Adds tests to verify that compute RPC calls have the correct version and
pass the correct arguments.

Change-Id: Idb931139d3a7e6f47cbb474807c619f0ae3cd4fb
xenapi: Pass string arguments to popen

The current BitTorrent code was passing integer arguments to `make_subprocess`
which would in turn pass those to `popen`. This would cause a failure because
the semantics of the underlying `execve` function is to only accept a list of
strings.

The solution is to cast the arguments to a string before passing them into
`make_subrpocess`.

Fixes bug 1201594

Change-Id: I8372795ca032420641c449cb07bb47f9252ff4ef
Fix iptables rules when metadata_host=127.0.0.1

When metadata_host is set to 127.0.0.1 metdata_forward will use the
REDIRECT target instead of the DNAT target in iptables rules. The
REDIRECT target results in an implicit DNAT to the primary address
of the incoming interface. As a result requests coming in from VMs
will have a destination address of the gateway brought up by
nova-network.

metadate_accept will now allow traffic destinatined for any local
address on the metadata_port when metadata_host is set to
127.0.0.1.

Change-Id: I877befe6f7c1020d2160194b6f6cab8297cb086c
Fixes: bug #1202356
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
Sync eventlet_backdoor from oslo-incubator

Includes this commit:

 c7c55b2 Improve usability when backdoor_port is nonzero

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