Add of basic keypair test

* Added support for keypair client to compute fixture
* Added basic create/delete keypair test

Change-Id: If7a113711fdd38b0d2cf5c5bfa54852ec489a61d
This commit is contained in:
Daryl Walleck
2013-04-14 22:18:30 -07:00
parent 1272813c98
commit 5cdc900682
2 changed files with 8 additions and 8 deletions

View File

@@ -16,7 +16,7 @@ limitations under the License.
from test_repo.compute.fixtures import ComputeFixture
class FlavorsTest(ComputeFixture):
class KeypairsTest(ComputeFixture):
def test_create_delete_keypair(self):
resp = self.keypairs_client.create_keypair('test3')

View File

@@ -59,13 +59,13 @@ class ComputeFixture(BaseTestFixture):
cls.image_ref_alt = cls.images_config.secondary_image
cls.disk_path = cls.servers_config.instance_disk_path
cls.identity_config = TokenAPI_Config()
token_client = TokenAPI_Client(
cls.identity_config = OSTokenAPI_Config()
token_client = OSTokenAPI_Client(
cls.identity_config.authentication_endpoint, 'json', 'json')
token_behaviors = TokenAPI_Behaviors(token_client)
token_behaviors = OSTokenAPI_Behaviors(token_client)
access_data = token_behaviors.get_access_data(cls.identity_config.username,
cls.identity_config.api_key,
cls.identity_config.tenant_id)
cls.identity_config.password,
cls.identity_config.tenant_name)
compute_service = access_data.get_service(
cls.compute_config.compute_endpoint_name)
@@ -77,8 +77,8 @@ class ComputeFixture(BaseTestFixture):
'json', 'json')
cls.images_client = ImagesClient(url, access_data.token.id_,
'json', 'json')
#cls.keypairs_client = KeypairsClient(url, access_data.token.id_,
# 'json', 'json')
cls.keypairs_client = KeypairsClient(url, access_data.token.id_,
'json', 'json')
cls.server_behaviors = ServerBehaviors(cls.servers_client,
cls.servers_config,
cls.images_config,