# under the License.
"""
-Fake VMEM XG-Tools client for testing drivers. Inspired by
-cinder/tests/fake_hp_3par_client.py.
+Fake VMEM REST client for testing drivers.
"""
import sys
vmemclient = mock.Mock()
vmemclient.__version__ = "unknown"
-sys.modules['vxg'] = vmemclient
+sys.modules['vmemclient'] = vmemclient
mock_client_conf = [
'basic',
from cinder import exception
from cinder import test
-from cinder.tests import fake_vmem_xgtools_client as vxg
+from cinder.tests import fake_vmem_client as vmemclient
from cinder.volume import configuration as conf
from cinder.volume.drivers.violin import v6000_common
config.container = 'myContainer'
return config
- @mock.patch('vxg.open')
+ @mock.patch('vmemclient.open')
def setup_mock_client(self, _m_client, m_conf=None):
"""Create a fake backend communication factory.
- The xg-tools creates a VShare connection object (for V6000
- devices) and returns it for use on a call to vxg.open().
+ The vmemclient creates a VShare connection object (for V6000
+ devices) and returns it for use on a call to vmemclient.open().
"""
# configure the vshare object mock with defaults
_m_vshare = mock.Mock(name='VShare',
version='1.1.1',
- spec=vxg.mock_client_conf)
+ spec=vmemclient.mock_client_conf)
# if m_conf, clobber the defaults with it
if m_conf:
_m_vshare.configure_mock(**m_conf)
- # set calls to vxg.open() to return this mocked vshare object
+ # set calls to vmemclient.open() to return this mocked vshare object
_m_client.return_value = _m_vshare
return _m_client
"""Create a fake VShare communication object."""
_m_vshare = mock.Mock(name='VShare',
version='1.1.1',
- spec=vxg.mock_client_conf)
+ spec=vmemclient.mock_client_conf)
if m_conf:
_m_vshare.configure_mock(**m_conf)
from cinder.db.sqlalchemy import models
from cinder import exception
from cinder import test
-from cinder.tests import fake_vmem_xgtools_client as vxg
+from cinder.tests import fake_vmem_client as vmemclient
from cinder.volume import configuration as conf
from cinder.volume.drivers.violin import v6000_common
from cinder.volume.drivers.violin import v6000_fcp
"""Create a fake VShare communication object."""
_m_vshare = mock.Mock(name='VShare',
version='1.1.1',
- spec=vxg.mock_client_conf)
+ spec=vmemclient.mock_client_conf)
if m_conf:
_m_vshare.configure_mock(**m_conf)
from cinder.db.sqlalchemy import models
from cinder import exception
from cinder import test
-from cinder.tests import fake_vmem_xgtools_client as vxg
+from cinder.tests import fake_vmem_client as vmemclient
from cinder.volume import configuration as conf
from cinder.volume.drivers.violin import v6000_common
from cinder.volume.drivers.violin import v6000_iscsi
"""Create a fake VShare communication object."""
_m_vshare = mock.Mock(name='VShare',
version='1.1.1',
- spec=vxg.mock_client_conf)
+ spec=vmemclient.mock_client_conf)
if m_conf:
_m_vshare.configure_mock(**m_conf)
V6000 series flash arrays.
Backend array communication is handled via VMEM's python library
-called 'xg-tools'.
+called 'vmemclient'.
NOTE: this driver file requires the use of synchronization points for
certain types of backend operations, and as a result may not work
LOG = logging.getLogger(__name__)
-vxg = importutils.try_import("vxg")
-if vxg:
- LOG.info(_LI("Running with xg-tools version: %s."), vxg.__version__)
+vmemclient = importutils.try_import("vmemclient")
+if vmemclient:
+ LOG.info(_LI("Running with vmemclient version: %s."),
+ vmemclient.__version__)
# version vmos versions V6.3.0.4 or newer
VMOS_SUPPORTED_VERSION_PATTERNS = ['V6.3.0.[4-9]', 'V6.3.[1-9].?[0-9]?']
reason=_('Global timeout option \'request_timeout\' must be '
'greater than 0'))
- self.vip = vxg.open(self.config.san_ip, self.config.san_login,
- self.config.san_password, keepalive=True)
- self.mga = vxg.open(self.config.gateway_mga, self.config.san_login,
- self.config.san_password, keepalive=True)
- self.mgb = vxg.open(self.config.gateway_mgb, self.config.san_login,
- self.config.san_password, keepalive=True)
+ self.vip = vmemclient.open(self.config.san_ip,
+ self.config.san_login,
+ self.config.san_password, keepalive=True)
+ self.mga = vmemclient.open(self.config.gateway_mga,
+ self.config.san_login,
+ self.config.san_password, keepalive=True)
+ self.mgb = vmemclient.open(self.config.gateway_mgb,
+ self.config.san_login,
+ self.config.san_password, keepalive=True)
ret_dict = self.vip.basic.get_node_values(
"/vshare/state/local/container/*")
This driver requires VMOS v6.3.0.4 or newer software on the array.
-You will need to install the python xg-tools client:
-sudo pip install xg-tools
+You will need to install the Violin Memory REST client library:
+sudo pip install vmemclient
Set the following in the cinder.conf file to enable the VMEM V6000
Fibre Channel Driver along with the required flags:
This driver requires VMOS v6.3.0.4 or newer software on the array.
-You will need to install the python xg-tools client:
-sudo pip install xg-tools
+You will need to install the Violin Memory REST client library:
+sudo pip install vmemclient
Set the following in the cinder.conf file to enable the VMEM V6000
ISCSI Driver along with the required flags: