Use policy based rule to define context.is_admin

When creating a context set is_admin based on policy instead of
hard coded requirement for a role named 'admin'.

Fixes: bug# 1053181

Change-Id: I9c05b8ecde887467557c4f01e074145b6a6372aa
Mock out sleep in some retry tests

Stub sleep in storwize tests
Stub sleep in glance tests

Change-Id: Ia935d561d104a4cd6373624208dedf5891b516e3
Add snapshot force delete admin action

Change-Id: I289030cf0db42aa78cd2d8441d89610dad6cbeaa
Merge "Use policy based rule to define context.is_admin"
Fix typo in policy documentation

Change-Id: I61df9dc9b752e1598f4a472771e581091f4de18f
Signed-off-by: Julien Danjou <julien@danjou.info>
Merge "Mock out sleep in some retry tests"
Merge "Add snapshot force delete admin action"
Configuration Options clean up

Small clean up of configuration options including:
 * unused config opts:
   - reclaim_instance_interval
 * rename 'instance' in config opts name/help message to 'volume'
   - 'instance_usage_audit_period' to 'volume_usage_audit_period'
   - help message of 'volume_name_template'

This change also re-generates cinder.conf.sample file.

Change-Id: I3d6c43cf56a5335b4bf768c51d65d76735213431
Loosen anyjson dependency to avoid clash with ceilometer

Ceilometer depends on anyjson 0.3.1, whereas cinder requires
exacly 0.2.4.

The net effect is a devstack with ceilometer installed will
appear to work initially, as ceilometer is sparked up after
cinder. However, if any of the cinder services are subsequently
restarted, they fail with:

  pkg_resources.DistributionNotFound: anyjson==0.2.4

By simply allowing the cinder anyjson dependency version to
be greater than as opposed to an exact match, we can avoid
the clash.

Change-Id: I21737a2504705f15dd16e6762b44624678177442
Merge "Configuration Options clean up"
Error message references incorrect variable

In remove_iscsi_target() for the TgtAdm class, the "Failed to
create iscsi target for volume id:" message references a
variable that doesn't exist -- use the correct variable name.

Fixes bug 1065073.

Change-Id: I55acb0dd2ee368fdc62a0ded6280d7ef7cd8ab7f
Fix incorrect class path for legacycinder formatter in logging_sample.conf

Change-Id: I313609f7b996650dfa2c804ebe964aa31549f5ea
Update common.

policy.py is not updated as it causes test failures. I will investigate
that separately.

Change-Id: I9936137c1ab5b368ba6c3c35c423568b38bf913f
Adds support for Windows 2012 Storage Server
blueprint windows2012driver
https://blueprints.launchpad.net/cinder/+spec/windows2012driver

Change-Id: I3f7efb1b976fedc4afb736b87d550a34c330c839
Change output strings to i18ned

Fixes bug #1069601.

Ensure visible message in cinder-volume-usage-audit got through
translation.

Change-Id: I5c32ce3b2ef2541b8a5520ed53feaf8e00f43c9d
Merge "Update common."
Drop duplicate sqlalchemy db api methods

Several methods were redefined at the bottom of
cinder/db/sqlalchemy/api.py. They have been removed:
- quota_get
- quota_get_all_by_project
- quota_create
- quota_update
- quota_destroy
- quota_destroy_all_by_project
- quota_class_get
- quota_class_get_all_by_name
- quota_class_create
- quota_class_update
- quota_class_destroy
- quota_class_destroy_all_by_name
- quota_usage_get
- quota_usage_get_all_by_project
- quota_usage_create
- quota_usage_update
- quota_usage_destroy

Fix bug 1070033

Change-Id: I64b0b0045af7251853da97a8a8c4b2cb09b1dd53
Drop unused quota_usage db methods

The quota_usage_update and quota_usage_destroy db methods are
not used anywhere - drop them.

Change-Id: Iaa23d1de1642ac7ec9ab4b4cbe119ec742346505
Update volume and snapshot status on delete

Change the status of "deleting" resources at the same time we update boolean
flag for deleted.  Makes dumb queries looking for stuck statuses a little
easier.

Change-Id: Iaf3386526a369f9bf281eb4be42eb11277038c92
Ensure device node exists before wiping during volume deletion

If the LVM device node is missing when a Cinder volume is deleted,
a large amount of data will be written to /dev/.  Check that the
device node exists before performing a _copy_volume('/dev/zero'...)
to wipe it.  Fixes bug 1070023.

Change-Id: I77a0a5545a54a4adc905a781ed8120db7adccc27