[
https://issues.apache.org/jira/browse/CLOUDSTACK-8897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15146683#comment-15146683
]
ASF GitHub Bot commented on CLOUDSTACK-8897:
--------------------------------------------
Github user alexandrelimassantana commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/874#discussion_r52846753
--- Diff: server/src/com/cloud/resource/ResourceManagerImpl.java ---
@@ -680,6 +680,13 @@ public Discoverer getMatchingDiscover(final
Hypervisor.HypervisorType hypervisor
}
}
+ if
((hypervisorType.equalsIgnoreCase(HypervisorType.BareMetal.toString()))) {
+ if (hostTags == null || hostTags.size() == 0) {
--- End diff --
Hey @harikrishna-patnala just a little tip on line 684. You could use
Apache Commons' CollectionUtils to make such checks, it does exactly the same
thing but is a little more clean. But that's just a little adjustment.
http://commons.apache.org/proper/commons-collections/javadocs/api-release/org/apache/commons/collections4/CollectionUtils.html#isEmpty(java.util.Collection)
> baremetal:addHost:make host tag info mandtory in baremetal addhost Api call
> ---------------------------------------------------------------------------
>
> Key: CLOUDSTACK-8897
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8897
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: Baremetal, Management Server
> Reporter: Harikrishna Patnala
> Assignee: Harikrishna Patnala
> Fix For: 4.6.1
>
>
> Right now in baremetal, 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 message was sent by Atlassian JIRA
(v6.3.4#6332)