'Connect ssl client.'

@proxy._trace_time
def setup(self, context):

    LOG.info("Setting    up    connection    to    %(title)s...\nActive    backend_id:    '%(id)s'.", {'title': strings.TITLE, 'id': self.active_backend_id})
    self.ibm_storage_cli = self._init_xcli(self.active_backend_id)
    if (self._get_connection_type() == storage.XIV_CONNECTION_TYPE_ISCSI):
        self.meta['ibm_storage_iqn'] = self._call_xiv_xcli('config_get').as_dict('name')['iscsi_name'].value
        portals = storage.get_online_iscsi_ports(self.ibm_storage_cli)
        if (len(portals) == 0):
            msg = (SETUP_BASE_ERROR, {'title': strings.TITLE, 'details': 'No    iSCSI    portals    available    on    the    Storage.'})
            raise self._get_exception()((_('%(prefix)s    %(portals)s') % {'prefix': storage.XIV_LOG_PREFIX, 'portals': msg}))
        self.meta['ibm_storage_portal'] = ('%s:3260' % portals[:1][0])
    remote_id = self._get_secondary_backend_id()
    if remote_id:
        self.ibm_storage_remote_cli = self._init_xcli(remote_id)
    self._event_service_start()
    self._update_stats()
    LOG.info('IBM    Storage    %(common_ver)s    xiv_proxy    %(proxy_ver)s.    ', {'common_ver': self.full_version, 'proxy_ver': self.full_version})
    self._update_system_id()
    if remote_id:
        self._update_active_schedule_objects()
        self._update_remote_schedule_objects()
    LOG.info('Connection    to    the    IBM    storage    system    established    successfully.')
