diff options
Diffstat (limited to 'windriver/titanium_cloud')
-rw-r--r-- | windriver/titanium_cloud/urls.py | 21 | ||||
-rw-r--r-- | windriver/titanium_cloud/vesagent/vesagent_ctrl.py | 21 |
2 files changed, 42 insertions, 0 deletions
diff --git a/windriver/titanium_cloud/urls.py b/windriver/titanium_cloud/urls.py index 51bcdd7f..cc538d63 100644 --- a/windriver/titanium_cloud/urls.py +++ b/windriver/titanium_cloud/urls.py @@ -44,6 +44,27 @@ urlpatterns = [ url(r'^api/multicloud-titanium_cloud/v0/(?P<vimid>[0-9a-zA-Z_-]+)/vesagent/?$', vesagent_ctrl.VesAgentCtrl.as_view()), +#API upgrading +# url(r'^api/multicloud-titanium_cloud/v1/(?P<cloud_owner>[0-9a-zA-Z_-]+)/(?P<cloud_region_id>[0-9a-zA-Z_-]+)/registry/?$', +# registration.Registry.as_view()), +# url(r'^api/multicloud-titanium_cloud/v1/(?P<cloud_owner>[0-9a-zA-Z_-]+)/(?P<cloud_region_id>[0-9a-zA-Z_-]+)/?$', +# registration.Registry.as_view()), +# url(r'^api/multicloud-titanium_cloud/v1/(?P<cloud_owner>[0-9a-zA-Z_-]+)/(?P<cloud_region_id>[0-9a-zA-Z_-]+)/exten', +# include('titanium_cloud.extensions.urls')), +# url(r'^api/multicloud-titanium_cloud/v1/(?P<cloud_owner>[0-9a-zA-Z_-]+)/(?P<cloud_region_id>[0-9a-zA-Z_-]+)/', +# include('titanium_cloud.proxy.urls')), +# url(r'^api/multicloud-titanium_cloud/v1/(?P<cloud_owner>[0-9a-zA-Z_-]+)/(?P<cloud_region_id>[0-9a-zA-Z_-]+)/tenants/?$', +# tenants.Tenants.as_view()), +# url(r'^api/multicloud-titanium_cloud/v1/(?P<cloud_owner>[0-9a-zA-Z_-]+)/(?P<cloud_region_id>[0-9a-zA-Z_-]+)/' +# '(?P<tenantid>[0-9a-zA-Z_-]{20,})/', include('titanium_cloud.requests.urls')), + # CapacityCheck +# url(r'^api/multicloud-titanium_cloud/v1/(?P<cloud_owner>[0-9a-zA-Z_-]+)/(?P<cloud_region_id>[0-9a-zA-Z_-]+)/capacity_check/?$', +# capacity.CapacityCheck.as_view()), + # events +# url(r'^api/multicloud-titanium_cloud/v1/(?P<cloud_owner>[0-9a-zA-Z_-]+)/(?P<cloud_region_id>[0-9a-zA-Z_-]+)/events_check/?$', +# events.EventsCheck.as_view()), + url(r'^api/multicloud-titanium_cloud/v1/(?P<cloud_owner>[0-9a-zA-Z_-]+)/(?P<cloud_region_id>[0-9a-zA-Z_-]+)/vesagent/?$', + vesagent_ctrl.VesAgentCtrlV1.as_view()), ] 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) |