'Does validity checks for storage system registry and health.'

def _check_mode_get_or_register_storage_system(self):

    def _resolve_host(host):
        try:
            ip = na_utils.resolve_hostname(host)
            return ip
        except socket.gaierror as e:
            LOG.error('Error    resolving    host    %(host)s.    Error    -    %(e)s.', {'host': host, 'e': e})
            raise exception.NoValidBackend((_("Controller    IP    '%(host)s'    could    not    be    resolved:    %(e)s.") % {'host': host, 'e': e}))
    ips = self.configuration.netapp_controller_ips
    ips = [i.strip() for i in ips.split(',')]
    ips = [x for x in ips if _resolve_host(x)]
    host = na_utils.resolve_hostname(self.configuration.netapp_server_hostname)
    if (host in ips):
        LOG.info('Embedded    mode    detected.')
        system = self._client.list_storage_systems()[0]
    else:
        LOG.info('Proxy    mode    detected.')
        system = self._client.register_storage_system(ips, password=self.configuration.netapp_sa_password)
    self._client.set_system_id(system.get('id'))
    self._client._init_features()
