Merge "use env vars to specify OS_IDENTITY_API_VERSION"
This commit is contained in:
		@@ -10,6 +10,8 @@
 | 
				
			|||||||
#    License for the specific language governing permissions and limitations
 | 
					#    License for the specific language governing permissions and limitations
 | 
				
			||||||
#    under the License.
 | 
					#    under the License.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import os
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from tempest.lib.common.utils import data_utils
 | 
					from tempest.lib.common.utils import data_utils
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from functional.common import test
 | 
					from functional.common import test
 | 
				
			||||||
@@ -39,8 +41,11 @@ class IdentityTests(test.TestCase):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    @classmethod
 | 
					    @classmethod
 | 
				
			||||||
    def setUpClass(cls):
 | 
					    def setUpClass(cls):
 | 
				
			||||||
        if hasattr(super(IdentityTests, cls), 'setUpClass'):
 | 
					        # prepare v2 env
 | 
				
			||||||
            super(IdentityTests, cls).setUpClass()
 | 
					        os.environ['OS_IDENTITY_API_VERSION'] = '2.0'
 | 
				
			||||||
 | 
					        auth_url = os.environ.get('OS_AUTH_URL')
 | 
				
			||||||
 | 
					        auth_url = auth_url.replace('v3', 'v2.0')
 | 
				
			||||||
 | 
					        os.environ['OS_AUTH_URL'] = auth_url
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # create dummy project
 | 
					        # create dummy project
 | 
				
			||||||
        cls.project_name = data_utils.rand_name('TestProject')
 | 
					        cls.project_name = data_utils.rand_name('TestProject')
 | 
				
			||||||
@@ -10,10 +10,10 @@
 | 
				
			|||||||
#    License for the specific language governing permissions and limitations
 | 
					#    License for the specific language governing permissions and limitations
 | 
				
			||||||
#    under the License.
 | 
					#    under the License.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from functional.tests.identity.v2 import test_identity
 | 
					from functional.tests.identity.v2 import common
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class CatalogTests(test_identity.IdentityTests):
 | 
					class CatalogTests(common.IdentityTests):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_catalog_list(self):
 | 
					    def test_catalog_list(self):
 | 
				
			||||||
        raw_output = self.openstack('catalog list')
 | 
					        raw_output = self.openstack('catalog list')
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,10 +10,10 @@
 | 
				
			|||||||
#    License for the specific language governing permissions and limitations
 | 
					#    License for the specific language governing permissions and limitations
 | 
				
			||||||
#    under the License.
 | 
					#    under the License.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from functional.tests.identity.v2 import test_identity
 | 
					from functional.tests.identity.v2 import common
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class EC2CredentialsTests(test_identity.IdentityTests):
 | 
					class EC2CredentialsTests(common.IdentityTests):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_ec2_credentials_create(self):
 | 
					    def test_ec2_credentials_create(self):
 | 
				
			||||||
        self._create_dummy_ec2_credentials()
 | 
					        self._create_dummy_ec2_credentials()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,10 +10,10 @@
 | 
				
			|||||||
#    License for the specific language governing permissions and limitations
 | 
					#    License for the specific language governing permissions and limitations
 | 
				
			||||||
#    under the License.
 | 
					#    under the License.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from functional.tests.identity.v2 import test_identity
 | 
					from functional.tests.identity.v2 import common
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class EndpointTests(test_identity.IdentityTests):
 | 
					class EndpointTests(common.IdentityTests):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_endpoint_create(self):
 | 
					    def test_endpoint_create(self):
 | 
				
			||||||
        self._create_dummy_endpoint()
 | 
					        self._create_dummy_endpoint()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,10 +12,10 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
from tempest.lib.common.utils import data_utils
 | 
					from tempest.lib.common.utils import data_utils
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from functional.tests.identity.v2 import test_identity
 | 
					from functional.tests.identity.v2 import common
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class ProjectTests(test_identity.IdentityTests):
 | 
					class ProjectTests(common.IdentityTests):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_project_create(self):
 | 
					    def test_project_create(self):
 | 
				
			||||||
        project_name = data_utils.rand_name('TestProject')
 | 
					        project_name = data_utils.rand_name('TestProject')
 | 
				
			||||||
