コード例 #1
0
    def test_positive_remove_capsule_by_id(self):
        """Remove a capsule from organization by its id

        @id: 71af64ec-5cbb-4dd8-ba90-652e302305ec

        @Assert: Capsule is removed from the org

        @CaseLevel: Integration
        """
        org = make_org()
        proxy = make_proxy()
        # Add capsule and org to cleanup list
        self.addCleanup(capsule_cleanup, proxy['id'])
        self.addCleanup(org_cleanup, org['id'])

        Org.add_smart_proxy({
            'id': org['id'],
            'smart-proxy-id': proxy['id'],
        })
        Org.remove_smart_proxy({
            'id': org['id'],
            'smart-proxy-id': proxy['id'],
        })
        org = Org.info({'id': org['id']})
        self.assertNotIn(proxy['name'], org['smart-proxies'])
コード例 #2
0
    def test_positive_remove_capsule_by_id(self):
        """Remove a capsule from organization by its id

        @id: 71af64ec-5cbb-4dd8-ba90-652e302305ec

        @Assert: Capsule is removed from the org

        @CaseLevel: Integration
        """
        org = make_org()
        proxy = make_proxy()
        # Add capsule and org to cleanup list
        self.addCleanup(capsule_cleanup, proxy['id'])
        self.addCleanup(org_cleanup, org['id'])

        Org.add_smart_proxy({
            'id': org['id'],
            'smart-proxy-id': proxy['id'],
        })
        Org.remove_smart_proxy({
            'id': org['id'],
            'smart-proxy-id': proxy['id'],
        })
        org = Org.info({'id': org['id']})
        self.assertNotIn(proxy['name'], org['smart-proxies'])
コード例 #3
0
    def test_positive_remove_capsule_by_name(self):
        """Remove a capsule from organization by its name

        @id: f56eaf46-fef5-4b52-819f-e30e61f0ec4a

        @Assert: Capsule is removed from the org

        @CaseLevel: Integration
        """
        org = make_org()
        proxy = make_proxy()
        # Add capsule and org to cleanup list
        self.addCleanup(capsule_cleanup, proxy['id'])
        self.addCleanup(org_cleanup, org['id'])

        Org.add_smart_proxy({
            'name': org['name'],
            'smart-proxy': proxy['name'],
        })
        Org.remove_smart_proxy({
            'name': org['name'],
            'smart-proxy': proxy['name'],
        })
        org = Org.info({'name': org['name']})
        self.assertNotIn(proxy['name'], org['smart-proxies'])
コード例 #4
0
    def test_positive_remove_capsule_by_name(self):
        """Remove a capsule from organization by its name

        @id: f56eaf46-fef5-4b52-819f-e30e61f0ec4a

        @Assert: Capsule is removed from the org

        @CaseLevel: Integration
        """
        org = make_org()
        proxy = make_proxy()
        # Add capsule and org to cleanup list
        self.addCleanup(capsule_cleanup, proxy['id'])
        self.addCleanup(org_cleanup, org['id'])

        Org.add_smart_proxy({
            'name': org['name'],
            'smart-proxy': proxy['name'],
        })
        Org.remove_smart_proxy({
            'name': org['name'],
            'smart-proxy': proxy['name'],
        })
        org = Org.info({'name': org['name']})
        self.assertNotIn(proxy['name'], org['smart-proxies'])
コード例 #5
0
def test_positive_add_and_remove_capsules(proxy, module_org):
    """Add and remove a capsule from organization

    :id: 71af64ec-5cbb-4dd8-ba90-652e302305ec

    :expectedresults: Capsules are handled correctly

    :steps:
        1. add and remove capsule by ip
        2. add and remove capsule by name

    :CaseLevel: Integration
    """
    Org.add_smart_proxy({'id': module_org.id, 'smart-proxy-id': proxy['id']})
    org_info = Org.info({'name': module_org.name})
    assert proxy['name'] in org_info['smart-proxies'], "Failed to add capsule by id"
    Org.remove_smart_proxy({'id': module_org.id, 'smart-proxy-id': proxy['id']})
    org_info = Org.info({'id': module_org.id})
    assert proxy['name'] not in org_info['smart-proxies'], "Failed to remove capsule by id"
    Org.add_smart_proxy({'name': module_org.name, 'smart-proxy': proxy['name']})
    org_info = Org.info({'name': module_org.name})
    assert proxy['name'] in org_info['smart-proxies'], "Failed to add capsule by name"
    Org.remove_smart_proxy({'name': module_org.name, 'smart-proxy': proxy['name']})
    org_info = Org.info({'name': module_org.name})
    assert proxy['name'] not in org_info['smart-proxies'], "Failed to add capsule by name"
コード例 #6
0
    def test_positive_add_capsule_by_name(self):
        """@Test: Add a capsule by its name

        @Feature: Organization

        @Assert: Capsule is added to the org
        """
        org = make_org()
        proxy = make_proxy()
        Org.add_smart_proxy({
            'name': org['name'],
            'smart-proxy': proxy['name'],
        })
コード例 #7
0
    def test_positive_add_capsule_by_name(self):
        """Add a capsule to organization by its name

        @Feature: Organization

        @Assert: Capsule is added to the org
        """
        org = make_org()
        proxy = make_proxy()
        Org.add_smart_proxy({
            'name': org['name'],
            'smart-proxy': proxy['name'],
        })
        org = Org.info({'name': org['name']})
        self.assertIn(proxy['name'], org['smart-proxies'])
コード例 #8
0
    def test_positive_add_capsule_by_id(self):
        """Add a capsule to organization by its ID

        @feature: Organization

        @assert: Capsule is added to the org
        """
        org = make_org()
        proxy = make_proxy()
        Org.add_smart_proxy({
            'name': org['name'],
            'smart-proxy-id': proxy['id'],
        })
        org = Org.info({'name': org['name']})
        self.assertIn(proxy['name'], org['smart-proxies'])
コード例 #9
0
    def test_positive_remove_capsule_by_name(self):
        """Remove a capsule from organization by its name

        @Feature: Organization

        @Assert: Capsule is removed from the org
        """
        org = make_org()
        proxy = make_proxy()
        Org.add_smart_proxy({
            'name': org['name'],
            'smart-proxy': proxy['name'],
        })
        Org.remove_smart_proxy({
            'name': org['name'],
            'smart-proxy': proxy['name'],
        })
コード例 #10
0
ファイル: test_organization.py プロジェクト: jhutar/robottelo
    def test_positive_add_and_remove_capsules(self):
        """Add and remove a capsule from organization

        :id: 71af64ec-5cbb-4dd8-ba90-652e302305ec

        :expectedresults: Capsules are handled correctly

        :steps:
            1. add and remove capsule by ip
            2. add and remove capsule by name

        :CaseLevel: Integration
        """
        org = make_org()
        proxy = self._make_proxy()
        self.addCleanup(org_cleanup, org['id'])
        Org.add_smart_proxy({
            'id': org['id'],
            'smart-proxy-id': proxy['id'],
        })
        org_info = Org.info({'name': org['name']})
        self.assertIn(proxy['name'], org_info['smart-proxies'],
                      "Failed to add capsule by id")
        Org.remove_smart_proxy({
            'id': org['id'],
            'smart-proxy-id': proxy['id'],
        })
        org_info = Org.info({'id': org['id']})
        self.assertNotIn(proxy['name'], org_info['smart-proxies'],
                         "Failed to remove capsule by id")
        Org.add_smart_proxy({
            'name': org['name'],
            'smart-proxy': proxy['name'],
        })
        org_info = Org.info({'name': org['name']})
        self.assertIn(proxy['name'], org_info['smart-proxies'],
                      "Failed to add capsule by name")
        Org.remove_smart_proxy({
            'name': org['name'],
            'smart-proxy': proxy['name'],
        })
        org_info = Org.info({'name': org['name']})
        self.assertNotIn(proxy['name'], org_info['smart-proxies'],
                         "Failed to add capsule by name")
コード例 #11
0
    def test_positive_add_and_remove_capsules(self):
        """Add and remove a capsule from organization

        :id: 71af64ec-5cbb-4dd8-ba90-652e302305ec

        :expectedresults: Capsules are handled correctly

        :steps:
            1. add and remove capsule by ip
            2. add and remove capsule by name

        :CaseLevel: Integration
        """
        org = make_org()
        proxy = self._make_proxy()
        self.addCleanup(org_cleanup, org['id'])
        Org.add_smart_proxy({
            'id': org['id'],
            'smart-proxy-id': proxy['id'],
        })
        org_info = Org.info({'name': org['name']})
        self.assertIn(proxy['name'], org_info['smart-proxies'],
                      "Failed to add capsule by id")
        Org.remove_smart_proxy({
            'id': org['id'],
            'smart-proxy-id': proxy['id'],
        })
        org_info = Org.info({'id': org['id']})
        self.assertNotIn(proxy['name'], org_info['smart-proxies'],
                         "Failed to remove capsule by id")
        Org.add_smart_proxy({
            'name': org['name'],
            'smart-proxy': proxy['name'],
        })
        org_info = Org.info({'name': org['name']})
        self.assertIn(proxy['name'], org_info['smart-proxies'],
                      "Failed to add capsule by name")
        Org.remove_smart_proxy({
            'name': org['name'],
            'smart-proxy': proxy['name'],
        })
        org_info = Org.info({'name': org['name']})
        self.assertNotIn(proxy['name'], org_info['smart-proxies'],
                         "Failed to add capsule by name")
コード例 #12
0
    def test_positive_remove_capsule_by_id(self):
        """Remove a capsule from organization by its id

        @Feature: Organization

        @Assert: Capsule is removed from the org
        """
        org = make_org()
        proxy = make_proxy()
        Org.add_smart_proxy({
            'id': org['id'],
            'smart-proxy-id': proxy['id'],
        })
        Org.remove_smart_proxy({
            'id': org['id'],
            'smart-proxy-id': proxy['id'],
        })
        org = Org.info({'id': org['id']})
        self.assertNotIn(proxy['name'], org['smart-proxies'])
コード例 #13
0
    def test_positive_remove_capsule_by_name(self):
        """Remove a capsule from organization by its name

        @Feature: Organization

        @Assert: Capsule is removed from the org
        """
        org = make_org()
        proxy = make_proxy()
        Org.add_smart_proxy({
            'name': org['name'],
            'smart-proxy': proxy['name'],
        })
        Org.remove_smart_proxy({
            'name': org['name'],
            'smart-proxy': proxy['name'],
        })
        org = Org.info({'name': org['name']})
        self.assertNotIn(proxy['name'], org['smart-proxies'])
コード例 #14
0
    def test_positive_add_capsule_by_name(self):
        """Add a capsule to organization by its name

        @id: dbf9dd74-3b9e-4124-9468-b0eb978897df

        @Assert: Capsule is added to the org

        @CaseLevel: Integration
        """
        org = make_org()
        proxy = make_proxy()
        # Add capsule and org to cleanup list
        self.addCleanup(capsule_cleanup, proxy['id'])
        self.addCleanup(org_cleanup, org['id'])

        Org.add_smart_proxy({
            'name': org['name'],
            'smart-proxy': proxy['name'],
        })
        org = Org.info({'name': org['name']})
        self.assertIn(proxy['name'], org['smart-proxies'])
コード例 #15
0
    def test_positive_add_capsule_by_id(self):
        """Add a capsule to organization by its ID

        @id: 0a64ebbe-d357-4ca8-b19e-86ea0963dc71

        @assert: Capsule is added to the org

        @CaseLevel: Integration
        """
        org = make_org()
        proxy = make_proxy()
        # Add capsule and org to cleanup list
        self.addCleanup(capsule_cleanup, proxy['id'])
        self.addCleanup(org_cleanup, org['id'])

        Org.add_smart_proxy({
            'name': org['name'],
            'smart-proxy-id': proxy['id'],
        })
        org = Org.info({'name': org['name']})
        self.assertIn(proxy['name'], org['smart-proxies'])
コード例 #16
0
    def test_positive_add_capsule_by_id(self):
        """Add a capsule to organization by its ID

        @id: 0a64ebbe-d357-4ca8-b19e-86ea0963dc71

        @assert: Capsule is added to the org

        @CaseLevel: Integration
        """
        org = make_org()
        proxy = make_proxy()
        # Add capsule and org to cleanup list
        self.addCleanup(capsule_cleanup, proxy['id'])
        self.addCleanup(org_cleanup, org['id'])

        Org.add_smart_proxy({
            'name': org['name'],
            'smart-proxy-id': proxy['id'],
        })
        org = Org.info({'name': org['name']})
        self.assertIn(proxy['name'], org['smart-proxies'])
コード例 #17
0
    def test_positive_add_capsule_by_name(self):
        """Add a capsule to organization by its name

        @id: dbf9dd74-3b9e-4124-9468-b0eb978897df

        @Assert: Capsule is added to the org

        @CaseLevel: Integration
        """
        org = make_org()
        proxy = make_proxy()
        # Add capsule and org to cleanup list
        self.addCleanup(capsule_cleanup, proxy['id'])
        self.addCleanup(org_cleanup, org['id'])

        Org.add_smart_proxy({
            'name': org['name'],
            'smart-proxy': proxy['name'],
        })
        org = Org.info({'name': org['name']})
        self.assertIn(proxy['name'], org['smart-proxies'])