Add support for lifecycle upgrade event
[osm/IM.git] / models / yang / vnfr.yang
index d47c6a7..b669f97 100644 (file)
@@ -27,10 +27,6 @@ module vnfr
     prefix "manotypes";
   }
 
     prefix "manotypes";
   }
 
-  import rw-pb-ext {
-    prefix "rwpb";
-  }
-
   import vnfd-base {
     prefix "vnfd-base";
   }
   import vnfd-base {
     prefix "vnfd-base";
   }
@@ -72,6 +68,36 @@ module vnfr
       "Derived from earlier versions of base YANG files";
   }
 
       "Derived from earlier versions of base YANG files";
   }
 
+  typedef vdu-operational-status {
+    type enumeration {
+      enum init;
+      enum vm-init-phase;
+      enum vm-alloc-pending;
+      enum running;
+      enum upgrading;
+      enum terminate;
+      enum vl-terminate-phase;
+      enum terminated;
+      enum failed;
+    }
+  }
+
+  typedef vnf-operational-status {
+    type enumeration {
+      enum pre-init;
+      enum init;
+      enum vl-init-phase;
+      enum vm-init-phase;
+      enum running;
+      enum upgrading;   // Experimental
+      enum terminate;
+      enum vm-terminate-phase;
+      enum vl-terminate-phase;
+      enum terminated;
+      enum failed;
+    }
+  }
+
   grouping placement-group-info {
     list placement-groups-info {
       description
   grouping placement-group-info {
     list placement-groups-info {
       description
@@ -85,7 +111,6 @@ module vnfr
     }
   }
 
     }
   }
 
-
   grouping virtual-interface {
     container virtual-interface {
       description
   grouping virtual-interface {
     container virtual-interface {
       description
@@ -331,6 +356,7 @@ module vnfr
               "IP address assigned to the external connection point";
             type inet:ip-address;
           }
               "IP address assigned to the external connection point";
             type inet:ip-address;
           }
+
           leaf mac-address {
             description
               "MAC address assigned to the external connection point";
           leaf mac-address {
             description
               "MAC address assigned to the external connection point";
@@ -364,8 +390,6 @@ module vnfr
             description "Short Unique name of the VDU
                   This will be of the format NSR name-ShortnedString-VDUname
                   NSR name and VDU name shall be constrained to 10 characters";
             description "Short Unique name of the VDU
                   This will be of the format NSR name-ShortnedString-VDUname
                   NSR name and VDU name shall be constrained to 10 characters";
-            rwpb:field-inline "true";
-            rwpb:field-string-max 64;
             type string;
           }
 
             type string;
           }
 
@@ -450,6 +474,7 @@ module vnfr
                 "IP address assigned to the internal connection point";
               type inet:ip-address;
             }
                 "IP address assigned to the internal connection point";
               type inet:ip-address;
             }
+
             leaf mac-address {
               description
                 "MAC address assigned to the internal connection point";
             leaf mac-address {
               description
                 "MAC address assigned to the internal connection point";
@@ -513,31 +538,21 @@ module vnfr
           uses virtual-interface;
         }
 
           uses virtual-interface;
         }
 
-        leaf operational-status {
-          description
-            "The operational status of the VDU
-              init                : The VDU has just started.
-              vm-init-phase       : The VDUs in the VNF is being created in VIM.
-              vm-alloc-pending    : The  VM alloc is pending in VIM
-              running             : The VDU is active in VM
-              terminate           : The VDU is being terminated
-              vm-terminate-phase  : The VDU in the VNF is being terminated in VIM.
-              terminated          : The VDU is in the terminated state.
-              failed              : The VDU  instantiation failed.
-            ";
-
-            type enumeration {
-              rwpb:enum-type "VduOperationalStatus";
-              enum init;
-              enum vm-init-phase;
-              enum vm-alloc-pending;
-              enum running;
-              enum terminate;
-              enum vl-terminate-phase;
-              enum terminated;
-              enum failed;
-            }
-          }
+         leaf operational-status {
+            description
+              "The operational status of the VDU
+                init                : The VDU has just started.
+                vm-init-phase       : The VDUs in the VNF is being created in VIM.
+                vm-alloc-pending    : The  VM alloc is pending in VIM
+                running             : The VDU is active in VM
+                upgrading           : The VDU is being upgraded (EXPERIMENTAL)
+                terminate           : The VDU is being terminated
+                vm-terminate-phase  : The VDU in the VNF is being terminated in VIM.
+                terminated          : The VDU is in the terminated state.
+                failed              : The VDU  instantiation failed.
+              ";
+            type vdu-operational-status;
+         }
 
           uses placement-group-info;
         }
 
           uses placement-group-info;
         }
@@ -558,20 +573,7 @@ module vnfr
               terminated          : The VNF is in the terminated state.
               failed              : The VNF instantiation failed
             ";
               terminated          : The VNF is in the terminated state.
               failed              : The VNF instantiation failed
             ";
-
-          type enumeration {
-            rwpb:enum-type "VnfrOperationalStatus";
-            enum pre-init;
-            enum init;
-            enum vl-init-phase;
-            enum vm-init-phase;
-            enum running;
-            enum terminate;
-            enum vm-terminate-phase;
-            enum vl-terminate-phase;
-            enum terminated;
-            enum failed;
-          }
+          type vnf-operational-status;
         }
 
         leaf config-status {
         }
 
         leaf config-status {
@@ -599,7 +601,6 @@ module vnfr
         uses placement-group-info;
 
         container cloud-config {
         uses placement-group-info;
 
         container cloud-config {
-          rwpb:msg-new VnfrCloudConfig;
           uses manotypes:cloud-config;
         }
       }
           uses manotypes:cloud-config;
         }
       }