@@ -49,7 +49,7 @@ class ProjectTests(test_identity.IdentityTests):
 | 
				
			|||||||
    def test_project_list(self):
 | 
					    def test_project_list(self):
 | 
				
			||||||
        raw_output = self.openstack('project list')
 | 
					        raw_output = self.openstack('project list')
 | 
				
			||||||
        items = self.parse_listing(raw_output)
 | 
					        items = self.parse_listing(raw_output)
 | 
				
			||||||
        self.assert_table_structure(items, test_identity.BASIC_LIST_HEADERS)
 | 
					        self.assert_table_structure(items, common.BASIC_LIST_HEADERS)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_project_set(self):
 | 
					    def test_project_set(self):
 | 
				
			||||||
        project_name = self._create_dummy_project()
 | 
					        project_name = self._create_dummy_project()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,10 +10,10 @@
 | 
				
			|||||||
#    License for the specific language governing permissions and limitations
 | 
					#    License for the specific language governing permissions and limitations
 | 
				
			||||||
#    under the License.
 | 
					#    under the License.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from functional.tests.identity.v2 import test_identity
 | 
					from functional.tests.identity.v2 import common
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class RoleTests(test_identity.IdentityTests):
 | 
					class RoleTests(common.IdentityTests):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_role_create(self):
 | 
					    def test_role_create(self):
 | 
				
			||||||
        self._create_dummy_role()
 | 
					        self._create_dummy_role()
 | 
				
			||||||
@@ -27,7 +27,7 @@ class RoleTests(test_identity.IdentityTests):
 | 
				
			|||||||
        self._create_dummy_role()
 | 
					        self._create_dummy_role()
 | 
				
			||||||
        raw_output = self.openstack('role list')
 | 
					        raw_output = self.openstack('role list')
 | 
				
			||||||
        items = self.parse_listing(raw_output)
 | 
					        items = self.parse_listing(raw_output)
 | 
				
			||||||
        self.assert_table_structure(items, test_identity.BASIC_LIST_HEADERS)
 | 
					        self.assert_table_structure(items, common.BASIC_LIST_HEADERS)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_role_list_with_user_project(self):
 | 
					    def test_role_list_with_user_project(self):
 | 
				
			||||||
        project_name = self._create_dummy_project()
 | 
					        project_name = self._create_dummy_project()
 | 
				
			||||||
@@ -58,7 +58,7 @@ class RoleTests(test_identity.IdentityTests):
 | 
				
			|||||||
            '' % {'project': project_name,
 | 
					            '' % {'project': project_name,
 | 
				
			||||||
                  'user': username})
 | 
					                  'user': username})
 | 
				
			||||||
        items = self.parse_listing(raw_output)
 | 
					        items = self.parse_listing(raw_output)
 | 
				
			||||||
        self.assert_table_structure(items, test_identity.BASIC_LIST_HEADERS)
 | 
					        self.assert_table_structure(items, common.BASIC_LIST_HEADERS)
 | 
				
			||||||
        self.assertEqual(1, len(items))
 | 
					        self.assertEqual(1, len(items))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_role_show(self):
 | 
					    def test_role_show(self):
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,10 +10,10 @@
 | 
				
			|||||||
#    License for the specific language governing permissions and limitations
 | 
					#    License for the specific language governing permissions and limitations
 | 
				
			||||||
#    under the License.
 | 
					#    under the License.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from functional.tests.identity.v2 import test_identity
 | 
					from functional.tests.identity.v2 import common
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class ServiceTests(test_identity.IdentityTests):
 | 
					class ServiceTests(common.IdentityTests):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_service_create(self):
 | 
					    def test_service_create(self):
 | 
				
			||||||
        self._create_dummy_service()
 | 
					        self._create_dummy_service()
 | 
				
			||||||
@@ -27,7 +27,7 @@ class ServiceTests(test_identity.IdentityTests):
 | 
				
			|||||||
        self._create_dummy_service()
 | 
					        self._create_dummy_service()
 | 
				
			||||||
        raw_output = self.openstack('service list')
 | 
					        raw_output = self.openstack('service list')
 | 
				
			||||||
        items = self.parse_listing(raw_output)
 | 
					        items = self.parse_listing(raw_output)
 | 
				
			||||||
        self.assert_table_structure(items, test_identity.BASIC_LIST_HEADERS)
 | 
					        self.assert_table_structure(items, common.BASIC_LIST_HEADERS)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_service_show(self):
 | 
					    def test_service_show(self):
 | 
				
			||||||
        service_name = self._create_dummy_service()
 | 
					        service_name = self._create_dummy_service()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,10 +10,10 @@
 | 
				
			|||||||
#    License for the specific language governing permissions and limitations
 | 
					#    License for the specific language governing permissions and limitations
 | 
				
			||||||
#    under the License.
 | 
					#    under the License.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from functional.tests.identity.v2 import test_identity
 | 
					from functional.tests.identity.v2 import common
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class TokenTests(test_identity.IdentityTests):
 | 
					class TokenTests(common.IdentityTests):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_token_issue(self):
 | 
					    def test_token_issue(self):
 | 
				
			||||||
        self._create_dummy_token()
 | 
					        self._create_dummy_token()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,10 +13,10 @@
 | 
				
			|||||||
from tempest.lib.common.utils import data_utils
 | 
					from tempest.lib.common.utils import data_utils
 | 
				
			||||||
from tempest.lib import exceptions
 | 
					from tempest.lib import exceptions
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from functional.tests.identity.v2 import test_identity
 | 
					from functional.tests.identity.v2 import common
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class UserTests(test_identity.IdentityTests):
 | 
					class UserTests(common.IdentityTests):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_user_create(self):
 | 
					    def test_user_create(self):
 | 
				
			||||||
        self._create_dummy_user()
 | 
					        self._create_dummy_user()
 | 
				
			||||||
@@ -29,7 +29,7 @@ class UserTests(test_identity.IdentityTests):
 | 
				
			|||||||
    def test_user_list(self):
 | 
					    def test_user_list(self):
 | 
				
			||||||
        raw_output = self.openstack('user list')
 | 
					        raw_output = self.openstack('user list')
 | 
				
			||||||
        items = self.parse_listing(raw_output)
 | 
					        items = self.parse_listing(raw_output)
 | 
				
			||||||
        self.assert_table_structure(items, test_identity.BASIC_LIST_HEADERS)
 | 
					        self.assert_table_structure(items, common.BASIC_LIST_HEADERS)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_user_set(self):
 | 
					    def test_user_set(self):
 | 
				
			||||||
        username = self._create_dummy_user()
 | 
					        username = self._create_dummy_user()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -51,15 +51,11 @@ class IdentityTests(test.TestCase):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    @classmethod
 | 
					    @classmethod
 | 
				
			||||||
    def setUpClass(cls):
 | 
					    def setUpClass(cls):
 | 
				
			||||||
        if hasattr(super(IdentityTests, cls), 'setUpClass'):
 | 
					 | 
				
			||||||
            super(IdentityTests, cls).setUpClass()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        # prepare v3 env
 | 
					        # prepare v3 env
 | 
				
			||||||
 | 
					        os.environ['OS_IDENTITY_API_VERSION'] = '3'
 | 
				
			||||||
        auth_url = os.environ.get('OS_AUTH_URL')
 | 
					        auth_url = os.environ.get('OS_AUTH_URL')
 | 
				
			||||||
        auth_url = auth_url.replace('v2.0', 'v3')
 | 
					        auth_url = auth_url.replace('v2.0', 'v3')
 | 
				
			||||||
        os.environ['OS_AUTH_URL'] = auth_url
 | 
					        os.environ['OS_AUTH_URL'] = auth_url
 | 
				
			||||||
        os.environ['OS_IDENTITY_API_VERSION'] = '3'
 | 
					 | 
				
			||||||
        os.environ['OS_AUTH_TYPE'] = 'v3password'
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # create dummy domain
 | 
					        # create dummy domain
 | 
				
			||||||
        cls.domain_name = data_utils.rand_name('TestDomain')
 | 
					        cls.domain_name = data_utils.rand_name('TestDomain')
 | 
				
			||||||
