Code Review
/
escalator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
ESCALATOR-42 Get available version list
[escalator.git]
/
client
/
escalatorclient
/
v1
/
versions.py
diff --git
a/client/escalatorclient/v1/versions.py
b/client/escalatorclient/v1/versions.py
index
f54ea23
..
f98a3ed
100644
(file)
--- 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 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')
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
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):
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
if obj_class is None:
obj_class = self.resource_class