Update vnfc-relations
[osm/IM.git] / models / augments / vip.yang
1 /*
2   Copyright 2020 Whitestack LLC
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
18 module vip {
19     yang-version 1.1;
20     namespace "urn:etsi:osm:yang:augments:vip";
21     prefix "vip";
22
23     import etsi-nfv-vnfd {
24         prefix vnfd;
25     }
26
27     grouping extended-vip {
28         list vip {
29             description
30               "Paired interfaces from different VDUs that share a Virtual IP";
31
32             key "name";
33             leaf name {
34                 description
35                   "Name of the Virtual IP";
36                 type string;
37             }
38
39             list paired-interfaces {
40                 key "vdu-id-ref";
41                 leaf vdu-id-ref {
42                     description
43                       "Reference to the VDU";
44                     type leafref {
45                         path "/vnfd:vnfd/vnfd:vdu/vnfd:id";
46                     }
47                 }
48
49                 leaf interface-ref {
50                     description
51                       "Reference to the interface";
52                     type leafref {
53                         path "/vnfd:vnfd/vnfd:vdu/vnfd:int-cpd/vnfd:virtual-network-interface-requirement/vnfd:name";
54                     }
55                 }
56             }
57         }
58     }
59
60     augment "/vnfd:vnfd" {
61         uses extended-vip;
62     }
63 }