Пример #1
0
    def checkJobStatus(self, config, job_id):
        manager = SubscriptionManager(self.logger, self.options, self.addJob)
        result, state = manager.checkJobStatus(config, job_id)

        if state == 'FINISHED':
            self.logger.info(
                "virt-who host/guest association update successful")
Пример #2
0
    def setUpClass(cls, rhsmcert, rhsmconfig):
        super(TestSubscriptionManager, cls).setUpClass()
        config = Config('test', 'libvirt')
        cls.tempdir = tempfile.mkdtemp()
        with open(os.path.join(cls.tempdir, 'cert.pem'), 'w') as f:
            f.write("\n")

        rhsmcert.return_value.subject = {'CN': 123}
        rhsmconfig.return_value.get.side_effect = lambda group, key: {
            'consumerCertDir': cls.tempdir
        }.get(key, DEFAULT)
        cls.sm = SubscriptionManager(cls.logger, config)
        cls.sm.cert_uuid = 123
Пример #3
0
    def checkJobStatus(self, config, job_id):
        manager = SubscriptionManager(self.logger, self.options, self.addJob)
        result, state = manager.checkJobStatus(config, job_id)

        if state == 'FINISHED':
            self.logger.info("virt-who host/guest association update successful")
Пример #4
0
    def checkJobStatus(self, config, job_id):
        manager = SubscriptionManager(self.logger, self.options, self.addJob)
        result = manager.checkJobStatus(config, job_id)

        if not result["failedUpdate"]:
            self.logger.info("virt-who host/guest association update successful")