Merge branch 'netslice' 30/6930/1
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Tue, 20 Nov 2018 16:24:31 +0000 (17:24 +0100)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Tue, 20 Nov 2018 16:24:31 +0000 (17:24 +0100)
Makefile
models/yang/instantiation-parameters.yang [new file with mode: 0644]
models/yang/nsd-base.yang
models/yang/nsi.yang [new file with mode: 0644]
models/yang/nst.yang [new file with mode: 0644]

index 9f0d92b..990b4eb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -21,7 +21,7 @@ PYANG:= pyang
 PYBINDPLUGIN:=$(shell /usr/bin/env python3 -c \
                    'import pyangbind; import os; print("{}/plugin".format(os.path.dirname(pyangbind.__file__)))')
 
-YANG_DESC_MODELS := vnfd nsd
+YANG_DESC_MODELS := vnfd nsd nst nsi
 YANG_RECORD_MODELS := vnfr nsr
 PYTHON_MODELS := $(addsuffix .py, $(YANG_DESC_MODELS))
 YANG_DESC_TREES := $(addsuffix .tree.txt, $(YANG_DESC_MODELS))
diff --git a/models/yang/instantiation-parameters.yang b/models/yang/instantiation-parameters.yang
new file mode 100644 (file)
index 0000000..dbf38b7
--- /dev/null
@@ -0,0 +1,212 @@
+//INFORMATION
+//organization "CTTC";
+//contact "Pol Alemany, Ricard Vilalta, Juan Luis de la Cruz";
+//description "Network Slice components definition";
+
+// MODULE STRUCTURE
+module instantiation-parameters {
+  //header information
+  yang-version 1;
+  namespace "urn:ietf:params:xml:ns:yang:nfvo:instantiation-parameters";
+  prefix "instantiation-parameters";
+  
+  import nsd {
+    prefix "nsd";
+  }
+
+  import vnfd {
+    prefix "vnfd";
+  }
+
+  import ietf-inet-types {
+    prefix "inet";
+  }
+
+  import ietf-yang-types {
+    prefix "ietf-yang";
+  }
+
+  //revision history
+  revision 2018-09-14 {
+    description "Initial version";
+  }
+
+  grouping netslice_params {
+    leaf vimAccountId {
+      mandatory true;
+      type string;
+    }
+    leaf ssh_keys {
+      type string;
+    }
+    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 string;
+    }
+    uses ns_params;
+  }
+
+  grouping ns_params {
+    leaf vimAccountId {
+      mandatory true;
+      type string;
+    }
+    leaf ssh_keys {
+      type string;
+    }
+    list vnf {
+      key "member-vnf-index";
+      uses vnf_params;
+    }
+    list vld {
+      key "name";
+      uses vld_params;
+    }
+  }
+
+  grouping vnf_params {
+    leaf member-vnf-index{
+      mandatory true;
+      type string;
+    }
+    leaf vimAccountId {
+      type string;
+    }
+    list vdu {
+      key "id";
+      uses vdu_params;
+    }
+    list internal-vld {
+      key "name";
+      uses internal_vld_params;
+    }
+  }
+
+  grouping vld_params {
+    leaf name {
+      type string;
+    }
+    leaf vim-network-name {
+      type string;
+    }
+    container ip-profile {
+      uses ip-profile-update-schema;
+    }
+    list vnfd-connection-point-ref {
+      key "member-vnf-index-ref vnfd-connection-point-ref";
+      leaf member-vnf-index-ref {
+        type leafref {
+            //path "../../../vnf/member-vnf-index";
+            path "/nsd:nsd-catalog/nsd:nsd/nsd:constituent-vnfd/nsd:member-vnf-index";
+        }
+      }
+      leaf vnfd-connection-point-ref {
+        type leafref {
+          path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:connection-point/vnfd:name";
+        }
+      }
+      leaf ip-address{
+        type inet:ip-address;
+      }
+    }
+  }
+
+  grouping vdu_params {
+    leaf id {
+      mandatory true;
+      type string;
+    }
+    list volume {
+      key "name";
+      leaf name {
+        mandatory true;
+        type string;
+      }
+      leaf vim-volume-id {
+        mandatory true;
+        type string;
+      }
+    }
+    list interface {
+      key "name";
+      leaf name {
+        mandatory true;
+        type string;
+      }
+      leaf ip-address {
+        type inet:ip-address;
+      }
+      leaf mac-address {
+        type ietf-yang:mac-address;
+      }
+      leaf floating-ip-required {
+        type boolean;
+      }
+    }
+  }
+
+  grouping internal_vld_params {
+    leaf name {
+      mandatory true;
+      type string;
+    }
+    leaf vim-network-name {
+      type string; 
+    }
+    container ip-profile {
+      uses ip-profile-update-schema;
+    }
+    list internal-connection-point {
+      key "id-ref";
+      leaf id-ref {
+        mandatory true;
+        type string;
+      }
+      leaf ip-address{
+        type inet:ip-address;
+      }
+    }
+  }
+
+  grouping ip-profile-update-schema { //each leaf/list is either null or something
+    leaf ip-version {
+      type inet:ip-version;
+    }
+    leaf subnet-address {
+      type inet:ip-prefix;
+    }
+    leaf gateway-address {
+      type inet:ip-prefix;
+    }
+    list dns-server {
+      key "address";
+      leaf address {
+        mandatory true;
+        type inet:ip-address;
+      }
+    }
+    container dhcp-params {
+      leaf enabled {
+        type boolean;
+      }
+      leaf count {
+        type uint8; // >=1
+      }
+      leaf start-address {
+        type inet:ip-address;
+      }
+    }
+  }
+
+}
index df99563..c164078 100644 (file)
@@ -100,7 +100,7 @@ module nsd-base
       description "NSD parameter pool name to use for this parameter";
       type string;
     }