@@ -10,10 +10,10 @@
 | 
				
			|||||||
#    License for the specific language governing permissions and limitations
 | 
					#    License for the specific language governing permissions and limitations
 | 
				
			||||||
#    under the License.
 | 
					#    under the License.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from functional.tests.identity.v3 import test_identity
 | 
					from functional.tests.identity.v3 import common
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class CatalogTests(test_identity.IdentityTests):
 | 
					class CatalogTests(common.IdentityTests):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_catalog_list(self):
 | 
					    def test_catalog_list(self):
 | 
				
			||||||
        raw_output = self.openstack('catalog list')
 | 
					        raw_output = self.openstack('catalog list')
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,10 +13,10 @@
 | 
				
			|||||||
from tempest.lib.common.utils import data_utils
 | 
					from tempest.lib.common.utils import data_utils
 | 
				
			||||||
from tempest.lib import exceptions
 | 
					from tempest.lib import exceptions
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from functional.tests.identity.v3 import test_identity
 | 
					from functional.tests.identity.v3 import common
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class DomainTests(test_identity.IdentityTests):
 | 
					class DomainTests(common.IdentityTests):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_domain_create(self):
 | 
					    def test_domain_create(self):
 | 
				
			||||||
        domain_name = data_utils.rand_name('TestDomain')
 | 
					        domain_name = data_utils.rand_name('TestDomain')
 | 
				
			||||||
@@ -33,7 +33,7 @@ class DomainTests(test_identity.IdentityTests):
 | 
				
			|||||||
        self._create_dummy_domain()
 | 
					        self._create_dummy_domain()
 | 
				
			||||||
        raw_output = self.openstack('domain list')
 | 
					        raw_output = self.openstack('domain list')
 | 
				
			||||||
        items = self.parse_listing(raw_output)
 | 
					        items = self.parse_listing(raw_output)
 | 
				
			||||||
        self.assert_table_structure(items, test_identity.BASIC_LIST_HEADERS)
 | 
					        self.assert_table_structure(items, common.BASIC_LIST_HEADERS)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_domain_delete(self):
 | 
					    def test_domain_delete(self):
 | 
				
			||||||
        domain_name = self._create_dummy_domain(add_clean_up=False)
 | 
					        domain_name = self._create_dummy_domain(add_clean_up=False)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,10 +12,10 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
from tempest.lib.common.utils import data_utils
 | 
					from tempest.lib.common.utils import data_utils
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from functional.tests.identity.v3 import test_identity
 | 
					from functional.tests.identity.v3 import common
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class EndpointTests(test_identity.IdentityTests):
 | 
					class EndpointTests(common.IdentityTests):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_endpoint_create(self):
 | 
					    def test_endpoint_create(self):
 | 
				
			||||||
        self._create_dummy_endpoint(interface='public')
 | 
					        self._create_dummy_endpoint(interface='public')
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,10 +12,10 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
from tempest.lib.common.utils import data_utils
 | 
					from tempest.lib.common.utils import data_utils
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from functional.tests.identity.v3 import test_identity
 | 
					from functional.tests.identity.v3 import common
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class GroupTests(test_identity.IdentityTests):
 | 
					class GroupTests(common.IdentityTests):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_group_create(self):
 | 
					    def test_group_create(self):
 | 
				
			||||||
        self._create_dummy_group()
 | 
					        self._create_dummy_group()
 | 
				
			||||||
