本文整理汇总了Python中pulp_auto.units.Orphans.info方法的典型用法代码示例。如果您正苦于以下问题:Python Orphans.info方法的具体用法?Python Orphans.info怎么用?Python Orphans.info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pulp_auto.units.Orphans
的用法示例。
在下文中一共展示了Orphans.info方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_02_delete_single_orphan
# 需要导入模块: from pulp_auto.units import Orphans [as 别名]
# 或者: from pulp_auto.units.Orphans import info [as 别名]
def test_02_delete_single_orphan(self):
old_info = Orphans.info(self.pulp)
rpm_orphans = RpmOrphan.list(self.pulp)
assert rpm_orphans, "No orphans found; there might be other 'Zoo' repos in %s" % self.pulp
rpm_orphans[0].delete(self.pulp)
del rpm_orphans[0]
self.assertPulpOK()
new_info = Orphans.info(self.pulp)
self.assertEqual(old_info['rpm']['count'], new_info['rpm']['count'] + 1)
self.assertEqual(
sorted(map(lambda x: x.data['name'], rpm_orphans)),
sorted(map(lambda x: x.data['name'], RpmOrphan.list(self.pulp)))
)
示例2: test_03_delete_orphans
# 需要导入模块: from pulp_auto.units import Orphans [as 别名]
# 或者: from pulp_auto.units.Orphans import info [as 别名]
def test_03_delete_orphans(self):
delete_response = Orphans.delete(self.pulp)
self.assertPulpOK()
Task.wait_for_report(self.pulp, delete_response)
info = Orphans.info(self.pulp)
orphans = Orphans.get(self.pulp)
self.assertPulpOK()
for orphan_type_name in info.keys():
self.assertEqual(len(orphans[orphan_type_name]), info[orphan_type_name]['count'])
self.assertEqual(orphans[orphan_type_name], [])
示例3: test_10_check_orphan_appears
# 需要导入模块: from pulp_auto.units import Orphans [as 别名]
# 或者: from pulp_auto.units.Orphans import info [as 别名]
def test_10_check_orphan_appears(self):
# unasosciate same module that was unassocited in dest_repo1
response = self.dest_repo2.unassociate_units(
self.pulp, data={"criteria": {"type_ids": ["puppet_module"], "filters": {"unit": {"name": "tomcat7_rhel"}}}}
)
self.assertPulp(code=202)
Task.wait_for_report(self.pulp, response)
# check 1 orphan appeared
orphan_info = Orphans.info(self.pulp)
self.assertEqual(orphan_info["puppet_module"]["count"], 1)
示例4: test_01_orphan_info_data_integrity
# 需要导入模块: from pulp_auto.units import Orphans [as 别名]
# 或者: from pulp_auto.units.Orphans import info [as 别名]
def test_01_orphan_info_data_integrity(self):
info = Orphans.info(self.pulp)
orphans = Orphans.get(self.pulp)
self.assertPulpOK()
for orphan_type_name in orphans.keys():
# reported count info is the same as the orphans counted
self.assertEqual(len(orphans[orphan_type_name]), info[orphan_type_name]['count'])
orphan_type = UnitFactory.type_map.orphans[orphan_type_name]
# '_href' is correct
self.assertEqual(pulp_auto.path_join(pulp_auto.path, orphan_type.path), info[orphan_type_name]['_href'])
# all orphans are of the same type
for orphan in orphans[orphan_type_name]:
self.assertTrue(isinstance(orphan, orphan_type), "different type: %s, %s" % (orphan_type_name, orphan.type_id))
示例5: test_09_check_orphan_appears
# 需要导入模块: from pulp_auto.units import Orphans [as 别名]
# 或者: from pulp_auto.units.Orphans import info [as 别名]
def test_09_check_orphan_appears(self):
#delete source repo
self.source_repo.delete(self.pulp)
self.assertPulpOK()
#unasosciate same module that was unassocited in dest_repo1
response = self.dest_repo2.unassociate_units(
self.pulp,
data={"criteria": {"type_ids": ["iso"], "filters": {"unit": {"name": "test.iso"}}}}
)
self.assertPulp(code=202)
Task.wait_for_report(self.pulp, response)
#check 1 orphan appeared
orphan_info = Orphans.info(self.pulp)
self.assertEqual(orphan_info['iso']['count'], 1)
示例6: test_09_check_orphan_appears
# 需要导入模块: from pulp_auto.units import Orphans [as 别名]
# 或者: from pulp_auto.units.Orphans import info [as 别名]
def test_09_check_orphan_appears(self):
#delete source repo
self.source_repo.delete(self.pulp)
self.assertPulpOK()
#unasosciate same module that was unassocited in dest_repo1
response = self.dest_repo2.unassociate_units(
self.pulp,
data={"criteria": {"type_ids": ["puppet_module"], "filters": {"unit": {"name": "tomcat7_rhel"}}}}
)
self.assertPulp(code=202)
task = Task.from_response(response)
task.wait(self.pulp)
#check 1 orphan appeared
orphan_info = Orphans.info(self.pulp)
self.assertEqual(orphan_info['puppet_module']['count'], 1)
示例7: test_08_check_no_orphan_appeared
# 需要导入模块: from pulp_auto.units import Orphans [as 别名]
# 或者: from pulp_auto.units.Orphans import info [as 别名]
def test_08_check_no_orphan_appeared(self):
#check that after unassociation of module it did not appered among orphans as it is still referenced to other repo
orphans = Orphans.get(self.pulp)
self.assertEqual(orphans['iso'], [])
orphan_info = Orphans.info(self.pulp)
self.assertEqual(orphan_info['iso']['count'], 0)
示例8: test_13_check_deleted_orphans
# 需要导入模块: from pulp_auto.units import Orphans [as 别名]
# 或者: from pulp_auto.units.Orphans import info [as 别名]
def test_13_check_deleted_orphans(self):
# check that all puppet_module orphans were successfully deleted
orphans = Orphans.get(self.pulp)
self.assertEqual(orphans['iso'], [])
orphan_info = Orphans.info(self.pulp)
self.assertEqual(orphan_info['iso']['count'], 0)
示例9: test_01_view_orphaned_content_by_type
# 需要导入模块: from pulp_auto.units import Orphans [as 别名]
# 或者: from pulp_auto.units.Orphans import info [as 别名]
def test_01_view_orphaned_content_by_type(self):
rpm_orphans = RpmOrphan.list(self.pulp)
self.assertPulpOK()
all_orphans = Orphans.info(self.pulp)
self.assertEqual(len(rpm_orphans), all_orphans['rpm']['count'])
示例10: test_00_view_all_orphaned_content
# 需要导入模块: from pulp_auto.units import Orphans [as 别名]
# 或者: from pulp_auto.units.Orphans import info [as 别名]
def test_00_view_all_orphaned_content(self):
Orphans.info(self.pulp)
self.assertPulpOK()
示例11: test_00_get_orphan_info
# 需要导入模块: from pulp_auto.units import Orphans [as 别名]
# 或者: from pulp_auto.units.Orphans import info [as 别名]
def test_00_get_orphan_info(self):
Orphans.info(self.pulp)
self.assertPulpOK()