Add ProviderID to DeviceStore port update APIs

- Not utilized by store implementation yet.

Change-Id: Iad757c2504fbeb3d9672f163aa05b5c45b19d3bd
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/OnosDistributedDeviceStore.java b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/OnosDistributedDeviceStore.java
index 4a0d347..d912983 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/OnosDistributedDeviceStore.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/OnosDistributedDeviceStore.java
@@ -192,7 +192,7 @@
     }
 
     @Override
-    public List<DeviceEvent> updatePorts(DeviceId deviceId,
+    public List<DeviceEvent> updatePorts(ProviderId providerId, DeviceId deviceId,
                                          List<PortDescription> portDescriptions) {
         List<DeviceEvent> events = new ArrayList<>();
         synchronized (this) {
@@ -296,7 +296,7 @@
     }
 
     @Override
-    public DeviceEvent updatePortStatus(DeviceId deviceId,
+    public DeviceEvent updatePortStatus(ProviderId providerId, DeviceId deviceId,
                                         PortDescription portDescription) {
         VersionedValue<Device> device = devices.get(deviceId);
         checkArgument(device != null, DEVICE_NOT_FOUND, deviceId);
diff --git a/core/store/hz/net/src/main/java/org/onlab/onos/store/device/impl/DistributedDeviceStore.java b/core/store/hz/net/src/main/java/org/onlab/onos/store/device/impl/DistributedDeviceStore.java
index a3d340b..5feb1ba 100644
--- a/core/store/hz/net/src/main/java/org/onlab/onos/store/device/impl/DistributedDeviceStore.java
+++ b/core/store/hz/net/src/main/java/org/onlab/onos/store/device/impl/DistributedDeviceStore.java
@@ -221,7 +221,7 @@
     }
 
     @Override
-    public List<DeviceEvent> updatePorts(DeviceId deviceId,
+    public List<DeviceEvent> updatePorts(ProviderId providerId, DeviceId deviceId,
                                          List<PortDescription> portDescriptions) {
         List<DeviceEvent> events = new ArrayList<>();
         synchronized (this) {
@@ -319,7 +319,7 @@
     }
 
     @Override
-    public DeviceEvent updatePortStatus(DeviceId deviceId,
+    public DeviceEvent updatePortStatus(ProviderId providerId, DeviceId deviceId,
                                         PortDescription portDescription) {
         synchronized (this) {
             Device device = devices.getUnchecked(deviceId).orNull();
diff --git a/core/store/hz/net/src/test/java/org/onlab/onos/store/device/impl/DistributedDeviceStoreTest.java b/core/store/hz/net/src/test/java/org/onlab/onos/store/device/impl/DistributedDeviceStoreTest.java
index 97b9ebe..80c9464 100644
--- a/core/store/hz/net/src/test/java/org/onlab/onos/store/device/impl/DistributedDeviceStoreTest.java
+++ b/core/store/hz/net/src/test/java/org/onlab/onos/store/device/impl/DistributedDeviceStoreTest.java
@@ -201,7 +201,7 @@
                 new DefaultPortDescription(P2, true)
                 );
 
-        List<DeviceEvent> events = deviceStore.updatePorts(DID1, pds);
+        List<DeviceEvent> events = deviceStore.updatePorts(PID, DID1, pds);
 
         Set<PortNumber> expectedPorts = Sets.newHashSet(P1, P2);
         for (DeviceEvent event : events) {
@@ -220,7 +220,7 @@
                 new DefaultPortDescription(P3, true)
                 );
 
-        events = deviceStore.updatePorts(DID1, pds2);
+        events = deviceStore.updatePorts(PID, DID1, pds2);
         assertFalse("event should be triggered", events.isEmpty());
         for (DeviceEvent event : events) {
             PortNumber num = event.port().number();
@@ -243,7 +243,7 @@
                 new DefaultPortDescription(P1, false),
                 new DefaultPortDescription(P2, true)
                 );
-        events = deviceStore.updatePorts(DID1, pds3);
+        events = deviceStore.updatePorts(PID, DID1, pds3);
         assertFalse("event should be triggered", events.isEmpty());
         for (DeviceEvent event : events) {
             PortNumber num = event.port().number();
@@ -268,9 +268,9 @@
         List<PortDescription> pds = Arrays.<PortDescription>asList(
                 new DefaultPortDescription(P1, true)
                 );
-        deviceStore.updatePorts(DID1, pds);
+        deviceStore.updatePorts(PID, DID1, pds);
 
-        DeviceEvent event = deviceStore.updatePortStatus(DID1,
+        DeviceEvent event = deviceStore.updatePortStatus(PID, DID1,
                 new DefaultPortDescription(P1, false));
         assertEquals(PORT_UPDATED, event.type());
         assertDevice(DID1, SW1, event.subject());
@@ -286,7 +286,7 @@
                 new DefaultPortDescription(P1, true),
                 new DefaultPortDescription(P2, true)
                 );
-        deviceStore.updatePorts(DID1, pds);
+        deviceStore.updatePorts(PID, DID1, pds);
 
         Set<PortNumber> expectedPorts = Sets.newHashSet(P1, P2);
         List<Port> ports = deviceStore.getPorts(DID1);
@@ -309,7 +309,7 @@
                 new DefaultPortDescription(P1, true),
                 new DefaultPortDescription(P2, false)
                 );
-        deviceStore.updatePorts(DID1, pds);
+        deviceStore.updatePorts(PID, DID1, pds);
 
         Port port1 = deviceStore.getPort(DID1, P1);
         assertEquals(P1, port1.number());
diff --git a/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleDeviceStore.java b/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleDeviceStore.java
index 3991ebf..df20b2d 100644
--- a/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleDeviceStore.java
+++ b/core/store/trivial/src/main/java/org/onlab/onos/store/trivial/impl/SimpleDeviceStore.java
@@ -143,7 +143,7 @@
     }
 
     @Override
-    public List<DeviceEvent> updatePorts(DeviceId deviceId,
+    public List<DeviceEvent> updatePorts(ProviderId providerId, DeviceId deviceId,
                                   List<PortDescription> portDescriptions) {
         List<DeviceEvent> events = new ArrayList<>();
         synchronized (this) {
@@ -221,7 +221,7 @@
     }
 
     @Override
-    public DeviceEvent updatePortStatus(DeviceId deviceId,
+    public DeviceEvent updatePortStatus(ProviderId providerId, DeviceId deviceId,
                                  PortDescription portDescription) {
         synchronized (this) {
             Device device = devices.get(deviceId);
diff --git a/core/store/trivial/src/test/java/org/onlab/onos/store/trivial/impl/SimpleDeviceStoreTest.java b/core/store/trivial/src/test/java/org/onlab/onos/store/trivial/impl/SimpleDeviceStoreTest.java
index f1210b0..42dc7c3 100644
--- a/core/store/trivial/src/test/java/org/onlab/onos/store/trivial/impl/SimpleDeviceStoreTest.java
+++ b/core/store/trivial/src/test/java/org/onlab/onos/store/trivial/impl/SimpleDeviceStoreTest.java
@@ -182,7 +182,7 @@
                 new DefaultPortDescription(P2, true)
                 );
 
-        List<DeviceEvent> events = deviceStore.updatePorts(DID1, pds);
+        List<DeviceEvent> events = deviceStore.updatePorts(PID, DID1, pds);
 
         Set<PortNumber> expectedPorts = Sets.newHashSet(P1, P2);
         for (DeviceEvent event : events) {
@@ -201,7 +201,7 @@
                 new DefaultPortDescription(P3, true)
                 );
 
-        events = deviceStore.updatePorts(DID1, pds2);
+        events = deviceStore.updatePorts(PID, DID1, pds2);
         assertFalse("event should be triggered", events.isEmpty());
         for (DeviceEvent event : events) {
             PortNumber num = event.port().number();
@@ -224,7 +224,7 @@
                 new DefaultPortDescription(P1, false),
                 new DefaultPortDescription(P2, true)
                 );
-        events = deviceStore.updatePorts(DID1, pds3);
+        events = deviceStore.updatePorts(PID, DID1, pds3);
         assertFalse("event should be triggered", events.isEmpty());
         for (DeviceEvent event : events) {
             PortNumber num = event.port().number();
@@ -249,9 +249,9 @@
         List<PortDescription> pds = Arrays.<PortDescription>asList(
                 new DefaultPortDescription(P1, true)
                 );
-        deviceStore.updatePorts(DID1, pds);
+        deviceStore.updatePorts(PID, DID1, pds);
 
-        DeviceEvent event = deviceStore.updatePortStatus(DID1,
+        DeviceEvent event = deviceStore.updatePortStatus(PID, DID1,
                 new DefaultPortDescription(P1, false));
         assertEquals(PORT_UPDATED, event.type());
         assertDevice(DID1, SW1, event.subject());
@@ -267,7 +267,7 @@
                 new DefaultPortDescription(P1, true),
                 new DefaultPortDescription(P2, true)
                 );
-        deviceStore.updatePorts(DID1, pds);
+        deviceStore.updatePorts(PID, DID1, pds);
 
         Set<PortNumber> expectedPorts = Sets.newHashSet(P1, P2);
         List<Port> ports = deviceStore.getPorts(DID1);
@@ -290,7 +290,7 @@
                 new DefaultPortDescription(P1, true),
                 new DefaultPortDescription(P2, false)
                 );
-        deviceStore.updatePorts(DID1, pds);
+        deviceStore.updatePorts(PID, DID1, pds);
 
         Port port1 = deviceStore.getPort(DID1, P1);
         assertEquals(P1, port1.number());