Merge "Implemented YANG identityref type parsing. Refactored augmentation parsing...
[controller.git] / opendaylight / sal / yang-prototype / code-generator / yang-model-parser-impl / src / test / resources / types / custom-types-test@2012-4-4.yang
index 4231699b50df19cb8cd5d359c640b179f7294540..86f5f195b8a8633bee31377b05b02cc575f1e98a 100644 (file)
@@ -4,8 +4,34 @@ module custom-types-test {
     namespace "urn:simple.container.demo";
     prefix "iit";
     
-    organization "Cisco";
+    organization "opendaylight";
     contact "WILL-BE-DEFINED-LATER";
+        revision 2012-04-16 {
+    }
+    
+    
+    typedef access-operations-type {
+        type bits {
+            bit create {
+                description "Any protocol operation that creates a new data node.";
+            }
+            bit read {
+                description "Any protocol operation or notification that returns the value of a data node.";
+                position 500;
+            }
+            bit update {
+                description "Any protocol operation that alters an existing data node.";
+            }
+            bit delete {
+                description "Any protocol operation that removes a data node.";
+                position 365;
+            }
+            bit exec {
+                description "Execution access to the specified protocol operation.";
+            }
+        }
+        description "NETCONF Access Operation.";
+    }
      
     leaf inst-id-leaf1 {
         type instance-identifier {
@@ -25,5 +51,65 @@ module custom-types-test {
         base "crypto-base";
         description "crypto-alg description";
     }
-       
+    
+    leaf mybits {
+        type bits {
+            bit disable-nagle {
+                position 0;
+            }
+            bit auto-sense-speed {
+                position 1;
+            }
+            bit 10-Mb-only {
+                position 2;
+            }
+        }
+        default "auto-sense-speed";
+    }
+    
+   typedef ip-version {
+     type enumeration {
+       enum unknown {
+         description
+          "An unknown or unspecified version of the Internet protocol.";
+       }
+       enum ipv4 {
+         value "19";
+         description
+          "The IPv4 protocol as defined in RFC 791.";
+       }
+       enum ipv6 {
+         value "7";
+         description
+          "The IPv6 protocol as defined in RFC 2460.";
+       }
+       enum default {
+         description 
+          "default ip";
+       }
+     }
+   }
+   
+  identity service-type {
+    description
+            "Service identity base type. All service identities must be
+             derived from this type. A service type uniquely defines a single
+             atomic API contract, such as a Java interface, a set of C
+             function declarations, or similar.
+
+             If the service type has a corresponding Java interface, the name
+             of that interface should be attached to the derived identity MUST
+             include a java-class keyword, whose name argument points to that
+             interface.";
+  }
+
+  typedef service-type-ref {
+    description
+            "Internal type of references to service type identity.";
+
+    type identityref {
+      base service-type;
+    }
+  }
+
 }