LibvirtHybridOVSBridgeDriver update for STP

Fixes bug 1129055

The patch will set the stp status as 'off' and the bridge
forwarding delay to 0.

Cherry picked from 7aeb17d5bbf20f6ffc1c8ccab71f5cbbb57be9a2

Change-Id: Id6874de0752a23646360590794773e7a7028a945
Fix Wrong syntax for set:tag in dnsmasq startup option

Looks like the introduction of quotes in fix for previous
bug 1012443 was erroneous.

Fixes LP# 1152504

Change-Id: Ic84739e38e3b3567f1617302a33623de03196f85
(cherry picked from commit d8188ef32293659c5a12d99f82ac19b452184967)
Adding netmask to dnsmasq argument --dhcp-range

By default, dnsmasq will try to guess the proper subnet size but
sometimes it will fail. This patch provides the network netmask
to dnsmasq via the --dhcp-range argument.

Fixes: bug #1154929

Change-Id: I74d62c837b5310004b9151851697e3ea3b475f92
(cherry picked from commit fb151b5e3704c9a293f10ba89abc14f83d803c24)
Add a format_message method to the Exceptions

This patch adds a format_message method to the NovaException class that
will almost always do what a user wants, when they want to print out the
message of the exception.

Exceptions that are received through RPC are turned into an actual
exception classes by the deserialize_remote_exception function of the
nova.openstack.common.rpc.common module. This function then overrides
__str__ and __unicode__ methods of a new class to print the whole trace.
We still want to preserve this functionality (for logging) but do not
want to leak the trace back to the user in the HTTP response.

Based on the above, This patch attempts to establish a convention that
states: if you need to get the message of a NovaException subclass -
always use the format_message method. Only use str(e) or unicode(e) when
you suspect that they were overriden.

Initially this was attempted through adding a custom metaclass to the
NovaException class so that format_message cannot be overridden in
subclasses, however due to a bug in testtools - many tests were failing.
A patch was proposed to testtols to remedy this
(https://github.com/testing-cabal/testtools/pull/34) however until it is
merged, we cannot use metaclasses with our exception classes as they
cause tests to fail.

(cherry picked from commit b936df8c1ec47300540403ebb6833f0fbf5f195f)

Conflicts:

	nova/tests/test_exception.py

Change-Id: I0a399b9ab3227bad644b031c9b689fe0ce64586e
Set default fixed_ip quota to unlimited.

DocImpact: our previous default quota of ten was poorly thought through
and resulted in upgrade problems. Instead, let's have operators opt into
fixed IP quotas. This change should be mentioned in release notes please.

Resolves bug 1161190.

Change-Id: I2f066a0129461899fe330a628cf49ee5273eaba4
(cherry picked from commit 78c7edc52efdf31d844b8bb38c2460add4c864fb)
Use format_message on exceptions instead of str()

This patch changes all usages of unicode() and str() in the API layer
(and most other reasonable places) into a new format_message method.
This is done in order to avoid leaking the stack trace back to the
user through the Remote excepitons.

This patch deliberately avoids the EC2 api as the way how the EC2 API
handles responses is being worked on as part of another blueprint.

Fixes bug 1159755

(cherry picked from commit 86031940b313532606449c400bca64707be1797a)

Conflicts:

	nova/api/openstack/compute/contrib/admin_actions.py
	nova/api/openstack/compute/contrib/agents.py
	nova/api/openstack/compute/contrib/console_output.py
	nova/api/openstack/compute/contrib/consoles.py
	nova/api/openstack/compute/contrib/deferred_delete.py
	nova/api/openstack/compute/contrib/fixed_ips.py
	nova/api/openstack/compute/contrib/flavorextraspecs.py
	nova/api/openstack/compute/contrib/flavormanage.py
	nova/api/openstack/compute/contrib/floating_ips_bulk.py
	nova/api/openstack/compute/contrib/hosts.py
	nova/api/openstack/compute/contrib/rescue.py
	nova/api/openstack/compute/contrib/server_password.py
	nova/api/openstack/compute/contrib/server_start_stop.py
	nova/api/openstack/compute/servers.py

Change-Id: I04a74682c4fac9a66ba25b52fd5c7af5e10e81e8
Merge "Set default fixed_ip quota to unlimited." into stable/folsom
Merge "LibvirtHybridOVSBridgeDriver update for STP" into stable/folsom
Merge "Add a format_message method to the Exceptions" into stable/folsom
Merge "Use format_message on exceptions instead of str()" into stable/folsom
Fix Network object encoding issue when using qpid

When creating network via REST API will throw the exception
"CodecException: no encoding for
<nova.db.sqlalchemy.models.Network object at 0x4a8ea10>".
It only occurs when using qpid.
Fix this issue through using jsonutils.to_primitive method.

Fix bug 1143584.

Change-Id: I833aef451f8e3d5eaa246c19d67b2474a9d36910
(cherry picked from commit b4d43b0d0c890ccb940862719c6b88a24029d44a)
Final versioning for 2012.2.4

Change-Id: Ic9ee9a7336c8f5f64ad4700c0322653e331c10bb
Bump version to 2012.2.5

Change-Id: Ibf237525fc86d5ba2129620f58d574685a713782
Remove insecure default for signing_dir option.

The sample api-paste.ini file included an insecure value for the
signing_dir option for the keystone authtoken middleware.  Comment out
the option so that we just rely on the default behavior by default.

Fix bug 1174608.

Conflicts:
	etc/nova/api-paste.ini

Change-Id: I6189788953d789c34456bbe150b8ed6ce6f68403
(cherry picked from commit 58d6879b1caaa750c39c8e452a0634c24ffef2ce)
Check QCOW2 image size during root disk creation

glance can only tell us the size of the file, not the virtual
size of the QCOW2. As such we need to check the virtual size of
the image once its cached and ensure it's <= to the flavor's
root disk size.

Change-Id: I833467284126557eb598b8350a84e10c06292fa9
Fixes: bug 1177830
(cherry picked from commit 44a8aba1d5da87d54db48079103fdef946666d80)