@@ -24,7 +24,7 @@ class GroupTests(test_identity.IdentityTests):
 | 
				
			|||||||
        group_name = self._create_dummy_group()
 | 
					        group_name = self._create_dummy_group()
 | 
				
			||||||
        raw_output = self.openstack('group list')
 | 
					        raw_output = self.openstack('group list')
 | 
				
			||||||
        items = self.parse_listing(raw_output)
 | 
					        items = self.parse_listing(raw_output)
 | 
				
			||||||
        self.assert_table_structure(items, test_identity.BASIC_LIST_HEADERS)
 | 
					        self.assert_table_structure(items, common.BASIC_LIST_HEADERS)
 | 
				
			||||||
        self.assertIn(group_name, raw_output)
 | 
					        self.assertIn(group_name, raw_output)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_group_list_with_domain(self):
 | 
					    def test_group_list_with_domain(self):
 | 
				
			||||||
@@ -32,7 +32,7 @@ class GroupTests(test_identity.IdentityTests):
 | 
				
			|||||||
        raw_output = self.openstack(
 | 
					        raw_output = self.openstack(
 | 
				
			||||||
            'group list --domain %s' % self.domain_name)
 | 
					            'group list --domain %s' % self.domain_name)
 | 
				
			||||||
        items = self.parse_listing(raw_output)
 | 
					        items = self.parse_listing(raw_output)
 | 
				
			||||||
        self.assert_table_structure(items, test_identity.BASIC_LIST_HEADERS)
 | 
					        self.assert_table_structure(items, common.BASIC_LIST_HEADERS)
 | 
				
			||||||
        self.assertIn(group_name, raw_output)
 | 
					        self.assertIn(group_name, raw_output)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_group_delete(self):
 | 
					    def test_group_delete(self):
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,11 +10,11 @@
 | 
				
			|||||||
#    License for the specific language governing permissions and limitations
 | 
					#    License for the specific language governing permissions and limitations
 | 
				
			||||||
#    under the License.
 | 
					#    under the License.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from functional.tests.identity.v3 import test_identity
 | 
					from functional.tests.identity.v3 import common
 | 
				
			||||||
from tempest.lib.common.utils import data_utils
 | 
					from tempest.lib.common.utils import data_utils
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class IdentityProviderTests(test_identity.IdentityTests):
 | 
					class IdentityProviderTests(common.IdentityTests):
 | 
				
			||||||
    # Introduce functional test case for command 'Identity Provider'
 | 
					    # Introduce functional test case for command 'Identity Provider'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_idp_create(self):
 | 
					    def test_idp_create(self):
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,10 +12,10 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
from tempest.lib.common.utils import data_utils
 | 
					from tempest.lib.common.utils import data_utils
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from functional.tests.identity.v3 import test_identity
 | 
					from functional.tests.identity.v3 import common
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class ProjectTests(test_identity.IdentityTests):
 | 
					class ProjectTests(common.IdentityTests):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_project_create(self):
 | 
					    def test_project_create(self):
 | 
				
			||||||
        project_name = data_utils.rand_name('TestProject')
 | 
					        project_name = data_utils.rand_name('TestProject')
 | 
				
			||||||
