Commit 2feb9477 authored by Stavros Sachtouris's avatar Stavros Sachtouris
Browse files

Adjust livetests to cloud renamings

parent f9d043ad
......@@ -39,9 +39,9 @@ from kamaki.clients.astakos import AstakosClient
class Astakos(livetest.Generic):
def setUp(self):
self.remote = 'remote.%s' % self['testremote']
self.cloud = 'cloud.%s' % self['testcloud']
self.client = AstakosClient(
self[self.remote, 'url'], self[self.remote, 'token'])
self[self.cloud, 'url'], self[self.cloud, 'token'])
with open(self['astakos', 'details']) as f:
self._astakos_details = eval(f.read())
......@@ -56,7 +56,7 @@ class Astakos(livetest.Generic):
self._test_0020_get_services()
def _test_0020_get_services(self):
for args in (tuple(), (self[self.remote, 'token'],)):
for args in (tuple(), (self[self.cloud, 'token'],)):
r = self.client.get_services(*args)
services = self._astakos_details['access']['serviceCatalog']
self.assertEqual(len(services), len(r))
......@@ -71,7 +71,7 @@ class Astakos(livetest.Generic):
parsed_services = dict()
for args in product(
self._astakos_details['access']['serviceCatalog'],
([tuple(), (self[self.remote, 'token'],)])):
([tuple(), (self[self.cloud, 'token'],)])):
service = args[0]
if service['type'] in parsed_services:
continue
......@@ -88,7 +88,7 @@ class Astakos(livetest.Generic):
parsed_services = dict()
for args in product(
self._astakos_details['access']['serviceCatalog'],
([], [self[self.remote, 'token']])):
([], [self[self.cloud, 'token']])):
service = args[0]
if service['type'] in parsed_services:
continue
......@@ -118,7 +118,7 @@ class Astakos(livetest.Generic):
def _test_0020_get(self):
for term in ('id', 'name', 'roles'):
self.assertEqual(
self.client.term(term, self[self.remote, 'token']),
self.client.term(term, self[self.cloud, 'token']),
self['astakos', term] or ([] if term == 'roles' else ''))
def test_list_users(self):
......
......@@ -54,14 +54,14 @@ class Cyclades(livetest.Generic):
self.servname1 = 'serv' + unicode(self.now)
self.servname2 = self.servname1 + '_v2'
self.servname1 += '_v1'
self.flavorid = 1
self.flavorid = self._flavor_details['id']
#servers have to be created at the begining...
self.networks = {}
self.netname1 = 'net' + unicode(self.now)
self.netname2 = 'net' + unicode(self.now) + '_v2'
self.remote = 'remote.%s' % self['testremote']
aurl, self.token = self[self.remote, 'url'], self[self.remote, 'token']
self.cloud = 'cloud.%s' % self['testcloud']
aurl, self.token = self[self.cloud, 'url'], self[self.cloud, 'token']
self.auth_base = AstakosClient(aurl, self.token)
curl = self.auth_base.get_service_endpoints('compute')['publicURL']
self.client = CycladesClient(curl, self.token)
......
......@@ -49,8 +49,8 @@ IMGMETA = set([
class Image(livetest.Generic):
def setUp(self):
self.now = time.mktime(time.gmtime())
self.remote = 'remote.%s' % self['testremote']
aurl, self.token = self[self.remote, 'url'], self[self.remote, 'token']
self.cloud = 'cloud.%s' % self['testcloud']
aurl, self.token = self[self.cloud, 'url'], self[self.cloud, 'token']
self.auth_base = AstakosCachedClient(aurl, self.token)
self.imgname = 'img_%s' % self.now
url = self.auth_base.get_service_endpoints('image')['publicURL']
......
......@@ -69,8 +69,8 @@ class Pithos(livetest.Generic):
files = []
def setUp(self):
self.remote = 'remote.%s' % self['testremote']
aurl, self.token = self[self.remote, 'url'], self[self.remote, 'token']
self.cloud = 'cloud.%s' % self['testcloud']
aurl, self.token = self[self.cloud, 'url'], self[self.cloud, 'token']
self.auth_base = AstakosClient(aurl, self.token)
purl = self.auth_base.get_service_endpoints(
'object-store')['publicURL']
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment