The 3PAR backend does not allow FQDN host names (i.e. foo.rose.hp.com),
instead it requires just foo without the rose.hp.com. This patch will
now validate the host name in terminate connection by calling
_safe_host just as it was doing in initialize connection when creating
the host on the 3PAR backend.
Change-Id: I52e90938c782473edc93f30672a0530ab5934edc
Fixes: bug 1214994
def terminate_connection(self, volume, connector, **kwargs):
"""Driver entry point to unattach a volume from an instance."""
self.common.client_login()
- self.common.terminate_connection(volume,
- connector['host'],
+ hostname = self.common._safe_hostname(connector['host'])
+ self.common.terminate_connection(volume, hostname,
connector['wwpns'])
self.common.client_logout()
def terminate_connection(self, volume, connector, **kwargs):
"""Driver entry point to unattach a volume from an instance."""
self.common.client_login()
- self.common.terminate_connection(volume,
- connector['host'],
+ hostname = self.common._safe_hostname(connector['host'])
+ self.common.terminate_connection(volume, hostname,
connector['initiator'])
self.common.client_logout()