summaryrefslogtreecommitdiffstats
path: root/windriver
diff options
context:
space:
mode:
authorBin Yang <bin.yang@windriver.com>2018-05-16 11:33:25 +0800
committerBin Yang <bin.yang@windriver.com>2018-05-16 11:33:25 +0800
commitb1d581f77eee6b1a592518ac7dca81448974cc02 (patch)
tree032dd7288cd1c78cecf11ecdd0201e3c91e0a33f /windriver
parent8e08c9dc1f6303827a07294e4792d3d49fbbac3c (diff)
Change logs to reduce uncessary info output
Change-Id: I2f2309316c048c9be98a35c72730a02a795329dc Issue-ID: Issue-ID: MULTICLOUD-232 Signed-off-by: Bin Yang <bin.yang@windriver.com>
Diffstat (limited to 'windriver')
-rw-r--r--windriver/titanium_cloud/vesagent/vesagent_ctrl.py23
1 files changed, 13 insertions, 10 deletions
diff --git a/windriver/titanium_cloud/vesagent/vesagent_ctrl.py b/windriver/titanium_cloud/vesagent/vesagent_ctrl.py
index 7049aee0..fbdd93f8 100644
--- a/windriver/titanium_cloud/vesagent/vesagent_ctrl.py
+++ b/windriver/titanium_cloud/vesagent/vesagent_ctrl.py
@@ -181,6 +181,7 @@ class VesAgentCtrl(APIView):
return Response(data={'error': str(e)},
status=status.HTTP_500_INTERNAL_SERVER_ERROR)
+ self._logger.info("return with %s" % status.HTTP_200_OK)
return Response(data={"vesagent_config":vesagent_config,
"vesagent_backlogs": vesagent_backlogs},
status=status.HTTP_200_OK)
@@ -233,6 +234,7 @@ class VesAgentCtrl(APIView):
return Response(data={'error': str(e)},
status=status.HTTP_500_INTERNAL_SERVER_ERROR)
+ self._logger.info("return with %s" % status.HTTP_201_CREATED)
return Response(data={"vesagent_config":vesagent_config,
"vesagent_backlogs": vesagent_backlogs},
status=status.HTTP_201_CREATED)
@@ -254,6 +256,7 @@ class VesAgentCtrl(APIView):
return Response(data={'error': str(e)},
status=status.HTTP_500_INTERNAL_SERVER_ERROR)
+ self._logger.info("return with %s" % status.HTTP_200_OK)
return Response(status=status.HTTP_200_OK)
@@ -263,7 +266,7 @@ class VesAgentCtrl(APIView):
:param vimid:
:return:
'''
- self._logger.info("vimid: %s" % vimid)
+ self._logger.debug("vimid: %s" % vimid)
vesAgentConfig = None
try:
@@ -284,7 +287,7 @@ class VesAgentCtrl(APIView):
self._logger.error("exception:%s" % str(e))
vesAgentConfig = {"error": "exception occurs"}
- self._logger.info("return")
+ self._logger.debug("return")
return vesAgentConfig
def clearBacklogsOneVIM(self, vimid):
@@ -294,7 +297,7 @@ class VesAgentCtrl(APIView):
:param vesagent_config:
:return:
'''
- self._logger.info("vimid: %s" % vimid)
+ self._logger.debug("vimid: %s" % vimid)
try:
# remove vimid from "VesAgentBacklogs.vimlist"
@@ -304,7 +307,7 @@ class VesAgentCtrl(APIView):
VesAgentBacklogsVimList = json.loads(VesAgentBacklogsVimListStr)
VesAgentBacklogsVimList = [v for v in VesAgentBacklogsVimList if v != vimid]
- logger.info("VesAgentBacklogs.vimlist is %s" % VesAgentBacklogsVimList)
+ logger.debug("VesAgentBacklogs.vimlist is %s" % VesAgentBacklogsVimList)
# cache forever
cache.set("VesAgentBacklogs.vimlist", json.dumps(VesAgentBacklogsVimList), None)
@@ -331,7 +334,7 @@ class VesAgentCtrl(APIView):
except Exception as e:
self._logger.error("exception:%s" % str(e))
- self._logger.info("return")
+ self._logger.debug("return")
return 0
def buildBacklogsOneVIM(self, vimid, vesagent_config = None):
@@ -341,7 +344,7 @@ class VesAgentCtrl(APIView):
:param vesagent_config: vesagent_config data in json object
:return:
'''
- self._logger.info("vimid: %s" % vimid)
+ self._logger.debug("vimid: %s" % vimid)
self._logger.debug("config data: %s" % vesagent_config)
VesAgentBacklogsConfig = None
@@ -370,7 +373,7 @@ class VesAgentCtrl(APIView):
VesAgentBacklogsVimList = [v for v in VesAgentBacklogsVimList if v != vimid]
VesAgentBacklogsVimList.append(vimid)
- logger.info("VesAgentBacklogs.vimlist is %s" % VesAgentBacklogsVimList)
+ logger.debug("VesAgentBacklogs.vimlist is %s" % VesAgentBacklogsVimList)
#cache forever
cache.set("VesAgentBacklogs.vimlist", json.dumps(VesAgentBacklogsVimList), None)
@@ -381,11 +384,11 @@ class VesAgentCtrl(APIView):
self._logger.error("exception:%s" % str(e))
VesAgentBacklogsConfig = {"error":"exception occurs during build backlogs"}
- self._logger.info("return")
+ self._logger.debug("return")
return VesAgentBacklogsConfig
def buildBacklog(self, vimid, backlog_input):
- self._logger.info("build backlog for: %s" % vimid)
+ self._logger.debug("build backlog for: %s" % vimid)
self._logger.debug("with input: %s" % backlog_input)
try:
@@ -399,5 +402,5 @@ class VesAgentCtrl(APIView):
self._logger.error("exception:%s" % str(e))
return None
- self._logger.info("return without backlog")
+ self._logger.debug("return without backlog")
return None