Send notifications when extending volume

- Send resize.start when volume extension begins.
- Send resize.end with new size when volume extension ends.

Fixes: bug #1219106
Change-Id: I729da1604668080ec1a5d096df211aa55913dc48
fix inconsistent i18n log message

An inconsistent example:
    imessage = _("Invalid metadata") + ": %(reason)s"
This is not consistent i18n usage. In most of cases, we use _() for
whole string instead of leaving something out.

More than inconsistent, some text in leaving strings may be not
translated, for example, ':' in English is different '：' in Chinese.

Change-Id: I00e690021c44f1debbe034cc0837a07b292ffd1b
Closes-Bug: #1220813
Validate VV Set exists in 3PAR drivers

The 3PAR drivers must first create a volume and then add that
volume to a virtual volume set on the backend for QoS support.
If that predefined virutal volume set does not exists the
volume would not be associated with the correct QoS settings.
This patch will now look to see if the virtaul volume set
exists and if not will delete the volume and notify the user
that the VV Set does not exists.

Change-Id: I460f6dd7001362b850c49454c78673aecd4cfef0
Fixes: bug 1218554
Synchronize extend_volume methods in 3PAR drivers

The extend_volume methods in the HP3PAR FC and
iSCSI drivers should have been synchronized with
the synchronize annotation, but were not.

Change-Id: Ic7f18b7314e10dfb499b16f43b72367fe3ed1176
Closes-Bug: #1220947
Remove deprecated assert_() usage

The method assert_() is an alias of assertTrue() and
is deprecated since python 2.7

http://docs.python.org/2/library/unittest.html#deprecated-aliases

This removes all assert_() uses.

Change-Id: I9f55c442cc2416a7aa2dac569d1750f723d95184
Utilize assertIsInstance

Using assertTrue and the 'isinstance' function to test
if an object is in an instance of some class is too python2.4.
Our unit testing framework supports assertIsInstance which was created
for these types of tests. Let's use assertIsInstance for these tests.

Change-Id: I2c931a52ae20f072f53210bf3dedb47127b413c0
Utilizes assertIsNotNone

Using assertTrue and the 'is not' operator to test if an element
is not None is too python2.4. Our unit testing framework supports
assertIsNotNone, included from python 2.7, which was created
for these types of tests.

Change-Id: I25c3f2b144357a3f86625deb8e324d78c20b9ce4
Fix error casting value to float in lvm.py

Special locale setting may result in that "vgs" command output different
results. Such as:

$ LC_NUMERIC='es_ES.UTF-8' sudo vgs
VG #PV #LV #SN Attr VSize VFree
vg_eharney 1 6 1 wz--n- 465,25g 12,97g

Fix bug 1219963

Change-Id: Ibe79d5ce673738d8e37f86de9106ab347c21bd52
Remove unused/redundant methods in cinder/test.py

The following methods are not used anywhere in Cinder
- assertDictListMatch()
- assertSubDictMatch()

The following methods are implemented in testtools
- assertIn()
- assertNotIn()

Change-Id: Iea96f7761c33ac774b5b4ae71e544aa007ba1bb2
Merge "Fix error casting value to float in lvm.py"
Merge "fix inconsistent i18n log message"
Merge "Remove deprecated assert_() usage"
Merge "Utilizes assertIsNotNone"
Merge "Utilize assertIsInstance"
Add support for LocalConnector type in brick

GPFS and other file based drivers require a LocalConnector to support
volume connection and migration operations.

Modify brick/initiator/connector.py to add LocalConnector class.

Modify test_brick_connector.py to extend test_factory to include LocalConnector
class.

Modify test_gpfs.py to include new migrate_volume test.

Modify test_utils.py to extend test_brick_get_connector to include LocalConnector
class.

Closes-Bug: #1218052

Change-Id: I259fae339c2df7ae304a91c80c27d135762041f5
Merge "Synchronize extend_volume methods in 3PAR drivers"
Merge "Remove unused/redundant methods in cinder/test.py"
Merge "Validate VV Set exists in 3PAR drivers"
Replace assertEquals with assertEqual - 1/2

The method assertEquals has been deprecated since python 2.7.
http://docs.python.org/2/library/unittest.html#deprecated-aliases

Also in Python 3, a deprecated warning is raised when using assertEquals
therefore we should use assertEqual instead.

This patch is a mere sed replace of one-liner assertEquals to assertEqual.

grep -lR "assertEquals(" cinder/tests/* | \
xargs sed -ri 's/(\W+self.assertEqual)s(.+)(\)$)/\1\2\3/'

Change-Id: I4feea94d53afa866af9b7e14bd80345fa7276e75
Do not attempt vg.update on uninitialized vg

It's possible for the scheduler to send the periodic
stats update request *before* the volume service/driver
has finished initializing, resulting in an exception trace
being logged.

This change adds a check to verify that the vg is actually
initialized (completed check_for_setup_error) and it also
removes all of the duplication of each LVM class driver.

To deal with other drivers that may have similar issues,
add initialized member to base driver, that member is
set False on __init__ and is updated by the manager
after running check_for_setup_error.  We also skip
update_stats if initialization isn't set True.

Rather than have a separate copy of update_stats in every
driver, we have one in the base LVM class and we set the two
unique variables as member parameters.

Fixes bug 1221874

Change-Id: I159e98a77782b8b2c85a8dd956b150828358fd25