Added command to get default user entry.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10885 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
fd4b63d1e6
commit
dea5659709
@ -58,7 +58,8 @@ sub process_request {
|
||||
'gangliacurrent' => \&web_gangliaLatest,
|
||||
'rinstall' => \&web_rinstall,
|
||||
'addnode' => \&web_addnode,
|
||||
'graph' => \&web_graphinfo
|
||||
'graph' => \&web_graphinfo,
|
||||
'getdefaultuserentry' => \&web_getdefaultuserentry
|
||||
);
|
||||
|
||||
#check whether the request is authorized or not
|
||||
@ -2167,4 +2168,20 @@ sub web_graphinfo{
|
||||
|
||||
$callback->({data => $retstr});
|
||||
}
|
||||
|
||||
sub web_getdefaultuserentry {
|
||||
# Get default user entry
|
||||
my ( $request, $callback, $sub_req ) = @_;
|
||||
|
||||
# Get hardware control point
|
||||
my $hcp = $request->{arg}->[1];
|
||||
my $group = $request->{arg}->[2];
|
||||
|
||||
if (!$group) {
|
||||
$group = 'default';
|
||||
}
|
||||
|
||||
my $entry = `ssh $hcp "cat /opt/zhcp/conf/$group.direct"`;
|
||||
$callback->( { data => $entry } );
|
||||
}
|
||||
1;
|
||||
|
Loading…
Reference in New Issue
Block a user