• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python factory.setup_org_for_a_rh_repo函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: setUpClass

 def setUpClass(cls):
     """Set up single org with subscription to 1 RH and 1 custom products to
     reuse in tests
     """
     super(ErrataTestCase, cls).setUpClass()
     cls.env = entities.LifecycleEnvironment(
         organization=cls.session_org).create()
     cls.content_view = entities.ContentView(
         organization=cls.session_org).create()
     cls.activation_key = entities.ActivationKey(
         environment=cls.env,
         organization=cls.session_org,
     ).create()
     setup_org_for_a_rh_repo({
         'product': PRDS['rhel'],
         'repository-set': REPOSET['rhst7'],
         'repository': REPOS['rhst7']['name'],
         'organization-id': cls.session_org.id,
         'content-view-id': cls.content_view.id,
         'lifecycle-environment-id': cls.env.id,
         'activationkey-id': cls.activation_key.id,
     })
     cls.custom_entitites = setup_org_for_a_custom_repo({
         'url': CUSTOM_REPO_URL,
         'organization-id': cls.session_org.id,
         'content-view-id': cls.content_view.id,
         'lifecycle-environment-id': cls.env.id,
         'activationkey-id': cls.activation_key.id,
     })
开发者ID:Ichimonji10,项目名称:robottelo,代码行数:29,代码来源:test_errata.py


示例2: setUpClass

    def setUpClass(cls):
        """Create Org, Lifecycle Environment, Content View, Activation key

        """
        super(KatelloAgentTestCase, cls).setUpClass()
        # Create new org, environment, CV and activation key
        KatelloAgentTestCase.org = make_org()
        KatelloAgentTestCase.env = make_lifecycle_environment({
            u'organization-id': KatelloAgentTestCase.org['id'],
        })
        KatelloAgentTestCase.content_view = make_content_view({
            u'organization-id': KatelloAgentTestCase.org['id'],
        })
        KatelloAgentTestCase.activation_key = make_activation_key({
            u'lifecycle-environment-id': KatelloAgentTestCase.env['id'],
            u'organization-id': KatelloAgentTestCase.org['id'],
        })
        # Add subscription to Satellite Tools repo to activation key
        setup_org_for_a_rh_repo({
            u'product': PRDS['rhel'],
            u'repository-set': REPOSET['rhst7'],
            u'repository': REPOS['rhst7']['name'],
            u'organization-id': KatelloAgentTestCase.org['id'],
            u'content-view-id': KatelloAgentTestCase.content_view['id'],
            u'lifecycle-environment-id': KatelloAgentTestCase.env['id'],
            u'activationkey-id': KatelloAgentTestCase.activation_key['id'],
        })
        # Create custom repo, add subscription to activation key
        setup_org_for_a_custom_repo({
            u'url': FAKE_0_YUM_REPO,
            u'organization-id': KatelloAgentTestCase.org['id'],
            u'content-view-id': KatelloAgentTestCase.content_view['id'],
            u'lifecycle-environment-id': KatelloAgentTestCase.env['id'],
            u'activationkey-id': KatelloAgentTestCase.activation_key['id'],
        })
开发者ID:waffle-iron,项目名称:robottelo,代码行数:35,代码来源:test_host.py


示例3: setUpClass

 def setUpClass(cls):
     """Create Lifecycle Environment, Content View and Activation key
     """
     super(ContentHostTestCase, cls).setUpClass()
     cls.env = entities.LifecycleEnvironment(
         organization=cls.session_org).create()
     cls.content_view = entities.ContentView(
         organization=cls.session_org).create()
     cls.activation_key = entities.ActivationKey(
         environment=cls.env,
         organization=cls.session_org,
     ).create()
     setup_org_for_a_rh_repo({
         'product': PRDS['rhel'],
         'repository-set': REPOSET['rhst7'],
         'repository': REPOS['rhst7']['name'],
         'organization-id': cls.session_org.id,
         'content-view-id': cls.content_view.id,
         'lifecycle-environment-id': cls.env.id,
         'activationkey-id': cls.activation_key.id,
     })
     setup_org_for_a_custom_repo({
         'url': FAKE_6_YUM_REPO,
         'organization-id': cls.session_org.id,
         'content-view-id': cls.content_view.id,
         'lifecycle-environment-id': cls.env.id,
         'activationkey-id': cls.activation_key.id,
     })
