Fixed few things:
[ovsdb.git] / openstack / net-virt / src / main / java / org / opendaylight / ovsdb / openstack / netvirt / SouthboundEvent.java
index 122d870e803c8037a4bd65b75c20c8605a41af76..afcbb8e6c55821018769c0797843598b282f60cb 100644 (file)
@@ -13,6 +13,7 @@ import org.opendaylight.ovsdb.openstack.netvirt.api.Action;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbBridgeAugmentation;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation;
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
+import org.opendaylight.yangtools.yang.binding.DataObject;
 
 public class SouthboundEvent extends AbstractEvent {
     public enum Type { NODE, OPENVSWITCH, BRIDGE, CONTROLLER, PORT }
@@ -21,6 +22,7 @@ public class SouthboundEvent extends AbstractEvent {
     private String tableName;
     private String uuid;
     private Object context;
+    private DataObject augmentationData;
     private OvsdbBridgeAugmentation bridge;
     private OvsdbTerminationPointAugmentation port;
     private String portName;
@@ -42,12 +44,21 @@ public class SouthboundEvent extends AbstractEvent {
         this.port = port;
         this.portName = portName;
     }
+
     public SouthboundEvent(Node node, Type type, Action action) {
         super(HandlerType.SOUTHBOUND, action);
         this.type = type;
         this.node = node;
     }
 
+    public SouthboundEvent(Node node, DataObject resourceAugmentationData, Type type, Action action) {
+        super(HandlerType.SOUTHBOUND, action);
+        this.type = type;
+        this.node = node;
+        this.augmentationData = resourceAugmentationData;
+    }
+
+
     public Type getType() {
         return type;
     }
@@ -72,11 +83,17 @@ public class SouthboundEvent extends AbstractEvent {
     public String getPortName() {
         return portName;
     }
+
+    public DataObject getAugmentationData() {
+        return augmentationData;
+    }
+
     @Override
     public String toString() {
         //if (type == Type.NODE) {
             return "SouthboundEvent [type=" + type
                     + ", action=" + super.getAction()
+                    + ",augmentationData="+augmentationData
                     + ", node=" + node + "]";
         //} else {
         //    return "SouthboundEvent [type=" + type + "]";
@@ -91,6 +108,7 @@ public class SouthboundEvent extends AbstractEvent {
         result = prime * result + ((tableName == null) ? 0 : tableName.hashCode());
         result = prime * result + ((type == null) ? 0 : type.hashCode());
         result = prime * result + ((uuid == null) ? 0 : uuid.hashCode());
+        result = prime * result + ((augmentationData == null) ? 0 : augmentationData.hashCode());
         return result;
     }
     @Override