X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FIM.git;a=blobdiff_plain;f=models%2Fyang%2Fnsr.yang;h=e2a4d6f25536360016082aed0981e76d5f81f8c4;hp=7597a6f3980ab0c1147332ff98c856866731d6bf;hb=c038a8d7a32f350cf88d952b4978bbaf9585d222;hpb=d6ccaf7e0a66331e9be1046642868f84e7184a31 diff --git a/models/yang/nsr.yang b/models/yang/nsr.yang index 7597a6f..e2a4d6f 100644 --- a/models/yang/nsr.yang +++ b/models/yang/nsr.yang @@ -20,13 +20,9 @@ module nsr { - namespace "urn:ietf:params:xml:ns:yang:nfvo:nsr"; + namespace "urn:etsi:osm:yang:nsr"; prefix "nsr"; - import rw-pb-ext { - prefix "rwpb"; - } - import vlr { prefix "vlr"; } @@ -59,8 +55,8 @@ module nsr prefix "manotypes"; } - import rw-project { - prefix "rw-project"; + import osm-project { + prefix "osm-project"; } revision 2017-02-08 { @@ -76,6 +72,34 @@ module nsr "Derived from earlier versions of base YANG files"; } + typedef vnffgr-operational-status { + type enumeration { + enum init; + enum running; + enum terminate; + enum terminated; + enum failed; + } + } + + typedef ns-operational-status { + type enumeration { + enum init; + enum vl-init-phase; + enum vnf-init-phase; + enum running; + enum terminate; + enum vnf-terminate-phase; + enum vl-terminate-phase; + enum terminated; + enum failed; + enum scaling-out; + enum scaling-in; + enum vl-instantiate; + enum vl-terminate; + } + } + typedef config-states { type enumeration { enum init; @@ -137,7 +161,7 @@ module nsr } } - augment "/rw-project:project" { + augment "/osm-project:project" { list key-pair { key "name"; description "Used to configure the list of public keys to be injected as part @@ -186,13 +210,19 @@ module nsr } } - augment "/rw-project:project" { + augment "/osm-project:project" { container ns-instance-config { list nsr { key "id"; unique "name"; + leaf schema-version { + description "Schema version for the NSR. If unspecified, it assumes v3.0"; + type string; + default "v3.0"; + } + leaf id { description "Identifier for the NSR."; type yang:uuid; @@ -378,15 +408,7 @@ module nsr terminated : The VNFFGR is in the terminated state. failed : The VNFFGR instantiation failed "; - - type enumeration { - rwpb:enum-type "VnffgrOperationalStatus"; - enum init; - enum running; - enum terminate; - enum terminated; - enum failed; - } + type vnffgr-operational-status; } list rsp { @@ -464,7 +486,7 @@ module nsr } leaf member-vnf-index-ref { - type uint64; + type string; } leaf vnfd-id-ref { description @@ -485,7 +507,16 @@ module nsr path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name"; } } - leaf vnfr-connection-point-ref { + leaf vnfr-ingress-connection-point-ref { + description + "A reference to a vnfr connection point."; + type leafref { + path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr" + + "[vnfr:id = current()/../vnfr-id-ref]" + + "/vnfr:connection-point/vnfr:name"; + } + } + leaf vnfr-egress-connection-point-ref { description "A reference to a vnfr connection point."; type leafref { @@ -507,13 +538,9 @@ module nsr type string; } leaf port-id { - rwpb:field-inline "true"; - rwpb:field-string-max 64; type string; } leaf vm-id { - rwpb:field-inline "true"; - rwpb:field-string-max 64; type string; } leaf address { @@ -598,13 +625,9 @@ module nsr } } leaf port-id { - rwpb:field-inline "true"; - rwpb:field-string-max 64; type string; } leaf vm-id { - rwpb:field-inline "true"; - rwpb:field-string-max 64; type string; } leaf ip-address { @@ -617,7 +640,7 @@ module nsr } } - augment "/rw-project:project" { + augment "/osm-project:project" { container ns-instance-opdata { config false; @@ -856,21 +879,11 @@ module nsr vl-terminate : The NS is terminating a VL "; - type enumeration { - enum init; - enum vl-init-phase; - enum vnf-init-phase; - enum running; - enum terminate; - enum vnf-terminate-phase; - enum vl-terminate-phase; - enum terminated; - enum failed; - enum scaling-out; - enum scaling-in; - enum vl-instantiate; - enum vl-terminate; - } + type ns-operational-status; + } + + container ns-configuration { + uses manotypes:vca-configuration; } leaf config-status { @@ -912,7 +925,7 @@ module nsr leaf member-vnf-index-ref { description "Reference to member-vnf within constituent-vnfds"; - type uint64; + type string; } leaf vnfd-id-ref { @@ -960,7 +973,6 @@ module nsr } list initial-service-primitive { - rwpb:msg-new NsrInitialServicePrimitive; description "Initial set of service primitives for NSD."; key "seq"; @@ -969,7 +981,6 @@ module nsr } list terminate-service-primitive { - rwpb:msg-new NsrTerminateServicePrimitive; description "Set of service primitives to execute during termination of NSD."; @@ -1149,7 +1160,7 @@ module nsr leaf nsr_id_ref { description "Reference to NSR ID ref"; type leafref { - path "/rw-project:project[rw-project:name=current()/.." + + path "/osm-project:project[osm-project:name=current()/.." + "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr/nsr:id"; } mandatory true; @@ -1214,7 +1225,7 @@ module nsr leaf member-vnf-index-ref { description "Reference to member-vnf within constituent-vnfds"; - type uint64; + type string; } leaf vnfd-id-ref { @@ -1449,7 +1460,7 @@ module nsr leaf scaling-group-name-ref { description "name of the scaling group"; type leafref { - path "/rw-project:project[rw-project:name=current()/.." + + path "/osm-project:project[osm-project:name=current()/.." + "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" + "[nsr:id=current()/../nsr:nsr_id_ref]/nsr:nsd" + "/nsr:scaling-group-descriptor/nsr:name"; @@ -1460,7 +1471,7 @@ module nsr leaf instance-id { description "id of the scaling group"; type leafref { - path "/rw-project:project[rw-project:name=current()/.." + + path "/osm-project:project[osm-project:name=current()/.." + "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" + "[nsr:id=current()/../nsr:nsr_id_ref]" + "/nsr:scaling-group[nsr:scaling-group-name-ref=current()/.." + @@ -1488,7 +1499,7 @@ module nsr leaf scaling-group-name-ref { description "name of the scaling group"; type leafref { - path "/rw-project:project[rw-project:name=current()/.." + + path "/osm-project:project[osm-project:name=current()/.." + "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" + "[nsr:id=current()/../nsr:nsr_id_ref]/nsr:nsd" + "/nsr:scaling-group-descriptor/nsr:name"; @@ -1524,7 +1535,7 @@ module nsr leaf nsd_id_ref { description "Reference to NSD ID ref"; type leafref { - path "/rw-project:project[rw-project:name=current()/.." + + path "/osm-project:project[osm-project:name=current()/.." + "/project-name]/project-nsd:nsd-catalog/project-nsd:nsd/project-nsd:id"; } } @@ -1556,7 +1567,7 @@ module nsr description "A reference to VNFD placement group"; type leafref { - path "/rw-project:project[rw-project:name=current()/" + + path "/osm-project:project[osm-project:name=current()/" + "../../project-name]/project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = " + "current()/../vnfd-id-ref]/project-vnfd:placement-groups/project-vnfd:name"; } @@ -1572,7 +1583,7 @@ module nsr leaf key-pair-ref { description "A reference to the key pair entry in the global key pair table"; type leafref { - path "/rw-project:project[rw-project:name=current()/../../../" + + path "/osm-project:project[osm-project:name=current()/../../../" + "project-name]/key-pair/name"; } } @@ -1599,7 +1610,7 @@ module nsr leaf key-pair-ref { description "A reference to the key pair entry in the global key pair table"; type leafref { - path "/rw-project:project[rw-project:name=current()/" + + path "/osm-project:project[osm-project:name=current()/" + "../../../../project-name]/key-pair/name"; } }