From 87483ce6b86f00e02a341e2bd343fc82c068ae82 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 26 Jun 2009 13:11:49 +0000 Subject: [PATCH] -Add feature for nodeset install/netboot to accept '=' style argument to specify new nodetype parameters git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3649 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/destiny.pm | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/destiny.pm b/xCAT-server/lib/xcat/plugins/destiny.pm index f083e421c..a26bbe40e 100644 --- a/xCAT-server/lib/xcat/plugins/destiny.pm +++ b/xCAT-server/lib/xcat/plugins/destiny.pm @@ -123,8 +123,26 @@ sub setdestiny { if ($ient->{kcmdline}) { $hash->{kcmdline} = $ient->{kcmdline} } $bptab->setNodeAttribs($_,$hash); } - } elsif ($state =~ /^install$/ or $state eq "install" or $state eq "netboot" or $state eq "image" or $state eq "winshell") { + } elsif ($state =~ /^install[=\$]/ or $state eq 'install' or $state =~ /^netboot[=\$]/ or $state eq 'netboot' or $state eq "image" or $state eq "winshell") { chomp($state); + my $target; + if ($state =~ /=/) { + ($state,$target) = split /=/,$state,2; + } + if ($target) { + my $updateattribs; + if ($target =~ /(.*)-(.*)-(.*)/) { + $updateattribs->{os}=$1; + $updateattribs->{arch}=$2; + $updateattribs->{profile}=$3; + } else { + $updateattribs->{profile}=$target; + } + my $nodetypetable = xCAT::Table->new('nodetype',-create=>1); + $nodetypetable->setNodesAttribs($req->{node},$updateattribs); + } + + $errored=0; $subreq->({command=>["mk$state"], node=>$req->{node}}, \&relay_response);