summaryrefslogtreecommitdiffstats
path: root/client/escalatorclient/v1/versions.py
diff options
context:
space:
mode:
authorkong wei <kong.wei2@zte.com.cn>2017-02-19 14:57:40 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-02-19 14:57:40 +0000
commit4f7acadc2e979d791aa8c2d69b60c92f69795084 (patch)
tree93e4e2ae4f62c284fac9948f7366bd04bebb0cf0 /client/escalatorclient/v1/versions.py
parentd40c048940b252b50355ea3aaf409f65edb6da5d (diff)
parent2cae5ac9c45eeecb496ef06d5d44ae8deec144b7 (diff)
Merge "ESCALATOR-42 Get available version list"
Diffstat (limited to 'client/escalatorclient/v1/versions.py')
-rw-r--r--client/escalatorclient/v1/versions.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/client/escalatorclient/v1/versions.py b/client/escalatorclient/v1/versions.py
index f54ea23..f98a3ed 100644
--- a/client/escalatorclient/v1/versions.py
+++ b/client/escalatorclient/v1/versions.py
@@ -22,6 +22,7 @@ import six.moves.urllib.parse as urlparse
from escalatorclient.common import utils
from escalatorclient.openstack.common.apiclient import base
+from escalatorclient.common.http import HTTPClient
CREATE_PARAMS = ('id', 'name', 'description', 'type', 'version', 'size',
'checksum', 'status', 'os_status', 'version_patch')
@@ -53,8 +54,14 @@ class Version(base.Resource):
class VersionManager(base.ManagerWithFind):
resource_class = Version
+ def get_version_client(self):
+ endpoint = "http://127.0.0.1:19292"
+ client = HTTPClient(endpoint)
+ return client
+
def _list(self, url, response_key, obj_class=None, body=None):
- resp, body = self.client.get(url)
+ version_client = self.get_version_client()
+ resp, body = version_client.get(url)
if obj_class is None:
obj_class = self.resource_class