Fixed warning in test_python.py: yaml.safe_load instead of load
[osm/IM.git] / models / augments / alternative-images.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 alternative-images {
19     yang-version 1.1;
20     namespace "urn:etsi:osm:yang:alternative-images";
21     prefix "alternative-images";
22
23     import etsi-nfv-vnfd {
24         prefix vnfd;
25     }
26
27     grouping extended-vim-type {
28         leaf vim-type {
29             description
30               "VIM type: openvim, openstack, vmware, aws, etc.";
31             type string;
32         }
33     }
34     grouping extended-alternative-images {
35         leaf-list alternative-sw-image-desc {
36             description
37               "List of alternative images per VIM type.
38                Different images can be used for specific types of VIMs instead
39                of the default image. This allows deployments in sites where the
40                image identifier in the VIM is given by the VIM provider and
41                cannot be modified.
42                If an alternative image is specified for a VIM type, it will prevail
43                over the default image";
44             type leafref {
45                 path "/vnfd:vnfd/vnfd:sw-image-desc/vnfd:id";
46             }
47         }
48     }
49
50     augment "/vnfd:vnfd/vnfd:sw-image-desc" {
51         uses extended-vim-type;
52     }
53
54     augment "/vnfd:vnfd/vnfd:vdu" {
55         uses extended-alternative-images;
56     }
57 }