'Helps to terminate the connection.
To share common codes with terminate_connection_snapshot.
:param volume: `common.Volume` object with volume information.
:param connector: connector information from Nova.'

def _terminate_connection(self, volume, connector):

    host = self.build_host(connector)
    sg = self.client.get_storage_group(host.name)
    self.remove_host_access(volume, host, sg)
    self.update_storage_group_if_required(sg)
    re = self.build_terminate_connection_return_data(host, sg)
    self.terminate_connection_cleanup(host, sg)
    return re