@@ -57,14 +57,14 @@ class ProjectTests(test_identity.IdentityTests):
 | 
				
			|||||||
    def test_project_list(self):
 | 
					    def test_project_list(self):
 | 
				
			||||||
        raw_output = self.openstack('project list')
 | 
					        raw_output = self.openstack('project list')
 | 
				
			||||||
        items = self.parse_listing(raw_output)
 | 
					        items = self.parse_listing(raw_output)
 | 
				
			||||||
        self.assert_table_structure(items, test_identity.BASIC_LIST_HEADERS)
 | 
					        self.assert_table_structure(items, common.BASIC_LIST_HEADERS)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_project_list_with_domain(self):
 | 
					    def test_project_list_with_domain(self):
 | 
				
			||||||
        project_name = self._create_dummy_project()
 | 
					        project_name = self._create_dummy_project()
 | 
				
			||||||
        raw_output = self.openstack(
 | 
					        raw_output = self.openstack(
 | 
				
			||||||
            'project list --domain %s' % self.domain_name)
 | 
					            'project list --domain %s' % self.domain_name)
 | 
				
			||||||
        items = self.parse_listing(raw_output)
 | 
					        items = self.parse_listing(raw_output)
 | 
				
			||||||
        self.assert_table_structure(items, test_identity.BASIC_LIST_HEADERS)
 | 
					        self.assert_table_structure(items, common.BASIC_LIST_HEADERS)
 | 
				
			||||||
        self.assertIn(project_name, raw_output)
 | 
					        self.assertIn(project_name, raw_output)
 | 
				
			||||||
        self.assertTrue(len(items) > 0)
 | 
					        self.assertTrue(len(items) > 0)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,10 +10,10 @@
 | 
				
			|||||||
#    License for the specific language governing permissions and limitations
 | 
					#    License for the specific language governing permissions and limitations
 | 
				
			||||||
#    under the License.
 | 
					#    under the License.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from functional.tests.identity.v3 import test_identity
 | 
					from functional.tests.identity.v3 import common
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class RegionTests(test_identity.IdentityTests):
 | 
					class RegionTests(common.IdentityTests):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_region_create(self):
 | 
					    def test_region_create(self):
 | 
				
			||||||
        self._create_dummy_region()
 | 
					        self._create_dummy_region()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,10 +12,10 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
from tempest.lib.common.utils import data_utils
 | 
					from tempest.lib.common.utils import data_utils
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from functional.tests.identity.v3 import test_identity
 | 
					from functional.tests.identity.v3 import common
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class RoleTests(test_identity.IdentityTests):
 | 
					class RoleTests(common.IdentityTests):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_role_create(self):
 | 
					    def test_role_create(self):
 | 
				
			||||||
        self._create_dummy_role()
 | 
					        self._create_dummy_role()
 | 
				
			||||||
@@ -29,7 +29,7 @@ class RoleTests(test_identity.IdentityTests):
 | 
				
			|||||||
        self._create_dummy_role()
 | 
					        self._create_dummy_role()
 | 
				
			||||||
        raw_output = self.openstack('role list')
 | 
					        raw_output = self.openstack('role list')
 | 
				
			||||||
        items = self.parse_listing(raw_output)
 | 
					        items = self.parse_listing(raw_output)
 | 
				
			||||||
        self.assert_table_structure(items, test_identity.BASIC_LIST_HEADERS)
 | 
					        self.assert_table_structure(items, common.BASIC_LIST_HEADERS)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_role_list_with_user_project(self):
 | 
					    def test_role_list_with_user_project(self):
 | 
				
			||||||
        role_name = self._create_dummy_role()
 | 
					        role_name = self._create_dummy_role()
 | 
				
			||||||
@@ -69,7 +69,7 @@ class RoleTests(test_identity.IdentityTests):
 | 
				
			|||||||
                  'user': username,
 | 
					                  'user': username,
 | 
				
			||||||
                  'user_domain': self.domain_name})
 | 
					                  'user_domain': self.domain_name})
 | 
				
			||||||
        items = self.parse_listing(raw_output)
 | 
					        items = self.parse_listing(raw_output)
 | 
				
			||||||
        self.assert_table_structure(items, test_identity.BASIC_LIST_HEADERS)
 | 
					        self.assert_table_structure(items, common.BASIC_LIST_HEADERS)
 | 
				
			||||||
        self.assertEqual(1, len(items))
 | 
					        self.assertEqual(1, len(items))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_role_show(self):
 | 
					    def test_role_show(self):
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,10 +12,10 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
from tempest.lib.common.utils import data_utils
 | 
					from tempest.lib.common.utils import data_utils
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from functional.tests.identity.v3 import test_identity
 | 
					from functional.tests.identity.v3 import common
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class ServiceTests(test_identity.IdentityTests):
 | 
					class ServiceTests(common.IdentityTests):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_service_create(self):
 | 
					    def test_service_create(self):
 | 
				
			||||||
        self._create_dummy_service()
 | 
					        self._create_dummy_service()
 | 
				
			||||||
