From 263bf078522e131b48fa4281aaf3a1cca5b987f9 Mon Sep 17 00:00:00 2001 From: ligc Date: Fri, 7 Aug 2009 02:09:33 +0000 Subject: [PATCH] fix for bug 2833468 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3963 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/DBobjectdefs.pm | 25 ++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm index 949f3f5d5..7c9f0b0f3 100644 --- a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm +++ b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm @@ -985,6 +985,17 @@ sub defmk { if ($::opt_d) { + # For dynamic node group, + # can not assign attributes for inherit + # only the 'objtype' in %::FINALATTRS + if (scalar(keys %{$::FINALATTRS{$obj}}) > 1) + { + my $rsp; + $rsp->{data}->[0] = "Can not assign attributes to dynamic node group \'$obj\'.\n"; + xCAT::MsgUtils->message("E", $rsp, $::callback); + $error = 1; + next; + } $::FINALATTRS{$obj}{grouptype} = 'dynamic'; $::FINALATTRS{$obj}{members} = 'dynamic'; } @@ -1490,6 +1501,20 @@ sub defch # what kind of group is this? - static or dynamic my $grptype; my %objhash; + if ($::opt_d) + { + # For dynamic node group, + # can not assign attributes for inherit + # only the 'objtype' in %::FINALATTRS + if (scalar(keys %{$::FINALATTRS{$obj}}) > 1) + { + my $rsp; + $rsp->{data}->[0] = "Can not assign attributes to dynamic node group \'$obj\'.\n"; + xCAT::MsgUtils->message("E", $rsp, $::callback); + $error = 1; + next; + } + } if ($isDefined) { $objhash{$obj} = $type;