12 |
my $GROUP = '224.0.0.103'; |
my $GROUP = '224.0.0.103'; |
13 |
my $PORT = '3235'; |
my $PORT = '3235'; |
14 |
|
|
15 |
my $debug = 0; |
#my $debug = 0; # from MDAP |
16 |
my $quiet = 1; |
my $quiet = 1; |
17 |
my $verbose = 0; |
my $verbose = 0; |
18 |
my $credentials = 0; |
my $credentials = 0; |
256 |
status "$waiting of $count ants still flasing upto $build\n"; |
status "$waiting of $count ants still flasing upto $build\n"; |
257 |
} |
} |
258 |
} |
} |
|
} else { |
|
|
once "!! NO FIRMWARE for $board in $tftp_path for ant $ant, skipping update"; |
|
|
} |
|
259 |
|
|
260 |
if ( $plugins ) { |
if ( $plugins ) { |
261 |
foreach my $plugin ( MDAP->plugins ) { |
foreach my $plugin ( MDAP->plugins ) { |
262 |
warn "## calling $plugin\n" if $debug; |
warn "## calling $plugin\n" if $debug; |
263 |
if ( my $command = $plugin->check( $h ) ) { |
if ( my $command = $plugin->check( $h ) ) { |
264 |
|
|
265 |
warn ">> $ant ", |
warn ">> $plugin $ant ", |
266 |
$h->{'ANT-NAME'}, " ", |
$h->{'ANT-NAME'}, " ", |
267 |
$h->{'_BUILD'}, " ", |
$h->{'_BUILD'}, " ", |
268 |
"\t:$command\n"; |
"\t:$command\n"; |
269 |
|
|
270 |
mdap_send("EXEC-CLI MDAP/$mdap_ver\r\nCLI-CMD:$command\r\nSEQ-NR:1\r\nTO-ANT:$ant\r\nUSER-ID:$user_id\r\nUSER-PWD:$user_pwd\r\n"); } |
mdap_send("EXEC-CLI MDAP/$mdap_ver\r\nCLI-CMD:$command\r\nSEQ-NR:1\r\nTO-ANT:$ant\r\nUSER-ID:$user_id\r\nUSER-PWD:$user_pwd\r\n"); |
271 |
|
last; |
272 |
|
} |
273 |
|
} |
274 |
} |
} |
275 |
|
|
276 |
|
} else { |
277 |
|
once "!! NO FIRMWARE for $board in $tftp_path for ant $ant, skipping update"; |
278 |
} |
} |
279 |
|
|
280 |
} elsif ( $type eq 'REPLY-EXEC-CLI' ) { |
} elsif ( $type eq 'REPLY-EXEC-CLI' ) { |
281 |
print "##<< $type\n$data\n" if $debug; |
print "##<< $type\n$data\n" if $debug; |
282 |
if ( $seq_nr == 1 ) { |
if ( $seq_nr == 1 ) { |
283 |
# mdap_send("EXEC-CLI MDAP/$mdap_ver\r\nSEQ-NR:2\r\nTO-ANT:$ant\r\nUSER-ID:$user_id\r\nUSER-PWD:$user_pwd\r\n"); |
mdap_send("EXEC-CLI MDAP/$mdap_ver\r\nSEQ-NR:2\r\nTO-ANT:$ant\r\nUSER-ID:$user_id\r\nUSER-PWD:$user_pwd\r\n"); |
284 |
forget_ant( $ant ) if ( $ant_flashing->{$ant} ); |
forget_ant( $ant ) if ( $ant_flashing->{$ant} ); |
285 |
} elsif ( $seq_nr < 0 ) { |
} elsif ( $seq_nr < 0 ) { |
286 |
warn "EXEC-CLI failed: $data\n"; |
warn "EXEC-CLI failed: $data\n"; |