blob: 10e22693c3ba5232e5241a903025d0fe6d2200b3 [file] [log] [blame]
dwalleck5d734432012-10-04 01:11:47 -05001# vim: tabstop=4 shiftwidth=4 softtabstop=4
2
3# Copyright 2012 OpenStack, LLC
4# All Rights Reserved.
5#
6# Licensed under the Apache License, Version 2.0 (the "License"); you may
7# not use this file except in compliance with the License. You may obtain
8# a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15# License for the specific language governing permissions and limitations
16# under the License.
17
18import nose
19import unittest2 as unittest
20
Matthew Treinish481466b2012-12-20 17:16:01 -050021from tempest import clients
dwalleck5d734432012-10-04 01:11:47 -050022import tempest.config
23from tempest import exceptions
harika-vakadi2daed0a2013-01-01 20:51:39 +053024from tempest.tests.identity.base import DataGenerator
dwalleck5d734432012-10-04 01:11:47 -050025
26
27class BaseObjectTest(unittest.TestCase):
28
29 @classmethod
30 def setUpClass(cls):
Matthew Treinish481466b2012-12-20 17:16:01 -050031 cls.os = clients.Manager()
dwalleck5d734432012-10-04 01:11:47 -050032 cls.object_client = cls.os.object_client
33 cls.container_client = cls.os.container_client
34 cls.account_client = cls.os.account_client
35 cls.config = cls.os.config
harika-vakadi1a9ad612012-12-14 19:12:08 +053036 cls.custom_object_client = cls.os.custom_object_client
harika-vakadi2daed0a2013-01-01 20:51:39 +053037 cls.os_admin = clients.IdentityManager()
38 cls.token_client = cls.os_admin.token_client
39 cls.admin_client = cls.os_admin.admin_client
40 cls.custom_account_client = cls.os.custom_account_client
41 cls.os_alt = clients.AltManager()
42 cls.object_client_alt = cls.os_alt.object_client
43 cls.container_client_alt = cls.os_alt.container_client
44 cls.admin_client_alt = cls.os_alt.admin_client
45
46 cls.data = DataGenerator(cls.admin_client)
dwalleck5d734432012-10-04 01:11:47 -050047
48 try:
49 cls.account_client.list_account_containers()
50 except exceptions.EndpointNotFound:
51 enabled = False
52 skip_msg = "No OpenStack Object Storage API endpoint"
53 raise nose.SkipTest(skip_msg)