开发者ID:Ichimonji10,项目名称:robottelo,代码行数:28,代码来源:test_contenthost.py


示例4: setUpClass

 def setUpClass(cls):
     """Create Org, Lifecycle Environment, Content View, Activation key
     """
     super(RemoteExecutionTestCase, cls).setUpClass()
     cls.org = make_org()
     ssh.command(
         '''echo 'getenforce' > {0}'''.format(TEMPLATE_FILE)
     )
     cls.env = make_lifecycle_environment({
         u'organization-id': cls.org['id'],
     })
     cls.content_view = make_content_view({
         u'organization-id': cls.org['id'],
     })
     cls.activation_key = make_activation_key({
         u'lifecycle-environment-id': cls.env['id'],
         u'organization-id': cls.org['id'],
     })
     # Add subscription to Satellite Tools repo to activation key
     setup_org_for_a_rh_repo({
         u'product': PRDS['rhel'],
         u'repository-set': REPOSET['rhst7'],
         u'repository': REPOS['rhst7']['name'],
         u'organization-id': cls.org['id'],
         u'content-view-id': cls.content_view['id'],
         u'lifecycle-environment-id': cls.env['id'],
         u'activationkey-id': cls.activation_key['id'],
     })
开发者ID:kbidarkar,项目名称:robottelo,代码行数:28,代码来源:test_remoteexecution.py


示例5: setUpClass

 def setUpClass(cls):
     """Create Org, Lifecycle Environment, Content View, Activation key"""
     super(ErrataTestCase, cls).setUpClass()
     cls.org = entities.Organization().create()
     cls.env = entities.LifecycleEnvironment(
         organization=cls.org).create()
     cls.content_view = entities.ContentView(
         organization=cls.org).create()
     cls.activation_key = entities.ActivationKey(
         environment=cls.env,
         organization=cls.org,
     ).create()
     setup_org_for_a_rh_repo({
         'product': PRDS['rhel'],
         'repository-set': REPOSET['rhst7'],
         'repository': REPOS['rhst7']['name'],
         'organization-id': cls.org.id,
         'content-view-id': cls.content_view.id,
         'lifecycle-environment-id': cls.env.id,
         'activationkey-id': cls.activation_key.id,
     }, force_manifest_upload=True)
     cls.custom_entities = setup_org_for_a_custom_repo({
         'url': FAKE_9_YUM_REPO,
         'organization-id': cls.org.id,
         'content-view-id': cls.content_view.id,
         'lifecycle-environment-id': cls.env.id,
         'activationkey-id': cls.activation_key.id,
     })
开发者ID:pondrejk,项目名称:robottelo,代码行数:28,代码来源:test_errata.py


