From ad9179b18ff256b8a1a718959f7c1b57a2efccf1 Mon Sep 17 00:00:00 2001 From: hu-weihua Date: Fri, 29 Sep 2017 02:07:30 -0400 Subject: [PATCH] modify depending on comments --- .../switch_based_switch_discovery_key_process | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/xCAT-test/autotest/testcase/switchdiscover/switch_based_switch_discovery_key_process b/xCAT-test/autotest/testcase/switchdiscover/switch_based_switch_discovery_key_process index 23d546746..8528a748d 100755 --- a/xCAT-test/autotest/testcase/switchdiscover/switch_based_switch_discovery_key_process +++ b/xCAT-test/autotest/testcase/switchdiscover/switch_based_switch_discovery_key_process @@ -33,10 +33,10 @@ my %discovery_target_switch_info; my @expected_attrs_for_switch_based_switch_discovery = ("ip", "mac", "switch", "switchport"); my $expected_attrs_for_switch_based_switch_discovery_str = join(",", @expected_attrs_for_switch_based_switch_discovery); -#$monitor_switch{}{workingip} -#$monitor_switch{}{workinghostname} -#$monitor_switch{}{mac} -#$monitor_switch{}{discover_status} +#$monitor_switch{}{workingip} +#$monitor_switch{}{workinghostname} +#$monitor_switch{}{mac} +#$monitor_switch{}{discover_status} my %monitor_switch; my %mac_nodename_map; @@ -44,7 +44,7 @@ my $pre_def_node_prefix = "xcattest_predef_"; #----------------------usage-------------------- $::USAGE = "Usage: - To test switch-based switch discovery key process: swtich discovery, predefined node match and predefined node definition update. + To test switch-based switch discovery key process: switch discovery, predefined node match and predefined node definition update. To get help: $program_name -h @@ -94,7 +94,7 @@ $SIG{TERM} = $SIG{INT} = sub { print "----------------Check the configuration of test case itself----------------\n"; $rst = check_test_case_self_conf(\@error); if ($failed_switch_num == $original_target_switch_num) { - print "All node in noderange $discovery_target_switch have error, there is not a valid swtich to do discovery\n"; + print "All node in noderange $discovery_target_switch have error, there is not a valid switch to do discovery\n"; foreach my $node (sort keys %node_error_info) { print "$node : $node_error_info{$node}\n"; } @@ -388,7 +388,7 @@ sub switch_discovery { my @values = split(" ", $line); if (grep(/$values[4]/, (keys %mac_nodename_map))) { if ($values[0] eq $monitor_switch{ $mac_nodename_map{ $values[4] } }{workingip}) { - $monitor_switch{ $mac_nodename_map{ $values[4] } }{discover_status} |= 0b01; + $monitor_switch{ $mac_nodename_map{ $values[4] } }{discover_status} |= 0b001; $monitor_switch{ $mac_nodename_map{ $values[4] } }{workinghostname} = $values[1]; } } @@ -398,7 +398,7 @@ sub switch_discovery { if ($opt_pre =~ /$pre_def_node_prefix(.+)/) { my $sname = $1; if ($monitor_switch{$sname}{workinghostname} eq $opt_sw) { - $monitor_switch{$sname}{discover_status} |= 0b10; + $monitor_switch{$sname}{discover_status} |= 0b010; } } }