more zone functions

This commit is contained in:
lissav 2014-03-03 13:15:06 -05:00
parent 0be18a3c4a
commit 91ff649bea

View File

@ -202,6 +202,32 @@ sub iszonedefined
}
#--------------------------------------------------------------------------------
=head3 getzonekeydir
Arguments:
zonename
Returns:
path to the root ssh keys for the zone /etc/xcat/sshkeys/<zonename>/.ssh
1 - zone not defined
Example:
xCAT::Zone->getzonekeydir($zonename);
=cut
#--------------------------------------------------------------------------------
sub getzonekeydir
{
my ($class,$zonename) = @_;
my $tab = xCAT::Table->new("zone");
$tab->close();
my $zonehash = $tab->getAttribs({zonename => $zonename},'sshkeydir');
if ( keys %$zonehash) {
my $zonesshkeydir=$zonehash->{sshkeydir};
return $zonesshkeydir;
}else{
return 1; # this is a bad error zone not defined
}
}
#--------------------------------------------------------------------------------
=head3 getmyzonename
Arguments:
$node -one nodename