示例6: test_positive_content_host_subscription_status

    def test_positive_content_host_subscription_status(self):
        """Check if the Content Host Subscription Status is working in the
        Dashboard UI

        :id: ce0d7b0c-ae6a-4361-8173-e50f6381194a

        :Steps:

            1. Register Content Host and subscribe it
            2. Navigate Monitor -> Dashboard
            3. Review the Content Host Subscription Status
            4. Click each link:

                a. Invalid Subscriptions
                b. Partial Subscriptions
                c. Valid Subscriptions

        :expectedresults: The widget is updated with all details for Valid,
            Invalid and Partial Subscriptions

        :CaseLevel: Integration
        """
        org = entities.Organization().create()
        env = entities.LifecycleEnvironment(organization=org).create()
        content_view = entities.ContentView(organization=org).create()
        activation_key = entities.ActivationKey(
            environment=env,
            organization=org,
        ).create()
        setup_org_for_a_rh_repo({
            'product': PRDS['rhel'],
            'repository-set': REPOSET['rhst7'],
            'repository': REPOS['rhst7']['name'],
            'organization-id': org.id,
            'content-view-id': content_view.id,
            'lifecycle-environment-id': env.id,
            'activationkey-id': activation_key.id,
        })
        with VirtualMachine(distro=DISTRO_RHEL7) as client:
            client.install_katello_ca()
            result = client.register_contenthost(
                org.label, activation_key.name)
            self.assertEqual(result.return_code, 0)
            client.enable_repo(REPOS['rhst7']['id'])
            client.install_katello_agent()
            with Session(self.browser) as session:
                set_context(session, org=org.name)
                self.assertTrue(self.dashboard.validate_chss_navigation(
                    'Invalid', u'subscription_status=invalid'))
                self.assertIsNotNone(self.dashboard.wait_until_element(
                    common_locators['kt_search_no_results']))
                self.assertTrue(self.dashboard.validate_chss_navigation(
                    'Partial', u'subscription_status=partial'))
                self.assertIsNotNone(self.dashboard.wait_until_element(
                    common_locators['kt_search_no_results']))
                self.assertTrue(self.dashboard.validate_chss_navigation(
                    'Valid', u'subscription_status=valid', client.hostname))
开发者ID:elyezer,项目名称:robottelo,代码行数:57,代码来源:test_dashboard.py


示例7: test_positive_filter_by_envs

    def test_positive_filter_by_envs(self):
        """Filter applicable errata for a content host by current and
        Library environments

        @id: f41bfcc2-39ee-4ae1-a71f-d2c9288875be

        @Setup:

        1. Make sure multiple environments are present.
        2. One of Content host's previous environment has additional errata.

        @Steps:

        1. GET /katello/api/errata

        @Assert: The errata for the content host is filtered by current and
        Library environments.

        @CaseLevel: System
        """
        org = entities.Organization().create()
        env = entities.LifecycleEnvironment(
            organization=org).create()
        content_view = entities.ContentView(
            organization=org).create()
        activation_key = entities.ActivationKey(
            environment=env,
            organization=org,
        ).create()
        setup_org_for_a_rh_repo({
            'product': PRDS['rhel'],
            'repository-set': REPOSET['rhst7'],
            'repository': REPOS['rhst7']['name'],
            'organization-id': org.id,
            'content-view-id': content_view.id,
            'lifecycle-environment-id': env.id,
            'activationkey-id': activation_key.id,
        })
        new_cv = entities.ContentView(organization=org).create()
        new_repo = entities.Repository(
            product=entities.Product(organization=org).create(),
            url=CUSTOM_REPO_URL,
        ).create()
        self.assertEqual(new_repo.sync()['result'], 'success')
        new_cv = new_cv.read()
        new_cv.repository.append(new_repo)
        new_cv = new_cv.update(['repository'])
        new_cv.publish()
        library_env = entities.LifecycleEnvironment(
            name='Library',
            organization=org,
        ).search()[0]
        errata_library = entities.Errata(environment=library_env).search()
        errata_env = entities.Errata(environment=env).search()
        self.assertGreater(len(errata_library), len(errata_env))
开发者ID:SatelliteQE,项目名称:robottelo,代码行数:55,代码来源:test_errata.py


