'Creates the SCApi object.
:return: SCApi object.
:raises VolumeBackendAPIException:'

def open_connection(self):

    connection = None
    LOG.info('open_connection    to    %(ssn)s    at    %(ip)s', {'ssn': self.primaryssn, 'ip': self.config.san_ip})
    if self.primaryssn:
        try:
            'Open    connection    to    REST    API.'
            connection = self._setup_connection()
        except Exception:
            if self._swap_credentials():
                connection = self._setup_connection()
            else:
                with excutils.save_and_reraise_exception():
                    LOG.error('Failed    to    connect    to    the    API.    No    backup    DSM    provided.')
        if (self.apiversion != connection.apiversion):
            LOG.info('open_connection:    Updating    API    version    to    %s', connection.apiversion)
            self.apiversion = connection.apiversion
    else:
        raise exception.VolumeBackendAPIException(data=_('Configuration    error:    dell_sc_ssn    not    set.'))
    return connection
