Merge "Revert "Revert "BUG-1425: Integrated new Binding to Normalized Node codec...
[controller.git] / opendaylight / md-sal / sal-binding-broker / src / main / yang / opendaylight-binding-broker-impl.yang
index 428025a58df58180085c4811f441f7f5a0e5d702..aec27235910633fb34389208e02b550c81a85a43 100644 (file)
@@ -18,10 +18,9 @@ module opendaylight-sal-binding-broker-impl {
 
     identity binding-dom-mapping-service {
         base config:service-type;
-        config:java-class "org.opendaylight.yangtools.yang.data.impl.codec.BindingIndependentMappingService";
+        config:java-class "org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec";
     }
 
-
     identity binding-broker-impl {
         base config:module-type;
         config:provided-service sal:binding-broker-osgi-registry;
@@ -29,19 +28,18 @@ module opendaylight-sal-binding-broker-impl {
         config:java-name-prefix BindingBrokerImpl;
     }
 
-    identity binding-data-broker {
-        base config:module-type;
-        config:provided-service sal:binding-data-broker;
-        config:provided-service sal:binding-data-consumer-broker;
-        config:java-name-prefix DataBrokerImpl;
-    }
-
     identity binding-data-compatible-broker {
         base config:module-type;
         config:provided-service sal:binding-data-broker;
         config:provided-service sal:binding-data-consumer-broker;
         config:java-name-prefix ForwardedCompatibleDataBrokerImpl;
     }
+    
+    identity binding-forwarded-data-broker {
+        base config:module-type;
+        config:provided-service sal:binding-async-data-broker;
+        config:java-name-prefix BindingAsyncDataBrokerImpl;
+    }
 
     identity binding-rpc-broker {
         base config:module-type;
@@ -62,6 +60,26 @@ module opendaylight-sal-binding-broker-impl {
         config:java-name-prefix RuntimeMapping;
     }
 
+    grouping dom-forwarding-component {
+        container dom-async-broker {
+                uses config:service-ref {
+                    refine type {
+                        mandatory true;
+                        config:required-identity dom:dom-broker-osgi-registry;
+                    }
+                }
+            }
+
+        container binding-mapping-service {
+            uses config:service-ref {
+                refine type {
+                    mandatory true;
+                    config:required-identity binding-dom-mapping-service;
+                }
+            }
+        }
+    }
+
     augment "/config:modules/config:module/config:configuration" {
         case binding-broker-impl {
             when "/config:modules/config:module/config:type = 'binding-broker-impl'";
@@ -79,7 +97,7 @@ module opendaylight-sal-binding-broker-impl {
             container data-broker {
                 uses config:service-ref {
                     refine type {
-                        mandatory true;
+                        mandatory false;
                         config:required-identity sal:binding-data-broker;
                     }
                 }
@@ -93,26 +111,12 @@ module opendaylight-sal-binding-broker-impl {
                     }
                 }
             }
-        }
-    }
-
-    augment "/config:modules/config:module/config:configuration" {
-        case binding-data-broker {
-            when "/config:modules/config:module/config:type = 'binding-data-broker'";
-            container dom-broker {
-                uses config:service-ref {
-                    refine type {
-                        mandatory true;
-                        config:required-identity dom:dom-broker-osgi-registry;
-                    }
-                }
-            }
 
-            container mapping-service {
+            container root-data-broker {
                 uses config:service-ref {
                     refine type {
-                        mandatory true;
-                        config:required-identity binding-dom-mapping-service;
+                        mandatory false;
+                        config:required-identity sal:binding-async-data-broker;
                     }
                 }
             }
@@ -123,22 +127,15 @@ module opendaylight-sal-binding-broker-impl {
         case binding-data-compatible-broker {
             when "/config:modules/config:module/config:type = 'binding-data-compatible-broker'";
 
-            container dom-async-broker {
-                uses config:service-ref {
-                    refine type {
-                        mandatory true;
-                        config:required-identity dom:dom-broker-osgi-registry;
-                    }
-                }
-            }
-
-            container binding-mapping-service {
-                uses config:service-ref {
-                    refine type {
-                        mandatory true;
-                        config:required-identity binding-dom-mapping-service;
-                    }
-                }
+            uses dom-forwarding-component;
+        }
+    }
+    
+    augment "/config:modules/config:module/config:configuration" {
+        case binding-forwarded-data-broker {
+            when "/config:modules/config:module/config:type = 'binding-forwarded-data-broker'";
+            container binding-forwarded-data-broker {
+                uses dom-forwarding-component;
             }
         }
     }
@@ -150,14 +147,6 @@ module opendaylight-sal-binding-broker-impl {
         }
     }
 
-    augment "/config:modules/config:module/config:state" {
-        case binding-data-broker {
-            when "/config:modules/config:module/config:type = 'binding-data-broker'";
-            container data {
-                uses common:data-state;
-            }
-        }
-    }
     augment "/config:modules/config:module/config:state" {
         case binding-rpc-broker {
             when "/config:modules/config:module/config:type = 'binding-rpc-broker'";