Config-Model-Itself
view release on metacpan or search on metacpan
data/models/MasterModel/References.pl view on Meta::CPAN
#
# This is free software, licensed under:
#
# The GNU Lesser General Public License, Version 2.1, February 1999
#
use strict;
use warnings;
return [
[
name => 'MasterModel::References::Host',
'element' => [
if => {
type => 'hash',
index_type => 'string',
cargo => {
type => 'node',
config_class_name => 'MasterModel::References::If',
}
},
trap => {
type => 'leaf',
value_type => 'string'
}
]
],
[
name => 'MasterModel::References::If',
element => [
ip => {
type => 'leaf',
value_type => 'string'
}
]
],
[
name => 'MasterModel::References::Lan',
element => [
node => {
type => 'hash',
index_type => 'string',
cargo => {
type => 'node',
config_class_name => 'MasterModel::References::Node',
}
},
]
],
[
name => 'MasterModel::References::Node',
element => [
host => {
type => 'leaf',
value_type => 'reference',
refer_to => '- host'
},
if => {
type => 'leaf',
value_type => 'reference',
computed_refer_to => {
formula => ' - host:$h if ',
variables => {h => '- host'}
}
},
ip => {
type => 'leaf',
value_type => 'string',
compute => {
formula => '$ip',
variables => {
ip => '- host:$h if:$card ip',
h => '- host',
card => '- if'
}
}
}
]
],
[
name => 'MasterModel::References',
element => [
host => {
type => 'hash',
index_type => 'string',
cargo => {
type => 'node',
config_class_name => 'MasterModel::References::Host'
}
},
lan => {
type => 'hash',
index_type => 'string',
cargo => {
type => 'node',
config_class_name => 'MasterModel::References::Lan'
}
},
host_and_choice => {
type => 'leaf',
value_type => 'reference',
refer_to => '- host ',
choice => [qw/foo bar/]
},
dumb_list => {
type => 'list',
cargo => {
type => 'leaf',
value_type => 'string'
}
},
refer_to_list_enum => {
type => 'leaf',
value_type => 'reference',
refer_to => '- dumb_list',
},
]
]
];
( run in 0.500 second using v1.01-cache-2.11-cpan-39bf76dae61 )