'Driver initialization'

def do_setup(self, context):

    if (infinisdk is None):
        msg = _("Missing    'infinisdk'    python    module,    ensure    the    library    is    installed    and    available.")
        raise exception.VolumeDriverException(message=msg)
    auth = (self.configuration.san_login, self.configuration.san_password)
    self.management_address = self.configuration.san_ip
    self._system = infinisdk.InfiniBox(self.management_address, auth=auth)
    self._system.login()
    backend_name = self.configuration.safe_get('volume_backend_name')
    self._backend_name = (backend_name or self.__class__.__name__)
    self._volume_stats = None
    if (self.configuration.infinidat_storage_protocol.lower() == 'iscsi'):
        self._protocol = 'iSCSI'
        if (len(self.configuration.infinidat_iscsi_netspaces) == 0):
            msg = _('No    iSCSI    network    spaces    configured')
            raise exception.VolumeDriverException(message=msg)
    else:
        self._protocol = 'FC'
    if (self.configuration.infinidat_use_compression and (not self._system.compat.has_compression())):
        msg = _('InfiniBox    system    does    not    support    volume    compression.\nCompression    is    available    on    InfiniBox    3.0    onward.\nPlease    disable    volume    compression    by    setting    infinidat_use_compression    to    False    in    the    Cinder    configuration    file.')
        raise exception.VolumeDriverException(message=msg)
    LOG.debug('setup    complete')
