Added name to nsi and nst as mandatory; removed wrong nst params; netslice instantiation parameters
Change-Id: Idf2e203ca2dc95e4ad370c532cc6a014eb641da8
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
diff --git a/models/yang/instantiation-parameters.yang b/models/yang/instantiation-parameters.yang
index 810b959..dbf38b7 100644
--- a/models/yang/instantiation-parameters.yang
+++ b/models/yang/instantiation-parameters.yang
@@ -10,10 +10,6 @@
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 @@
prefix "vnfd";
}
- import nsr {
- prefix "nsr";
- }
-
import ietf-inet-types {
prefix "inet";
}
@@ -39,20 +31,7 @@
description "Initial version";
}
- grouping ns_instantiate {
- leaf nsName {
- mandatory true;
- type string;
- }
- leaf nsDescription {
- type string;
- }
- leaf nsdId {
- mandatory true;
- type leafref {
- path "/nsd:nsd-catalog/nsd:nsd/nsd:id";
- }
- }
+ grouping netslice_params {
leaf vimAccountId {
mandatory true;
type string;
@@ -60,23 +39,43 @@
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 netslice-subnet {
+ key "id";
+ uses netslice_subnet_params;
}
- list vnf {
- key "member-vnf-index";
- uses vnf;
- }
- list vld {
+ list netslice-vld {
key "name";
- uses vld;
+ uses vld_params;
}
}
- grouping vnf {
+ 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;
@@ -86,15 +85,15 @@
}
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;
}
@@ -123,7 +122,7 @@
}
}
- grouping ns_instantiate_vdu {
+ grouping vdu_params {
leaf id {
mandatory true;
type string;
@@ -157,7 +156,7 @@
}
}
- grouping ns-instantiate-internal-vld {
+ grouping internal_vld_params {
leaf name {
mandatory true;
type string;
@@ -210,4 +209,4 @@
}
}
-}
\ No newline at end of file
+}
diff --git a/models/yang/nsi.yang b/models/yang/nsi.yang
index 32087d3..b6184e1 100644
--- a/models/yang/nsi.yang
+++ b/models/yang/nsi.yang
@@ -30,6 +30,10 @@
prefix "instantiation-parameters";
}
+ import ietf-yang-types {
+ prefix "yang";
+ }
+
//revision history
revision 2018-09-28 {
description "Initial version";
@@ -37,23 +41,35 @@
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 {
- list netslice-subnet {
- key "nsdId";
- uses instantiation-parameters:ns_instantiate;
- }
- list netslice-vld {
- key "name";
- uses instantiation-parameters:vld;
- }
+ uses instantiation-parameters:netslice_params;
}
container network-slice-template {
@@ -87,6 +103,7 @@
list nsi{
key "id";
+ unique "name";
uses nsi;
}
diff --git a/models/yang/nst.yang b/models/yang/nst.yang
index b501dae..85e2917 100644
--- a/models/yang/nst.yang
+++ b/models/yang/nst.yang
@@ -140,41 +140,20 @@
grouping netslice-subnet {
leaf id {
- description "Identifier for the netslice-subnet.";
+ description "Identifier or name for the netslice-subnet in NST scope.";
mandatory true;
type string {
length 1..63;
}
}
- leaf name {
- description "netslice-subnet name.";
- mandatory true;
- type string;
- }
- leaf short-name {
- description "Short name to appear as label in the UI";
- mandatory true;
- type string;
- }
- leaf vendor {
- description "Vendor of the NSD.";
- mandatory true;
+ leaf description {
+ description "Description of the NSD.";
type string;
}
leaf is-shared-nss {
description "NSS is shared between NS";
- mandatory true;
type boolean;
- }
- leaf description {
- description "Description of the NSD.";
- mandatory true;
- type string;
- }
- leaf version {
- description "Version of the NSD";
- mandatory true;
- type string;
+ default false;
}
leaf nsd-ref {
description "Reference to catalog NSD";
@@ -184,7 +163,7 @@
}
}
container instantiation-parameters {
- uses instantiation-parameters:ns_instantiate;
+ uses instantiation-parameters:ns_params;
}
}
@@ -297,6 +276,7 @@
leaf name {
type string;
+ mandatory true;
}
container SNSSAI-identifier {
@@ -317,7 +297,7 @@
key "id";
uses nsvld;
}
- list netslicefgd{
+ list netslicefgd {
key "id";
uses netslicefgd;
}