Skip to content

Commit 8e087ca

Browse files
authored
Merge pull request #874 from harikrishna-patnala/CLOUDSTACK-8897
CLOUDSTACK-8897: baremetal:addHost:make host tag info mandtory in bar…
2 parents 7ca8d00 + 1e256cc commit 8e087ca

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

server/src/com/cloud/resource/ResourceManagerImpl.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,12 @@ private List<HostVO> discoverHostsFull(final Long dcId, final Long podId, Long c
679679
}
680680
}
681681

682+
if ((hypervisorType.equalsIgnoreCase(HypervisorType.BareMetal.toString()))) {
683+
if (hostTags.isEmpty()) {
684+
throw new InvalidParameterValueException("hosttag is mandatory while adding host of type Baremetal");
685+
}
686+
}
687+
682688
if (clusterName != null) {
683689
final HostPodVO pod = _podDao.findById(podId);
684690
if (pod == null) {

0 commit comments

Comments
 (0)