示例8: setUp

    def setUp(self):
        """Create VM, subscribe it to satellite-tools repo, install katello-ca
        and katello-agent packages

        """
        super(TestCHKatelloAgent, self).setUp()

        # Create new org, environment, CV and activation key
        if TestCHKatelloAgent.org is None:
            TestCHKatelloAgent.org = make_org()
        if TestCHKatelloAgent.env is None:
            TestCHKatelloAgent.env = make_lifecycle_environment({
                u'organization-id': TestCHKatelloAgent.org['id'],
            })
        if TestCHKatelloAgent.cv is None:
            TestCHKatelloAgent.cv = make_content_view({
                u'organization-id': TestCHKatelloAgent.org['id'],
            })
        if TestCHKatelloAgent.activation_key is None:
            TestCHKatelloAgent.activation_key = make_activation_key({
                u'lifecycle-environment-id': TestCHKatelloAgent.env['id'],
                u'organization-id': TestCHKatelloAgent.org['id'],
            })
        # Add subscription to Satellite Tools repo to activation key
        if not TestCHKatelloAgent.org_is_set_up:
            setup_org_for_a_rh_repo({
                u'product': PRDS['rhel'],
                u'repository-set': REPOSET['rhst7'],
                u'repository': REPOS['rhst7']['name'],
                u'organization-id': TestCHKatelloAgent.org['id'],
                u'content-view-id': TestCHKatelloAgent.cv['id'],
                u'lifecycle-environment-id': TestCHKatelloAgent.env['id'],
                u'activationkey-id': TestCHKatelloAgent.activation_key['id'],
            })
            TestCHKatelloAgent.org_is_set_up = True

        # Create VM and register content host
        self.vm = VirtualMachine(distro='rhel71')
        self.vm.create()
        self.vm.install_katello_cert()
        # Create custom repo, add subscription to activation key
        setup_org_for_a_custom_repo({
            u'url': FAKE_0_YUM_REPO,
            u'organization-id': TestCHKatelloAgent.org['id'],
            u'content-view-id': TestCHKatelloAgent.cv['id'],
            u'lifecycle-environment-id': TestCHKatelloAgent.env['id'],
            u'activationkey-id': TestCHKatelloAgent.activation_key['id'],
        })
        # Register content host, install katello-agent
        self.vm.register_contenthost(
            TestCHKatelloAgent.activation_key['name'],
            TestCHKatelloAgent.org['label']
        )
        self.vm.enable_repo(REPOS['rhst7']['id'])
        self.vm.install_katello_agent()
开发者ID:ares,项目名称:robottelo,代码行数:55,代码来源:test_contenthost.py


示例9: test_positive_re_register_host

    def test_positive_re_register_host(self):
        """Re-register a host which was un-registered earlier from content-host

        @id: 898695dc-36ff-45b8-85be-6734e6a232d6

        @steps:
        1.  Re-register a host which was unregistered before
        2.  View host under content hosts
        3.  View host under 'All hosts'

        @assert: A single entry of host should appear at both places on
        re-registering

        @CaseLevel: System
        """
        org = entities.Organization().create()
        env = entities.LifecycleEnvironment(organization=org).create()
        content_view = entities.ContentView(organization=org).create()
        activation_key = entities.ActivationKey(
            environment=env,
            organization=org,
        ).create()
        setup_org_for_a_rh_repo({
            'product': PRDS['rhel'],
            'repository-set': REPOSET['rhst7'],
            'repository': REPOS['rhst7']['name'],
            'organization-id': org.id,
            'content-view-id': content_view.id,
            'lifecycle-environment-id': env.id,
            'activationkey-id': activation_key.id,
        })
        with VirtualMachine(distro=DISTRO_RHEL7) as vm:
            vm.install_katello_ca()
            result = vm.register_contenthost(org.label, activation_key.name)
            self.assertEqual(result.return_code, 0)
            with Session(self.browser) as session:
                session.nav.go_to_select_org(org.name)
                self.contenthost.unregister(vm.hostname)
                self.contenthost.validate_subscription_status(
                    vm.hostname, False)
                result = vm.register_contenthost(
                    org.label, activation_key.name)
                self.assertEqual(result.return_code, 0)
                self.contenthost.validate_subscription_status(
                    vm.hostname, True)
                self.assertIsNotNone(self.contenthost.search(vm.hostname))
                self.assertIsNotNone(self.hosts.search(vm.hostname))
开发者ID:SatelliteQE,项目名称:robottelo,代码行数:47,代码来源:test_hostunification.py