-  }
+  } // primitive-parameter
 
   grouping nsd-descriptor-common {
     leaf id {
@@ -157,11 +157,7 @@ module nsd-base
           different NS.";
 
       key "name";
-      leaf name {
-        description
-            "Name of the NS connection point.";
-        type string;
-      }
+      uses nsd-connection-point-common;
 
       leaf type {
         description
@@ -169,15 +165,6 @@ module nsd-base
         type manotypes:connection-point-type;
       }
 
-      leaf floating-ip-required {
-        description
-            "Boolean parameter to indicate whether the CP must be exposed.
-             A public IP address will be allocated to this CP if exposed is true.
-             The default is false meaning a floating IP address is not required.
-             It must be explicitly asked for a floating IP address to be allocated.";
-        type boolean;
-      }
-
       choice connection {
         description "Logical connection of the CP to a VLD or to a VNF CP";
 
@@ -419,113 +406,71 @@ module nsd-base
 
       key "id";
 
-      leaf id {
-        description
-            "Identifier for the VNFFGD.";
-        type string;
-      }
-
-      leaf name {
-        description
-            "VNFFGD name.";
-        type string;
-      }
-
-      leaf short-name {
-        description
-            "Short name to appear as label in the UI";
-        type string;
-      }
-
-      leaf vendor {
-        description "Provider of the VNFFGD.";
-        type string;
-      }
-
-      leaf description {
-        description "Description of the VNFFGD.";
-        type string;
-      }
-
-      leaf version {
-        description "Version of the VNFFGD";
-        type string;
-      }
+      uses fgd-common;
 
       list rsp {
         description
           "List of Rendered Service Paths (RSP).";
-
         key "id";
 
-        leaf id {
-          description
-            "Identifier for the RSP.";
-          type string;
+        uses rsp-common;
+
+        list vnfd-connection-point-ref { // not common
+        description
+          "A list of references to connection points.";
+        key "member-vnf-index-ref";
+
+        leaf member-vnf-index-ref {
+          description "Reference to member-vnf within constituent-vnfds";
+          type leafref {
+            path "../../../../constituent-vnfd/member-vnf-index";
+          }
         }
 
-        leaf name {
+        leaf order {
+          type uint8;
           description
-            "RSP name.";
-          type string;
+            "A number that denotes the order of a VNF in a chain";
         }
 
-        list vnfd-connection-point-ref {
+        leaf vnfd-id-ref {
           description
-            "A list of references to connection points.";
-          key "member-vnf-index-ref";
-
-          leaf member-vnf-index-ref {
-            description "Reference to member-vnf within constituent-vnfds";
-            type leafref {
-              path "../../../../constituent-vnfd/member-vnf-index";
-            }
-          }
-
-          leaf order {
-            type uint8;
-            description
-              "A number that denotes the order of a VNF in a chain";
-          }
-
-          leaf vnfd-id-ref {
-            description
-              "A reference to a vnfd. This is a
-                  leafref to path:
-                      ../../../../nsd:constituent-vnfd
-                      + [nsd:id = current()/../nsd:id-ref]
-                      + /nsd:vnfd-id-ref";
-
-             type leafref {
-                path "../../../../constituent-vnfd" +
-                     "[member-vnf-index = current()/../member-vnf-index-ref]" +
-                     "/vnfd-id-ref";
-             }
+            "A reference to a vnfd. This is a
+                leafref to path:
+                    ../../../../nsd:constituent-vnfd
+                    + [nsd:id = current()/../nsd:id-ref]
+                    + /nsd:vnfd-id-ref";
+
+           type leafref {
+              path "../../../../constituent-vnfd" +
+                   "[member-vnf-index = current()/../member-vnf-index-ref]" +
+                   "/vnfd-id-ref";
            }
+         }
 
-          leaf vnfd-connection-point-ref {
-            description
-              "A reference to a connection point name
-                  in a vnfd. This is a leafref to path:
-                      /vnfd:vnfd-catalog/vnfd:vnfd
-                      + [vnfd:id = current()/../nsd:vnfd-id-ref]
-                      + /vnfd:connection-point/vnfd:name
-                  NOTE: An issue with confd is preventing the
-                  use of xpath. Seems to be an issue with leafref
-                  to leafref, whose target is in a different module.
-                  Once that is resolved this will switched to use
-                  leafref";
-            // TODO: Keeping as string as this needs to be
-            // diffenent lvel based of if it is nsd-catalog or
-            // in nsr.
-            // type leafref {
-            //   path "../../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
-            //        "[vnfd:id = current()/../vnfd-id-ref]/" +
-            //        "vnfd:connection-point/vnfd:name";
-            // }
-            type string;
-          }
+        leaf vnfd-connection-point-ref {
+          description
+            "A reference to a connection point name
+                in a vnfd. This is a leafref to path:
+                    /vnfd:vnfd-catalog/vnfd:vnfd
+                    + [vnfd:id = current()/../nsd:vnfd-id-ref]
+                    + /vnfd:connection-point/vnfd:name
+                NOTE: An issue with confd is preventing the
+                use of xpath. Seems to be an issue with leafref
+                to leafref, whose target is in a different module.
+                Once that is resolved this will switched to use
+                leafref";
+          // TODO: Keeping as string as this needs to be
+          // diffenent lvel based of if it is nsd-catalog or
+          // in nsr.
+          // type leafref {
+          //   path "../../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
+          //        "[vnfd:id = current()/../vnfd-id-ref]/" +
+          //        "vnfd:connection-point/vnfd:name";
+          // }
+          type string;
         }
+      }
       } //rsp
 
       list classifier {
@@ -534,25 +479,7 @@ module nsd-base
 
         key "id";
 
-        leaf id {
-          description
-              "Identifier for the classifier rule.";
-          type string;
-        }
-
-        leaf name {
-          description
-              "Name of the classifier.";
-          type string;
-        }
-
-        leaf rsp-id-ref {
-          description
-              "A reference to the RSP.";
-          type leafref {
-            path "../../rsp/id";
-          }
-        }
+        uses classifier-common;
 
         leaf member-vnf-index-ref {
           description "Reference to member-vnf within constituent-vnfds";
@@ -598,51 +525,8 @@ module nsd-base
           // }
           type string;
         }
-
-        list match-attributes {
-          description
-              "List of match attributes.";
-
-          key "id";
-
-          leaf id {
-            description
-                "Identifier for the classifier match attribute rule.";
-            type string;
-          }
-
-          leaf ip-proto {
-            description
-                "IP Protocol.";
-            type uint8;
-          }
-
-          leaf source-ip-address {
-            description
-                "Source IP address.";
-            type inet:ip-address;
-          }
-
-          leaf destination-ip-address {
-            description
-                "Destination IP address.";
-            type inet:ip-address;
-          }
-
-          leaf source-port {
-            description
-                "Source port number.";
-            type inet:port-number;
-          }
-
-          leaf destination-port {
-            description
-                "Destination port number.";
-            type inet:port-number;
-          }
-          //TODO: Add more match criteria
-        } //match-attributes
       } // classifier
+
     } // vnffgd
 
     uses manotypes:ip-profile-list;
@@ -744,12 +628,60 @@ module nsd-base
         }
       }
     }
-  }
+  } // nsd-descriptor-common
 
   grouping nsd-vld-common {
     /* Still having issues modelling this,
        see the comments under vnfd-connection-point-ref
+
+       IMPORTANT: Change description fields
     */
+    uses vld-common;
+
+    choice init-params {
+      description "Extra parameters for VLD instantiation";
+
+      case vim-network-ref {
+        leaf vim-network-name {
+          description
+            "Name of network in VIM account. This is used to indicate
+                   pre-provisioned network name in cloud account.";
+          type string;
+        }
+      }
+
+      case vim-network-profile {
+        leaf ip-profile-ref {
+          description "Named reference to IP-profile object";
+          type leafref {
+            path "../../ip-profiles/name";
+          }
+        }
+      }
+
+    }
+  } // nsd-vld-common
+
+  grouping nsd-connection-point-common {
+    description "NSD connection point base";
+    //IMPORTANT: Change description fields
+    leaf name {
+      description
+          "Name of the connection point.";
+      type string;
+    }
+
+    leaf floating-ip-required {
+      description
+          "Boolean parameter to indicate whether the CP must be exposed.
+           A public IP address will be allocated to this CP if exposed is true.
+           The default is false meaning a floating IP address is not required.
+           It must be explicitly asked for a floating IP address to be allocated.";
+      type boolean;
+    }
+  } // nsd-connection-point-common
+
+  grouping vld-common {
     description
       "List of Virtual Link Descriptors.";
 
@@ -810,30 +742,126 @@ module nsd-base
       type boolean;
       default false;
     }
+  } // vld-common
 
