| garciadeblas | 5419736 | 2018-11-27 15:30:13 +0100 | [diff] [blame] | 1 | /* |
| 2 | * |
| 3 | * Copyright 2018 CTTC |
| 4 | * Copyright 2018 Telefonica Investigacion y Desarrollo S.A.U. |
| 5 | * |
| 6 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | * you may not use this file except in compliance with the License. |
| 8 | * You may obtain a copy of the License at |
| 9 | * |
| 10 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | * |
| 12 | * Unless required by applicable law or agreed to in writing, software |
| 13 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | * See the License for the specific language governing permissions and |
| 16 | * limitations under the License. |
| 17 | * |
| 18 | * |
| 19 | */ |
| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 20 | |
| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 21 | module nsi { |
| 22 | //header information |
| 23 | yang-version 1; |
| 24 | namespace "urn:ietf:params:xml:ns:yang:nfvo:nsi"; |
| 25 | prefix "nsi"; |
| 26 | |
| 27 | import nst { |
| 28 | prefix "nst"; |
| 29 | } |
| 30 | |
| 31 | import nsr { |
| 32 | prefix "nsr"; |
| 33 | } |
| 34 | |
| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 35 | import rw-project { |
| 36 | prefix "rw-project"; |
| 37 | } |
| 38 | |
| garciadeblas | 5419736 | 2018-11-27 15:30:13 +0100 | [diff] [blame] | 39 | import netslice-instantiation-parameters { |
| 40 | prefix "netslice-instantiation-parameters"; |
| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 41 | } |
| 42 | |
| garciadeblas | ff4b926 | 2018-10-19 14:31:56 +0200 | [diff] [blame] | 43 | import ietf-yang-types { |
| 44 | prefix "yang"; |
| 45 | } |
| 46 | |
| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 47 | //revision history |
| 48 | revision 2018-09-28 { |
| 49 | description "Initial version"; |
| 50 | } |
| 51 | |
| 52 | grouping nsi { |
| 53 | leaf id { |
| garciadeblas | ff4b926 | 2018-10-19 14:31:56 +0200 | [diff] [blame] | 54 | description "Identifier for the NSI."; |
| 55 | type yang:uuid; |
| 56 | } |
| 57 | |
| 58 | leaf name { |
| 59 | description "NSI name."; |
| 60 | type string; |
| 61 | mandatory true; |
| 62 | } |
| 63 | |
| 64 | leaf short-name { |
| 65 | description "NSI short name."; |
| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 66 | type string; |
| 67 | } |
| garciadeblas | ff4b926 | 2018-10-19 14:31:56 +0200 | [diff] [blame] | 68 | |
| 69 | leaf description { |
| 70 | description "NSI description."; |
| 71 | type string; |
| 72 | } |
| 73 | |
| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 74 | leaf nst-ref { |
| 75 | type leafref { |
| 76 | path "/nst:nst/nst:id"; |
| 77 | } |
| garciadeblas | ff4b926 | 2018-10-19 14:31:56 +0200 | [diff] [blame] | 78 | mandatory true; |
| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 79 | } |
| 80 | |
| 81 | container instantiation-parameters { |
| garciadeblas | 5419736 | 2018-11-27 15:30:13 +0100 | [diff] [blame] | 82 | uses netslice-instantiation-parameters:netslice_params; |
| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 83 | } |
| 84 | |
| 85 | container network-slice-template { |
| 86 | uses nst:network-slice; |
| 87 | } |
| 88 | |
| 89 | list nsr-ref-list{ |
| 90 | config false; |
| 91 | key "nsr-ref"; |
| 92 | leaf nsr-ref { |
| 93 | description "Reference to instantiated NSR"; |
| 94 | config false; |
| 95 | type leafref { |
| 96 | path "/rw-project:project/nsr:ns-instance-opdata/nsr:nsr/nsr:ns-instance-config-ref"; |
| 97 | } |
| 98 | } |
| 99 | } |
| 100 | |
| garciadeblas | 5419736 | 2018-11-27 15:30:13 +0100 | [diff] [blame] | 101 | list vlr-list{ |
| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 102 | config false; |
| garciadeblas | 5419736 | 2018-11-27 15:30:13 +0100 | [diff] [blame] | 103 | key "id"; |
| 104 | leaf id { |
| 105 | description "ID of instantiated VLR"; |
| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 106 | config false; |
| garciadeblas | 5419736 | 2018-11-27 15:30:13 +0100 | [diff] [blame] | 107 | type yang:uuid; |
| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 108 | } |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | list nsi{ |
| 113 | key "id"; |
| garciadeblas | ff4b926 | 2018-10-19 14:31:56 +0200 | [diff] [blame] | 114 | unique "name"; |
| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 115 | uses nsi; |
| 116 | } |
| 117 | |
| 118 | } |