f2098fddf2bcbdea53a0079220a715fed8ac71a0
[smo/teiv.git] /
1 module deviate-replace-test-module {
2
3     namespace "urn:ietf:params:xml:ns:yang:deviate-replace-test-module";
4     prefix dev;
5
6     import deviation-host-test-module {
7         prefix host;
8     }
9
10         import _3gpp-common-yang-extensions {
11                 prefix yext3gpp;
12         }
13
14         description
15         "Copyright (C) 2024 Ericsson
16         Modifications Copyright (C) 2024 OpenInfra Foundation Europe";
17
18     revision "2019-10-09" {
19         description "initial revision";
20     }
21
22 // ---------------- These deviations are just fine ---------------------
23
24     deviation /host:cont2/host:leaf21 {
25         deviate replace {
26             config true;
27             mandatory false;
28             units "days";
29         }
30     }
31
32     deviation /host:list11/host:leaflist113 {
33         deviate replace {
34             default 1234;
35             default 7890;
36             yext3gpp:initial-value 70;
37         }
38     }
39
40         deviation /host:list21 {
41             deviate replace {
42             min-elements 2;
43             max-elements 36;
44             }
45         }
46
47     deviation /host:cont5/host:leaf51 {
48         deviate replace {
49             type string {
50                 length 10..40;
51             }
52         }
53     }
54
55 // ---------------- These deviations try to replace things that don't exist in the host model ---------------------
56
57     deviation /host:cont1/host:leaf11 {
58         deviate replace {
59             units "hours";
60         }
61     }
62
63 // ---------------- Various other findings ---------------------
64
65     deviation /host:cont4 {
66         deviate replace;                // Missing substatements
67     }
68
69     deviation /host:list11/host:leaf112 {
70         deviate replace {
71             type string;                        // Should throw a finding as data type has changed.
72         }
73     }
74
75     deviation /host:list22 {
76         deviate replace {
77             min-elements 6;             // shrinking boundary
78             max-elements 10;    // same
79         }
80     }
81
82     deviation /host:list11/host:leaf114 {
83         deviate replace {
84             default 23;         // target is a leaf so only a single default can occur.
85             default 95;
86         }
87     }
88
89 }