Added name to nsi and nst as mandatory; removed wrong nst params; netslice instantiat...
[osm/IM.git] / models / yang / nsi.yang
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
33   import ietf-yang-types {
34     prefix "yang";
35   }
36
37   //revision history
38   revision 2018-09-28 {
39     description "Initial version";
40   }
41
42   grouping nsi {
43     leaf id {
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.";
56       type string;
57     }
58
59     leaf description {
60       description "NSI description.";
61       type string;
62     }
63
64     leaf nst-ref {
65       type leafref {
66         path "/nst:nst/nst:id";
67       }
68       mandatory true;
69     }
70
71     container instantiation-parameters {
72       uses instantiation-parameters:netslice_params;
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";
106     unique "name";
107     uses nsi;
108   }
109
110 }