Support for NETCONF Get command to get xapp configuration in O1 client
[ric-plt/o1.git] / agent / yang / o-ran-sc-ric-xapp-desc-v1.yang
index 05e17d6..bac2b50 100755 (executable)
@@ -34,8 +34,8 @@ module o-ran-sc-ric-xapp-desc-v1 {
     // LCM: Generic xApp descriptor passed to xApp Manager (or OCO) during xApp deployment/undeployment
     grouping xapp-descriptor {
         leaf name {
-            mandatory true;
             type string;
+            mandatory true;
             description
                 "Name of the xApp in helm chart";
         }
@@ -59,37 +59,93 @@ module o-ran-sc-ric-xapp-desc-v1 {
             description
                 "JSON string of override file for 'helm install' command";
         }
+       leaf config {
+           type string;
+           description
+               "configuration of the xapp";
+       }
+        description
+            "xApp descriptor";
+    }
+
+    typedef health-status {
+         type enumeration {
+            enum unavailable {
+                description
+                    "The health status not available";
+            }
+            enum healthy {
+                description
+                    "The xApp is healthy";
+            }
+            enum unhealthy {
+                description
+                    "The xApp is not healthy";
+            }
+        }
+        description
+            "xApp health status";
     }
 
     grouping xapp-status {
         leaf name {
             type string;
             description
-                "Name of the xApp in helm chart";
+                "Name of the xApp visible in Kubernetes";
         }
         leaf status {
-            type boolean;
+            type string;
+            description
+                "The status of the xApp pod: running, restarted, etc";
+        }
+        leaf health {
+            type health-status;
             description
-                "The status of xApp: true=healthy false=not-healthy";
+                "The health status of xApp: healthy, not-healthy, unavailable";
         }
+        description
+            "xApp health status";
     }
-    
+
     // Top-level (root) managed object
     container ric {
         container xapps {
             list xapp {
                 key "name";
                 uses xapp-descriptor;
+                description
+                    "xApp descriptor";
             }
+            description
+                "List of xApps to be managed";
         }
         container health {
             config false;
             list status {
                 key "name";
                 uses xapp-status;
+                description
+                    "The status of xApp";
             }
             description
                 "State data of the xApps";
         }
+       container configuration {
+           config false;
+           container xapps {
+           list xapp {
+               key "name";
+               uses xapp-descriptor;
+               description
+                   "xApp descriptor";
+           }
+           description
+               "List of xApps for which config to be extracted";
+         }
+         description
+             "config get data of the xApps";
+       }
+        description
+            "Root object for xApp management and status";
     }
-}
\ No newline at end of file
+}