'Build 3PAR client config dictionary.
self._client_conf will contain values from self.config if the volume
is located on the primary array in order to properly contact it. If
the volume has been failed over and therefore on a secondary array,
self._client_conf will contain values on how to contact that array.
The only time we will return with entries from a secondary array is
with unmanaged replication.'

def _build_3par_config(self, conf=None):

    if conf:
        self._client_conf['hpe3par_cpg'] = self._generate_hpe3par_cpgs(conf.get('cpg_map'))
        self._client_conf['hpe3par_username'] = conf.get('hpe3par_username')
        self._client_conf['hpe3par_password'] = conf.get('hpe3par_password')
        self._client_conf['san_ip'] = conf.get('san_ip')
        self._client_conf['san_login'] = conf.get('san_login')
        self._client_conf['san_password'] = conf.get('san_password')
        self._client_conf['san_ssh_port'] = conf.get('san_ssh_port')
        self._client_conf['ssh_conn_timeout'] = conf.get('ssh_conn_timeout')
        self._client_conf['san_private_key'] = conf.get('san_private_key')
        self._client_conf['hpe3par_api_url'] = conf.get('hpe3par_api_url')
        self._client_conf['hpe3par_iscsi_ips'] = conf.get('hpe3par_iscsi_ips')
        self._client_conf['hpe3par_iscsi_chap_enabled'] = conf.get('hpe3par_iscsi_chap_enabled')
        self._client_conf['iscsi_ip_address'] = conf.get('iscsi_ip_address')
        self._client_conf['iscsi_port'] = conf.get('iscsi_port')
    else:
        self._client_conf['hpe3par_cpg'] = self.config.hpe3par_cpg
        self._client_conf['hpe3par_username'] = self.config.hpe3par_username
        self._client_conf['hpe3par_password'] = self.config.hpe3par_password
        self._client_conf['san_ip'] = self.config.san_ip
        self._client_conf['san_login'] = self.config.san_login
        self._client_conf['san_password'] = self.config.san_password
        self._client_conf['san_ssh_port'] = self.config.san_ssh_port
        self._client_conf['ssh_conn_timeout'] = self.config.ssh_conn_timeout
        self._client_conf['san_private_key'] = self.config.san_private_key
        self._client_conf['hpe3par_api_url'] = self.config.hpe3par_api_url
        self._client_conf['hpe3par_iscsi_ips'] = self.config.hpe3par_iscsi_ips
        self._client_conf['hpe3par_iscsi_chap_enabled'] = self.config.hpe3par_iscsi_chap_enabled
        self._client_conf['iscsi_ip_address'] = self.config.iscsi_ip_address
        self._client_conf['iscsi_port'] = self.config.iscsi_port
