def add_hosts(self, hostIds):
"""
Adds a host to the cluster.
@param hostIds: List of IDs of hosts to add to cluster.
@return: A list of ApiHostRef objects of the new
hosts that were added to the cluster
@since: API v3
"""
hostRefList = [ApiHostRef(self._get_resource_root(), x) for x in hostIds]
return self._post("hosts", ApiHostRef, True, data=hostRefList,
api_version=3)
评论列表
文章目录