Added support to generate types from Choices and Cases added by augmentation.
[controller.git] / opendaylight / sal / yang-prototype / code-generator / samples / maven-code-gen-sample / src / main / yang / augment-monitoring@2013-07-01.yang
diff --git a/opendaylight/sal/yang-prototype/code-generator/samples/maven-code-gen-sample/src/main/yang/augment-monitoring@2013-07-01.yang b/opendaylight/sal/yang-prototype/code-generator/samples/maven-code-gen-sample/src/main/yang/augment-monitoring@2013-07-01.yang
new file mode 100644 (file)
index 0000000..4683598
--- /dev/null
@@ -0,0 +1,88 @@
+module augment-monitoring {
+    yang-version 1;
+    namespace "urn:ietf:params:xml:ns:yang:augment-monitoring";
+    prefix "amon";
+
+    import choice-monitoring { prefix nm; }
+
+    organization "OPEN DAYLIGHT";
+    contact "http://www.opendaylight.org/";
+
+    revision "2013-07-01" {
+            reference "NO REF";
+    }
+
+    augment "/nm:netconf-state/nm:datastores/nm:datastore/nm:locks/nm:lock-type" {
+        case autonomous-lock {
+            container autonomous-def {
+                leaf lock-id {
+                    type int32;
+                }
+
+                leaf lock-time {
+                    type uint32;
+                }
+            }
+        }
+
+        case anonymous-lock {
+            leaf lock-time {
+                type uint32;
+            }
+        }
+
+        leaf leaf-aug-case {
+            type string;
+        }
+    }
+
+    augment "/nm:netconf-state/nm:datastores/nm:datastore/nm:locks/nm:lock-type/nm:partial-lock" {
+        choice aug-case-by-choice {
+            case foo {
+                leaf foo {
+                    type string;
+                }
+            }
+
+            case bar {
+                leaf bar {
+                    type boolean;
+                }
+            }
+        }
+    }
+
+    augment "/nm:netconf-state/nm:datastores/nm:datastore" {
+        choice storage-format {
+            case xml {
+                container xml-def {
+                    leaf file-name {
+                        type string;
+                    }
+                }
+            }
+
+            case yang {
+                leaf yang-file-name {
+                    type string;
+                }
+            }
+
+            case unknown-files {
+                list files {
+                    key "file-name";
+
+                    leaf file-name {
+                        type string;
+                    }
+
+                    container file-data {
+                        leaf utf8-data {
+                            type string;
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
\ No newline at end of file