@@ -29,7 +29,7 @@ class ServiceTests(test_identity.IdentityTests):
 | 
				
			|||||||
        self._create_dummy_service()
 | 
					        self._create_dummy_service()
 | 
				
			||||||
        raw_output = self.openstack('service list')
 | 
					        raw_output = self.openstack('service list')
 | 
				
			||||||
        items = self.parse_listing(raw_output)
 | 
					        items = self.parse_listing(raw_output)
 | 
				
			||||||
        self.assert_table_structure(items, test_identity.BASIC_LIST_HEADERS)
 | 
					        self.assert_table_structure(items, common.BASIC_LIST_HEADERS)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_service_set(self):
 | 
					    def test_service_set(self):
 | 
				
			||||||
        service_name = self._create_dummy_service()
 | 
					        service_name = self._create_dummy_service()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,11 +10,11 @@
 | 
				
			|||||||
#    License for the specific language governing permissions and limitations
 | 
					#    License for the specific language governing permissions and limitations
 | 
				
			||||||
#    under the License.
 | 
					#    under the License.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from functional.tests.identity.v3 import test_identity
 | 
					from functional.tests.identity.v3 import common
 | 
				
			||||||
from tempest.lib.common.utils import data_utils
 | 
					from tempest.lib.common.utils import data_utils
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class ServiceProviderTests(test_identity.IdentityTests):
 | 
					class ServiceProviderTests(common.IdentityTests):
 | 
				
			||||||
    # Introduce functional test cases for command 'Service Provider'
 | 
					    # Introduce functional test cases for command 'Service Provider'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_sp_create(self):
 | 
					    def test_sp_create(self):
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,10 +10,10 @@
 | 
				
			|||||||
#    License for the specific language governing permissions and limitations
 | 
					#    License for the specific language governing permissions and limitations
 | 
				
			||||||
#    under the License.
 | 
					#    under the License.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from functional.tests.identity.v3 import test_identity
 | 
					from functional.tests.identity.v3 import common
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class TokenTests(test_identity.IdentityTests):
 | 
					class TokenTests(common.IdentityTests):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_token_issue(self):
 | 
					    def test_token_issue(self):
 | 
				
			||||||
        raw_output = self.openstack('token issue')
 | 
					        raw_output = self.openstack('token issue')
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,10 +12,10 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
from tempest.lib.common.utils import data_utils
 | 
					from tempest.lib.common.utils import data_utils
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from functional.tests.identity.v3 import test_identity
 | 
					from functional.tests.identity.v3 import common
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class UserTests(test_identity.IdentityTests):
 | 
					class UserTests(common.IdentityTests):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_user_create(self):
 | 
					    def test_user_create(self):
 | 
				
			||||||
        self._create_dummy_user()
 | 
					        self._create_dummy_user()
 | 
				
			||||||
@@ -31,7 +31,7 @@ class UserTests(test_identity.IdentityTests):
 | 
				
			|||||||
    def test_user_list(self):
 | 
					    def test_user_list(self):
 | 
				
			||||||
        raw_output = self.openstack('user list')
 | 
					        raw_output = self.openstack('user list')
 | 
				
			||||||
        items = self.parse_listing(raw_output)
 | 
					        items = self.parse_listing(raw_output)
 | 
				
			||||||
        self.assert_table_structure(items, test_identity.BASIC_LIST_HEADERS)
 | 
					        self.assert_table_structure(items, common.BASIC_LIST_HEADERS)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_user_set(self):
 | 
					    def test_user_set(self):
 | 
				
			||||||
        username = self._create_dummy_user()
 | 
					        username = self._create_dummy_user()
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user