def setup_fakes(self):
self.stubs.Set(hpdriver.hpcommon.HP3PARCommon, "_create_client",
self.fake_create_client)
+ self.stubs.Set(hpdriver.hpcommon.HP3PARCommon, "_set_connections",
+ self.fake_set_connections)
self.stubs.Set(hpdriver.hpcommon.HP3PARCommon, "_get_3par_host",
self.fake_get_3par_host)
self.stubs.Set(hpdriver.hpcommon.HP3PARCommon, "_delete_3par_host",
def fake_create_client(self):
return FakeHP3ParClient(self.driver.configuration.hp3par_api_url)
+ def fake_set_connections(self):
+ return
+
def fake_get_cpg(self, volume):
return HP3PAR_CPG
self.stubs.Set(hpdriver.hpcommon.HP3PARCommon, "_create_client",
self.fake_create_client)
+ self.stubs.Set(hpdriver.hpcommon.HP3PARCommon, "_set_connections",
+ self.fake_set_connections)
self.driver.do_setup(None)
def fake_create_3par_fibrechan_host(self, hostname, wwn,
self.stubs.Set(hpdriver.hpcommon.HP3PARCommon, "get_ports",
self.fake_get_ports)
+ self.stubs.Set(hpdriver.hpcommon.HP3PARCommon, "_set_connections",
+ self.fake_set_connections)
self.driver.do_setup(None)
def fake_create_3par_iscsi_host(self, hostname, iscsi_iqn,
try:
# make sure the default CPG exists
self.validate_cpg(self.config.hp3par_cpg)
+ self._set_connections()
finally:
self.client_logout()
LOG.error(err)
raise exception.InvalidInput(reason=err)
+ def _set_connections(self):
+ """Set the number of concurrent connections.
+
+ The 3PAR WS API server has a limit of concurrent connections.
+ This is setting the number to the highest allowed, 15 connections.
+ """
+ self._cli_run("setwsapi -sru high", None)
+
def get_domain(self, cpg_name):
try:
cpg = self.client.getCPG(cpg_name)