donald-ngo | 20b6bca | 2011-12-15 13:35:12 -0800 | [diff] [blame^] | 1 | from tempest.common import rest_client |
2 | import json | ||||
3 | |||||
4 | |||||
5 | class ExtensionsClient(object): | ||||
6 | |||||
7 | def __init__(self, config, username, key, auth_url, tenant_name=None): | ||||
8 | self.config = config | ||||
9 | self.client = rest_client.RestClient(config, username, key, | ||||
10 | auth_url, tenant_name) | ||||
11 | |||||
12 | def list_extensions(self): | ||||
13 | url = 'extensions' | ||||
14 | resp, body = self.client.get(url) | ||||
15 | body = json.loads(body) | ||||
16 | return resp, body |