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