Added controller-uuid to the model and got it into operational store. 58/18058/2
authorEd Warnicke <eaw@cisco.com>
Thu, 9 Apr 2015 20:17:52 +0000 (13:17 -0700)
committerSam Hague <shague@redhat.com>
Fri, 10 Apr 2015 11:18:11 +0000 (11:18 +0000)
Change-Id: I3fa2cc475362776bce096b0f2f4f7be1c2d8b455
Signed-off-by: Ed Warnicke <eaw@cisco.com>
southbound/southbound-api/src/main/yang/ovsdb.yang
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/SouthboundMapper.java

index f23ca5307f1d82c082bd9b22cc6991d5e8419575..36b0873424ee1f3d53f52aa7dc4a61f7fd873715 100755 (executable)
@@ -146,6 +146,11 @@ module ovsdb {
                 description "Uri telling bridge how to connect to controller";
                 type inet:uri;
             }
+            leaf controller-uuid {
+                description "The unique identifier of the controller";
+                type yang:uuid;
+            }
+
         }
 
         leaf datapath-id {
index fba60f5ebf97baf9a409308096cb8f6cf0bf1320..f4e4580a6a21862504c4fc1562c35daccd1699ad 100644 (file)
@@ -309,7 +309,12 @@ public class SouthboundMapper {
             if (controller != null && controller.getTargetColumn() != null
                     && controller.getTargetColumn() != null) {
                 String targetString = controller.getTargetColumn().getData();
-                controllerEntries.add(new ControllerEntryBuilder().setTarget(new Uri(targetString)).build());
+                org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid uuid =
+                        new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang
+                            .ietf.yang.types.rev130715.Uuid(controller.getUuid().toString());
+                controllerEntries.add(new ControllerEntryBuilder()
+                    .setTarget(new Uri(targetString))
+                    .setControllerUuid(uuid).build());
             }
         }
         return controllerEntries;