示例10: test_positive_unregister_content_host

    def test_positive_unregister_content_host(self):
        """Unregister a host from content-hosts page

        :id: a7d8a081-b0f2-4944-a8dc-5527cb6ab914

        :steps:
            1.  Un-register a host from content-host page
            2.  View host under content hosts
            3.  View host under 'All hosts'

        :expectedresults: Hosts un-registered from content-host should appear
            in both sides of UI

        :CaseLevel: System
        """
        org = entities.Organization().create()
        env = entities.LifecycleEnvironment(organization=org).create()
        content_view = entities.ContentView(organization=org).create()
        activation_key = entities.ActivationKey(
            environment=env,
            organization=org,
        ).create()
        setup_org_for_a_rh_repo({
            'product': PRDS['rhel'],
            'repository-set': REPOSET['rhst7'],
            'repository': REPOS['rhst7']['name'],
            'organization-id': org.id,
            'content-view-id': content_view.id,
            'lifecycle-environment-id': env.id,
            'activationkey-id': activation_key.id,
        })
        with VirtualMachine(distro=DISTRO_RHEL7) as vm:
            vm.install_katello_ca()
            vm.register_contenthost(org.label, activation_key.name)
            self.assertTrue(vm.subscribed)
            with Session(self) as session:
                session.nav.go_to_select_org(org.name)
                self.contenthost.unregister(vm.hostname)
                self.contenthost.validate_subscription_status(
                    vm.hostname, False)
                self.assertIsNotNone(self.contenthost.search(vm.hostname))
                self.assertIsNotNone(self.hosts.search(vm.hostname))
开发者ID:jyejare,项目名称:robottelo,代码行数:42,代码来源:test_hostunification.py


示例11: setUpClass

 def setUpClass(cls):
     """Set up single org with subscription to 1 RH and 1 custom products to
     reuse in tests
     """
     super(ErrataTestCase, cls).setUpClass()
     cls.env = entities.LifecycleEnvironment(
         organization=cls.session_org).create()
     cls.content_view = entities.ContentView(
         organization=cls.session_org).create()
     cls.activation_key = entities.ActivationKey(
         environment=cls.env,
         organization=cls.session_org,
     ).create()
     setup_org_for_a_rh_repo({
         'product': PRDS['rhel'],
         'repository-set': REPOSET['rhst7'],
         'repository': REPOS['rhst7']['name'],
         'organization-id': cls.session_org.id,
         'content-view-id': cls.content_view.id,
         'lifecycle-environment-id': cls.env.id,
         'activationkey-id': cls.activation_key.id,
     }, force_manifest_upload=True)
     cls.custom_entitites = setup_org_for_a_custom_repo({
         'url': CUSTOM_REPO_URL,
         'organization-id': cls.session_org.id,
         'content-view-id': cls.content_view.id,
         'lifecycle-environment-id': cls.env.id,
         'activationkey-id': cls.activation_key.id,
     })
     rhva_repo = enable_rhrepo_and_fetchid(
         basearch=DEFAULT_ARCHITECTURE,
         org_id=cls.session_org.id,
         product=PRDS['rhel'],
         repo=REPOS['rhva6']['name'],
         reposet=REPOSET['rhva6'],
         releasever=DEFAULT_RELEASE_VERSION,
     )
     assert entities.Repository(id=rhva_repo).sync()['result'] == 'success'
     cls.rhva_errata_id = REAL_4_ERRATA_ID
     cls.rhva_errata_cves = REAL_4_ERRATA_CVES
开发者ID:jyejare,项目名称:robottelo,代码行数:40,代码来源:test_errata.py


示例12: test_positive_register_host_via_ak

    def test_positive_register_host_via_ak(self):
        """Register a pre-installed host via rhsm using activation-key

        :id: b42a1a13-49ef-418e-bb66-12ed71cf3038

        :steps:
            1.  Register a host via rhsm using activation-key
            2.  View host under content hosts
            3.  View host under 'All Hosts'

        :expectedresults: Hosts registered via activation key appears under
            'All hosts' as well as under content-hosts

        :CaseLevel: System
        """
        org = entities.Organization().create()
        env = entities.LifecycleEnvironment(organization=org).create()
        content_view = entities.ContentView(organization=org).create()
        activation_key = entities.ActivationKey(
            environment=env,
            organization=org,
        ).create()
        setup_org_for_a_rh_repo({
            'product': PRDS['rhel'],
            'repository-set': REPOSET['rhst7'],
            'repository': REPOS['rhst7']['name'],
            'organization-id': org.id,
            'content-view-id': content_view.id,
            'lifecycle-environment-id': env.id,
            'activationkey-id': activation_key.id,
        })
        with VirtualMachine(distro=DISTRO_RHEL7) as vm:
            vm.install_katello_ca()
            vm.register_contenthost(org.label, activation_key.name)
            self.assertTrue(vm.subscribed)
            with Session(self) as session:
                session.nav.go_to_select_org(org.name)
                self.assertIsNotNone(self.hosts.search(vm.hostname))
                self.assertIsNotNone(self.contenthost.search(vm.hostname))