-    choice init-params {
-      description "Extra parameters for VLD instantiation";
+  grouping fgd-common {
 
-      case vim-network-ref {
-        leaf vim-network-name {
-          description
-            "Name of network in VIM account. This is used to indicate
-                   pre-provisioned network name in cloud account.";
-          type string;
-        }
+    leaf id {
+      description
+          "Identifier for the FGD.";
+      type string;
+    }
+
+    leaf name {
+      description
+          "FGD name.";
+      type string;
+    }
+
+    leaf short-name {
+      description
+          "Short name to appear as label in the UI";
+      type string;
+    }
+
+    leaf vendor {
+      description "Provider of the FGD.";
+      type string;
+    }
+
+    leaf description {
+      description "Description of the FGD.";
+      type string;
+    }
+
+    leaf version {
+      description "Version of the FGD";
+      type string;
+    }
+  } // fgd-common
+
+  grouping rsp-common {
+
+    leaf id {
+      description
+        "Identifier for the RSP.";
+      type string;
+    }
+
+    leaf name {
+      description
+        "RSP name.";
+      type string;
+    }
+
+  } // rsp-common
+
+  grouping classifier-common {
+
+    leaf id {
+      description
+          "Identifier for the classifier rule.";
+      type string;
+    }
+
+    leaf name {
+      description
+          "Name of the classifier.";
+      type string;
+    }
+
+    leaf rsp-id-ref {
+      description
+          "A reference to the RSP.";
+      type leafref {
+        path "../../rsp/id";
+      }
+    }
+
+    list match-attributes {
+      description
+          "List of match attributes.";
+
+      key "id";
+
+      leaf id {
+        description
+            "Identifier for the classifier match attribute rule.";
+        type string;
       }
 
-      case vim-network-profile {
-        leaf ip-profile-ref {
-          description "Named reference to IP-profile object";
-          type leafref {
-            path "../../ip-profiles/name";
-          }
-        }
+      leaf ip-proto {
+        description
+            "IP Protocol.";
+        type uint8;
       }
 
-    }
-  }
+      leaf source-ip-address {
+        description
+            "Source IP address.";
+        type inet:ip-address;
+      }
+
+      leaf destination-ip-address {
+        description
+            "Destination IP address.";
+        type inet:ip-address;
+      }
+
+      leaf source-port {
+        description
+            "Source port number.";
+        type inet:port-number;
+      }
+
+      leaf destination-port {
+        description
+            "Destination port number.";
+        type inet:port-number;
+      }
+      //TODO: Add more match criteria
+    } //match-attributes
+  } // classifier-common
 
   grouping monitoring-param-common {
     description
@@ -851,5 +879,5 @@ module nsd-base
     uses manotypes:monitoring-param-value;
     uses manotypes:monitoring-param-ui-data;
     uses manotypes:monitoring-param-aggregation;
-  }
+  } // monitoring-param-common
 }
