From 9154720606df1bb43e501a63cd23beca77a409eb Mon Sep 17 00:00:00 2001 From: Bin Yang Date: Tue, 28 May 2019 05:32:54 +0000 Subject: Fix issue of v1/.../tenants API Fix all openoapi v1 which use logger Change-Id: Iaf82c1ca17959725531f6b340e3e770844dd222c Issue-ID: MULTICLOUD-657 Signed-off-by: Bin Yang --- share/newton_base/openoapi/subnet.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'share/newton_base/openoapi/subnet.py') diff --git a/share/newton_base/openoapi/subnet.py b/share/newton_base/openoapi/subnet.py index 06e029a8..25b94aa9 100644 --- a/share/newton_base/openoapi/subnet.py +++ b/share/newton_base/openoapi/subnet.py @@ -41,6 +41,10 @@ class Subnets(APIView): ("allocation_pools", "allocationPools"), ] + def __init__(self): + super(Subnets, self).__init__() + self._logger = logger + def get(self, request, vimid="", tenantid="", subnetid=""): logger.info("vimid, tenantid, subnetid = %s,%s,%s" % (vimid, tenantid, subnetid)) if request.data: @@ -221,6 +225,10 @@ class Subnets(APIView): class APIv1Subnets(Subnets): + def __init__(self): + super(APIv1Subnets, self).__init__() + self._logger = logger + def get(self, request, cloud_owner="", cloud_region_id="", tenantid="", subnetid=""): self._logger.info("%s, %s" % (cloud_owner, cloud_region_id)) -- cgit 1.2.3-korg