HP3PAR_SAN_IP,
HP3PAR_USER_NAME,
HP3PAR_USER_PASS,
+ missing_key_policy='AutoAddPolicy',
privatekey=HP3PAR_SAN_SSH_PRIVATE,
+ known_hosts_file=mock.ANY,
port=HP3PAR_SAN_SSH_PORT,
conn_timeout=HP3PAR_SAN_SSH_CON_TIMEOUT)]
self.assertRaises(exception.InvalidInput,
self.setup_driver)
- @mock.patch('hp3parclient.version', "3.1.0")
- def test_ssh_options_310(self):
-
- self.ctxt = context.get_admin_context()
- mock_client = self.setup_mock_client(driver=hpfcdriver.HP3PARFCDriver)
- expected = [
- mock.call.getCPG(HP3PAR_CPG),
- mock.call.getCPG(HP3PAR_CPG2)]
- mock_client.assert_has_calls(
- self.standard_login +
- expected +
- self.standard_logout)
-
- @mock.patch('hp3parclient.version', "3.1.1")
+ @mock.patch('hp3parclient.version', "3.1.2")
def test_ssh_options(self):
expected_hosts_key_file = "test_hosts_key_file"
expected +
self.standard_logout)
- @mock.patch('hp3parclient.version', "3.1.1")
+ @mock.patch('hp3parclient.version', "3.1.2")
def test_ssh_options_strict(self):
expected_hosts_key_file = "test_hosts_key_file"
LOG = logging.getLogger(__name__)
-MIN_CLIENT_VERSION = '3.1.0'
-MIN_CLIENT_SSH_ARGS_VERSION = '3.1.1'
+MIN_CLIENT_VERSION = '3.1.2'
hp3par_opts = [
cfg.StrOpt('hp3par_api_url',
2.0.27 - Fixing manage source-id error bug #1357075
2.0.28 - Removing locks bug #1381190
2.0.29 - Report a limitless cpg's stats better bug #1398651
+ 2.0.30 - Update the minimum hp3parclient version bug #1402115
"""
- VERSION = "2.0.29"
+ VERSION = "2.0.30"
stats = {}
LOG.error(msg)
raise exception.InvalidInput(reason=msg)
- client_version = hp3parclient.version
-
- if client_version < MIN_CLIENT_SSH_ARGS_VERSION:
- self.client.setSSHOptions(
- self.config.san_ip,
- self.config.san_login,
- self.config.san_password,
- port=self.config.san_ssh_port,
- conn_timeout=self.config.ssh_conn_timeout,
- privatekey=self.config.san_private_key)
- else:
- known_hosts_file = CONF.ssh_hosts_key_file
- policy = "AutoAddPolicy"
- if CONF.strict_ssh_host_key_policy:
- policy = "RejectPolicy"
- self.client.setSSHOptions(
- self.config.san_ip,
- self.config.san_login,
- self.config.san_password,
- port=self.config.san_ssh_port,
- conn_timeout=self.config.ssh_conn_timeout,
- privatekey=self.config.san_private_key,
- missing_key_policy=policy,
- known_hosts_file=known_hosts_file)
+ known_hosts_file = CONF.ssh_hosts_key_file
+ policy = "AutoAddPolicy"
+ if CONF.strict_ssh_host_key_policy:
+ policy = "RejectPolicy"
+ self.client.setSSHOptions(
+ self.config.san_ip,
+ self.config.san_login,
+ self.config.san_password,
+ port=self.config.san_ssh_port,
+ conn_timeout=self.config.ssh_conn_timeout,
+ privatekey=self.config.san_private_key,
+ missing_key_policy=policy,
+ known_hosts_file=known_hosts_file)
def client_logout(self):
LOG.info(_LI("Disconnect from 3PAR REST and SSH %s") % self.uuid)