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