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))