Change the collaboration with sequential discovery for the output of nodediscover* message

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15963 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
daniceexi 2013-04-12 08:08:17 +00:00
parent 61eacdadad
commit 9d73e3a4fb

View File

@ -241,18 +241,21 @@ sub validate_args{
if ($mandatoryparamsref){
@mandatoryparams = @$mandatoryparamsref;
}
my $profiledis;
foreach (@mandatoryparams){
if (exists($args_dict{$_})) {
# this is for profile discovery
$profiledis = 1;
last;
if (@mandatoryparams) {
my $profiledis;
foreach (@mandatoryparams){
if (exists($args_dict{$_})) {
# this is for profile discovery
$profiledis = 1;
last;
}
}
unless ($profiledis) {
# Not see the nodrange and 'networkprofile', 'imageprofile', 'hostnameformat'
# return to make sequential discovery to display help message
return 0;
}
}
unless ($profiledis) {
# Not see the nodrange and 'networkprofile', 'imageprofile', 'hostnameformat'
# return to make sequential discovery to display help message
return 0;
}
foreach (@mandatoryparams){
@ -1135,6 +1138,13 @@ Usage:
}
}
# Check the running of sequential discovery
my @PCMdiscover = xCAT::TableUtils->get_site_attribute("__SEQDiscover");
if ($PCMdiscover[0]) {
setrsp_errormsg("Profile Discovery cannot be run together with Sequential discovery.");
return;
}
# Read DB to confirm the discover is not started yet.
my $discover_running = xCAT::ProfiledNodeUtils->is_discover_started();
if ($discover_running){