Merge "Add integration test for extending API: Get Module Definitions"
[cps.git] / integration-test / src / test / resources / data / bookstore / bookstore.yang
index ab384de..2abde65 100644 (file)
@@ -1,45 +1,40 @@
 module stores {
     yang-version 1.1;
-    namespace "org:onap:ccsdk:sample";
+    namespace "org:onap:cps:sample";
 
     prefix book-store;
 
-    revision "2020-09-15" {
+    import bookstore-types {
+        prefix "types";
+        revision-date 2024-01-30;
+    }
+
+    revision "2024-01-30" {
         description
-        "Sample Model";
+            "Extracted bookstore types";
     }
 
-    typedef year {
-        type uint16 {
-            range "1000..9999";
-        }
+    revision "2020-09-15" {
+        description
+        "Sample Model";
     }
 
-    list invoice {
-        key "ProductID";
-        leaf ProductID {
-            type uint64;
-            mandatory "true";
-            description
-            "Unique product ID. Example: 001";
-        }
-        leaf ProductName {
+    list bookstore-address {
+        key "bookstore-name";
+        leaf bookstore-name {
             type string;
-            mandatory "true";
             description
-            "Name of the Product";
+            "Name of bookstore. Example: My Bookstore";
         }
-        leaf price {
-            type uint64;
-            mandatory "true";
+        leaf address {
+            type string;
             description
-            "Price of book";
+            "Address of store";
         }
-        leaf stock {
-            type boolean;
-            default "false";
+        leaf postal-code {
+            type string;
             description
-            "Book in stock or not. Example value: true";
+            "Postal code of store";
         }
     }
 
@@ -58,6 +53,17 @@ module stores {
             }
         }
 
+        container support-info {
+                    leaf support-office {
+                        type string;
+                    }
+                    container contact-emails {
+                        leaf email {
+                            type string;
+                        }
+                    }
+                }
+
         container container-without-leaves { }
 
         container premises {
@@ -104,7 +110,7 @@ module stores {
                     type string;
                 }
                 leaf-list editions {
-                    type year;
+                    type types:year;
                 }
                 leaf price {
                     type uint64;