本文整理汇总了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)
示例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()
示例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)
示例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)
示例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'
)
)
示例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)
示例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)
)
示例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))
示例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))
示例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))