From 1c1103c876ac248bfa165700f89e24a72eace910 Mon Sep 17 00:00:00 2001 From: Casandra Qiu Date: Wed, 27 May 2015 10:22:41 -0400 Subject: [PATCH] fill in switch type for mgt and nodetype for switchdiscover command --- xCAT-server/lib/xcat/plugins/switchdiscover.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/switchdiscover.pm b/xCAT-server/lib/xcat/plugins/switchdiscover.pm index ec6575145..de7bae5de 100755 --- a/xCAT-server/lib/xcat/plugins/switchdiscover.pm +++ b/xCAT-server/lib/xcat/plugins/switchdiscover.pm @@ -16,6 +16,7 @@ use xCAT::Utils; use XML::Simple; no strict; use Data::Dumper; +use Socket; #global variables for this module my %globalopt; @@ -718,7 +719,7 @@ sub xCATdB { $ret = xCAT::Utils->runxcmd( { command => ['lsdef'], arg => ['-t','switch','-o',$host] }, $sub_req, 0, 1); if ($::RUNCMD_RC == 0) { - $ret = xCAT::Utils->runxcmd({ command => ['chdef'], arg => ['-t','switch','-o',$host,"ip=$ip","comments=$vendor","switchtype=$stype"] }, $sub_req, 0, 1); + $ret = xCAT::Utils->runxcmd({ command => ['chdef'], arg => ['-t','switch','-o',$host,"ip=$ip","comments=$vendor",'nodetype=switch','mgt=switch',"switchtype=$stype"] }, $sub_req, 0, 1); } else { $ret = xCAT::Utils->runxcmd( { command => ['mkdef'], arg => ['-t','switch','-o',$host,'groups=switch',"ip=$ip","comments=$vendor",'nodetype=switch','mgt=switch',"switchtype=$stype"] }, $sub_req, 0, 1); }