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):
     # 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(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):
     # 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(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())
예제 #6
0
 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(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))