insights/client/connection.py
def unregister(self):
        """
        Unregister this system from the insights service
        """
        if self.config.legacy_upload:
            return self._legacy_unregister()

        results = self._fetch_system_by_machine_id()
        try:
            logger.debug("Unregistering host...")
            url = self.api_url + "/inventory/v1/hosts/" + results[0]['id']
            net_logger.info("DELETE %s", url)
            response = self.session.delete(url)
            response.raise_for_status()
            logger.info(
                "Successfully unregistered from the Red Hat Insights Service")
            return True
        except (requests.ConnectionError, requests.Timeout, requests.HTTPError) as e:
            logger.debug(e)
            logger.error("Could not unregister this system")
            return False

        Unregister this system from the insights service
        
Unregister this system from the insights service
Unregister this system from the insights service
def unregister(self):
        if self.config.legacy_upload:
            return self._legacy_unregister()
        results = self._fetch_system_by_machine_id()
        try:
            logger.debug("Unregistering host...")
            url = self.api_url + "/inventory/v1/hosts/" + results[0]['id']
            net_logger.info("DELETE %s", url)
            response = self.session.delete(url)
            response.raise_for_status()
            logger.info(
                "Successfully unregistered from the Red Hat Insights Service")
            return True
        except (requests.ConnectionError, requests.Timeout, requests.HTTPError) as e:
            logger.debug(e)
            logger.error("Could not unregister this system")
            return False
def unregister ( self ) : if self . config . legacy_upload : return self . _legacy_unregister ( ) results = self . _fetch_system_by_machine_id ( ) try : logger . debug ( "Unregistering host..." ) url = self . api_url + "/inventory/v1/hosts/" + results [ 0 ] [ 'id' ] net_logger . info ( "DELETE %s" , url ) response = self . session . delete ( url ) response . raise_for_status ( ) logger . info ( "Successfully unregistered from the Red Hat Insights Service" ) return True except ( requests . ConnectionError , requests . Timeout , requests . HTTPError ) as e : logger . debug ( e ) logger . error ( "Could not unregister this system" ) return False
Unregister this system from the insights service
Unregister this system from the insights service
"""
        Unregister this system from the insights service
        """
self