mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 03:12:30 +00:00 
			
		
		
		
	Merge pull request #3059 from mattaezell/switch_findme
Enable switches to run findme for autodiscovery (#2662)
This commit is contained in:
		| @@ -293,15 +293,19 @@ sub process_request { | ||||
|             #discovery working.  Food for thought. | ||||
|             return; | ||||
|         } | ||||
|         my $discoverswitch = 0; | ||||
|         if (defined $req->{nodetype} and $req->{nodetype}->[0] eq 'switch') { | ||||
|             $discoverswitch = 1; | ||||
|         } | ||||
|         my $firstpass = 1; | ||||
|         if ($mac) { | ||||
|             $node = $macmap->find_mac($mac, $req->{cacheonly}->[0]); | ||||
|             $node = $macmap->find_mac($mac, $req->{cacheonly}->[0], $discoverswitch); | ||||
|             $firstpass = 0; | ||||
|         } | ||||
|         if (not $node) {    # and $req->{checkallmacs}->[0]) { | ||||
|             foreach (@{ $req->{mac} }) { | ||||
|                 /.*\|.*\|([\dABCDEFabcdef:]+)(\||$)/; | ||||
|                 $node = $macmap->find_mac($1, $firstpass); | ||||
|                 $node = $macmap->find_mac($1, $firstpass, $discoverswitch); | ||||
|                 $firstpass = 0; | ||||
|                 if ($node) { last; } | ||||
|             } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user