:param external: The external keyword argument denotes whether this lock
should work across multiple processes. This means that if two different
- workers both run a a method decorated with @synchronized('mylock',
+ workers both run a method decorated with @synchronized('mylock',
external=True), only one of them will execute at a time.
:param lock_path: The lock_path keyword argument is used to specify a
can use this to perform simple boolean logic. For
example, the following rule would return True if the creds
contain the role 'admin' OR the if the tenant_id matches
- the target dict AND the the creds contains the role
+ the target dict AND the creds contains the role
'compute_sysadmin':
::
volume, uid = self._create_volume_and_return_uid('manage_test')
# Descriptor of the Cinder volume that we want to own the vdisk
- # refrerenced by uid.
+ # referenced by uid.
new_volume = self._generate_vol_info(None, None)
# Submit the request to manage it.
self.driver.initialize_connection(volume, conn)
# Descriptor of the Cinder volume that we want to own the vdisk
- # refrerenced by uid.
+ # referenced by uid.
volume = self._generate_vol_info(None, None)
ref = {'source-id': uid}
"""Tests managing a mapped volume with override.
This test case attempts to manage an existing volume by UID, when it
- it already mapped to a host, but the ref specifies that this is OK.
+ already mapped to a host, but the ref specifies that this is OK.
We verify that the backend volume was renamed to have the name of the
Cinder volume that we asked for it to be associated with.
"""
self.driver.initialize_connection(volume, conn)
# Descriptor of the Cinder volume that we want to own the vdisk
- # refrerenced by uid.
+ # referenced by uid.
new_volume = self._generate_vol_info(None, None)
# Submit the request to manage it, specifying that it is OK to
def create_vol(self, volume, pool_name, reserve):
"""Execute createVol API."""
response = self._execute_create_vol(volume, pool_name, reserve)
- LOG.info(_('Successfuly create volume %s') % response['name'])
+ LOG.info(_('Successfully create volume %s') % response['name'])
return response['name']
@_connection_checker
def get_group_config(self):
"""Execute getGroupConfig API."""
response = self._execute_get_group_config()
- LOG.debug('Successfuly retrieved group config information')
+ LOG.debug('Successfully retrieved group config information')
return response['info']
@_connection_checker
def get_vol_info(self, vol_name):
"""Execute getVolInfo API."""
response = self._execute_get_vol_info(vol_name)
- LOG.info(_('Successfuly got volume information for volume %s')
+ LOG.info(_('Successfully got volume information for volume %s')
% vol_name)
return response['vol']
def get_initiator_grp_list(self):
"""Execute getInitiatorGrpList API."""
response = self._execute_get_initiator_grp_list()
- LOG.info(_('Successfuly retrieved InitiatorGrpList'))
+ LOG.info(_('Successfully retrieved InitiatorGrpList'))
return (response['initiatorgrp-list']
if 'initiatorgrp-list' in response else [])
else:
display_name = None
- # Generate the new volume information based off of the new ID.
+ # Generate the new volume information based on the new ID.
new_vol_name = self._get_3par_vol_name(volume['id'])
name = 'volume-' + volume['id']