Revert "Full Juju Charm support"
[osm/SO.git] / models / plugins / yang / vld.yang
1
2 /*
3  * 
4  *   Copyright 2016-2017 RIFT.IO Inc
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  */
20
21 module vld
22 {
23   namespace "urn:ietf:params:xml:ns:yang:nfvo:vld";
24   prefix "vld";
25
26   import project-vnfd {
27     prefix "project-vnfd";
28   }
29
30   import ietf-inet-types {
31     prefix "inet";
32   }
33
34   import ietf-yang-types {
35     prefix "yang";
36   }
37
38   import mano-types {
39     prefix "manotypes";
40   }
41
42   import rw-project {
43     prefix "rw-project";
44   }
45
46   revision 2017-02-08 {
47     description
48       "Update model to support projects.";
49   }
50
51   revision 2015-09-10 {
52     description
53       "Initial revision. This YANG file defines
54        the Virtual Link Descriptor (VLD)";
55     reference
56       "Derived from earlier versions of base YANG files";
57   }
58
59   augment "/rw-project:project" {
60     container vld-catalog {
61
62       list vld {
63         key "id";
64
65         leaf id {
66           description "Identifier for the VLD.";
67           type yang:uuid;
68         }
69
70         leaf name {
71           description "Virtual Link Descriptor (VLD) name.";
72           type string;
73         }
74
75         leaf short-name {
76           description "Short name for VLD for UI";
77           type string;
78         }
79
80         leaf vendor {
81           description "Provider of the VLD.";
82           type string;
83         }
84
85         leaf description {
86           description "Description of the VLD.";
87           type string;
88         }
89
90         leaf version {
91           description "Version of the VLD";
92           type string;
93         }
94
95         leaf type {
96           type manotypes:virtual-link-type;
97         }
98
99         leaf root-bandwidth {
100           description
101             "For ELAN this is the aggregate bandwidth.";
102           type uint64;
103         }
104
105         leaf leaf-bandwidth {
106           description
107             "For ELAN this is the bandwidth of branches.";
108           type uint64;
109         }
110
111         list vnfd-connection-point-ref {
112           description
113             "A list of references to connection points.";
114           key "vnfd-ref member-vnf-index-ref";
115
116           leaf vnfd-ref {
117             description "A reference to a vnfd";
118             type leafref {
119               path "../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id";
120             }
121           }
122
123           leaf member-vnf-index-ref {
124             description
125               "A reference to the consituent-vnfd id in nsd. 
126               Should have been a leafref to:
127                 '/rw-project:project/project-nsd:nsd-catalog:/nsd/constituent-vnfd/member-vnf-index-ref'.
128               Instead using direct leaf to avoid circular reference.";
129             type uint64;
130           }
131
132           leaf vnfd-connection-point-ref {
133             description
134               "A reference to a connection point name in a vnfd";
135             type leafref {
136               path "../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd"
137                 + "[project-vnfd:id = current()/../vld:vnfd-ref]"
138                 + "/project-vnfd:connection-point/project-vnfd:name";
139             }
140           }
141         }
142
143         // replicate for pnfd container here
144         uses manotypes:provider-network;
145       }
146     }
147   }
148 }