From 0e2b2088c0ee37edbe8c1a546a78cac50a44ed9c Mon Sep 17 00:00:00 2001 From: yinle Date: Thu, 7 Jul 2011 02:38:07 +0000 Subject: [PATCH] modify the way of finding nodetype git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10028 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/dhcp.pm | 29 ++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/dhcp.pm b/xCAT-server/lib/xcat/plugins/dhcp.pm index 6c4be1130..d919f77c5 100644 --- a/xCAT-server/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server/lib/xcat/plugins/dhcp.pm @@ -689,13 +689,17 @@ sub preprocess_request foreach my $n (@nodes) { # get the nodetype for each node - my $ntype = xCAT::DBobjUtils->getnodetype($n); - if ($ntype =~ /osi/) { + #my $ntype = xCAT::DBobjUtils->getnodetype($n); + my $ntable = xCAT::Table->new('nodetype'); + if ($ntable) { + my $mytype = $ntable->getNodesAttribs($n,['nodetype']); + if ($mytype =~ /osi/) { $Imsg++; - } - unless ($ntype =~ /osi/) { - push @tmplist, $n; - } + } + unless ($mytype =~ /osi/) { + push @tmplist, $n; + } + } } @nodes = @tmplist; @@ -1139,11 +1143,16 @@ sub process_request foreach my $n (@{$req->{node}}) { # get the nodetype for each node - my $ntype = xCAT::DBobjUtils->getnodetype($n); - # don't add if it is type "osi" - unless ($ntype =~ /osi/) { + #my $ntype = xCAT::DBobjUtils->getnodetype($n); + my $ntable = xCAT::Table->new('nodetype'); + if ($ntable) { + my $ntype = $ntable->getNodesAttribs($n,['nodetype']); + + # don't add if it is type "osi" + unless ($ntype =~ /osi/) { push @tmplist, $n; - } + } + } } @{$req->{node}} = @tmplist; }