It looks like you're intending to pass in a array of routes to net::addr in a routes name, but you've defined it as taking the 4 keys of each route rather then the route array. Try the following and see if it works any better.
node test{
net::addr { 'routing':
routes => {
route1 => {
address => '172.29.54.70',
netmask => '255.255.255.0',
gateway => '172.29.54.65',
dev => 'eth0',
},
route2 => {
address => '192.168.1.3',
netmask => '255.255.255.0',
gateway => '192.168.1.1',
dev => 'eth3',
},
}
}
}
and
define net::addr (
$routes={},
) {
file { "route-${name}":
ensure => 'present',
mode => '0644',
owner => 'root',
group => 'root',
path => "/etc/sysconfig/network-scripts/route-${name}",
content => template('network/addr.erb'),
}
}
Edit: Fixed typo, padding to get by edit character limit