mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-8897: baremetal:addHost:make host tag info mandtory in baremetal addhost Api call
addhost api is successful with out providing the host tag info and we recommend host tag is mandatory for bare-metal. In the current implementation host tag check is happening at vm deployment stage but it will be good to have host tag field as mandatory field during adding of the host it self.
This commit is contained in:
parent
61ce75e901
commit
1e256ccf50
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue