Update openjdk version to 19 and yang2swagger version to 2.1.0
[osm/IM.git] / models / augments / vnffgd.yang
1 /*
2   # Copyright ETSI Contributors and Others.
3
4   Licensed under the Apache License, Version 2.0 (the "License");
5   you may not use this file except in compliance with the License.
6   You may obtain a copy of the License at
7
8     http://www.apache.org/licenses/LICENSE-2.0
9
10   Unless required by applicable law or agreed to in writing, software
11   distributed under the License is distributed on an "AS IS" BASIS,
12   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13   implied.
14   See the License for the specific language governing permissions and
15   limitations under the License.
16 */
17 module vnffgd {
18     yang-version 1.1;
19     namespace "urn:etsi:osm:yang:augments:vnffgd";
20     prefix "vnffgd";
21
22     import etsi-nfv-nsd {
23         prefix nsd;
24     }
25
26     import ietf-inet-types {
27         prefix inet;
28     }
29
30     grouping match {
31         list match-attributes {
32             description
33                 "List of match attributes.";
34
35             key "id";
36             leaf id {
37                 description
38                     "Identifier for the classifier match attribute rule.";
39                 type string;
40             }
41
42             leaf ip-proto {
43                 description
44                     "IP Protocol.";
45                 type uint8;
46             }
47
48             leaf source-ip-address {
49                 description
50                     "Source IP address.";
51                 type inet:ip-address;
52             }
53
54             leaf destination-ip-address {
55                 description
56                     "Destination IP address.";
57                 type inet:ip-address;
58             }
59
60             leaf source-port {
61                 description
62                     "Source port number.";
63                 type inet:port-number;
64             }
65
66             leaf destination-port {
67                 description
68                     "Destination port number.";
69                 type inet:port-number;
70             }
71
72             leaf constituent-base-element-id {
73                 description
74                     "Refer to the profile of source NS constituent.";
75                 type leafref {
76                     path "/nsd:nsd/nsd:nsd/nsd:df/nsd:vnf-profile/nsd:id";
77                 }
78             }
79
80             leaf constituent-cpd-id {
81                 description
82                     "Logical source port.";
83                 type string;
84             }
85             //TODO: Add more match criteria
86         } //match-attributes
87
88     }
89
90     grouping extended-position-element {
91
92         leaf-list nfp-position-element-id {
93             type leafref {
94               path "../../../nfp-position-element/id";
95             }
96             description
97               "References one or a pair of CPDs or SAPDs.";
98             reference
99               "GS NFV IFA014: Section 6.4.5.2 NfpPositionDesc
100                information element";
101           }
102     }
103
104     grouping extended-nfp-position {
105         list nfp-position-element {
106             key "id";
107             leaf id {
108                 type string;
109                 description
110                     "Identifier of this NfpPositionElemen information
111                     element. It uniquely identifies an
112                     NfpPositionElement.";
113                 reference
114                     "GS NFV IFA014: Section 6.4.6.2 NfpPositionElement
115                     information element";
116             }
117         }
118
119     }
120
121     grouping extended-cpe {
122         leaf constituent-base-element-id {
123             type leafref {
124                 path "/nsd:nsd/nsd:nsd/nsd:vnffgd/nsd:vnf-profile-id";
125             }
126         }
127
128         leaf order {
129             type uint8;
130             description
131               "A number that denotes the order of a VNF in a chain";
132         }
133
134         leaf ingress-constituent-cpd-id {
135             description
136               "A reference to a connection point name
137                   in a vnfd.";
138
139             type string;
140         }
141
142         leaf egress-constituent-cpd-id {
143             description
144               "A reference to a connection point name
145                   in a vnfd.";
146
147             type string;
148         }
149     }
150
151     augment "/nsd:nsd/nsd:nsd/nsd:vnffgd/nsd:nfpd/nsd:position-desc-id" {
152         uses match;
153     }
154
155     augment "/nsd:nsd/nsd:nsd/nsd:vnffgd" {
156         uses extended-nfp-position;
157     }
158
159     augment "/nsd:nsd/nsd:nsd/nsd:vnffgd/nsd:nfpd/nsd:position-desc-id" {
160         uses extended-position-element;
161     }
162
163     augment "/nsd:nsd/nsd:nsd/nsd:vnffgd/nsd:nfpd/nsd:position-desc-id/nsd:cp-profile-id/nsd:constituent-profile-elements"{
164         uses extended-cpe;
165     }
166 }