def setUpClass(cls): super(PuppetCopyRepoTest, cls).setUpClass() # this repo role is hardwired because of the search strings # refering to exact names as e.g. tomcat7_rhel # The proxy role is considered repo = { 'id': cls.__name__, 'feed': 'https://forge.puppetlabs.com', 'queries': ['tomcat'], 'proxy': ROLES.get('proxy'), } # create source repo and sync it to have modules fetched cls.source_repo, _, _ = PuppetRepo.from_role(repo).create(cls.pulp) Task.wait_for_report(cls.pulp, cls.source_repo.sync(cls.pulp)) # create two destinations repos for copy purpose importer = PuppetImporter(feed=None, queries=[]) distributors = [PuppetDistributor()] cls.dest_repo1, _, _ = PuppetRepo(id=cls.__name__ + '1', importer=importer, distributors=distributors).create(cls.pulp) cls.dest_repo2, _, _ = PuppetRepo(id=cls.__name__ + '2', importer=importer, distributors=distributors).create(cls.pulp) # create data for repo cls.invalid_repo = Repo(data={'id': cls.__name__ + "_invalidrepo"}) # create yum repo cls.yumrepo, _, _ = YumRepo(id=cls.__name__ + 'yum', importer=YumImporter(feed=None), distributors=[YumDistributor(relative_url='xyz')]).create(cls.pulp)
def setUpClass(cls): super(IsoRepoTest, cls).setUpClass() # FIXME: hardwired role cls.repo_role = { 'id': cls.__name__ + '_repo', 'feed': DEFAULT_FEED, 'proxy': ROLES.get('proxy'), } cls.repo = Repo(data=IsoRepo.from_role(cls.repo_role).as_data())
def setUpClass(cls): super(PuppetRepoTest, cls).setUpClass() # FIXME: hardwired repo role cls.repo_role = { "id": cls.__name__, "feed": DEFAULT_FEED, "proxy": ROLES.get("proxy"), "queries": ["stdlib", "yum"], } cls.repo = Repo(data=PuppetRepo.from_role(cls.repo_role).as_data())
def setUpClass(cls): super(DockerRepoTest, cls).setUpClass() # FIXME: hardwired role cls.repo_role = { 'id': 'docker-test123', 'feed': DEFAULT_FEED, 'upstream_name': 'hello-world', 'proxy': ROLES.get('proxy'), 'relative_url': '/library/hello-world' } cls.repo = Repo(data=DockerRepo.from_role(cls.repo_role).as_data())
def setUpClass(cls): super(IsoRepoTest, cls).setUpClass() # FIXME hardwired repo role repo = { 'id': cls.__name__ + '_repo', 'feed': DEFAULT_FEED, 'proxy': ROLES.get('proxy'), } cls.repo, cls.importer1, [cls.distributor1] = IsoRepo.from_role(repo).create(cls.pulp) importer = IsoImporter(feed=None) distributors1 = [IsoDistributor(relative_url='xyz')] distributors2 = [IsoDistributor(relative_url='zyx')] cls.repo_copy, cls.importer_copy, [cls.distributor_copy] = IsoRepo(id=cls.__name__ + "_repo_copy", importer=importer, distributors=distributors1).create(cls.pulp) cls.repo_upload, cls.importer_upload, [cls.distributor_upload] = IsoRepo(id=cls.__name__ + "_repo_upload", importer=importer, distributors=distributors2).create(cls.pulp)
def setUpClass(cls): # this repo role is hardwired because of the search strings # refering to exact names as e.g. tomcat7_rhel # The proxy role is considered super(PuppetSearchRepoTest, cls).setUpClass() repo = { "id": cls.__name__, "feed": "https://forge.puppetlabs.com", "queries": ["tomcat"], "proxy": ROLES.get("proxy"), } repo1 = repo.copy() repo1["id"] = cls.__name__ + "1" cls.repo, _, _ = PuppetRepo.from_role(repo).create(cls.pulp) cls.repo1, _, _ = PuppetRepo.from_role(repo1).create(cls.pulp) Task.wait_for_report(cls.pulp, cls.repo.sync(cls.pulp))
def setUpClass(cls): # this repo role is hardwired because of the search strings # refering to exact names as e.g. tomcat7_rhel # The proxy role is considered super(PuppetSearchRepoTest, cls).setUpClass() repo = { 'id': cls.__name__, 'feed': 'https://forge.puppetlabs.com', 'queries': ['tomcat'], 'proxy': ROLES.get('proxy') } repo1 = repo.copy() repo1['id'] = cls.__name__ + '1' cls.repo, _, _ = PuppetRepo.from_role(repo).create(cls.pulp) cls.repo1, _, _ = PuppetRepo.from_role(repo1).create(cls.pulp) Task.wait_for_report(cls.pulp, cls.repo.sync(cls.pulp))
def setUpClass(cls): super(IsoCopyRepoTest, cls).setUpClass() # FIXME: hardwired role repo = { 'id': cls.__name__, 'feed': DEFAULT_FEED, 'proxy': ROLES.get('proxy'), } # create source repo and sync it to have modules fetched cls.source_repo, _, _ = IsoRepo.from_role(repo).create(cls.pulp) Task.wait_for_report(cls.pulp, cls.source_repo.sync(cls.pulp)) # create two destinations repos for copy purpose importer = IsoImporter(feed=None) distributors = [IsoDistributor(relative_url='xyz')] cls.dest_repo1, _, _ = IsoRepo(id=cls.__name__ + '1', importer=importer, distributors=distributors).create(cls.pulp) cls.dest_repo2, _, _ = IsoRepo(id=cls.__name__ + '2', importer=importer, distributors=distributors).create(cls.pulp)
def setUpClass(cls): super(UnitSearchTest, cls).setUpClass() #create and sync puppet repo # FIXME: hardwired role details repo = { 'id': cls.__name__, 'queries': ['jenkins'], 'feed': 'https://forge.puppetlabs.com', 'proxy': ROLES.get('proxy'), } # make sure we run clean response = Repo({'id': repo['id']}).delete(cls.pulp) if response == ResponseLike(202): Task.wait_for_report(cls.pulp, response) cls.repo1, _, _ = PuppetRepo.from_role(repo).create(cls.pulp) Task.wait_for_report(cls.pulp, cls.repo1.sync(cls.pulp)) # create and sync rpm repo repo_config = [repo for repo in ROLES.repos if repo.type == 'rpm'][0] cls.repo2, _, _ = YumRepo.from_role(repo_config).create(cls.pulp) Task.wait_for_report(cls.pulp, cls.repo2.sync(cls.pulp))
def setUpClass(cls): super(IsoCopyRepoTest, cls).setUpClass() # FIXME: hardwired role repo = { 'id': cls.__name__, 'feed': DEFAULT_FEED, 'proxy': ROLES.get('proxy'), } # create source repo and sync it to have modules fetched cls.source_repo, _, _ = IsoRepo.from_role(repo).create(cls.pulp) Task.wait_for_report(cls.pulp, cls.source_repo.sync(cls.pulp)) # create two destinations repos for copy purpose importer = IsoImporter(feed=None) distributors = [IsoDistributor(relative_url='xyz')] cls.dest_repo1, _, _ = IsoRepo(id=cls.__name__ + '1', importer=importer, distributors=distributors).create( cls.pulp) cls.dest_repo2, _, _ = IsoRepo(id=cls.__name__ + '2', importer=importer, distributors=distributors).create( cls.pulp)
def setUpClass(cls): super(IsoRepoTest, cls).setUpClass() # FIXME hardwired repo role repo = { 'id': cls.__name__ + '_repo', 'feed': DEFAULT_FEED, 'proxy': ROLES.get('proxy'), } cls.repo, cls.importer1, [cls.distributor1 ] = IsoRepo.from_role(repo).create(cls.pulp) importer = IsoImporter(feed=None) distributors1 = [IsoDistributor(relative_url='xyz')] distributors2 = [IsoDistributor(relative_url='zyx')] cls.repo_copy, cls.importer_copy, [cls.distributor_copy] = IsoRepo( id=cls.__name__ + "_repo_copy", importer=importer, distributors=distributors1).create(cls.pulp) cls.repo_upload, cls.importer_upload, [ cls.distributor_upload ] = IsoRepo(id=cls.__name__ + "_repo_upload", importer=importer, distributors=distributors2).create(cls.pulp)