From bb1a62a309ffbf0f16442e97e4508a0ddb9df2c9 Mon Sep 17 00:00:00 2001 From: Karl Newell Date: Tue, 10 Mar 2020 14:01:20 -0700 Subject: [PATCH] Update main.py. Add commit comment --- main.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 9cd21f7..5eb9ee2 100644 --- a/main.py +++ b/main.py @@ -78,7 +78,8 @@ def addNewFlowRoute(self, flowRouteData=None): cu.lock() cu.load(template_path='template/set-flow-route.conf', template_vars=flowRouteData) - cu.commit() + comment = 'Flow Route added: {}'.format(flowRouteData['flowRouteName']) + cu.commit(comment=comment) cu.unlock() logger.info('Flow Route added ' + str(flowRouteData)) @@ -121,7 +122,8 @@ def modFlowRoute(self, flowRouteData=None): cu = Config(dev) cu.lock() cu.load(template_path='template/set-flow-route.conf', template_vars=flowRouteData) - cu.commit() + comment = 'Flow Route modified: {}'.format(flowRouteData['flowRouteName']) + cu.commit(comment=comment) cu.unlock() logger.info('Flow Route modified ' + str(flowRouteData)) @@ -162,7 +164,8 @@ def delFlowRoute(self, flowRouteData=None): cu = Config(dev) cu.lock() cu.load(template_path='template/delete-flow-route.conf', template_vars=flowRouteData, merge=True) - cu.commit() + comment = 'Flow Route deleted: {}'.format(flowRouteData['flowRouteName']) + cu.commit(comment=comment) cu.unlock() logger.info('Flow Route deleted ' + str(flowRouteData))