Persisting a list element to a parent list (ep2)
[cps.git] / integration-test / src / test / resources / data / bookstore / bookstore.yang
index e592a9c..ab384de 100644 (file)
@@ -15,6 +15,34 @@ module stores {
         }
     }
 
+    list invoice {
+        key "ProductID";
+        leaf ProductID {
+            type uint64;
+            mandatory "true";
+            description
+            "Unique product ID. Example: 001";
+        }
+        leaf ProductName {
+            type string;
+            mandatory "true";
+            description
+            "Name of the Product";
+        }
+        leaf price {
+            type uint64;
+            mandatory "true";
+            description
+            "Price of book";
+        }
+        leaf stock {
+            type boolean;
+            default "false";
+            description
+            "Book in stock or not. Example value: true";
+        }
+    }
+
     container bookstore {
 
         leaf bookstore-name {