Revert "custom logging--do not merge" 31/20431/2
authorAnil Vishnoi <vishnoianil@gmail.com>
Thu, 14 May 2015 19:51:32 +0000 (19:51 +0000)
committerAnil Vishnoi <vishnoianil@gmail.com>
Thu, 14 May 2015 19:56:53 +0000 (01:26 +0530)
This reverts commit 3fd5fa34e138be2e6fa773a57b8384353946397c.

Change-Id: I88352e97f1f87d0c81e5b3f8ea54e8d250819d9d
Signed-off-by: Anil Vishnoi <vishnoianil@gmail.com>
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/SouthboundHandler.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/OvsdbDataChangeListener.java

index 415e67a2bb481421ba88febe05bbe2d17d96e4b1..79a3f40e731467542568fa0d17045691afe8a3be 100644 (file)
@@ -76,16 +76,16 @@ public class SouthboundHandler extends AbstractHandler
 
     @Override
     public void ovsdbUpdate(Node node, DataObject resourceAugmentationData, OvsdbType ovsdbType, Action action) {
-        logger.trace("SouthboundHandler#ovsdbUpdate: {} - {} - <<{}>> <<{}>>", ovsdbType, action, node, resourceAugmentationData);
+        logger.info("ovsdbUpdate: {} - {} - <<{}>> <<{}>>", ovsdbType, action, node, resourceAugmentationData);
         this.enqueueEvent(new SouthboundEvent(node, resourceAugmentationData,
                 ovsdbTypeToSouthboundEventType(ovsdbType), action));
     }
 
     private void handleInterfaceUpdate (Node node, OvsdbTerminationPointAugmentation tp) {
-        logger.debug("SouthboundHandler#handleInterfaceUpdate <{}> <{}>", node, tp);
+        logger.debug("handleInterfaceUpdate <{}> <{}>", node, tp);
         NeutronNetwork network = tenantNetworkManager.getTenantNetwork(tp);
         if (network != null && !network.getRouterExternal()) {
-            logger.info("SouthboundHandler#handleInterfaceUpdate <{}> <{}> network: {}", node, tp, network.getNetworkUUID());
+            logger.trace("handleInterfaceUpdate <{}> <{}> network: {}", node, tp, network.getNetworkUUID());
             neutronL3Adapter.handleInterfaceEvent(node, tp, network, Action.UPDATE);
             if (bridgeConfigurationManager.createLocalNetwork(node, network)) {
                 networkingProviderManager.getProvider(node).handleInterfaceUpdate(network, node, tp);
@@ -97,7 +97,7 @@ public class SouthboundHandler extends AbstractHandler
 
     private void handleInterfaceDelete (Node node, OvsdbTerminationPointAugmentation intf,
                                         boolean isLastInstanceOnNode, NeutronNetwork network) {
-        logger.info("SouthboundHandler#handleInterfaceDelete: node: <{}>, isLastInstanceOnNode: {}, interface: <{}>",
+        logger.debug("handleInterfaceDelete: node: <{}>, isLastInstanceOnNode: {}, interface: <{}>",
                 node, isLastInstanceOnNode, intf);
 
         neutronL3Adapter.handleInterfaceEvent(node, intf, network, Action.DELETE);
@@ -140,7 +140,7 @@ public class SouthboundHandler extends AbstractHandler
 
     private void processPortDelete(Node node, OvsdbTerminationPointAugmentation ovsdbTerminationPointAugmentation,
                                    Object context) {
-        logger.info("SouthboundHandler#processPortDelete <{}> <{}>", node, ovsdbTerminationPointAugmentation);
+        logger.debug("processPortDelete <{}> <{}>", node, ovsdbTerminationPointAugmentation);
         NeutronNetwork network = null;
         if (context == null) {
             network = tenantNetworkManager.getTenantNetwork(ovsdbTerminationPointAugmentation);
@@ -211,7 +211,7 @@ public class SouthboundHandler extends AbstractHandler
      */
     @Override
     public void notifyNode (Node node, Action action) {
-        logger.info("SouthboundHandler#notifyNode: action: {}, Node <{}>", action, node);
+        logger.info("notifyNode: action: {}, Node <{}>", action, node);
 
         if (action.equals(Action.ADD)) {
             if (MdsalUtils.getBridge(node) != null) {
@@ -233,7 +233,7 @@ public class SouthboundHandler extends AbstractHandler
             return;
         }
         SouthboundEvent ev = (SouthboundEvent) abstractEvent;
-        logger.trace("SouthboundHandler#processEvent: {}", ev);
+        logger.debug("processEvent: {}", ev);
         switch (ev.getType()) {
             case NODE:
                 processOvsdbNodeEvent(ev);
@@ -274,18 +274,18 @@ public class SouthboundHandler extends AbstractHandler
     }
 
     private void processOvsdbNodeCreate(Node node, OvsdbNodeAugmentation ovsdbNode) {
-        logger.info("SouthboundHandler#processOvsdbNodeCreate <{}> <{}>", node, ovsdbNode);
+        logger.info("processOvsdbNodeCreate <{}> <{}>", node, ovsdbNode);
         nodeCacheManager.nodeAdded(node);
         bridgeConfigurationManager.prepareNode(node);
     }
 
     private void processOvsdbNodeUpdate(Node node, OvsdbNodeAugmentation ovsdbNode) {
-        logger.info("SouthboundHandler#processOvsdbNodeUpdate <{}> <{}>", node, ovsdbNode);
+        logger.info("processOvsdbNodeUpdate <{}> <{}>", node, ovsdbNode);
         nodeCacheManager.nodeAdded(node);
     }
 
     private void processOvsdbNodeDelete(Node node, OvsdbNodeAugmentation ovsdbNode) {
-        logger.info("SouthboundHandler#processOvsdbNodeDelete <{}> <{}>", node, ovsdbNode);
+        logger.info("processOvsdbNodeDelete <{}> <{}>", node, ovsdbNode);
         nodeCacheManager.nodeRemoved(node);
         /* TODO SB_MIGRATION
         * I don't think we want to do this yet
@@ -309,7 +309,7 @@ public class SouthboundHandler extends AbstractHandler
     }
 
     private void processPortUpdate(Node node, OvsdbTerminationPointAugmentation port) {
-        logger.info("SouthboundHandler#processPortUpdate <{}> <{}>", node, port);
+        logger.debug("processPortUpdate <{}> <{}>", node, port);
         NeutronNetwork network = tenantNetworkManager.getTenantNetwork(port);
         if (network != null && !network.getRouterExternal()) {
             this.handleInterfaceUpdate(node, port);
@@ -328,7 +328,7 @@ public class SouthboundHandler extends AbstractHandler
     }
 
     private void processOpenVSwitchUpdate(Node node) {
-        logger.info("SouthboundHandler#processOpenVSwitchUpdate {}", node);
+        logger.debug("processOpenVSwitchUpdate {}", node);
         // TODO this node might be the OvsdbNode and not have termination points
         // Would need to change listener or grab tp nodes in here.
         List<TerminationPoint> terminationPoints = MdsalUtils.extractTerminationPoints(node);
@@ -372,7 +372,7 @@ public class SouthboundHandler extends AbstractHandler
     }
 
     private void processBridgeCreate(Node node, OvsdbBridgeAugmentation bridge) {
-        logger.info("SouthboundHandler#processBridgeCreate <{}> <{}>", node, bridge);
+        logger.debug("processBridgeCreate <{}> <{}>", node, bridge);
         String datapathId = MdsalUtils.getDatapathId(bridge);
         // Having a datapathId means the ovsdb node has connected to ODL
         if (datapathId != null) {
@@ -383,7 +383,7 @@ public class SouthboundHandler extends AbstractHandler
     }
 
     private void processBridgeUpdate(Node node, OvsdbBridgeAugmentation bridge) {
-        logger.info("SouthboundHandler#processBridgeUpdate <{}> <{}>", node, bridge);
+        logger.debug("processBridgeUpdate <{}> <{}>", node, bridge);
         String datapathId = MdsalUtils.getDatapathId(bridge);
         // Having a datapathId means the ovsdb node has connected to ODL
         if (datapathId != null) {
@@ -394,7 +394,7 @@ public class SouthboundHandler extends AbstractHandler
     }
 
     private void processBridgeDelete(Node node, OvsdbBridgeAugmentation bridge) {
-        logger.info("SouthboundHandler#processBridgeDelete: Delete bridge from config data store: <{}> <{}>",
+        logger.debug("processBridgeDelete: Delete bridge from config data store: <{}> <{}>",
                 node, bridge);
         nodeCacheManager.nodeRemoved(node);
         // TODO SB_MIGRATION
index b2d6aa72a6f508f4ffb81c3209e17123cf14be62..1f698a89ccb629aa7d8fa1ee46679b3614ad2dad 100644 (file)
@@ -88,7 +88,7 @@ public class OvsdbDataChangeListener implements DataChangeListener, AutoCloseabl
         for (Map.Entry<InstanceIdentifier<?>, DataObject> created : changes.getCreatedData().entrySet()) {
             if (created.getValue() instanceof OvsdbNodeAugmentation) {
                 Node ovsdbNode = getNode(changes.getCreatedData(), created);
-                LOG.trace("OvsdbDataChangeListner#processOvsdbConnections: <{}>, ovsdbNode: <{}>", created, ovsdbNode);
+                LOG.trace("processOvsdbConnections: <{}>, ovsdbNode: <{}>", created, ovsdbNode);
                 ovsdbUpdate(ovsdbNode, created.getValue(), OvsdbInventoryListener.OvsdbType.NODE, Action.ADD);
             }
         }
@@ -99,8 +99,6 @@ public class OvsdbDataChangeListener implements DataChangeListener, AutoCloseabl
 
         for(InstanceIdentifier<?> removedOvsdbNode : changes.getRemovedPaths()) {
             if(removedOvsdbNode.getTargetType().equals(OvsdbNodeAugmentation.class)){
-                LOG.trace("OvsdbDataChangeListner#processOvsdbDisconnect: {}", removedOvsdbNode);
-
                 //Get top node to get details of all the bridge/termination point augmentation
                 // in case we want to do any cleanup task while processing node disconnection
                 Node parentNode = getNode(changes.getOriginalData(), removedOvsdbNode);
@@ -129,7 +127,7 @@ public class OvsdbDataChangeListener implements DataChangeListener, AutoCloseabl
 
         for(Map.Entry<InstanceIdentifier<?>, DataObject> updatedOvsdbNode : changes.getUpdatedData().entrySet()){
             if(updatedOvsdbNode.getKey().getTargetType().equals(OvsdbNodeAugmentation.class)){
-                LOG.trace("OvsdbDataChangeListner#processOvsdbConnectionAttributeUpdates: {}", updatedOvsdbNode);
+                LOG.trace("processOvsdbConnectionAttributeUpdates: {}", updatedOvsdbNode);
                 /* XXX (NOTE): Till now we don't really need the old ovsdb connection attributes data before update.
                  * I am passing the updated data of both Node and resource augmentation data (connection attributes).
                  * If in future we need old OvsdbNodeAugmentation attributes data, we will extract it from
@@ -156,7 +154,7 @@ public class OvsdbDataChangeListener implements DataChangeListener, AutoCloseabl
             AsyncDataChangeEvent<InstanceIdentifier<?>, DataObject> changes) {
         for(Map.Entry<InstanceIdentifier<?>, DataObject> newPort : changes.getCreatedData().entrySet()){
             if(newPort.getKey().getTargetType().equals(OvsdbTerminationPointAugmentation.class)){
-                LOG.trace("OvsdbDataChangeListner#processPortCreation: {}", newPort);
+                //LOG.trace("processPortCreation: {}", newPort);
                 //If user created termination point only, Node will get updated
                 Node tpParentNode  = getNode(changes.getUpdatedData(), newPort);
                 if(tpParentNode == null){
@@ -182,7 +180,6 @@ public class OvsdbDataChangeListener implements DataChangeListener, AutoCloseabl
 
         for(InstanceIdentifier<?> removedPort : changes.getRemovedPaths()) {
             if(removedPort.getTargetType().equals(OvsdbTerminationPointAugmentation.class)){
-                LOG.trace("OvsdbDataChangeListner#processPortDeletion: {}", removedPort);
                 Node tpParentNode = getNode(changes.getOriginalData(), removedPort);
                 if(tpParentNode == null){
                     //Throwing this warning in case behavior of southbound plugin changes.
@@ -207,7 +204,7 @@ public class OvsdbDataChangeListener implements DataChangeListener, AutoCloseabl
 
         for (Map.Entry<InstanceIdentifier<?>, DataObject> updatedPort : changes.getUpdatedData().entrySet()){
             if (updatedPort.getKey().getTargetType().equals(OvsdbTerminationPointAugmentation.class)){
-                LOG.trace("OvsdbDataChangeListner#processPortUpdate: <{}>", updatedPort);
+                //LOG.trace("processPortUpdate: <{}>", updatedPort);
                 /* XXX (NOTE): Till now we don't really need the old termination point data before update.
                  * I am passing the updated data of both Node and resource augmentation data (termination-point).
                  * If in future we need old TerminationPointAugmentation data, we will extract it from
@@ -234,7 +231,7 @@ public class OvsdbDataChangeListener implements DataChangeListener, AutoCloseabl
 
         for(Map.Entry<InstanceIdentifier<?>, DataObject> newBridge : changes.getCreatedData().entrySet()){
             if(newBridge.getKey().getTargetType().equals(OvsdbBridgeAugmentation.class)){
-                LOG.trace("OvsdbDataChangeListner#processBridgeCreation <{}>", newBridge);
+                //LOG.trace("processBridgeCreation <{}>", newBridge);
                 //Bridge augmentation happens directly on the Node so Node details should also exist in created data.
                 Node bridgeParentNode  = getNode(changes.getCreatedData(),newBridge);
                 if(bridgeParentNode == null){
@@ -255,7 +252,7 @@ public class OvsdbDataChangeListener implements DataChangeListener, AutoCloseabl
 
         for (Map.Entry<InstanceIdentifier<?>, DataObject> updatedBridge : changes.getUpdatedData().entrySet()) {
             if(updatedBridge.getKey().getTargetType().equals(OvsdbBridgeAugmentation.class)){
-                LOG.trace("OvsdbDataChangeListner#processBridgeUpdate <{}>", updatedBridge);
+                //LOG.trace("processBridgeUpdate <{}>", updatedBridge);
                 /* XXX (NOTE): Till now we don't really need the old bridge data before update.
                  * I am passing the updated data of both Node and resource augmentation data.
                  * If in future we need old bridgeAugmentationData, we will extract it from
@@ -281,7 +278,6 @@ public class OvsdbDataChangeListener implements DataChangeListener, AutoCloseabl
 
         for(InstanceIdentifier<?> removedBridge : changes.getRemovedPaths()) {
             if(removedBridge.getTargetType().equals(OvsdbBridgeAugmentation.class)){
-                LOG.trace("OvsdbDataChangeListner#processBridgeDeletion <{}>", removedBridge);
                 Node bridgeParentNode = getNode(changes.getOriginalData(), removedBridge);
                 if(bridgeParentNode == null){
                     //Throwing this warning to catch the behavior change of southbound plugin.