예제 #1
0
    def test_patch_adapter_common(self):
        self.configuration = conf.Configuration(None)
        utils.init_ops(self.configuration)
        self.configuration.san_ip = '192.168.1.1'
        self.configuration.storage_vnx_authentication_type = 'global'
        self.configuration.storage_vnx_pool_names = 'pool1,unit_test_pool'

        @res_mock.patch_common_adapter
        def test_patch_common_adapter_inner(self, patched_adapter, mocked):
            pool = patched_adapter.client.vnx.get_pool()
            self.assertEqual('pool_name', pool.name)

        test_patch_common_adapter_inner(self)
예제 #2
0
    def test_patch_adapter_common(self):
        self.configuration = conf.Configuration(None)
        utils.init_ops(self.configuration)
        self.configuration.san_ip = '192.168.1.1'
        self.configuration.storage_vnx_authentication_type = 'global'
        self.configuration.storage_vnx_pool_names = 'pool1,unit_test_pool'

        @res_mock.patch_common_adapter
        def test_patch_common_adapter_inner(self, patched_adapter, mocked):
            pool = patched_adapter.client.vnx.get_pool()
            self.assertEqual('pool_name', pool.name)

        test_patch_common_adapter_inner(self)
예제 #3
0
 def __init__(self, *args, **kwargs):
     super(EMCVNXDriver, self).__init__(*args, **kwargs)
     utils.init_ops(self.configuration)
     self.protocol = self.configuration.storage_protocol.lower()
     self.active_backend_id = kwargs.get('active_backend_id', None)
     self.adapter = None
예제 #4
0
파일: driver.py 프로젝트: C2python/cinder
 def __init__(self, *args, **kwargs):
     super(EMCVNXDriver, self).__init__(*args, **kwargs)
     utils.init_ops(self.configuration)
     self.protocol = self.configuration.storage_protocol.lower()
     self.active_backend_id = kwargs.get('active_backend_id', None)
     self.adapter = None