Mass replace osapi_volume to osapi_share

Removed locale
This commit is contained in:
Yulia Portnova 2013-09-05 15:27:46 +03:00
parent 59411bf710
commit b2b51fb29f
38 changed files with 48 additions and 134754 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -22,7 +22,7 @@ LOG = logging.getLogger(__name__)
class CapabilitiesFilter(filters.BaseHostFilter):
"""HostFilter to work with resource (instance & volume) type records."""
"""HostFilter to work with resource (instance & share) type records."""
def _satisfies_extra_specs(self, capabilities, resource_type):
"""Check that the capabilities provided by the services

View File

@ -58,10 +58,10 @@ service_opts = [
' (Disable by setting to 0)'),
cfg.StrOpt('osapi_share_listen',
default="0.0.0.0",
help='IP address for OpenStack Volume API to listen'),
help='IP address for OpenStack Share API to listen'),
cfg.IntOpt('osapi_share_listen_port',
default=8786,
help='port for os volume api to listen'), ]
help='port for os share api to listen'), ]
FLAGS = flags.FLAGS
FLAGS.register_opts(service_opts)

View File

@ -160,7 +160,7 @@ class API(base.Base):
snapshots = self.db.share_snapshot_get_all_for_share(context, share_id)
if len(snapshots):
msg = _("Share still has %d dependent snapshots") % len(snapshots)
raise exception.InvalidVolume(reason=msg)
raise exception.InvalidShare(reason=msg)
now = timeutils.utcnow()
share = self.db.share_update(context, share_id, {'status': 'deleting',

View File

@ -33,11 +33,11 @@ NS = "{http://docs.openstack.org/common/api/v1.0}"
class ExtensionTestCase(test.TestCase):
def setUp(self):
super(ExtensionTestCase, self).setUp()
ext_list = FLAGS.osapi_volume_extension[:]
ext_list = FLAGS.osapi_share_extension[:]
fox = ('manila.tests.api.extensions.foxinsocks.Foxinsocks')
if fox not in ext_list:
ext_list.append(fox)
self.flags(osapi_volume_extension=ext_list)
self.flags(osapi_share_extension=ext_list)
class ExtensionControllerTest(ExtensionTestCase):

View File

@ -77,7 +77,7 @@ class _IntegratedTestBase(test.TestCase):
super(_IntegratedTestBase, self).tearDown()
def _start_api_service(self):
self.osapi = service.WSGIService("osapi_volume")
self.osapi = service.WSGIService("osapi_share")
self.osapi.start()
# FIXME(ja): this is not the auth url - this is the service url
# FIXME(ja): this needs fixed in nova as well
@ -89,10 +89,10 @@ class _IntegratedTestBase(test.TestCase):
f = {}
# Ensure tests only listen on localhost
f['osapi_volume_listen'] = '127.0.0.1'
f['osapi_share_listen'] = '127.0.0.1'
# Auto-assign ports to allow concurrent tests
f['osapi_volume_listen_port'] = 0
f['osapi_share_listen_port'] = 0
return f

View File

@ -27,8 +27,8 @@ LOG = logging.getLogger(__name__)
class ExtensionsTest(integrated_helpers._IntegratedTestBase):
def _get_flags(self):
f = super(ExtensionsTest, self)._get_flags()
f['osapi_volume_extension'] = FLAGS.osapi_volume_extension[:]
f['osapi_volume_extension'].append(
f['osapi_share_extension'] = FLAGS.osapi_share_extension[:]
f['osapi_share_extension'].append(
'manila.tests.api.extensions.foxinsocks.Foxinsocks')
return f

View File

@ -35,7 +35,7 @@ class VolumesTest(integrated_helpers._IntegratedTestBase):
fake_driver.LoggingVolumeDriver.clear_logs()
def _start_api_service(self):
self.osapi = service.WSGIService("osapi_volume")
self.osapi = service.WSGIService("osapi_share")
self.osapi.start()
self.auth_url = 'http://%s:%s/v1' % (self.osapi.host, self.osapi.port)
LOG.warn(self.auth_url)

View File

@ -241,5 +241,5 @@ class HpSanISCSITestCase(test.TestCase):
def test_cliq_error(self):
try:
self.driver._cliq_run_xml("testError", {})
except exception.VolumeBackendAPIException:
except exception.ShareBackendAPIException:
pass

View File

@ -693,14 +693,14 @@ class EMCSMISISCSIDriverTestCase(test.TestCase):
self.driver.delete_volume(test_volume)
def test_create_volume_failed(self):
self.assertRaises(exception.VolumeBackendAPIException,
self.assertRaises(exception.ShareBackendAPIException,
self.driver.create_volume,
test_failed_volume)
def test_create_volume_snapshot_unsupported(self):
self.driver.create_volume(test_volume)
self.driver.create_snapshot(test_snapshot_vmax)
self.assertRaises(exception.VolumeBackendAPIException,
self.assertRaises(exception.ShareBackendAPIException,
self.driver.create_volume_from_snapshot,
test_clone,
test_snapshot_vmax)
@ -710,7 +710,7 @@ class EMCSMISISCSIDriverTestCase(test.TestCase):
def test_create_volume_snapshot_replica_failed(self):
self.driver.create_volume(test_volume)
self.driver.create_snapshot(test_snapshot)
self.assertRaises(exception.VolumeBackendAPIException,
self.assertRaises(exception.ShareBackendAPIException,
self.driver.create_volume_from_snapshot,
failed_snapshot_replica,
test_snapshot)
@ -720,7 +720,7 @@ class EMCSMISISCSIDriverTestCase(test.TestCase):
def test_create_volume_snapshot_sync_failed(self):
self.driver.create_volume(test_volume)
self.driver.create_snapshot(test_snapshot)
self.assertRaises(exception.VolumeBackendAPIException,
self.assertRaises(exception.ShareBackendAPIException,
self.driver.create_volume_from_snapshot,
failed_snapshot_sync,
test_snapshot)
@ -729,7 +729,7 @@ class EMCSMISISCSIDriverTestCase(test.TestCase):
def test_create_volume_clone_replica_failed(self):
self.driver.create_volume(test_volume)
self.assertRaises(exception.VolumeBackendAPIException,
self.assertRaises(exception.ShareBackendAPIException,
self.driver.create_cloned_volume,
failed_clone_replica,
test_volume)
@ -737,7 +737,7 @@ class EMCSMISISCSIDriverTestCase(test.TestCase):
def test_create_volume_clone_sync_failed(self):
self.driver.create_volume(test_volume)
self.assertRaises(exception.VolumeBackendAPIException,
self.assertRaises(exception.ShareBackendAPIException,
self.driver.create_cloned_volume,
failed_clone_sync,
test_volume)
@ -751,7 +751,7 @@ class EMCSMISISCSIDriverTestCase(test.TestCase):
def test_delete_volume_failed(self):
self.driver.create_volume(failed_delete_vol)
self.assertRaises(exception.VolumeBackendAPIException,
self.assertRaises(exception.ShareBackendAPIException,
self.driver.delete_volume,
failed_delete_vol)

View File

@ -183,7 +183,7 @@ class HuaweiVolumeTestCase(test.TestCase):
self._test_check_for_setup_errors()
def test_create_export_failed(self):
self.assertRaises(exception.VolumeBackendAPIException,
self.assertRaises(exception.ShareBackendAPIException,
self.driver.create_export,
{}, FakeVolume)
@ -191,7 +191,7 @@ class HuaweiVolumeTestCase(test.TestCase):
self._test_delete_volume()
def test_create_snapshot_failed(self):
self.assertRaises(exception.VolumeBackendAPIException,
self.assertRaises(exception.ShareBackendAPIException,
self.driver.create_snapshot,
FakeSnapshot)
@ -199,17 +199,17 @@ class HuaweiVolumeTestCase(test.TestCase):
self._test_delete_snapshot()
def test_create_luncopy_failed(self):
self.assertRaises(exception.VolumeBackendAPIException,
self.assertRaises(exception.ShareBackendAPIException,
self.driver.create_volume_from_snapshot,
FakeVolumeCopy, FakeSnapshot)
def test_initialize_failed(self):
self.assertRaises(exception.VolumeBackendAPIException,
self.assertRaises(exception.ShareBackendAPIException,
self.driver.initialize_connection,
FakeVolume, FakeConnector)
def test_terminate_connection_failed(self):
self.assertRaises(exception.VolumeBackendAPIException,
self.assertRaises(exception.ShareBackendAPIException,
self.driver.terminate_connection,
FakeVolume, FakeConnector)
@ -231,15 +231,15 @@ class HuaweiVolumeTestCase(test.TestCase):
self.driver._test_flg = 'check_for_Dorado2100G2'
self._test_check_for_setup_errors()
self._test_create_volume()
self.assertRaises(exception.VolumeBackendAPIException,
self.assertRaises(exception.ShareBackendAPIException,
self.driver.create_snapshot,
FakeSnapshot)
self.assertRaises(exception.VolumeBackendAPIException,
self.assertRaises(exception.ShareBackendAPIException,
self.driver.create_volume_from_snapshot,
FakeVolumeCopy, FakeSnapshot)
self._test_initialize_connection_for_Dorado2100G2()
self._test_terminate_connection()
self.assertRaises(exception.VolumeBackendAPIException,
self.assertRaises(exception.ShareBackendAPIException,
self.driver.delete_snapshot,
FakeSnapshot)
self._test_delete_volume()
@ -249,7 +249,7 @@ class HuaweiVolumeTestCase(test.TestCase):
self._test_check_for_setup_errors()
self._test_create_volume()
self._test_create_snapshot()
self.assertRaises(exception.VolumeBackendAPIException,
self.assertRaises(exception.ShareBackendAPIException,
self.driver.create_volume_from_snapshot,
FakeVolumeCopy, FakeSnapshot)
self._test_initialize_connection_for_Dorado5100()

View File

@ -28,7 +28,7 @@ import tempfile
from lxml import etree
from manila.exception import VolumeBackendAPIException
from manila.exception import ShareBackendAPIException
from manila.openstack.common import log as logging
from manila import test
from manila.volume import configuration as conf
@ -1061,7 +1061,7 @@ class NetAppDriverTestCase(test.TestCase):
self.driver.create_cloned_volume(volume_clone_fail,
volume_src)
raise AssertionError()
except VolumeBackendAPIException:
except ShareBackendAPIException:
pass
@ -1470,7 +1470,7 @@ class NetAppCmodeISCSIDriverTestCase(test.TestCase):
self.driver.create_volume_from_snapshot(self.volume,
self.snapshot_fail)
raise AssertionError()
except VolumeBackendAPIException:
except ShareBackendAPIException:
pass
finally:
self.driver.delete_volume(self.volume)
@ -1487,7 +1487,7 @@ class NetAppCmodeISCSIDriverTestCase(test.TestCase):
self.driver.create_cloned_volume(self.volume_clone_fail,
self.volume)
raise AssertionError()
except VolumeBackendAPIException:
except ShareBackendAPIException:
pass
finally:
self.driver.delete_volume(self.volume)
@ -1900,7 +1900,7 @@ class NetAppDirectCmodeISCSIDriverTestCase(NetAppCmodeISCSIDriverTestCase):
raise AssertionError('Target portal is none')
def test_fail_create_vol(self):
self.assertRaises(VolumeBackendAPIException,
self.assertRaises(ShareBackendAPIException,
self.driver.create_volume, self.vol_fail)
@ -2329,7 +2329,7 @@ class NetAppDirect7modeISCSIDriverTestCase_NV(
success = False
try:
self.driver.create_volume(self.volume)
except VolumeBackendAPIException:
except ShareBackendAPIException:
success = True
pass
finally:

View File

@ -117,19 +117,19 @@ class ScalityDriverTestCase(test.TestCase):
def test_setup_no_config(self):
"""Missing SOFS configuration shall raise an error."""
scality.FLAGS.scality_sofs_config = None
self.assertRaises(exception.VolumeBackendAPIException,
self.assertRaises(exception.ShareBackendAPIException,
self._driver.do_setup, None)
def test_setup_missing_config(self):
"""Non-existent SOFS configuration file shall raise an error."""
scality.FLAGS.scality_sofs_config = 'nonexistent.conf'
self.assertRaises(exception.VolumeBackendAPIException,
self.assertRaises(exception.ShareBackendAPIException,
self._driver.do_setup, None)
def test_setup_no_mount_helper(self):
"""SOFS must be installed to use the driver."""
self._set_access_wrapper(False)
self.assertRaises(exception.VolumeBackendAPIException,
self.assertRaises(exception.ShareBackendAPIException,
self._driver.do_setup, None)
def test_setup_make_voldir(self):

View File

@ -1319,16 +1319,16 @@ class StorwizeSVCDriverTestCase(test.TestCase):
# as well as receiving unexpected results from the storage
if self.USESIM:
self.sim.error_injection('lsnodecanister', 'header_mismatch')
self.assertRaises(exception.VolumeBackendAPIException,
self.assertRaises(exception.ShareBackendAPIException,
self.driver.do_setup, None)
self.sim.error_injection('lsnodecanister', 'remove_field')
self.assertRaises(exception.VolumeBackendAPIException,
self.assertRaises(exception.ShareBackendAPIException,
self.driver.do_setup, None)
self.sim.error_injection('lsportip', 'header_mismatch')
self.assertRaises(exception.VolumeBackendAPIException,
self.assertRaises(exception.ShareBackendAPIException,
self.driver.do_setup, None)
self.sim.error_injection('lsportip', 'remove_field')
self.assertRaises(exception.VolumeBackendAPIException,
self.assertRaises(exception.ShareBackendAPIException,
self.driver.do_setup, None)
# Check with bad parameters
@ -1497,7 +1497,7 @@ class StorwizeSVCDriverTestCase(test.TestCase):
# Try to create where source size != target size
vol2['size'] += 1
self.assertRaises(exception.VolumeBackendAPIException,
self.assertRaises(exception.ShareBackendAPIException,
self.driver.create_volume_from_snapshot,
vol2, snap1)
self._assert_vol_exists(vol2['name'], False)
@ -1511,7 +1511,7 @@ class StorwizeSVCDriverTestCase(test.TestCase):
# Try to clone where source size != target size
vol3['size'] += 1
self.assertRaises(exception.VolumeBackendAPIException,
self.assertRaises(exception.ShareBackendAPIException,
self.driver.create_cloned_volume,
vol3, vol2)
self._assert_vol_exists(vol3['name'], False)
@ -1709,7 +1709,7 @@ class StorwizeSVCDriverTestCase(test.TestCase):
if protocol == 'FC' and self.USESIM:
for error in ['remove_field', 'header_mismatch']:
self.sim.error_injection('lsfabric', error)
self.assertRaises(exception.VolumeBackendAPIException,
self.assertRaises(exception.ShareBackendAPIException,
self.driver.initialize_connection,
volume2, conn)
@ -1737,7 +1737,7 @@ class StorwizeSVCDriverTestCase(test.TestCase):
# Test no preferred node
if self.USESIM:
self.sim.error_injection('lsvdisk', 'no_pref_node')
self.assertRaises(exception.VolumeBackendAPIException,
self.assertRaises(exception.ShareBackendAPIException,
self.driver.initialize_connection,
volume1, conn)
@ -1752,7 +1752,7 @@ class StorwizeSVCDriverTestCase(test.TestCase):
conn_no_exist = conn.copy()
conn_no_exist['initiator'] = 'i_dont_exist'
conn_no_exist['wwpns'] = ['0000000000000000']
self.assertRaises(exception.VolumeBackendAPIException,
self.assertRaises(exception.ShareBackendAPIException,
self.driver.terminate_connection,
volume1,
conn_no_exist)

View File

@ -181,7 +181,7 @@ class XIVVolumeDriverTest(test.TestCase):
"""Vertify that the xiv_proxy validates volume pool space."""
self.driver.do_setup(None)
self.assertRaises(exception.VolumeBackendAPIException,
self.assertRaises(exception.ShareBackendAPIException,
self.driver.create_volume,
{'name': FAKE,
'id': 1,