Added name to nsi and nst as mandatory; removed wrong nst params; netslice instantiat...
[osm/IM.git] / models / yang / instantiation-parameters.yang
index a954066..dbf38b7 100644 (file)
@@ -10,10 +10,6 @@ module instantiation-parameters {
   namespace "urn:ietf:params:xml:ns:yang:nfvo:instantiation-parameters";
   prefix "instantiation-parameters";
   
-  import rw-project {
-    prefix "rw-project";
-  }
-  
   import nsd {
     prefix "nsd";
   }
@@ -22,10 +18,6 @@ module instantiation-parameters {
     prefix "vnfd";
   }
 
-  import nsr {
-    prefix "nsr";
-  }
-
   import ietf-inet-types {
     prefix "inet";
   }
@@ -38,21 +30,34 @@ module instantiation-parameters {
   revision 2018-09-14 {
     description "Initial version";
   }
-  //typedef definitions
-  grouping ns_instantiate {
-    leaf nsName {
+
+  grouping netslice_params {
+    leaf vimAccountId {
       mandatory true;
       type string;
     }
-    leaf nsDescription {
+    leaf ssh_keys {
       type string;
     }
-    leaf nsdId {
+    list netslice-subnet {
+      key "id";
+      uses netslice_subnet_params;
+    }
+    list netslice-vld {
+      key "name";
+      uses vld_params;
+    }
+  }
+
+  grouping netslice_subnet_params {
+    leaf id {
       mandatory true;
-      type leafref {
-        path "/nsd:nsd-catalog/nsd:nsd/nsd:id";
-      }
+      type string;
     }
+    uses ns_params;
+  }
+
+  grouping ns_params {
     leaf vimAccountId {
       mandatory true;
       type string;
@@ -60,22 +65,17 @@ module instantiation-parameters {
     leaf ssh_keys {
       type string;
     }
-    leaf nsr_id {
-      config false;
-      type leafref {
-        path "/rw-project:project/nsr:ns-instance-opdata/nsr:nsr/nsr:ns-instance-config-ref";
-      }
-    }
     list vnf {
       key "member-vnf-index";
-      uses vnf;
+      uses vnf_params;
     }
     list vld {
       key "name";
-      uses vld;
+      uses vld_params;
     }
   }
-  grouping vnf {
+
+  grouping vnf_params {
     leaf member-vnf-index{
       mandatory true;
       type string;
@@ -85,15 +85,15 @@ module instantiation-parameters {
     }
     list vdu {
       key "id";
-      uses ns_instantiate_vdu;
+      uses vdu_params;
     }
     list internal-vld {
       key "name";
-      uses ns-instantiate-internal-vld;
+      uses internal_vld_params;
     }
   }
 
-  grouping vld {
+  grouping vld_params {
     leaf name {
       type string;
     }
@@ -107,7 +107,8 @@ module instantiation-parameters {
       key "member-vnf-index-ref vnfd-connection-point-ref";
       leaf member-vnf-index-ref {
         type leafref {
-            path "../../../vnf/member-vnf-index";
+            //path "../../../vnf/member-vnf-index";
+            path "/nsd:nsd-catalog/nsd:nsd/nsd:constituent-vnfd/nsd:member-vnf-index";
         }
       }
       leaf vnfd-connection-point-ref {
@@ -119,10 +120,9 @@ module instantiation-parameters {
         type inet:ip-address;
       }
     }
-
   }
 
-  grouping ns_instantiate_vdu {
+  grouping vdu_params {
     leaf id {
       mandatory true;
       type string;
@@ -156,7 +156,7 @@ module instantiation-parameters {
     }
   }
 
-  grouping ns-instantiate-internal-vld {
+  grouping internal_vld_params {
     leaf name {
       mandatory true;
       type string;
@@ -208,10 +208,5 @@ module instantiation-parameters {
       }
     }
   }
-  
-  list instantiation-parameters {
-    key "nsName";
-    uses ns_instantiate;
-  }
 
-}
\ No newline at end of file
+}