summaryrefslogtreecommitdiffstats
path: root/windriver/titanium_cloud/vesagent/vesagent_ctrl.py
diff options
context:
space:
mode:
authorBin Yang <bin.yang@windriver.com>2018-08-03 06:13:42 +0000
committerBin Yang <bin.yang@windriver.com>2018-08-03 06:13:42 +0000
commitb906025377784de4152de1963b8c7df005d8b59c (patch)
treee31501c146256af537f8c3aeefefbd171e87f5ea /windriver/titanium_cloud/vesagent/vesagent_ctrl.py
parentf5718605d7aae67eb9b63e3d5fa3f2217ec9bdf2 (diff)
Upgrade API for vesagent
first try to add API v1 version Change-Id: Ic7511ce3c41792a3fa4a4ede84dd04483997033b Issue-ID: MULTICLOUD-297 Signed-off-by: Bin Yang <bin.yang@windriver.com>
Diffstat (limited to 'windriver/titanium_cloud/vesagent/vesagent_ctrl.py')
-rw-r--r--windriver/titanium_cloud/vesagent/vesagent_ctrl.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/windriver/titanium_cloud/vesagent/vesagent_ctrl.py b/windriver/titanium_cloud/vesagent/vesagent_ctrl.py
index 54b770bf..207ae561 100644
--- a/windriver/titanium_cloud/vesagent/vesagent_ctrl.py
+++ b/windriver/titanium_cloud/vesagent/vesagent_ctrl.py
@@ -404,3 +404,24 @@ class VesAgentCtrl(APIView):
self._logger.debug("return without backlog")
return None
+
+
+class VesAgentCtrlV1(VesAgentCtrl):
+
+ def __init__(self):
+ self._logger = logger
+ self.proxy_prefix = settings.MULTICLOUD_PREFIX
+
+ def get(self, request, cloud_owner="", cloud_region_id=""):
+ '''
+ :param request:
+ :param cloud_owner:
+ :param cloud_region_id:
+ :return:
+ '''
+ self._logger.info("cloud_owner,cloud_region_id: %s,%s" % (cloud_owner,cloud_region_id))
+ self._logger.debug("with META: %s" % request.META)
+
+ #temp realization for API upgrading only, assume cloud_owner does not contains "_" , refactor it later
+ vimid = cloud_owner+"_"+cloud_region_id
+ return super(VesAgentCtrlV1,self).get(request, vimid)