• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python units.Orphans类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中pulp_auto.units.Orphans的典型用法代码示例。如果您正苦于以下问题:Python Orphans类的具体用法?Python Orphans怎么用?Python Orphans使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: test_03_delete_orphans

 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], [])
开发者ID:CUXIDUMDUM,项目名称:pulp-automation,代码行数:10,代码来源:test_10_orphans.py


示例2: test_01_orphan_info_data_integrity

 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))
开发者ID:CUXIDUMDUM,项目名称:pulp-automation,代码行数:13,代码来源:test_10_orphans.py


示例3: test_02_delete_single_orphan

 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)))
     )
开发者ID:jeremycline,项目名称:pulp-automation,代码行数:13,代码来源:test_10_orphans.py


示例4: tearDownClass

 def tearDownClass(cls):
     for repo_id in ['SimpleRepoCopyTest_repo', 'SimpleRepoCopyTest_copy', 'SimpleRepoCopyTest_copy1']:
         Repo({'id': repo_id}).delete(cls.pulp)
     #orphans also should be deleted in cleanup
     delete_response = Orphans.delete(cls.pulp)
     delete_task = Task.from_response(delete_response)
     delete_task.wait(cls.pulp)
开发者ID:alexxa,项目名称:pulp-automation,代码行数:7,代码来源:test_12_yum_repo_copy.py


示例5: tearDownClass

 def tearDownClass(cls):
     with \
         cls.pulp.asserting(True), \
         cls.agent.catching(False), \
         cls.agent.running(cls.qpid_handle, frequency=10) \
     :
         Task.wait_for_report(cls.pulp, cls.repo.delete(cls.pulp))
         Task.wait_for_report(cls.pulp, Orphans.delete(cls.pulp))
         cls.consumer.delete(cls.pulp)
     super(ConsumerAgentPulpTest, cls).tearDownClass()
开发者ID:CUXIDUMDUM,项目名称:pulp-automation,代码行数:10,代码来源:pulp_test.py


示例6: test_10_check_orphan_appears

 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)
开发者ID:preethit,项目名称:pulp-automation,代码行数:10,代码来源:test_12_puppet_repo_orphans_and_copy.py


示例7: test_09_check_orphan_appears

 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)
开发者ID:lenfree,项目名称:pulp-automation,代码行数:14,代码来源:test_17_iso_repo_orphans_and_copy.py


示例8: tearDownClass

    def tearDownClass(cls):
        # delete repo
        with cls.pulp.asserting(True):
            response = cls.repo.delete(cls.pulp)
        Task.wait_for_report(cls.pulp, response)
        
        # delete orphans
        with cls.pulp.asserting(True):
            response = Orphans.delete(cls.pulp)
        Task.wait_for_report(cls.pulp, response)

        # unregister consumer
        cls.consumer.cli.unregister()
        super(RegRepoNoFeedTest, cls).tearDownClass()
开发者ID:CUXIDUMDUM,项目名称:pulp-automation,代码行数:14,代码来源:test_01_rpm_repo_without_feed.py


示例9: tearDownClass

    def tearDownClass(cls):
        with cls.pulp.asserting(True):
            response = cls.repo1.delete(cls.pulp)
        Task.wait_for_report(cls.pulp, response)

        with cls.pulp.asserting(True):
            response = cls.repo2.delete(cls.pulp)
        Task.wait_for_report(cls.pulp, response)

        # delete orphans
        with cls.pulp.asserting(True):
            response = Orphans.delete(cls.pulp)
        Task.wait_for_report(cls.pulp, response)

        super(PackageCategoryTest, cls).tearDownClass()
开发者ID:RedHatQE,项目名称:pulp-automation,代码行数:15,代码来源:test_04_package_category.py


示例10: test_09_check_orphan_appears

 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)
开发者ID:alexxa,项目名称:pulp-automation,代码行数:15,代码来源:test_12_puppet_repo_orphans_and_copy.py


示例11: test_10_delete_orphans

 def test_10_delete_orphans(self):
     delete_response = Orphans.delete(self.pulp)
     self.assertPulpOK()
     Task.wait_for_report(self.pulp, delete_response)
开发者ID:RedHatQE,项目名称:pulp-automation,代码行数:4,代码来源:test_15_iso_repo.py


示例12: test_06_delete_orphan_by_type_and_id_1092467

 def test_06_delete_orphan_by_type_and_id_1092467(self):
     # https://bugzilla.redhat.com/show_bug.cgi?id=1092467
     response = Orphans.delete_by_type_id(self.pulp, data=[{'content_type_id': 'rpm', 'unit_id': 'd0dc2044-1edc-4298-bf10-a472ea943fe1'}]
                                         )
     self.assertPulpOK()
     Task.wait_for_report(self.pulp, response)
开发者ID:CUXIDUMDUM,项目名称:pulp-automation,代码行数:6,代码来源:test_10_orphans.py


示例13: test_07_delete_orphans

 def test_07_delete_orphans(self):
     response = Orphans.delete(self.pulp)
     task = Task.from_response(response)
     task.wait(self.pulp)
开发者ID:alexxa,项目名称:pulp-automation,代码行数:4,代码来源:test_16_unit_search.py


示例14: test_07_delete_orphans

 def test_07_delete_orphans(self):
     response = Orphans.delete(self.pulp)
     Task.wait_for_report(self.pulp, response)
开发者ID:preethit,项目名称:pulp-automation,代码行数:3,代码来源:test_16_unit_search.py


示例15: test_00_get_orphan_info

 def test_00_get_orphan_info(self):
     Orphans.info(self.pulp)
     self.assertPulpOK()
开发者ID:lenfree,项目名称:pulp-automation,代码行数:3,代码来源:test_10_orphans.py


示例16: test_13_check_deleted_orphans

 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)
开发者ID:lenfree,项目名称:pulp-automation,代码行数:6,代码来源:test_17_iso_repo_orphans_and_copy.py


示例17: test_08_check_no_orphan_appeared

 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)
开发者ID:lenfree,项目名称:pulp-automation,代码行数:6,代码来源:test_17_iso_repo_orphans_and_copy.py


示例18: test_00_view_all_orphaned_content

 def test_00_view_all_orphaned_content(self):
     Orphans.info(self.pulp)
     self.assertPulpOK()
开发者ID:CUXIDUMDUM,项目名称:pulp-automation,代码行数:3,代码来源:test_10_orphans.py


示例19: test_10_delete_orphans

 def test_10_delete_orphans(self):
     delete_response = Orphans.delete(self.pulp)
     self.assertPulpOK()
     task = Task.from_response(delete_response)
     task.wait(self.pulp)
开发者ID:alexxa,项目名称:pulp-automation,代码行数:5,代码来源:test_15_iso_repo.py


示例20: test_01_view_orphaned_content_by_type

 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'])
开发者ID:CUXIDUMDUM,项目名称:pulp-automation,代码行数:5,代码来源:test_10_orphans.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python importer.DockerImporter类代码示例发布时间:2022-05-25
下一篇:
Python task.Task类代码示例发布时间:2022-05-25
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap