Merge "Add filtering capability to config.ini in order to reference logging bridge...
[controller.git] / opendaylight / md-sal / sal-binding-broker / src / main / yang / opendaylight-binding-broker-impl.yang
index 72bae68d4c759aa48af9cb50ebc9559c2e8c8fb7..428025a58df58180085c4811f441f7f5a0e5d702 100644 (file)
 module opendaylight-sal-binding-broker-impl {
-       yang-version 1;
+    yang-version 1;
     namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl";
     prefix "binding-impl";
 
-       import config { prefix config; revision-date 2013-04-05; }
-       import opendaylight-md-sal-binding {prefix sal;}
+    import config { prefix config; revision-date 2013-04-05; }
+    import opendaylight-md-sal-binding {prefix sal;}
+    import opendaylight-md-sal-dom {prefix dom;}
+    import opendaylight-md-sal-common {prefix common;}
 
     description
         "Service definition for Binding Aware MD-SAL.";
+
     revision "2013-10-28" {
         description
             "Initial revision";
     }
 
-    identity binding-broker-impl-singleton {
+    identity binding-dom-mapping-service {
+        base config:service-type;
+        config:java-class "org.opendaylight.yangtools.yang.data.impl.codec.BindingIndependentMappingService";
+    }
+
+
+    identity binding-broker-impl {
         base config:module-type;
         config:provided-service sal:binding-broker-osgi-registry;
-        config:java-name-prefix BindingBrokerImplSingleton;
+        config:provided-service sal:binding-rpc-registry;
+        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-rpc-broker {
+        base config:module-type;
+        config:provided-service sal:binding-rpc-registry;
+        config:java-name-prefix RpcBrokerImpl;
     }
 
-    grouping rpc-routing-table {
-        
-    
+    identity binding-notification-broker {
+        base config:module-type;
+        config:provided-service sal:binding-notification-service;
+        config:provided-service sal:binding-notification-subscription-service;
+        config:java-name-prefix NotificationBrokerImpl;
+    }
+
+    identity runtime-generated-mapping {
+        base config:module-type;
+        config:provided-service binding-dom-mapping-service;
+        config:java-name-prefix RuntimeMapping;
+    }
+
+    augment "/config:modules/config:module/config:configuration" {
+        case binding-broker-impl {
+            when "/config:modules/config:module/config:type = 'binding-broker-impl'";
+
+            /*
+            container rpc-registry {
+                uses config:service-ref {
+                    refine type {
+                        mandatory true;
+                        config:required-identity sal:binding-rpc-registry;
+                    }
+                }
+            }*/
+
+            container data-broker {
+                uses config:service-ref {
+                    refine type {
+                        mandatory true;
+                        config:required-identity sal:binding-data-broker;
+                    }
+                }
+            }
+
+            container notification-service {
+                uses config:service-ref {
+                    refine type {
+                        mandatory true;
+                        config:required-identity sal:binding-notification-service;
+                    }
+                }
+            }
+        }
     }
 
+    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;
+                    }
+                }
+            }
 
-    grouping rpc-router {
-        leaf module {
-            type string;
+            container mapping-service {
+                uses config:service-ref {
+                    refine type {
+                        mandatory true;
+                        config:required-identity binding-dom-mapping-service;
+                    }
+                }
+            }
         }
-        container routing-tables {
-            list routing-table {
-                uses rpc-routing-table;
+    }
+
+    augment "/config:modules/config:module/config:configuration" {
+        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;
+                    }
+                }
             }
         }
     }
 
 
     augment "/config:modules/config:module/config:state" {
-        case binding-broker-impl-singleton {
-            when "/config:modules/config:module/config:type = 'binding-broker-impl-singleton'";
-            
-            container rpc-routers {
-                list rpc-router {
-                    uses rpc-router;
-                }
+        case runtime-generated-mapping {
+            when "/config:modules/config:module/config:type = 'runtime-generated-mapping'";
+        }
+    }
+
+    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;
             }
         }
     }
-}
\ No newline at end of file
+    augment "/config:modules/config:module/config:state" {
+        case binding-rpc-broker {
+            when "/config:modules/config:module/config:type = 'binding-rpc-broker'";
+            uses common:rpc-state;
+        }
+    }
+    augment "/config:modules/config:module/config:state" {
+        case binding-notification-broker {
+            when "/config:modules/config:module/config:type = 'binding-notification-broker'";
+            uses common:notification-state;
+        }
+    }
+}