com.cloud.resource.ResourceManager.listAllHostsInOneZoneByType()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(126)

本文整理了Java中com.cloud.resource.ResourceManager.listAllHostsInOneZoneByType方法的一些代码示例,展示了ResourceManager.listAllHostsInOneZoneByType的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ResourceManager.listAllHostsInOneZoneByType方法的具体详情如下:
包路径:com.cloud.resource.ResourceManager
类名称:ResourceManager
方法名:listAllHostsInOneZoneByType

ResourceManager.listAllHostsInOneZoneByType介绍

暂无

代码示例

代码示例来源:origin: apache/cloudstack

@Override
public List<HostVO> listTrafficMonitors(ListTrafficMonitorsCmd cmd) {
  long zoneId = cmd.getZoneId();
  return _resourceMgr.listAllHostsInOneZoneByType(Host.Type.TrafficMonitor, zoneId);
}

代码示例来源:origin: apache/cloudstack

List<HostVO> trafficMonitorsInZone = _resourceMgr.listAllHostsInOneZoneByType(Host.Type.TrafficMonitor, zoneId);
if (trafficMonitorsInZone.size() != 0) {
  throw new InvalidParameterValueException("Already added an traffic monitor in zone: " + zoneName);

代码示例来源:origin: apache/cloudstack

String guid = UUID.nameUUIDFromBytes(agentIp.getBytes()).toString();
List<HostVO> existingHosts = _resourceMgr.listAllHostsInOneZoneByType(Host.Type.Routing, dcId);
if (existingHosts != null) {
  for (HostVO existingHost : existingHosts) {

代码示例来源:origin: apache/cloudstack

List<HostVO> hosts = _resourceMgr.listAllHostsInOneZoneByType(Host.Type.L2Networking, dataCenterId);
for (HostVO host : hosts) {
  assert (credential != null);

代码示例来源:origin: apache/cloudstack

List<HostVO> pxes = _resourceMgr.listAllHostsInOneZoneByType(Host.Type.BaremetalPxe, zoneId);
if (!pxes.isEmpty()) {
  throw new IllegalArgumentException("Already had a PXE server zone: " + zoneId);

代码示例来源:origin: apache/cloudstack

boolean success = false;
try {
  List<HostVO> storageServers = _resourceMgr.listAllHostsInOneZoneByType(Host.Type.SecondaryStorage, dataCenterId);
  if (storageServers == null) {
    errorString = "No Storage Server found at the datacenter - " + dataCenterId;

代码示例来源:origin: apache/cloudstack

List<HostVO> hosts = _resourceMgr.listAllHostsInOneZoneByType(Host.Type.L2Networking, zoneId);
for (HostVO host : hosts) {
  assert (credential != null);

相关文章