예제 #1
0
 def setUp(self):
     # backup
     back_os_path_exists = os.path.exists
     self.addCleanup(self._restore, back_os_path_exists)
     super(EMCVNXCLIDriverISCSITestCase, self).setUp()
     self.configuration = conf.Configuration(None)
     self.configuration.append_config_values = mock.Mock(return_value=0)
     self.configuration.naviseccli_path = '/opt/Navisphere/bin/naviseccli'
     self.configuration.san_ip = '10.0.0.1'
     self.configuration.storage_vnx_pool_name = 'unit_test_pool'
     self.configuration.san_login = '******'
     self.configuration.san_password = '******'
     self.configuration.default_timeout = 0
     self.testData = EMCVNXCLIDriverTestData()
     self.navisecclicmd = '/opt/Navisphere/bin/naviseccli ' + \
         '-address 10.0.0.1 -user sysadmin -password sysadmin -scope 0 '
     os.path.exists = mock.Mock(return_value=1)
     EMCVnxCli._cli_execute = mock.Mock(side_effect=self._fake_cli_executor)
     self.driver = EMCCLIISCSIDriver(configuration=self.configuration)
     self.driver.cli.wait_interval = 0