Make extension aliases consistent

related to blueprint disable-server-extensions

The alias for extensions should start with os- where possible.
Unfortunately the alias is used for xml namespacing in some cases
so it cannot be made consistent for some legacy extensions

There will continue to be a small number of output extensions that
have no special namespace because they were added before we started
namespacing extensions and they need to remain the same for legacy
compatibility.

In the future all extensions should include a namespace prefix
when adding extra data to the api.

Change-Id: I3a31fa21e16dc7c289d7f5b2e4736ab48bf42557
Allow loaded extensions to be checked from servers

related to blueprint disable-server-extensions

Adds an is_loaded method to the extension manager and passes
the extension manager to the servers controller so that it
can be used to enable optional post parameters.

The extension manager is also saved in ExtensionDescriptors
because they may need access to it if they are subclassing
the servers Controller.

Tests are included to verify that extension loading can be
properly determined.

Change-Id: Ie4effbb885370dc80d86ee13d27c9263f7f63cad
Move root_helper deprecation warning into execute.

By moving this warning into the execute function and out of the top
level utils module we eliminate warnings that could occur when
Nova code includes utils.py but doesn't setup a config file properly.

Fixes LP Bug #1032657.

Change-Id: Iae41ead251a64717de3bf7cba3fa206cda278a20
Use explicit args in run_instance scheduler code.

This patch goes through code paths related to run_instance in the
scheduler to use explicit arguments instead of **kwargs.  I'm trying to
work out exactly what data is getting passed through the system when an
instance is created, so that I can make the no-db-messaging related
changes.  This patch helps clarify some things.

Part of blueprint no-db-messaging.

Change-Id: Id83fc1e399e1d5c75af6dd3c8972b8ba9d706af1
Remove topic from scheduler run_instance.

This argument to run_instance was unused, so just remove it.

Change-Id: I42366514285a2355f647c776af140effc1618b7d
Use explicit arguments in compute manager run_instance.

Use explicit arguments in functions in the run_instance code path of the
compute manager.  I think methods of the rpc API are better this way as
we have to be careful when changing these functions so we handle
versioning and backwards compatibility properly.  Spelling out all of
the arguments like this makes it easier to catch when things change and
to make sure they are changed properly.

This is in preparation of changing the instance_uuid to an instance
dict, instead.

Part of blueprint no-db-messaging.

Change-Id: I1e141b471040b0fd4833d4e08d44166a9d12bcad
Use dict style access for image_ref.

When reading image_ref from an instance, use dict style syntax.  This is
to be compatible with no-db-messaging changes.

Part of blueprint no-db-messaging.

Change-Id: I19753da6301c5d78b8fb13b30fbc6996ba828096
Send full instance to run_instance.

This patch updates run_instance in the compute manager to take a full
instance instead of just an instance UUID.  This reduces db access
required by the compute nodes.  The scheduler code needed some work here
as well since it wasn't using the compute rpcapi for calling
run_instance.

Part of blueprint no-db-messaging.

Change-Id: If5545748122b4ff9e2da6788cbd4b0fa26c4db99
Send full instance to scheduler live_migration.

Remove the instance_id parameter and send a full instance dict to the
live_migration method of the scheduler manager.  This cuts down on some
unnecessary database access in the scheduler.

Part of blueprint no-db-messaging.

Change-Id: Ic45105300c967c760559df2225e59e515cea8b7b
Add underscore in front of post_live_migration.

Rename this method of the compute manager by just adding an underscore
in front of the name.  This is a private method and is not part of the
rpc api.  Make that more apparent by using the private method naming
convention.

Change-Id: I66633ffd59c6d670ccc748855fb1dcbac7df222d
Send full instance to compute live_migration.

Remove the instance_id parameter and send a full instance to
live_migration in the compute manager.  This cuts down on database
access required by the compute manager.

Part of blueprint no-db-messaging.

Change-Id: Ic21f061702704ddeaa6925aac4ecad69b0e8de18
Rename private methods of compute manager.

Add an underscore in front of add_instance_fault_from_exc and
error_out_instance_on_exception in the compute manager.  They
are private methods that are not part of the rpc API.

Change-Id: Ic5c0c0fb1a599d38c100810a144592b082e1ebad
Solve possible race in semaphor creation

Solve the race condition described in the bug 872558 report which can
result in:

- thread crashing trying to remove semaphore from dict
- two threads getting different semaphores for the same name

First case is solved automatically by weakref dictionary. No explicit
deletion takes place.
The second case is solved by getting existing or new semaphore in one
step. Once a local reference to the semaphore is obtained, it can be
safely assigned to the dictionary if it's missing. If it's present, it
will not be removed anymore because there's at least one strong
reference present (local variable 'sem').

This solution is only valid for greenthreads.

Change-Id: I6bddc3e7abb39fd75e1f03abb2ea0f911b761957
Merge "Use explicit args in run_instance scheduler code."
Merge "Remove topic from scheduler run_instance."
Merge "Use explicit arguments in compute manager run_instance."
Fixes parameter passing to tgt-admin for iscsi

Fixes bug 1033670

The change to add persistent volumes for tgtd 1ba3dfec,
passes parameters as '--conf %s' % volume_path,
'--update %s' % vol_id etc. which cause the tgt-admin command
to fail silently because the options are misquoted.

Instead pass as '--conf', volume_path

Change-Id: Ic986ee5fe21a0927c1aa2f8c94420fe30127d088
Update RPC code from common

* Fix impl_zmq following common migration.
A number of problems have been discovered with impl_zmq
following the move to common. These problems have been
resolved in openstack-common. This patch squashes those
changes and brings them into Nova.

* rpc/common - Removes conf argument where it was no longer necessary.

* AMQP - Fix import order

* Qpid - Fix heartbeat

* __init__ - Fix line length, pep8

* proxy -
Enable fanout_cast and fanout_cast_to_server to provide topic

Change-Id: If9c4616a50d7ec6c7a7e4adad58dc2fdcfc3ffdf
Merge "Use dict style access for image_ref."
Merge "Send full instance to run_instance."