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


Python Repo.delete方法代码示例

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


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

示例1: RepoTest

# 需要导入模块: from pulp_auto.repo import Repo [as 别名]
# 或者: from pulp_auto.repo.Repo import delete [as 别名]
class RepoTest(pulp_test.PulpTest):
    def setUp(self):
        super(RepoTest, self).setUp()
        self.repo = Repo(data={'id': type(self).__name__ + "_repo"})
        self.feed = 'http://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/zoo/'
        # assert connection works
        self.pulp.send(login.request())
        self.assertPulpOK()

    def tearDown(self):
        self.repo.delete(self.pulp)
开发者ID:alexxa,项目名称:pulp-automation,代码行数:13,代码来源:test_3_race.py

示例2: setUpClass

# 需要导入模块: from pulp_auto.repo import Repo [as 别名]
# 或者: from pulp_auto.repo.Repo import delete [as 别名]
 def setUpClass(cls):
     super(SimpleOrphanTest, cls).setUpClass()
     # prepare orphans by syncing and deleting a repo
     # make sure the repo is gone
     repo_config = [repo for repo in ROLES.repos if repo.type == 'rpm'][0]
     repo = Repo(repo_config)
     repo.delete(cls.pulp)
     # create and sync repo
     cls.repo, _, _ = create_yum_repo(cls.pulp, **repo_config)
     Task.wait_for_report(cls.pulp, cls.repo.sync(cls.pulp))
     # this is where orphans appear
     Task.wait_for_report(cls.pulp, cls.repo.delete(cls.pulp))
开发者ID:CUXIDUMDUM,项目名称:pulp-automation,代码行数:14,代码来源:test_10_orphans.py

示例3: setUpClass

# 需要导入模块: from pulp_auto.repo import Repo [as 别名]
# 或者: from pulp_auto.repo.Repo import delete [as 别名]
    def setUpClass(cls):
        super(SimpleRepoCopyTest, cls).setUpClass()
        #Destination repo
        # make sure repos don't exist
        # no need to wait for repos.delete to happen
        dest_repo_name = cls.__name__ + '_copy'
        dest_repo1 = Repo({'id': dest_repo_name})
        dest_repo1.delete(cls.pulp)
        cls.dest_repo1, _, _ = YumRepo(id=dest_repo_name, importer=YumImporter(None),
                                distributors=[YumDistributor(relative_url='abc')]).create(cls.pulp)

        #2nd Destination Repo
        dest_repo_name = cls.__name__ + '_copy1'
        dest_repo2 = Repo({'id': dest_repo_name})
        dest_repo2.delete(cls.pulp)
        cls.dest_repo2, _, _ = YumRepo(id=dest_repo_name, importer=YumImporter(None),
                                distributors=[YumDistributor(relative_url='xyz')]).create(cls.pulp)

        # Source repo
        default_repo_config = [repo for repo in ROLES.repos if repo.type == 'rpm'][0]
        cls.source_repo, _, _ = YumRepo.from_role(default_repo_config).create(cls.pulp)
        Task.wait_for_report(cls.pulp, cls.source_repo.sync(cls.pulp))
开发者ID:RedHatQE,项目名称:pulp-automation,代码行数:24,代码来源:test_12_yum_repo_copy.py

示例4: setUpClass

# 需要导入模块: from pulp_auto.repo import Repo [as 别名]
# 或者: from pulp_auto.repo.Repo import delete [as 别名]
    def setUpClass(cls):
        super(SimpleRepoCopyTest, cls).setUpClass()
        #Destination repo
        feed = None
        dest_repo_name = cls.__name__ + '_copy'
        dest_repo1 = Repo({'id': dest_repo_name})
        dest_repo1.delete(cls.pulp)
        cls.dest_repo1, _, _ = create_yum_repo(cls.pulp, dest_repo_name, feed)

        #2nd Destination Repo
        dest_repo_name = cls.__name__ + '_copy1'
        dest_repo2 = Repo({'id': dest_repo_name})
        dest_repo2.delete(cls.pulp)
        cls.dest_repo2, _, _ = create_yum_repo(cls.pulp, dest_repo_name, feed)

        # Source repo
        default_repo_config = [repo for repo in ROLES.repos if repo.type == 'rpm'][0]
        source_repo_name = cls.__name__ + '_repo'
        source_repo = Repo({'id': source_repo_name})
        source_repo.delete(cls.pulp)
        cls.source_repo, _, _ = create_yum_repo(cls.pulp, source_repo_name, default_repo_config.feed)
        sync_task = Task.from_response(cls.source_repo.sync(cls.pulp))[0]
        sync_task.wait(cls.pulp)
开发者ID:alexxa,项目名称:pulp-automation,代码行数:25,代码来源:test_12_yum_repo_copy.py

示例5: setUpClass

# 需要导入模块: from pulp_auto.repo import Repo [as 别名]
# 或者: from pulp_auto.repo.Repo import delete [as 别名]
    def setUpClass(cls):
        super(SimpleRepoCopyTest, cls).setUpClass()
        #Destination repo
        # make sure repos don't exist
        # no need to wait for repos.delete to happen
        feed = None
        dest_repo_name = cls.__name__ + '_copy'
        dest_repo1 = Repo({'id': dest_repo_name})
        dest_repo1.delete(cls.pulp)
        cls.dest_repo1, _, _ = create_yum_repo(cls.pulp, dest_repo_name, feed)

        #2nd Destination Repo
        dest_repo_name = cls.__name__ + '_copy1'
        dest_repo2 = Repo({'id': dest_repo_name})
        dest_repo2.delete(cls.pulp)
        cls.dest_repo2, _, _ = create_yum_repo(cls.pulp, dest_repo_name, feed)

        # Source repo
        default_repo_config = [repo for repo in ROLES.repos if repo.type == 'rpm'][0]
        source_repo_name = cls.__name__ + '_repo'
        source_repo = Repo({'id': source_repo_name})
        source_repo.delete(cls.pulp)
        cls.source_repo, _, _ = create_yum_repo(cls.pulp, source_repo_name, default_repo_config.feed)
        Task.wait_for_report(cls.pulp, cls.source_repo.sync(cls.pulp))
开发者ID:CUXIDUMDUM,项目名称:pulp-automation,代码行数:26,代码来源:test_12_yum_repo_copy.py

示例6: test_02_race_delete

# 需要导入模块: from pulp_auto.repo import Repo [as 别名]
# 或者: from pulp_auto.repo.Repo import delete [as 别名]
 def test_02_race_delete(self):
     # see also: https://bugzilla.redhat.com/show_bug.cgi?id=1065455
     repo = Repo(data=self.repo_config)
     with self.pulp.async():
         repo.delete(self.pulp)
         repo.delete(self.pulp)
开发者ID:jeremycline,项目名称:pulp-automation,代码行数:8,代码来源:test_3_race.py


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