diff --git a/xCAT-server/lib/xcat/plugins/tabutils.pm b/xCAT-server/lib/xcat/plugins/tabutils.pm index 2edfbc2a3..91abc85e1 100644 --- a/xCAT-server/lib/xcat/plugins/tabutils.pm +++ b/xCAT-server/lib/xcat/plugins/tabutils.pm @@ -60,6 +60,7 @@ sub handled_commands delEntries => "tabutils", getAttribs => "tabutils", setAttribs => "tabutils", + NodeRange => "tabutils", gennr => "tabutils" }; } @@ -170,6 +171,10 @@ sub process_request { return setAttribs($request,$callback); } + elsif ($command eq "NodeRange") + { + return NodeRange($request,$callback); + } else { print "$command not implemented yet\n"; @@ -2312,7 +2317,7 @@ sub getAllEntries # # # -# nodename +#nodename #value1 #. #. @@ -2548,7 +2553,6 @@ sub getAttribs # cluster.net # This is a comment # -# # sub setAttribs { @@ -2569,3 +2573,31 @@ sub setAttribs $tab->setAttribs(\%keyhash,\%attrhash); return; } +# noderange +# Expands the input noderange into a list of nodes. +# +#PCM +#noderange +#compute1-compute2 +# +# +#nodename1 +# . +# . +#nodenamern1 +# +sub NodeRange +{ + my $request = shift; + my $cb = shift; + my $command = $request->{command}->[0]; + my %rsp; + my $node=$request->{node}; + my @nodes = @$node; + foreach my $node (@nodes){ + push @{$rsp{"node"}}, $node; + + } + $cb->(\%rsp); + return; +}