开发者ID:jyejare,项目名称:robottelo,代码行数:39,代码来源:test_hostunification.py


示例13: test_positive_delete_content_host

    def test_positive_delete_content_host(self):
        """Unregister and delete a host from content-hosts page

        @id: 3c75c1e6-85e3-49e6-a10e-6052a0db2b7f

        @steps:
        1.  Un-register and delete a host from content-host page
        2.  View host under content hosts
        3.  View host under 'All hosts'

        @assert: Hosts un-registered from content-host should disappear from
        both sides of UI

        @CaseLevel: System
        """
        org = entities.Organization().create()
        env = entities.LifecycleEnvironment(organization=org).create()
        content_view = entities.ContentView(organization=org).create()
        activation_key = entities.ActivationKey(
            environment=env,
            organization=org,
        ).create()
        setup_org_for_a_rh_repo({
            'product': PRDS['rhel'],
            'repository-set': REPOSET['rhst7'],
            'repository': REPOS['rhst7']['name'],
            'organization-id': org.id,
            'content-view-id': content_view.id,
            'lifecycle-environment-id': env.id,
            'activationkey-id': activation_key.id,
        })
        with VirtualMachine(distro=DISTRO_RHEL7) as vm:
            vm.install_katello_ca()
            result = vm.register_contenthost(org.label, activation_key.name)
            self.assertEqual(result.return_code, 0)
            with Session(self.browser) as session:
                session.nav.go_to_select_org(org.name)
                self.contenthost.delete(vm.hostname)
                self.assertIsNone(self.hosts.search(vm.hostname))
开发者ID:SatelliteQE,项目名称:robottelo,代码行数:39,代码来源:test_hostunification.py


示例14: setUpClass

    def setUpClass(cls):
        """Create Org, Lifecycle Environment, Content View, Activation key

        """
        super(KatelloAgentTestCase, cls).setUpClass()
        # Create new org, environment, CV and activation key
        KatelloAgentTestCase.org = make_org()
        KatelloAgentTestCase.env = make_lifecycle_environment({u"organization-id": KatelloAgentTestCase.org["id"]})
        KatelloAgentTestCase.content_view = make_content_view({u"organization-id": KatelloAgentTestCase.org["id"]})
        KatelloAgentTestCase.activation_key = make_activation_key(
            {
                u"lifecycle-environment-id": KatelloAgentTestCase.env["id"],
                u"organization-id": KatelloAgentTestCase.org["id"],
            }
        )
        # Add subscription to Satellite Tools repo to activation key
        setup_org_for_a_rh_repo(
            {
                u"product": PRDS["rhel"],
                u"repository-set": REPOSET["rhst7"],
                u"repository": REPOS["rhst7"]["name"],
                u"organization-id": KatelloAgentTestCase.org["id"],
                u"content-view-id": KatelloAgentTestCase.content_view["id"],
                u"lifecycle-environment-id": KatelloAgentTestCase.env["id"],
                u"activationkey-id": KatelloAgentTestCase.activation_key["id"],
            }
        )
        # Create custom repo, add subscription to activation key
        setup_org_for_a_custom_repo(
            {
                u"url": FAKE_0_YUM_REPO,
                u"organization-id": KatelloAgentTestCase.org["id"],
                u"content-view-id": KatelloAgentTestCase.content_view["id"],
                u"lifecycle-environment-id": KatelloAgentTestCase.env["id"],
                u"activationkey-id": KatelloAgentTestCase.activation_key["id"],
            }
        )
