From 2c4a482dff1645932b0ab7f4a5d307badfcbdbcc Mon Sep 17 00:00:00 2001 From: leiaibj Date: Mon, 24 Dec 2012 06:39:26 +0000 Subject: [PATCH] Supporting auto discover for PureFlex X nodes git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14705 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/profilednodes.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/profilednodes.pm b/xCAT-server/lib/xcat/plugins/profilednodes.pm index e98bacacc..1f46f543a 100644 --- a/xCAT-server/lib/xcat/plugins/profilednodes.pm +++ b/xCAT-server/lib/xcat/plugins/profilednodes.pm @@ -1077,6 +1077,8 @@ sub findme{ %allracks = %$recordsref; $recordsref = xCAT::ProfiledNodeUtils->get_all_chassis(1); %allchassis = %$recordsref; + $recordsref = xCAT::ProfiledNodeUtils->get_all_chassis(1,'cmm'); + %allcmmchassis = %$recordsref; # Get discovered client IP and MAC my $ip = $request->{'_xcat_clientip'}; @@ -1124,7 +1126,12 @@ sub findme{ $sitetab->setAttribs({"key" => "__PCMDiscover"}, {"value" => "$valuestr"}); $sitetab->close(); } - + # For auto discovering PureFlex (x) nodes, set slotid attribute by default. + if (exists $args_dict{'chassis'}){ + if(exists $allcmmchassis{$args_dict{'chassis'}}){ + $raw_hostinfo_str .= " slotid=1\n"; + } + } my ($hostinfo_dict_ref, $invalid_records_ref) = parse_hosts_string($raw_hostinfo_str); my %hostinfo_dict = %$hostinfo_dict_ref;