Exemple #1
0
    def test_create_floating_ip_pool(self):

        rbac_utils.switch_role(self, switchToRbacRole=True)
        try:
            self._create_floating_ip_pool()
        finally:
            rbac_utils.switch_role(self, switchToRbacRole=False)
Exemple #2
0
    def test_delete_floating_ip_pool(self):

        uuid = self._create_floating_ip_pool()['uuid']
        rbac_utils.switch_role(self, switchToRbacRole=True)
        try:
            self.fip_client.delete_floating_ip_pool(uuid)
        finally:
            rbac_utils.switch_role(self, switchToRbacRole=False)
Exemple #3
0
    def test_list_floating_ip_pools(self):

        self._create_floating_ip_pool()['uuid']

        rbac_utils.switch_role(self, switchToRbacRole=True)
        try:
            self.fip_client.list_floating_ip_pools()
        finally:
            rbac_utils.switch_role(self, switchToRbacRole=False)
Exemple #4
0
 def test_update_namespace(self):
     resp, ns_uuid = self.client.create_namespace()
     was_created = resp.status == 200
     rbac_utils.switch_role(self, switchToRbacRole=True)
     try:
         self.client.update_namespace(ns_uuid)
     finally:
         rbac_utils.switch_role(self, switchToRbacRole=False)
         if was_created:
             self.client.delete_namespace(ns_uuid)
Exemple #5
0
    def test_create_floating_ip(self):

        # Create floating ip pool
        fip_pool = self._create_floating_ip_pool()

        rbac_utils.switch_role(self, switchToRbacRole=True)
        try:
            self._create_floating_ip(fip_pool)
        finally:
            rbac_utils.switch_role(self, switchToRbacRole=False)
Exemple #6
0
    def test_update_floating_ip_pool(self):

        uuid = self._create_floating_ip_pool()['uuid']

        rbac_utils.switch_role(self, switchToRbacRole=True)
        try:
            self.fip_client.update_floating_ip_pool(
                uuid, display_name='rbac-fip-pool-new-name')
        finally:
            rbac_utils.switch_role(self, switchToRbacRole=False)
Exemple #7
0
    def test_show_floating_ip(self):

        # Create floating ip pool
        fip_pool = self._create_floating_ip_pool()
        uuid = self._create_floating_ip(fip_pool)['uuid']

        rbac_utils.switch_role(self, switchToRbacRole=True)
        try:
            self.fip_client.show_floating_ip(uuid)
        finally:
            rbac_utils.switch_role(self, switchToRbacRole=False)
    def test_delete_namespace(self):
	resp, ns_uuid = self.namespace_client.create_namespace()
	was_created = resp.status == 200
	was_deleted = False
        rbac_utils.switch_role(self, switchToRbacRole=True)
        try:
            resp, _ = self.namespace_client.delete_namespace(ns_uuid)
	    was_deleted = resp.status == 200
        finally:
            rbac_utils.switch_role(self, switchToRbacRole=False)
	    if was_created and not was_deleted:
	        self.namespace_client.delete_namespace(ns_uuid)
Exemple #9
0
 def test_list_namespaces(self):
     rbac_utils.switch_role(self, switchToRbacRole=True)
     try:
         self.client.list_namespaces()
     finally:
         rbac_utils.switch_role(self, switchToRbacRole=False)
Exemple #10
0
 def test_services_ext(self):
     try:
         rbac_utils.switch_role(self, switchToRbacRole=True)
         self.client.list_services()
     finally:
         rbac_utils.switch_role(self, switchToRbacRole=False)
Exemple #11
0
 def test_list_virtual_DNSs(self):
     rbac_utils.switch_role(self, switchToRbacRole=True)
     try:
         body = self.client.list_virtual_DNSs()
     finally:
         rbac_utils.switch_role(self, switchToRbacRole=False)