| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 1 | //INFORMATION |
| 2 | //organization "CTTC"; |
| 3 | //contact "Pol Alemany, Ricard Vilalta, Juan Luis de la Cruz"; |
| 4 | //description "Network Slice components definition"; |
| 5 | |
| 6 | // MODULE STRUCTURE |
| 7 | module nsi { |
| 8 | //header information |
| 9 | yang-version 1; |
| 10 | namespace "urn:ietf:params:xml:ns:yang:nfvo:nsi"; |
| 11 | prefix "nsi"; |
| 12 | |
| 13 | import nst { |
| 14 | prefix "nst"; |
| 15 | } |
| 16 | |
| 17 | import nsr { |
| 18 | prefix "nsr"; |
| 19 | } |
| 20 | |
| 21 | import vlr { |
| 22 | prefix "vlr"; |
| 23 | } |
| 24 | |
| 25 | import rw-project { |
| 26 | prefix "rw-project"; |
| 27 | } |
| 28 | |
| 29 | import instantiation-parameters { |
| 30 | prefix "instantiation-parameters"; |
| 31 | } |
| 32 | |
| garciadeblas | ff4b926 | 2018-10-19 14:31:56 +0200 | [diff] [blame] | 33 | import ietf-yang-types { |
| 34 | prefix "yang"; |
| 35 | } |
| 36 | |
| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 37 | //revision history |
| 38 | revision 2018-09-28 { |
| 39 | description "Initial version"; |
| 40 | } |
| 41 | |
| 42 | grouping nsi { |
| 43 | leaf id { |
| garciadeblas | ff4b926 | 2018-10-19 14:31:56 +0200 | [diff] [blame] | 44 | description "Identifier for the NSI."; |
| 45 | type yang:uuid; |
| 46 | } |
| 47 | |
| 48 | leaf name { |
| 49 | description "NSI name."; |
| 50 | type string; |
| 51 | mandatory true; |
| 52 | } |
| 53 | |
| 54 | leaf short-name { |
| 55 | description "NSI short name."; |
| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 56 | type string; |
| 57 | } |
| garciadeblas | ff4b926 | 2018-10-19 14:31:56 +0200 | [diff] [blame] | 58 | |
| 59 | leaf description { |
| 60 | description "NSI description."; |
| 61 | type string; |
| 62 | } |
| 63 | |
| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 64 | leaf nst-ref { |
| 65 | type leafref { |
| 66 | path "/nst:nst/nst:id"; |
| 67 | } |
| garciadeblas | ff4b926 | 2018-10-19 14:31:56 +0200 | [diff] [blame] | 68 | mandatory true; |
| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 69 | } |
| 70 | |
| 71 | container instantiation-parameters { |
| garciadeblas | ff4b926 | 2018-10-19 14:31:56 +0200 | [diff] [blame] | 72 | uses instantiation-parameters:netslice_params; |
| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 73 | } |
| 74 | |
| 75 | container network-slice-template { |
| 76 | uses nst:network-slice; |
| 77 | } |
| 78 | |
| 79 | list nsr-ref-list{ |
| 80 | config false; |
| 81 | key "nsr-ref"; |
| 82 | leaf nsr-ref { |
| 83 | description "Reference to instantiated NSR"; |
| 84 | config false; |
| 85 | type leafref { |
| 86 | path "/rw-project:project/nsr:ns-instance-opdata/nsr:nsr/nsr:ns-instance-config-ref"; |
| 87 | } |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | list vlr-ref-list{ |
| 92 | key "vlr-ref"; |
| 93 | config false; |
| 94 | leaf vlr-ref { |
| 95 | description "Reference to instantiated VLR"; |
| 96 | config false; |
| 97 | type leafref { |
| 98 | path "/rw-project:project/vlr:vlr-catalog/vlr:vlr/vlr:id"; |
| 99 | } |
| 100 | } |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | list nsi{ |
| 105 | key "id"; |
| garciadeblas | ff4b926 | 2018-10-19 14:31:56 +0200 | [diff] [blame] | 106 | unique "name"; |
| jdelacruz | 2779753 | 2018-09-18 19:16:16 +0200 | [diff] [blame] | 107 | uses nsi; |
| 108 | } |
| 109 | |
| 110 | } |