From e26893a6af9bd6d2201a15b0a9c23ef0c05bfc23 Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Tue, 20 Oct 2009 06:58:27 +0000 Subject: [PATCH] Fixed one issue in xcat2nim with dynamic node group git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4418 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/xcat2nim.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/xcat2nim.pm b/xCAT-server/lib/xcat/plugins/xcat2nim.pm index a5e09d978..363fbab99 100644 --- a/xCAT-server/lib/xcat/plugins/xcat2nim.pm +++ b/xCAT-server/lib/xcat/plugins/xcat2nim.pm @@ -690,6 +690,17 @@ sub x2n # create a NIM group definition if ($::objtype{$objname} eq 'group') { $::objhash{$objname}{'grouptype'}='static'; + my $grptab = xCAT::Table->new('nodegroup'); + my @grplist = @{$grptab->getAllEntries()}; #dynamic groups and static groups in nodegroup table + foreach my $grpdef_ref (@grplist) { + my %grpdef = %$grpdef_ref; + if (($grpdef{'groupname'} eq $objname) && ($grpdef{'grouptype'} eq 'dynamic')) { + $::objhash{$objname}{'grouptype'}='dynamic'; + last; + } + } + $grptab->close; + if (mkgrpdef($objname, $callback)) { # could not create group definition $error++;