Extension support - easy lookup for toOFJava
[openflowplugin.git] / extension / test-extension / src / main / yang / test-provider-impl.yang
diff --git a/extension/test-extension/src/main/yang/test-provider-impl.yang b/extension/test-extension/src/main/yang/test-provider-impl.yang
new file mode 100644 (file)
index 0000000..ebb557e
--- /dev/null
@@ -0,0 +1,53 @@
+/*\r
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.\r
+ *\r
+ * This program and the accompanying materials are made available under the\r
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
+ * and is available at http://www.eclipse.org/legal/epl-v10.html\r
+ */\r
+\r
+module test-provider-impl {\r
+    yang-version 1;\r
+    namespace "urn:opendaylight:params:xml:ns:yang:controller:config:test-provider:impl";\r
+    prefix "test-provider-impl";\r
+\r
+    import config { prefix config; revision-date 2013-04-05; }\r
+    import opendaylight-md-sal-binding { prefix mdsal; revision-date 2013-10-28; }\r
+\r
+    revision "2014-06-11" {\r
+        description\r
+            "Initial revision.";\r
+    }\r
+\r
+    identity test-provider-impl {\r
+        base "config:module-type";\r
+\r
+        config:java-name-prefix TestProvider;\r
+    }\r
+\r
+    // Augments the 'configuration' choice node under modules/module.  \r
+    augment "/config:modules/config:module/config:configuration" {\r
+        case test-provider-impl {\r
+            when "/config:modules/config:module/config:type = 'test-provider-impl'";\r
+\r
+            //wires in the data-broker service \r
+            container data-broker {\r
+                uses config:service-ref {\r
+                    refine type {\r
+                        mandatory true;\r
+                        config:required-identity mdsal:binding-async-data-broker;\r
+                    }\r
+                }\r
+            }\r
+            // RPC Registry\r
+            container rpc-registry {\r
+                uses config:service-ref {\r
+                    refine type {\r
+                        mandatory true;\r
+                        config:required-identity mdsal:binding-rpc-registry;\r
+                    }\r
+                }\r
+            }\r
+        }\r
+    }\r
+}\r