当前位置: 首页>>代码示例>>Python>>正文


Python Task.wait_for_response方法代码示例

本文整理汇总了Python中pulp_auto.task.Task.wait_for_response方法的典型用法代码示例。如果您正苦于以下问题:Python Task.wait_for_response方法的具体用法?Python Task.wait_for_response怎么用?Python Task.wait_for_response使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pulp_auto.task.Task的用法示例。


在下文中一共展示了Task.wait_for_response方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_10_repos_no_feed_cannot_be_synced

# 需要导入模块: from pulp_auto.task import Task [as 别名]
# 或者: from pulp_auto.task.Task import wait_for_response [as 别名]
 def test_10_repos_no_feed_cannot_be_synced(self):
     # check that repos without feed cannot be synced
     response = self.dest_repo2.sync(self.pulp)
     self.assertPulp(code=202)
     with self.assertRaises(TaskFailure):
         with self.pulp.asserting(True):
             Task.wait_for_response(self.pulp, response)
开发者ID:alexxa,项目名称:pulp-automation,代码行数:9,代码来源:test_12_puppet_repo_orphans_and_copy.py

示例2: tearDownClass

# 需要导入模块: from pulp_auto.task import Task [as 别名]
# 或者: from pulp_auto.task.Task import wait_for_response [as 别名]
 def tearDownClass(cls):
     with \
         cls.pulp.asserting(True), \
         cls.agent.catching(False), \
         cls.agent.running(cls.qpid_handle, frequency=10) \
     :
         Task.wait_for_response(cls.pulp, cls.repo.delete(cls.pulp))
         cls.consumer.delete(cls.pulp)
     super(ConsumerAgentPulpTest, cls).tearDownClass()
开发者ID:alexxa,项目名称:pulp-automation,代码行数:11,代码来源:pulp_test.py

示例3: test_07_no_unassociation_within_repo_with_feed

# 需要导入模块: from pulp_auto.task import Task [as 别名]
# 或者: from pulp_auto.task.Task import wait_for_response [as 别名]
 def test_07_no_unassociation_within_repo_with_feed(self):
     # repos with feed cannot delete partial content inside it
     response = self.source_repo.unassociate_units(
         self.pulp,
         data={"criteria": {"type_ids": ["puppet_module"], "filters": {"unit": {"name": "tomcat7_rhel"}}}}
     )
     self.assertPulp(code=202)
     with self.assertRaises(TaskFailure):
         Task.wait_for_response(self.pulp, response)
开发者ID:alexxa,项目名称:pulp-automation,代码行数:11,代码来源:test_12_puppet_repo_orphans_and_copy.py

示例4: setUpClass

# 需要导入模块: from pulp_auto.task import Task [as 别名]
# 或者: from pulp_auto.task.Task import wait_for_response [as 别名]
 def setUpClass(cls):
     super(CliConsumerTest, cls).setUpClass()
     consumer_config = ROLES.consumers[0]
     # create all repos
     with cls.pulp.asserting(True):
         cls.repos = [create_yum_repo(cls.pulp, **repo) for repo in consumer_config.repos if repo.type == 'rpm']
         for repo, _, distributor in cls.repos:
             Task.wait_for_response(cls.pulp, repo.sync(cls.pulp))
             Task.wait_for_response(cls.pulp, repo.publish(cls.pulp, data={'id': distributor.id}))
     cls.consumer_cli = Cli.ready_instance(**consumer_config)
     cls.consumer = Consumer(consumer_config)
开发者ID:alexxa,项目名称:pulp-automation,代码行数:13,代码来源:test_13_cli_consumer.py

示例5: test_06_assert_nonexisten_unit_install

# 需要导入模块: from pulp_auto.task import Task [as 别名]
# 或者: from pulp_auto.task.Task import wait_for_response [as 别名]
 def test_06_assert_nonexisten_unit_install(self):
     unit = {
         'name': '__NO_SUCH_UNIT__'
     }
     with self.assertRaises(TaskFailure):
         Task.wait_for_response(
             self.pulp,
             self.consumer.install_unit(
                 self.pulp,
                 unit,
                 'rpm'
             )
         )
开发者ID:alexxa,项目名称:pulp-automation,代码行数:15,代码来源:test_13_cli_consumer.py

示例6: test_02_bind_distributor

# 需要导入模块: from pulp_auto.task import Task [as 别名]
# 或者: from pulp_auto.task.Task import wait_for_response [as 别名]
    def test_02_bind_distributor(self):
        # assert binding distributor works
        # bind all repos
        with self.pulp.asserting(True):
            for repo, _, distributor in self.repos:
                binding_data = {
                    'repo_id': repo.id,
                    'distributor_id': distributor.id
                }
                Task.wait_for_response(self.pulp, self.consumer.bind_distributor(self.pulp, binding_data))

        # assert all bound repos are available on consumer
        rpm_repo_ids = set([repo.id for repo in RpmRepo.list(self.consumer_cli)])
        for repo, _, _ in self.repos:
            self.assertIn(repo.id, rpm_repo_ids)
开发者ID:alexxa,项目名称:pulp-automation,代码行数:17,代码来源:test_13_cli_consumer.py

示例7: test_04_assert_unit_install

# 需要导入模块: from pulp_auto.task import Task [as 别名]
# 或者: from pulp_auto.task.Task import wait_for_response [as 别名]
 def test_04_assert_unit_install(self):
     unit = {
         'name': 'zebra'
     }
     Task.wait_for_response(
         self.pulp,
         self.consumer.install_unit(
             self.pulp,
             unit,
             'rpm'
         )
     )
     self.assertIn(
         RpmUnit(unit, relevant_data_keys=unit.keys()),
         RpmUnit.list(self.consumer_cli)
     )
开发者ID:alexxa,项目名称:pulp-automation,代码行数:18,代码来源:test_13_cli_consumer.py

示例8: test_08_unbind_repos

# 需要导入模块: from pulp_auto.task import Task [as 别名]
# 或者: from pulp_auto.task.Task import wait_for_response [as 别名]
 def test_08_unbind_repos(self):
     # assert unbinding distributors works
     with self.pulp.asserting(True):
         for repo, _, distributor in self.repos:
             Task.wait_for_response(self.pulp, self.consumer.unbind_distributor(self.pulp, repo.id, distributor.id))
开发者ID:alexxa,项目名称:pulp-automation,代码行数:7,代码来源:test_13_cli_consumer.py

示例9: test_06_unbind_distributor

# 需要导入模块: from pulp_auto.task import Task [as 别名]
# 或者: from pulp_auto.task.Task import wait_for_response [as 别名]
 def test_06_unbind_distributor(self):
     with self.pulp.asserting(True):
         Task.wait_for_response(self.pulp, self.consumer.unbind_distributor(self.pulp, self.repo.id, self.distributor.id))
开发者ID:alexxa,项目名称:pulp-automation,代码行数:5,代码来源:test_9_consumer.py

示例10: test_02_bind_distributor

# 需要导入模块: from pulp_auto.task import Task [as 别名]
# 或者: from pulp_auto.task.Task import wait_for_response [as 别名]
 def test_02_bind_distributor(self):
     with self.pulp.asserting(True):
         Task.wait_for_response(self.pulp, self.consumer.bind_distributor(self.pulp, self.binding_data))
开发者ID:alexxa,项目名称:pulp-automation,代码行数:5,代码来源:test_9_consumer.py


注:本文中的pulp_auto.task.Task.wait_for_response方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。