Exemple #1
0
    def __init__(self, from_ip, uuid):
        """
        @param from_ip: IP address of inventory source 
        @type from_ip: string

        @param uuid: Host UUID
        @type uuid: string

        """
        # Test to resolve the inventory source
  
        if not InventoryUtils.is_comming_from_pxe(from_ip) :

            logging.getLogger().info("<scheduler> : Start")
            self.uuid = uuid
            mmc = MMCProxy()
            if not mmc.failure :
                self.proxy = mmc.proxy
                self.dispatch_msc()
            else :
                logging.getLogger().warn("<scheduler> : Building the mmc proxy failed")
                logging.getLogger().warn("<scheduler> : Exit the scheduler trigger")
            logging.getLogger().info("<scheduler> : Return to inventory")

        else :

            logging.getLogger().info("<scheduler> : Incoming from PXE : ignore")
Exemple #2
0
    def check_target(self):
        if InventoryUtils.is_coming_from_pxe(self.xml):
            logger.info("<Inventory2Scheduler> Ignoring inventory for %s received (Minimal PXE inventory)" % self.uuid)
            return

        if self.proxy.msc.is_pull_target(self.uuid):
            logger.info("<Inventory2Scheduler> Ignoring inventory for %s received (Client is in Pull mode)" % self.uuid)
            return

        logger.info("<Inventory2Scheduler> Valid inventory for %s received" % self.uuid)
        self.dispatch_msc()
Exemple #3
0
    def check_target(self):
        if InventoryUtils.is_coming_from_pxe(self.xml):
            logger.info("<scheduler> : Incoming from PXE : ignore")
            return

        if self.proxy.msc.is_pull_target(self.uuid):
            logger.info("<scheduler> : Pull Client inventory : ignore")
            return

        logger.info("<scheduler> : Start")
        self.dispatch_msc()