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


Python units.Orphans类代码示例

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


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


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