| 1 |
# -*- cperl -*- |
| 2 |
|
| 3 |
# this file is used by test script |
| 4 |
|
| 5 |
[ |
| 6 |
[ |
| 7 |
name => 'SubSlave2', |
| 8 |
element => [ |
| 9 |
[qw/aa2 ab2 ac2 ad2 Z/] => |
| 10 |
{ type => 'leaf', value_type => 'string' } |
| 11 |
] |
| 12 |
], |
| 13 |
|
| 14 |
[ |
| 15 |
name => 'SubSlave', |
| 16 |
element => [ |
| 17 |
[qw/aa ab ac ad/] => |
| 18 |
{ type => 'leaf', value_type => 'uniline' }, |
| 19 |
sub_slave => { type => 'node' , |
| 20 |
config_class_name => 'SubSlave2', |
| 21 |
} |
| 22 |
] |
| 23 |
], |
| 24 |
|
| 25 |
[ |
| 26 |
name => 'X_base_class2', |
| 27 |
element => [ |
| 28 |
X => { type => 'leaf', |
| 29 |
value_type => 'enum', |
| 30 |
choice => [qw/Av Bv Cv/] |
| 31 |
}, |
| 32 |
], |
| 33 |
class_description => 'rather dummy class to check include feature', |
| 34 |
], |
| 35 |
|
| 36 |
[ |
| 37 |
name => 'X_base_class', |
| 38 |
include => 'X_base_class2', |
| 39 |
], |
| 40 |
|
| 41 |
|
| 42 |
[ |
| 43 |
name => 'SlaveZ', |
| 44 |
element => [ |
| 45 |
[qw/Z/] => { type => 'leaf', |
| 46 |
value_type => 'enum', |
| 47 |
choice => [qw/Av Bv Cv/] |
| 48 |
}, |
| 49 |
[qw/DX/] => { type => 'leaf', |
| 50 |
value_type => 'enum', |
| 51 |
default => 'Dv', |
| 52 |
choice => [qw/Av Bv Cv Dv/] |
| 53 |
}, |
| 54 |
], |
| 55 |
include => 'X_base_class', |
| 56 |
include_after => 'Z', |
| 57 |
], |
| 58 |
|
| 59 |
[ |
| 60 |
name => 'SlaveY', |
| 61 |
element => [ |
| 62 |
std_id => { |
| 63 |
type => 'hash', |
| 64 |
index_type => 'string', |
| 65 |
cargo => { |
| 66 |
type => 'node', |
| 67 |
config_class_name => 'SlaveZ' |
| 68 |
} , |
| 69 |
}, |
| 70 |
sub_slave => { type => 'node' , |
| 71 |
config_class_name => 'SubSlave', |
| 72 |
}, |
| 73 |
[qw/a_string a_long_string another_string/] |
| 74 |
=> { type => 'leaf', |
| 75 |
mandatory => 1 , |
| 76 |
value_type => 'string' |
| 77 |
}, |
| 78 |
warp2 => { |
| 79 |
type => 'warped_node', |
| 80 |
config_class_name => 'SubSlave', |
| 81 |
morph => 1 , |
| 82 |
warp => { |
| 83 |
follow => '! tree_macro', |
| 84 |
rules => [ |
| 85 |
mXY => { config_class_name => 'SubSlave2'}, |
| 86 |
XZ => { config_class_name => 'SubSlave2'} |
| 87 |
] |
| 88 |
} |
| 89 |
}, |
| 90 |
Y => { type => 'leaf', |
| 91 |
value_type => 'enum', |
| 92 |
choice => [qw/Av Bv Cv/] |
| 93 |
}, |
| 94 |
], |
| 95 |
include => 'X_base_class', |
| 96 |
], |
| 97 |
|
| 98 |
|
| 99 |
[ |
| 100 |
name => 'Master', |
| 101 |
class_description => "Master description", |
| 102 |
level => [ [qw/hash_a tree_macro int_v/] => 'important' ], |
| 103 |
element => [ |
| 104 |
a_string => { type => 'leaf', |
| 105 |
value_type => 'string' |
| 106 |
}, |
| 107 |
string_with_def => { type => 'leaf', |
| 108 |
value_type => 'string', |
| 109 |
default => 'yada yada' |
| 110 |
}, |
| 111 |
m_string => { type => 'leaf', |
| 112 |
mandatory => 1 , |
| 113 |
value_type => 'string', |
| 114 |
description =>'an important mandatory string', |
| 115 |
}, |
| 116 |
m_int_v => { type => 'leaf', |
| 117 |
value_type => 'integer', |
| 118 |
default => '10', |
| 119 |
mandatory => 1, |
| 120 |
min => 5, |
| 121 |
max => 15 |
| 122 |
}, |
| 123 |
m_bool_v => { type => 'leaf', |
| 124 |
value_type => 'boolean', |
| 125 |
mandatory => 1 |
| 126 |
}, |
| 127 |
int_v => { type => 'leaf', |
| 128 |
value_type => 'integer', |
| 129 |
default => '10', |
| 130 |
min => 5, |
| 131 |
max => 15 |
| 132 |
}, |
| 133 |
int_v_upstream_default => { type => 'leaf', |
| 134 |
value_type => 'integer', |
| 135 |
upstream_default => '5', |
| 136 |
min => 5, |
| 137 |
max => 15 |
| 138 |
}, |
| 139 |
std_id => { type => 'hash', |
| 140 |
index_type => 'string', |
| 141 |
cargo => { type => 'node', |
| 142 |
config_class_name => 'SlaveZ' |
| 143 |
} , |
| 144 |
}, |
| 145 |
[qw/lista listb/] => { type => 'list', |
| 146 |
cargo => { type => 'leaf', |
| 147 |
value_type => 'uniline' |
| 148 |
}, |
| 149 |
}, |
| 150 |
[qw/hash_a hash_b/] => { type => 'hash', |
| 151 |
index_type => 'string', |
| 152 |
cargo => { type => 'leaf', |
| 153 |
value_type => 'uniline' |
| 154 |
}, |
| 155 |
}, |
| 156 |
ordered_hash => { type => 'hash', |
| 157 |
index_type => 'string', |
| 158 |
ordered => 1 , |
| 159 |
cargo => { type => 'leaf', |
| 160 |
value_type => 'uniline' |
| 161 |
}, |
| 162 |
}, |
| 163 |
ordered_hash_of_mandatory => { type => 'hash', |
| 164 |
index_type => 'string', |
| 165 |
ordered => 1 , |
| 166 |
cargo => { type => 'leaf', |
| 167 |
value_type => 'uniline', |
| 168 |
mandatory => 1, |
| 169 |
}, |
| 170 |
}, |
| 171 |
'ordered_hash_of_nodes' |
| 172 |
=> { type => 'hash', |
| 173 |
index_type => 'string', |
| 174 |
ordered => 1 , |
| 175 |
cargo => { type => 'node', |
| 176 |
config_class_name => 'SlaveZ' |
| 177 |
}, |
| 178 |
}, |
| 179 |
olist => { type => 'list', |
| 180 |
cargo => { type => 'node', |
| 181 |
config_class_name => 'SlaveZ' , |
| 182 |
}, |
| 183 |
}, |
| 184 |
enum_list => { type => 'list', |
| 185 |
cargo => { type => 'leaf', |
| 186 |
value_type => 'enum', |
| 187 |
choice => [qw/A B C/], |
| 188 |
} |
| 189 |
}, |
| 190 |
tree_macro => { type => 'leaf', |
| 191 |
value_type => 'enum', |
| 192 |
choice => [qw/XY XZ mXY/], |
| 193 |
help => { XY => 'XY help', |
| 194 |
XZ => 'XZ help', |
| 195 |
mXY => 'mXY help', |
| 196 |
} |
| 197 |
}, |
| 198 |
warp => { |
| 199 |
type => 'warped_node', |
| 200 |
config_class_name => 'SlaveY', |
| 201 |
morph => 1 , |
| 202 |
warp => { |
| 203 |
follow => '! tree_macro', |
| 204 |
rules => [ |
| 205 |
mXY => { config_class_name => 'SlaveY'}, |
| 206 |
XZ => { config_class_name => 'SlaveZ'} |
| 207 |
] |
| 208 |
} |
| 209 |
}, |
| 210 |
|
| 211 |
'slave_y' => { type => 'node', |
| 212 |
config_class_name => 'SlaveY' , |
| 213 |
}, |
| 214 |
|
| 215 |
my_check_list => { type => 'check_list', |
| 216 |
choice => [ 'A', 'B', 'C', 'D' ], |
| 217 |
help => { 'A' => 'some help on A', |
| 218 |
'B' => 'some help on B not A', |
| 219 |
'C' => 'some help on C not AB', |
| 220 |
'D' => 'some help on D not ABC', |
| 221 |
} |
| 222 |
} , |
| 223 |
my_ref_check_list => { type => 'check_list', |
| 224 |
refer_to => '- hash_a + ! hash_b', |
| 225 |
} , |
| 226 |
|
| 227 |
'ordered_checklist' |
| 228 |
=> { type => 'check_list', |
| 229 |
choice => ['A' .. 'Z'], |
| 230 |
ordered => 1 , |
| 231 |
help => { A => 'A help', E => 'E help' } , |
| 232 |
}, |
| 233 |
|
| 234 |
my_reference => { type => 'leaf', |
| 235 |
value_type => 'reference', |
| 236 |
refer_to => '- hash_a + ! hash_b', |
| 237 |
}, |
| 238 |
my_uniline => { type => 'leaf', value_type => 'uniline'}, |
| 239 |
|
| 240 |
], |
| 241 |
description => [ |
| 242 |
tree_macro => 'controls behavior of other elements', |
| 243 |
std_id => 'a dumb hash of SlaveZ nodes', |
| 244 |
my_ref_check_list => 'checkable items are defined by hash_a and hash_b' |
| 245 |
] |
| 246 |
], |
| 247 |
] ; |
| 248 |
|
| 249 |
# do not put 1; at the end or Model-> load will not work |
| 250 |
|