Merge pull request #874 from harikrishna-patnala/CLOUDSTACK-8897

CLOUDSTACK-8897: baremetal:addHost:make host tag info mandtory in bar…
This commit is contained in:
Rajani Karuturi 2017-05-18 15:15:46 +05:30 committed by GitHub
commit 8e087ca3ef
1 changed files with 6 additions and 0 deletions

View File

@ -679,6 +679,12 @@ public class ResourceManagerImpl extends ManagerBase implements ResourceManager,
}
}
if ((hypervisorType.equalsIgnoreCase(HypervisorType.BareMetal.toString()))) {
if (hostTags.isEmpty()) {
throw new InvalidParameterValueException("hosttag is mandatory while adding host of type Baremetal");
}
}
if (clusterName != null) {
final HostPodVO pod = _podDao.findById(podId);
if (pod == null) {