Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- my $node_to_ports = {};
- for my $node (@appliances){
- $node_to_ports->{$node} = {};
- (my $code, $port) = $rest->call( "GET", "node/$node/ports", {} );
- foreach my $port (@{$port->{items}}) {
- $node_to_ports->{$node}->{$port->{id}} = $port;
- # So in etwa ...
- my $port_reporting = $rest->call( "GET", "port/$port->{id}/fasel", {} );
- $node_to_ports->{$node}->{$port->{id}}->{reporting} = $port_reporting;
- }
- }
- print Dumper($node_to_ports);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement