diff options
author | Bin Yang <bin.yang@windriver.com> | 2018-08-14 08:50:33 +0000 |
---|---|---|
committer | Bin Yang <bin.yang@windriver.com> | 2018-08-14 08:50:33 +0000 |
commit | 39d394d0a5c02fbe122f0b78f4a5a47bf5ec4bae (patch) | |
tree | 19dd713f9fc861125efc5fe6bc4f504ac08523fb /share/newton_base | |
parent | 375fa747adf4096042c9f606d2bb21e0e8165570 (diff) |
API upgrading for dnsaas
Change-Id: I328f8838b96013d5738354f751f5668f2136b1dc
Issue-ID: MULTICLOUD-297
Signed-off-by: Bin Yang <bin.yang@windriver.com>
Diffstat (limited to 'share/newton_base')
-rw-r--r-- | share/newton_base/proxy/dnsaasdelegate.py | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/share/newton_base/proxy/dnsaasdelegate.py b/share/newton_base/proxy/dnsaasdelegate.py index dd61c167..4ffe29f8 100644 --- a/share/newton_base/proxy/dnsaasdelegate.py +++ b/share/newton_base/proxy/dnsaasdelegate.py @@ -226,3 +226,49 @@ class DnsaasDelegate(Services): self._logger.debug("META,data> %s , %s" % (request.META, request.data)) return self._do_action("delete", request, vimid, "dns", requri) + + + +class APIv1DnsaasDelegate(Services): + ''' + DNSaaS delegate service API V1 + ''' + + def __init__(self): + self._logger = logger + + def get(self, request, cloud_owner="", cloud_region_id="", servicetype="dns-delegate", requri=""): + self._logger.info("cloud_owner,cloud_region_id: %s,%s" % (cloud_owner,cloud_region_id)) + + vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id) + return super(APIv1DnsaasDelegate,self).get(request, vimid, servicetype, requri) + + def head(self, request, cloud_owner="", cloud_region_id="", servicetype="dns-delegate", requri=""): + self._logger.info("cloud_owner,cloud_region_id: %s,%s" % (cloud_owner,cloud_region_id)) + + vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id) + return super(APIv1DnsaasDelegate,self).head(request, vimid, servicetype, requri) + + def post(self, request, cloud_owner="", cloud_region_id="", servicetype="dns-delegate", requri=""): + self._logger.info("cloud_owner,cloud_region_id: %s,%s" % (cloud_owner,cloud_region_id)) + + vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id) + return super(APIv1DnsaasDelegate,self).post(request, vimid, servicetype, requri) + + def put(self, request, cloud_owner="", cloud_region_id="", servicetype="dns-delegate", requri=""): + self._logger.info("cloud_owner,cloud_region_id: %s,%s" % (cloud_owner,cloud_region_id)) + + vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id) + return super(APIv1DnsaasDelegate,self).put(request, vimid, servicetype, requri) + + def patch(self, request, cloud_owner="", cloud_region_id="", servicetype="dns-delegate", requri=""): + self._logger.info("cloud_owner,cloud_region_id: %s,%s" % (cloud_owner,cloud_region_id)) + + vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id) + return super(APIv1DnsaasDelegate,self).patch(request, vimid, servicetype, requri) + + def delete(self, request, cloud_owner="", cloud_region_id="", servicetype="dns-delegate", requri=""): + self._logger.info("cloud_owner,cloud_region_id: %s,%s" % (cloud_owner,cloud_region_id)) + + vimid = extsys.encode_vim_id(cloud_owner, cloud_region_id) + return super(APIv1DnsaasDelegate,self).delete(request, vimid, servicetype, requri) |