diff --git a/models/yang/nsi.yang b/models/yang/nsi.yang
new file mode 100644 (file)
index 0000000..b6184e1
--- /dev/null
@@ -0,0 +1,110 @@
+//INFORMATION
+//organization "CTTC";
+//contact "Pol Alemany, Ricard Vilalta, Juan Luis de la Cruz";
+//description "Network Slice components definition";
+
+// MODULE STRUCTURE
+module nsi {
+  //header information
+  yang-version 1;
+  namespace "urn:ietf:params:xml:ns:yang:nfvo:nsi";
+  prefix "nsi";
+
+  import nst {
+    prefix "nst";
+  }
+
+  import nsr {
+    prefix "nsr";
+  }
+
+  import vlr {
+    prefix "vlr";
+  }
+
+  import rw-project {
+    prefix "rw-project";
+  }
+
+  import instantiation-parameters {
+    prefix "instantiation-parameters";
+  }
+
+  import ietf-yang-types {
+    prefix "yang";
+  }
+
+  //revision history
+  revision 2018-09-28 {
+    description "Initial version";
+  }
+
+  grouping nsi {
+    leaf id {
+      description "Identifier for the NSI.";
+      type yang:uuid;
+    }
+
+    leaf name {
+      description "NSI name.";
+      type string;
+      mandatory true;
+    }
+
+    leaf short-name {
+      description "NSI short name.";
+      type string;
+    }
+
+    leaf description {
+      description "NSI description.";
+      type string;
+    }
+
+    leaf nst-ref {
+      type leafref {
+        path "/nst:nst/nst:id";
+      }
+      mandatory true;
+    }
+
+    container instantiation-parameters {
+      uses instantiation-parameters:netslice_params;
+    }
+
+    container network-slice-template {
+      uses nst:network-slice;
+    }
+
+    list nsr-ref-list{
+      config false;
+      key "nsr-ref";
+      leaf nsr-ref {
+        description "Reference to instantiated NSR";
+        config false;
+        type leafref {
+          path "/rw-project:project/nsr:ns-instance-opdata/nsr:nsr/nsr:ns-instance-config-ref";
+        }
+      }
+    }
+
+    list vlr-ref-list{
+      key "vlr-ref";
+      config false;
+      leaf vlr-ref {
+        description "Reference to instantiated VLR";
+        config false;
+        type leafref {
+          path "/rw-project:project/vlr:vlr-catalog/vlr:vlr/vlr:id";
+        }
+      }
+    }
+  }
+
+  list nsi{
+    key "id";
+    unique "name";
+    uses nsi;
+  }
+
+}
diff --git a/models/yang/nst.yang b/models/yang/nst.yang
new file mode 100644 (file)
index 0000000..85e2917
--- /dev/null
@@ -0,0 +1,311 @@
+//INFORMATION
+//organization "CTTC";
+//contact "Pol Alemany, Ricard Vilalta, Juan Luis de la Cruz";
+//description "Network Slice components definition";
+
+// MODULE STRUCTURE
+module nst {
+  //header information
+  yang-version 1;
+  namespace "urn:ietf:params:xml:ns:yang:nfvo:nst";
+  prefix "nst";
+
+  import nsd-base{
+    prefix "nsd-base";
+  }
+
+  import nsd {
+    prefix "nsd";
+  }
+
+  import instantiation-parameters {
+    prefix "instantiation-parameters";
+  }
+
+  import ietf-inet-types {
+    prefix "inet";
+  }
+
+  //revision history
+  revision 2018-08-20 {
+    description "Initial version";
+  }
+
+  //typedef definitions
+  typedef connection-points {
+    description "";
+    type string;
+  }
+
+  typedef network-slice-type {
+    type enumeration {
+      enum eMBB {
+        description "enhanced Mobile Broadband slice";
+      }
+      enum URLLC {
+        description "Ultra Reliable Low Latency Communications slice";
+      }
+      enum mMTC {
+        description "massive Machine Type Communications slice";
+      }
+    }
+  }
+
+  typedef resource-type {
+    type enumeration {
+      enum delay-critical-GBR {
+        description "delay critical guaranted bit rate";
+      }
+      enum GBR {
+        description "guaranted bit rate";
+      }
+      enum non-GBR {
+        description "NON guaranted bit rate";
+      }
+    }
+  }
+
+  grouping nsvld {
+    description "List of NetSlice Subnet Virtual Link Descriptors.";
+
+    uses nsd-base:vld-common;
+
+    list nsd-connection-point-ref {
+      description
+          "A list of references to connection points.";
+      key "nsd-ref nsd-connection-point-ref";
+
+      leaf nsd-ref {
+        description "Reference to nsd";
+        type leafref {
+          path "/nsd:nsd-catalog/nsd:nsd/nsd:id";
+        }
+      }
+
+      leaf nsd-connection-point-ref {
+        description "A reference to a connection point name";
+        type leafref {
+          path "/nsd:nsd-catalog/nsd:nsd/nsd:connection-point/nsd:name";
+        }
+      }
+
+      leaf ip-address {
+        description "IP address of the connection point";
+        type inet:ip-address;
+      }
+
+    }
+  } // nsvld
+
+  grouping snssai {
+    description "";
+    leaf slice-service-type {
+      description "Network slice service type ";
+      type network-slice-type;
+      mandatory true;
+    }
+    leaf slice-differentiator {
+      description "Network slice differentiator";
+      type string;
+    }
+  } // snssai
+
+  grouping five-qi {
+    leaf id{
+      description "Quality of service identifier";
+      type uint16;
+      mandatory true;
+    }
+    leaf resource-type {
+      description "Quality of service resource type";
+      type resource-type;
+    }
+    leaf priority-level {
+      description "Priority level of the service";
+      type uint16;
+    }
+    leaf packet-delay-budget {
+      description "Packet delay budget in miliseconds (ms)";
+      type uint16;
+    }
+    leaf packet-error-rate {
+      description "Packet error rate (PER) given in powers of ten";
+      type uint16;
+    }
+    leaf default-max-data-burst {
+      description "Maximum data burst given in bytes (B)";
+      type uint16;
+    }
+  }
+
+  grouping netslice-subnet {
+    leaf id {
+      description "Identifier or name for the netslice-subnet in NST scope.";
+      mandatory true;
+      type string {
+        length 1..63;
+      }
+    }
+    leaf description {
+      description "Description of the NSD.";
+      type string;
+    }
+    leaf is-shared-nss {
+      description "NSS is shared between NS";
+      type boolean;
+      default false;
+    }
+    leaf nsd-ref {
+      description "Reference to catalog NSD";
+      mandatory true;
+      type leafref{
+          path "/nsd:nsd-catalog/nsd:nsd/nsd:id";
+      }
+    }
+    container instantiation-parameters {
+      uses instantiation-parameters:ns_params;
+    }
+
+  }
+
+  grouping slice-connection-points {
+    description "List for external connection points. Each NS has one or more external connection
+                points. As the name implies that external connection points are used for connecting
+                the NS to other NS or to external networks. Each NS exposes these connection points 
+                to the orchestrator. The orchestrator can construct network service chains by 
+                connecting the connection points between different NS.";
+
+    uses nsd-base:nsd-connection-point-common;
+
+    choice connection {
+      description "Logical connection of the CP to a NSVLD or to a NSD CP";
+      case netslice-vld-ref {
+        leaf netslice-vld-id-ref {
+          description "ID reference to a NSVLD in the NS";
+          type leafref {
+            path "../../netslice-vld/id";
+          }
+
+        }
+      }
+      case nsd-connection-point-ref {
+        leaf nsd-id-ref {
+          description "A reference to a nsd.";
+          type leafref {
+            path "/nsd:nsd-catalog/nsd:nsd/nsd:id";
+          }
+        }
+        leaf nsd-connection-point-ref {
+          description "";
+          type leafref {
+            path "/nsd:nsd-catalog/nsd:nsd/nsd:connection-point/nsd:name";
+           }
+        }
+      }
+    }
+  }
+
+  grouping rsp {
+
+    uses nsd-base:rsp-common;
+
+    list nsd-connection-point-ref {
+      description
+        "A list of references to connection points.";
+      key "nsd-ref";
+
+      leaf nsd-ref {
+        description "Reference to member-vnf within constituent-vnfds";
+        type leafref {
+          path "/nsd:nsd-catalog/nsd:nsd/nsd:id";
+        }
+      }
+      leaf order {
+        type uint8;
+        description
+          "A number that denotes the order of a NSD in a chain";
+      }
+      leaf nsd-connection-point-ref {    
+        type leafref {
+          path "/nsd:nsd-catalog/nsd:nsd/nsd:connection-point/nsd:name";
+         }
+      }
+    }  
+  }
+
+  grouping classifier {
+    uses nsd-base:classifier-common;
+
+    leaf nsd-ref {
+      type leafref {
+          path "/nsd:nsd-catalog/nsd:nsd/nsd:id";
+      }
+    }
+
+    leaf nsd-connection-point-ref {
+
+      type leafref {
+        path "/nsd:nsd-catalog/nsd:nsd/nsd:connection-point/nsd:name";
+       }
+    }
+  }
+
+  grouping netslicefgd {
+
+    uses nsd-base:fgd-common;
+
+    list rsp {
+      description
+        "List of Rendered Service Paths (RSP).";
+      key "id";
+      uses rsp;
+    } 
+
+    list classifier {
+      description
+          "List of classifier rules.";
+      key "id";
+      uses classifier;
+    } 
+  }
+  grouping network-slice{
+    leaf id {
+      mandatory true;
+      type string;
+    }
+
+    leaf name {
+      type string;
+      mandatory true;
+    }
+
+    container SNSSAI-identifier {
+      uses snssai;
+    }
+    container quality-of-service {
+      uses five-qi;
+    }
+    list netslice-subnet {//list with multiple network service elements
+      key "id";
+      uses netslice-subnet;
+    }
+    list netslice-connection-point {
+      key "name";
+      uses slice-connection-points;
+    }
+    list netslice-vld {
+      key "id";
+      uses nsvld;
+    }
+    list netslicefgd {
+      key "id";
+      uses netslicefgd;
+    }
+  }
+
+  //containers definitions
+  list nst {
+    key "id";
+    uses network-slice;
+  }
+}