开发者ID:adammhaile,项目名称:robottelo,代码行数:37,代码来源:test_contenthost.py


示例15: setUpClass

 def setUpClass(cls):
     """Create Org, Lifecycle Environment, Content View, Activation key"""
     super(HostCollectionPackageManagementTest, cls).setUpClass()
     cls.env = entities.LifecycleEnvironment(
         organization=cls.session_org).create()
     cls.content_view = entities.ContentView(
         organization=cls.session_org).create()
     cls.activation_key = entities.ActivationKey(
         environment=cls.env,
         organization=cls.session_org,
     ).create()
     rh_tools_content_data = setup_org_for_a_rh_repo({
         'product': PRDS['rhel'],
         'repository-set': REPOSET['rhst7'],
         'repository': REPOS['rhst7']['name'],
         'organization-id': cls.session_org.id,
         'content-view-id': cls.content_view.id,
         'lifecycle-environment-id': cls.env.id,
         'activationkey-id': cls.activation_key.id,
     })
     custom_content_data = [
         setup_org_for_a_custom_repo({
             'url': url,
             'organization-id': cls.session_org.id,
             'content-view-id': cls.content_view.id,
             'lifecycle-environment-id': cls.env.id,
             'activationkey-id': cls.activation_key.id,
         }) for url in [FAKE_1_YUM_REPO, FAKE_6_YUM_REPO]
     ]
     cls.rh_sat_tools_custom_product = None
     cls.rh_sat_tools_custom_repository = None
     if not settings.cdn and settings.sattools_repo['rhel7']:
         # RH sat tools repository was added as custom product and repo
         cls.rh_sat_tools_custom_product = entities.Product(
             id=rh_tools_content_data['product-id']).read()
         cls.rh_sat_tools_custom_repository = entities.Repository(
             id=rh_tools_content_data['repository-id']).read()
     cls.custom_products = [
         entities.Product(id=content_data['product-id']).read()
         for content_data in custom_content_data
     ]
     cls.custom_repositories = [
         entities.Repository(id=content_data['repository-id']).read()
         for content_data in custom_content_data
     ]
开发者ID:renzon,项目名称:robottelo,代码行数:45,代码来源:test_hostcollection.py


示例16: test_positive_add_redhat_product

    def test_positive_add_redhat_product(self):
        """Test that RH product can be associated to Activation Keys

        @Feature: Activation key - Product

        @BZ: 1293585

        @Assert: RH products are successfully associated to Activation key
        """
        result = setup_org_for_a_rh_repo(
            {
                u"product": PRDS["rhel"],
                u"repository-set": REPOSET["rhst7"],
                u"repository": REPOS["rhst7"]["name"],
                u"organization-id": self.org["id"],
            }
        )
        content = ActivationKey.product_content({u"id": result["activationkey-id"], u"organization-id": self.org["id"]})
        self.assertEqual(content[0]["name"], REPOSET["rhst7"])
开发者ID:adammhaile,项目名称:robottelo,代码行数:19,代码来源:test_activationkey.py


示例17: test_positive_add_redhat_and_custom_products

    def test_positive_add_redhat_and_custom_products(self):
        """Test if RH/Custom product can be associated to Activation key

        :id: 74c77426-18f5-4abb-bca9-a2135f7fcc1f

        :Steps:

            1. Create Activation key
            2. Associate RH product(s) to Activation Key
            3. Associate custom product(s) to Activation Key

        :expectedresults: RH/Custom product is successfully associated to
            Activation key

        :CaseLevel: System

        :BZ: 1426386
        """
        org = make_org()
        # Using CDN as we need this repo to be RH one no matter are we in
        # downstream or cdn
        result = setup_org_for_a_rh_repo({
            u'product': PRDS['rhel'],
            u'repository-set': REPOSET['rhst7'],
            u'repository': REPOS['rhst7']['name'],
            u'organization-id': org['id'],
        }, force_use_cdn=True)
        result = setup_org_for_a_custom_repo({
            u'url': FAKE_0_YUM_REPO,
            u'organization-id': org['id'],
            u'activationkey-id': result['activationkey-id'],
            u'content-view-id': result['content-view-id'],
            u'lifecycle-environment-id': result['lifecycle-environment-id'],
        })
        repo = Repository.info({u'id': result['repository-id']})
        content = ActivationKey.product_content({
            u'id': result['activationkey-id'],
            u'organization-id': org['id'],
        })
        self.assertEqual(len(content), 2)
        self.assertEqual(
            {REPOSET['rhst7'], repo['name']}, {pc['name'] for pc in content})
