Final versioning for 2012.1

Switch to Final=True versioning as we release RC1.

Change-Id: Ic79df75f186cd5f82eb065e28c491cc8891f2be7
Import recent openstack-common changes

Fixes MultiStrOpt, plus also adds secret kwarg for sanitizing logs

Change-Id: I87b979b38084f82b012872054262fc49d291e99e
Don't send snapshot requests through the scheduler

 * If there is more than one volume host, snapshots need to be
   created on the host that has the volume.  Sending the request
   through the scheduler means that the snapshot will sometimes
   be created on the wrong host and fail.
 * Fixes bug 960437

Change-Id: If8562bd533226cf9aee1d3be522f799d233581a9
Fix launching of guests where instances_path is on GlusterFS

The FUSE module does not (currentl) support O_DIRECT on files.
This prevents QEMU from starting guests using 'cache=none' for
their disks located on a GlusterFS filesystem. The same also
applies for a handful of other filesystems (notably tmpfs, or
any other FUSE filesystem).

This patch introduces a startup check in Nova compute service
which tries to create a file $instances_path/.direct_io.test
using the O_DIRECT flag. If this succeeds, then cache=none
will be used for all disks, otherwise it will fallback to
using cache=writethrough. While the latter does not have
performance which is as consistent as cache=none, it is still
host-crash safe and preserves data integrity with migration,
if the filesystem is cache coherant (cluster filesystems like
GlusterFS are, NFS by constrast is not).

By doing the dynamic check for O_DIRECT, we ensure that if
future FUSE modules gain O_DIRECT support, Nova will automatically
do the right thing.

* nova/tests/test_libvirt.py: Stub out os.open in
  the _check_xml_and_disk_driver() to enable testing of
  both O_DIRECT and non-O_DIRECT code paths
* nova/tests/test_virt_drivers.py: Set instances_path to
  the current directory
* nova/virt/libvirt.xml.template: Replace hardcoded 'none'
  string with the '$cachemode' variable for all disks.
  Add missing 'cache' attribute for the config disk
* nova/virt/libvirt/connection.py: Check whether O_DIRECT
  is supported on the "FLAGS.instances_path" directory
  and use 'none' for cachemode if it is, 'writethrough'
  otherwise

Bug: 959637
Change-Id: I60cbff1c3ad8299fe2aa37099390f9235f6724d0
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
makes volume versions display properly

 * The compute versions controller changed during a refactor and broke
   the volume versions controller (since we are using it as a base class)
 * Added naive test
 * fixes bug 963357

Change-Id: Ica9c65952b800d316d264db11f89e369e56bcade
Handle correctly QuotaError in EC2 API

Without this patch, EC2 API returns UnknownError when quota is exceeded, see bug #853381

This patch fixes that by handling the exception. Now euca-run-instances returns useful information:

$ euca-run-instances --instance-count 10 --instance-type m1.8gb.2cpus.diskless ami-00000012
QuotaError: Quota exceeded: code=InstanceLimitExceeded

Change-Id: I1f7b381b34d2f538b7cc2d9582a40fd8bf88fbc3
Signed-off-by: Julien Danjou <julien@danjou.info>
Send a more appropriate error response for 403 in osapi

 * Don't use resizeNotAllowed for 403
 * Fixes bug 949444

Change-Id: Ib2b5acba291a04e0c0296fa5e8438019983dda20
Strip auth token from log output.

Fix bug 956777.

This patch updates _safe_log, which is used for rpc debug logs, to not
include auth tokens.

Change-Id: I36bb4233acd356f85b0e6006a6b812a67605b393
Tweak security port validation for ICMP

Horizon allows for ICMP to be type:code.
Type and code can be from -1 to 255.

API refers to both EC2 and Nova APIs

This patch attempts to resolve:
1. API code throws exceptations when 0 is passed for either field
2. API code validates type:code like from->to range.  type and code
   are independent
3. Update unit tests for this new set of operations.

A side effect is that the following are allowed type:code.
-1:X
X:-1

The code assumes that -1 is a wildcard for the field.

bug 956967

Change-Id: Ieb6989815afc6986b72e0efc7611c2cc353ab5d8
Fixed status validation. Fixes bug 960884.

Fixed the status value validation in os-hosts extension and added a negative
scenario in unit test for os-hosts extension.

Change-Id: Ib4166757561e531494a1a4d3070d7c8971b57dc5
Fix 'nova-manage config convert'

Fixes bug #965069

Looks like this never worked. The dest of the infile and outfile
arguments sets up an unknown kwarg.

Change-Id: I428f56564b39f5586229325db03dccb0b4a01ef6
Merge "Fix launching of guests where instances_path is on GlusterFS" into milestone-proposed
Merge "makes volume versions display properly" into milestone-proposed
Merge "Handle correctly QuotaError in EC2 API" into milestone-proposed
Merge "Fixed status validation. Fixes bug 960884." into milestone-proposed
Volumes API now uses underscores for attrs

* Fixes bug 943053

Change-Id: I7066e963b4377a4a1f8a3c259e6273e6a0ca073f
Merge "Import recent openstack-common changes" into milestone-proposed
Merge "Fix 'nova-manage config convert'" into milestone-proposed
Merge "Send a more appropriate error response for 403 in osapi" into milestone-proposed
Handle Forbidden and NotAuthenticated glance exc.

 * Remove references to deprecated NotAuthorized exception
 * Handle Forbidden and NotAuthenticated
 * Fixes bug 965540

Change-Id: Ib5eef3015239e0fafdb01c975a0f5d553f70519e