blob: 746c23e323b85b74f20a24a8902d1df79d90a49c [file] [log] [blame]
sonu gupta1bb37b82016-11-11 16:51:18 +05301module decimal64 {
2
3 yang-version 1;
4
5 namespace "ydt.decimal64";
6
7 prefix "decimal64";
8
9 organization "ON-LAB";
10
11 description "This module defines for decimal64 classifier.";
12
13 revision "2016-05-24" {
14 description "Initial revision.";
15 }
16 leaf negInt {
17 type decimal64 {
18 fraction-digits 2;
19 }
20 }
21
sonu guptaeff184b2016-11-24 12:43:49 +053022 leaf posInt {
sonu gupta1bb37b82016-11-11 16:51:18 +053023 type decimal64 {
sonu guptaeff184b2016-11-24 12:43:49 +053024 fraction-digits 2;
sonu gupta1bb37b82016-11-11 16:51:18 +053025 }
26 }
27
28 leaf negIntWithMinFraction {
29 type decimal64 {
30 fraction-digits 1;
31 }
32 }
33
sonu guptaeff184b2016-11-24 12:43:49 +053034 leaf posIntWithMinFraction {
sonu gupta1bb37b82016-11-11 16:51:18 +053035 type decimal64 {
sonu guptaeff184b2016-11-24 12:43:49 +053036 fraction-digits 1;
37 }
38
39 }
40 leaf negIntWithMaxFraction {
41 type decimal64 {
42 fraction-digits 18;
sonu gupta1bb37b82016-11-11 16:51:18 +053043 }
44 }
45
46 leaf posIntWithMaxFraction {
47 type decimal64 {
48 fraction-digits 18;
49 }
50
51 }
52
sonu guptaeff184b2016-11-24 12:43:49 +053053 leaf midIntWithRange {
sonu gupta1bb37b82016-11-11 16:51:18 +053054 type decimal64 {
sonu guptaeff184b2016-11-24 12:43:49 +053055 fraction-digits 2;
56 range "10 .. 100";
57 }
sonu gupta1bb37b82016-11-11 16:51:18 +053058 }
59
60 leaf minIntWithRange {
61 type decimal64 {
62 fraction-digits 2;
63 range "10 .. 100";
64 }
65 }
66
sonu gupta1bb37b82016-11-11 16:51:18 +053067 leaf maxIntWithRange {
68 type decimal64 {
69 fraction-digits 2;
70 range "10 .. 100";
71 }
72 }
73
74 list multiRangeValidation {
75 config false;
76 leaf decimal {
77 type decimal64 {
78 fraction-digits 2;
79 range "10..40 | 50..100";
80 }
81 }
82 leaf revDecimal {
83 type decimal64 {
84 fraction-digits 2;
85 range "min .. 3.14 | 10 | 20..max";
86 }
87 }
88 }
sonu guptaeff184b2016-11-24 12:43:49 +053089
90 leaf l1 {
91 type decimal64 {
92 fraction-digits 2;
93 }
94 }
sonu gupta1bb37b82016-11-11 16:51:18 +053095}