开发者ID:kbidarkar,项目名称:robottelo,代码行数:42,代码来源:test_activationkey.py


示例18: test_positive_add_redhat_product

    def test_positive_add_redhat_product(self):
        """@Test: Test that RH product can be associated to Activation Keys

        @Feature: Activation key - Product

        @BZ: 1293585

        @Assert: RH products are successfully associated to Activation key
        """
        result = setup_org_for_a_rh_repo({
            u'product': PRDS['rhel'],
            u'repository-set': REPOSET['rhst7'],
            u'repository': REPOS['rhst7']['name'],
            u'organization-id': self.org['id'],
        })
        content = ActivationKey.product_content({
            u'id': result['activationkey-id'],
            u'organization-id': self.org['id'],
        })
        self.assertEqual(content[0]['name'], REPOSET['rhst7'])
开发者ID:tkolhar,项目名称:robottelo,代码行数:20,代码来源:test_activationkey.py


示例19: test_positive_add_redhat_product

    def test_positive_add_redhat_product(self):
        """Test that RH product can be associated to Activation Keys

        @id: 7b15de8e-edde-41aa-937b-ad6aa529891a

        @Assert: RH products are successfully associated to Activation key

        @CaseLevel: System
        """
        result = setup_org_for_a_rh_repo({
            u'product': PRDS['rhel'],
            u'repository-set': REPOSET['rhst7'],
            u'repository': REPOS['rhst7']['name'],
            u'organization-id': self.org['id'],
        })
        content = ActivationKey.product_content({
            u'id': result['activationkey-id'],
            u'organization-id': self.org['id'],
        })
        self.assertEqual(content[0]['name'], REPOSET['rhst7'])
开发者ID:waffle-iron,项目名称:robottelo,代码行数:20,代码来源:test_activationkey.py


示例20: test_positive_add_redhat_and_custom_products

    def test_positive_add_redhat_and_custom_products(self):
        """Test if RH/Custom product can be associated to Activation key

        @Feature: Activation key - Product

        @Steps:

        1. Create Activation key
        2. Associate RH product(s) to Activation Key
        3. Associate custom product(s) to Activation Key

        @BZ: 1293585

        @Assert: RH/Custom product is successfully associated to Activation key
        """
        result = setup_org_for_a_rh_repo(
            {
                u"product": PRDS["rhel"],
                u"repository-set": REPOSET["rhst7"],
                u"repository": REPOS["rhst7"]["name"],
                u"organization-id": self.org["id"],
            }
        )
        result = setup_org_for_a_custom_repo(
            {
                u"url": FAKE_0_YUM_REPO,
                u"organization-id": self.org["id"],
                u"activationkey-id": result["activationkey-id"],
                u"content-view-id": result["content-view-id"],
                u"lifecycle-environment-id": result["lifecycle-environment-id"],
            }
        )
        repo = Repository.info({u"id": result["repository-id"]})
        content = ActivationKey.product_content({u"id": result["activationkey-id"], u"organization-id": self.org["id"]})
        self.assertEqual(len(content), 2)
        self.assertEqual(content[0]["name"], REPOSET["rhst7"])
        self.assertEqual(content[1]["name"], repo["name"])
开发者ID:adammhaile,项目名称:robottelo,代码行数:37,代码来源:test_activationkey.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python filter.Filter类代码示例发布时间:2022-05-26
下一篇:
Python factory.setup_org_for_a_custom_repo函数代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap