Ejemplo n.º 1
0
    def test_positive_remove_capsule_by_name(self):
        """Remove a capsule from organization by its name

        :id: 91dcafbe-5f52-48af-b5c7-9319b2929f5a

        :expectedresults: Capsule is removed from the org

        :CaseLevel: Integration
        """
        loc = make_location()
        proxy = make_proxy()
        # Add capsule and location to cleanup list
        self.addCleanup(capsule_cleanup, proxy['id'])
        self.addCleanup(location_cleanup, loc['id'])

        Location.add_smart_proxy({
            'name': loc['name'],
            'smart-proxy': proxy['name'],
        })
        Location.remove_smart_proxy({
            'name': loc['name'],
            'smart-proxy': proxy['name'],
        })
        loc = Location.info({'name': loc['name']})
        self.assertNotIn(proxy['name'], loc['smart-proxies'])
Ejemplo n.º 2
0
    def test_positive_add_and_remove_capsule(self, request):
        """Add a capsule to location and remove it

        :id: 15e3c1e6-4fa3-4965-8808-a9ba01d1c050

        :expectedresults: Capsule is added to the org

        :BZ: 1398695

        :CaseLevel: Integration
        """
        location = _location(request)
        proxy = _proxy(request)

        Location.add_smart_proxy({
            'name': location['name'],
            'smart-proxy-id': proxy['id']
        })
        location = Location.info({'name': location['name']})
        assert proxy['name'] in location['smart-proxies']

        Location.remove_smart_proxy({
            'name': location['name'],
            'smart-proxy': proxy['name']
        })
        location = Location.info({'name': location['name']})
        assert proxy['name'] not in location['smart-proxies']
Ejemplo n.º 3
0
    def test_positive_remove_capsule_by_id(self):
        """Remove a capsule from organization by its id

        :id: 98681f4f-a5e2-44f6-8879-d23ad90b4c59

        :expectedresults: Capsule is removed from the org

        :CaseLevel: Integration
        """
        loc = make_location()
        proxy = make_proxy()
        # Add capsule and location to cleanup list
        self.addCleanup(capsule_cleanup, proxy['id'])
        self.addCleanup(location_cleanup, loc['id'])

        Location.add_smart_proxy({
            'id': loc['id'],
            'smart-proxy-id': proxy['id'],
        })
        Location.remove_smart_proxy({
            'id': loc['id'],
            'smart-proxy-id': proxy['id'],
        })
        loc = Location.info({'id': loc['id']})
        self.assertNotIn(proxy['name'], loc['smart-proxies'])
Ejemplo n.º 4
0
    def test_positive_remove_capsule_by_name(self):
        """Remove a capsule from organization by its name

        :id: 91dcafbe-5f52-48af-b5c7-9319b2929f5a

        :expectedresults: Capsule is removed from the org

        :CaseLevel: Integration
        """
        loc = make_location()
        proxy = make_proxy()
        # Add capsule and location to cleanup list
        self.addCleanup(capsule_cleanup, proxy['id'])
        self.addCleanup(location_cleanup, loc['id'])

        Location.add_smart_proxy({
            'name': loc['name'],
            'smart-proxy': proxy['name'],
        })
        Location.remove_smart_proxy({
            'name': loc['name'],
            'smart-proxy': proxy['name'],
        })
        loc = Location.info({'name': loc['name']})
        self.assertNotIn(proxy['name'], loc['smart-proxies'])
Ejemplo n.º 5
0
    def test_positive_add_and_remove_capsule(self):
        """Add a capsule to location and remove it

        :id: 15e3c1e6-4fa3-4965-8808-a9ba01d1c050

        :expectedresults: Capsule is added to the org

        :BZ: 1398695

        :CaseLevel: Integration
        """
        loc = make_location()
        proxy = self._make_proxy()
        self.addCleanup(location_cleanup, loc['id'])

        Location.add_smart_proxy({
            'name': loc['name'],
            'smart-proxy-id': proxy['id']
        })
        loc = Location.info({'name': loc['name']})
        self.assertIn(proxy['name'], loc['smart-proxies'])
        Location.remove_smart_proxy({
            'name': loc['name'],
            'smart-proxy': proxy['name']
        })
        loc = Location.info({'name': loc['name']})
        self.assertNotIn(proxy['name'], loc['smart-proxies'])
Ejemplo n.º 6
0
    def test_positive_remove_capsule_by_id(self):
        """Remove a capsule from organization by its id

        :id: 98681f4f-a5e2-44f6-8879-d23ad90b4c59

        :expectedresults: Capsule is removed from the org

        :CaseLevel: Integration
        """
        loc = make_location()
        proxy = make_proxy()
        # Add capsule and location to cleanup list
        self.addCleanup(capsule_cleanup, proxy['id'])
        self.addCleanup(location_cleanup, loc['id'])

        Location.add_smart_proxy({
            'id': loc['id'],
            'smart-proxy-id': proxy['id'],
        })
        Location.remove_smart_proxy({
            'id': loc['id'],
            'smart-proxy-id': proxy['id'],
        })
        loc = Location.info({'id': loc['id']})
        self.assertNotIn(proxy['name'], loc['smart-proxies'])
Ejemplo n.º 7
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
        """
        loc = make_location()
        proxy = make_proxy()
        Location.add_smart_proxy({
            'name': loc['name'],
            'smart-proxy-id': proxy['id'],
        })
        loc = Location.info({'name': loc['name']})
        self.assertIn(proxy['name'], loc['smart-proxies'])
Ejemplo n.º 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
        """
        loc = make_location()
        proxy = make_proxy()
        Location.add_smart_proxy({
            'name': loc['name'],
            'smart-proxy-id': proxy['id'],
        })
        loc = Location.info({'name': loc['name']})
        self.assertIn(proxy['name'], loc['smart-proxies'])
Ejemplo n.º 9
0
    def test_positive_add_capsule_by_id(self):
        """Add a capsule to location by its ID

        :id: 15e3c1e6-4fa3-4965-8808-a9ba01d1c050

        :expectedresults: Capsule is added to the org

        :CaseLevel: Integration
        """
        loc = make_location()
        proxy = self._make_proxy()
        self.addCleanup(location_cleanup, loc['id'])

        Location.add_smart_proxy({
            'name': loc['name'],
            'smart-proxy-id': proxy['id'],
        })
        loc = Location.info({'name': loc['name']})
        self.assertIn(proxy['name'], loc['smart-proxies'])
Ejemplo n.º 10
0
    def test_positive_add_capsule_by_name(self):
        """Add a capsule to location by its name

        :id: 32b1e969-a1a8-4d65-bde9-a825ab542b1d

        :expectedresults: Capsule is added to the org

        :CaseLevel: Integration
        """
        loc = make_location()
        proxy = self._make_proxy()
        self.addCleanup(location_cleanup, loc['id'])

        Location.add_smart_proxy({
            'name': loc['name'],
            'smart-proxy': proxy['name'],
        })
        loc = Location.info({'name': loc['name']})
        self.assertIn(proxy['name'], loc['smart-proxies'])
Ejemplo n.º 11
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
        """
        loc = make_location()
        proxy = make_proxy()
        Location.add_smart_proxy({
            'name': loc['name'],
            'smart-proxy': proxy['name'],
        })
        Location.remove_smart_proxy({
            'name': loc['name'],
            'smart-proxy': proxy['name'],
        })
        loc = Location.info({'name': loc['name']})
        self.assertNotIn(proxy['name'], loc['smart-proxies'])
Ejemplo n.º 12
0
    def test_positive_add_capsule_by_name(self):
        """Add a capsule to location by its name

        :id: 32b1e969-a1a8-4d65-bde9-a825ab542b1d

        :expectedresults: Capsule is added to the org

        :CaseLevel: Integration
        """
        loc = make_location()
        proxy = self._make_proxy()
        self.addCleanup(location_cleanup, loc['id'])

        Location.add_smart_proxy({
            'name': loc['name'],
            'smart-proxy': proxy['name'],
        })
        loc = Location.info({'name': loc['name']})
        self.assertIn(proxy['name'], loc['smart-proxies'])
Ejemplo n.º 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
        """
        loc = make_location()
        proxy = make_proxy()
        Location.add_smart_proxy({
            'name': loc['name'],
            'smart-proxy': proxy['name'],
        })
        Location.remove_smart_proxy({
            'name': loc['name'],
            'smart-proxy': proxy['name'],
        })
        loc = Location.info({'name': loc['name']})
        self.assertNotIn(proxy['name'], loc['smart-proxies'])
Ejemplo n.º 14
0
    def test_positive_add_capsule_by_name(self):
        """Add a capsule to location by its name

        @id: 32b1e969-a1a8-4d65-bde9-a825ab542b1d

        @Assert: Capsule is added to the org

        @CaseLevel: Integration
        """
        loc = make_location()
        proxy = make_proxy()
        # Add capsule and location to cleanup list
        self.addCleanup(capsule_cleanup, proxy['id'])
        self.addCleanup(location_cleanup, loc['id'])

        Location.add_smart_proxy({
            'name': loc['name'],
            'smart-proxy': proxy['name'],
        })
        loc = Location.info({'name': loc['name']})
        self.assertIn(proxy['name'], loc['smart-proxies'])
Ejemplo n.º 15
0
    def test_positive_add_capsule_by_id(self):
        """Add a capsule to location by its ID

        :id: 15e3c1e6-4fa3-4965-8808-a9ba01d1c050

        :expectedresults: Capsule is added to the org

        :CaseLevel: Integration
        """
        loc = make_location()
        proxy = make_proxy()
        # Add capsule and location to cleanup list
        self.addCleanup(capsule_cleanup, proxy['id'])
        self.addCleanup(location_cleanup, loc['id'])

        Location.add_smart_proxy({
            'name': loc['name'],
            'smart-proxy-id': proxy['id'],
        })
        loc = Location.info({'name': loc['name']})
        self.assertIn(proxy['name'], loc['smart-proxies'])
Ejemplo n.º 16
0
    def test_positive_add_capsule_by_name(self):
        """Add a capsule to location by its name

        @id: 32b1e969-a1a8-4d65-bde9-a825ab542b1d

        @Assert: Capsule is added to the org

        @CaseLevel: Integration
        """
        loc = make_location()
        proxy = make_proxy()
        # Add capsule and location to cleanup list
        self.addCleanup(capsule_cleanup, proxy['id'])
        self.addCleanup(location_cleanup, loc['id'])

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