Define LOG globally in baremetal_deploy_helper

Since LOG = getLogger() has been moved from the global scope
to the function scope (main), the rest of the module could
not find LOG. This patch makes LOG global again.

Fixes bug 1165262

Change-Id: I2607802dcbed64135f75011a02ebce95519e4ea1
Raise correct exception for duplicate networks

When using Quantum, if duplicate network ids are passed in on a
nova boot, nova-api raises a NetworkNotFound exception, which is
not correct.  This change causes it to raise a NetworkDuplicated
exception instead.

Fixes bug 1165088

Change-Id: I4f1f9aa5e1fa0e740b78e67760d924e2dd1d4d98
Add NOVA_LOCALEDIR env variable

Part of fixing bug #995287

Syncs these two commits from oslo-incubator:

  Support overriding oslo localedir too
  Add a gettextutils.install() helper function

to get a new gettextutils.install() function which allows the default
localedir to be overwritten via an environment variable.

Note that gettextutils.install() must be called before any other nova
modules are imported since some modules attempt to translate strings
at import time (e.g. the 'message' attributes on classes in
nova.exception). This is broken and inefficient, but fixing it involves
adding something like spinx's l_() function and would be very invaisve.

Also, note that calling gettextutils.install() in nova.cmd.__init__
means that no program which uses a different translation domain should
ever import any of the modules under nova.cmd.

Change-Id: I86562b3a65d371673bb21f7179eecc7602bc0775
xenapi: Make _connect_volume exc handler eventlet safe

`forget_sr` blocks and so clears the exception state causing the
subsequent raise to try to raise `None`, which fails.

Fixes bug 1167515

Change-Id: I18562c7389b152a6490d352c5a8d36934288f47d
Fix bug in os-availability-zone extension.

Fixes bug 1167956.
The call to get the list of availability zones (GET V2/os-availability-zone)
doesn't hide internal availability zone if all services in that zone are
disabled.

Change-Id: I2c49ad68c2ee5ddea0536dfa770f649fbb392b63
Allow for the power state interval to be configured.

The power state interval right now is hard coded to 600 seconds.
In order to allow deployers to change this timing (and determine)
the side-effects of that change it is useful to allow this value
to be configured instead of static.

DocImpact

Change-Id: I9baf34f9b132dc20fcc096f86fa0e5794fc06312
Cleans up orphan compute_nodes not cleaned up by compute manager

Fixes bug 1161193

Orphan compute_node records can cause the scheduler to pick
compute nodes that are not handled by driver anymore. This
can happen if you rename your hypervisor_hostname or in a
multi-node support where driver does not support a node
anymore for whatever reason (hardare failure for example).

Also, removing resource tracker logic to delete nodes since
resource trackers built in compute manager will never accept
nodes not reported by driver

Change-Id: I742d2e81ec0592d952ee5736aa8dce1e5598ef80
Add an extension to show the mac address of a ip in server(s)

This extension adds the OS-EXT-IPS-MAC:mac_addr param
so that users can associate the mac address to the ip of the server in
one API call.

Implement bp: os-ext-ips-mac-api-extension
DocImpact

Change-Id: I01d0b3aa804b5218853a4bb568c85e31b87d04e4
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
Merge "Allow for the power state interval to be configured."
Make compute/manager use conductor for unrescue()

The compute_api.unrescue() call makes direct database queries, which means
it can't be called directly from compute manager. This patch adds support
in conductor for proxying this request and makes compute manager utilize
it.

Fixes bug 1167619

Change-Id: I158c64cabdfe436462f5669047fb930819a13c50
Merge "Define LOG globally in baremetal_deploy_helper"
Make sure confirm_resize finishes before setting vm_state to ACTIVE

Setting it to ACTIVE to early will allow new resize or whatever
operations to start before the current confirm has finished which
might result in all sorts of conflicts.

Resolves bug 1161529 where an intermittent failure in a tempest test
happens because a confirm operation conflicts with a later resize
carried out on the same instance. As the new resize starts to move
around instance disks, the still not finished confirm operation might
fail at recalculating total disk usage due to a missing disk.

Other possible conflicts might be due to system_metadata and/or quota
not being up-to-date at the moment the instance becomes ACTIVE.

Change-Id: I079da4e271469739504fa87e23149d03652d98f0
Merge "Add an extension to show the mac address of a ip in server(s)"
baremetal: Change input for sfdisk

To prevent sfdisk stopping with "bad input", use a empty string
instead of "-" (and doing so requires using "," as a separator).

Fixes bug 1166112

Change-Id: I5e4cffaa326fbafd1583d55744f921a40b3ae76f
Imported Translations from Transifex

Change-Id: I1b7a045d7b9bd96200c4508043cdd18c8a96fa5d
Merge "Make compute/manager use conductor for unrescue()"
Merge "Make sure confirm_resize finishes before setting vm_state to ACTIVE"
Imported Translations from Transifex

Change-Id: I01693e36efa67457c5d5963a430d590bd2903908
Sync rpc from oslo-incubator.

This includes rpc api namespace support, some minor configuration
related fixes, and the redis based matchmaker for use with impl_zmq.

Change-Id: I9fc826a498461417afe8b2a923edac8d68c2c18f
Merge "Add NOVA_LOCALEDIR env variable"