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

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

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

ResourceManager.deleteRoutingHost介绍

暂无

代码示例

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

@Override
public DeleteHostAnswer deleteHost(HostVO host, boolean isForced,
    boolean isForceDeleteStorage) throws UnableDeleteHostException {
  LOGGER.debug("deleteHost: " + host);
  if (host.getType() != com.cloud.host.Host.Type.Routing
      || host.getHypervisorType() != HypervisorType.Ovm3) {
    return null;
  }
  resourceMgr.deleteRoutingHost(host, isForced, isForceDeleteStorage);
  return new DeleteHostAnswer(true);
}

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

@Override
public DeleteHostAnswer deleteHost(HostVO host, boolean isForced, boolean isForceDeleteStorage) throws UnableDeleteHostException {
  if (host.getType() != com.cloud.host.Host.Type.Routing || host.getHypervisorType() != HypervisorType.Ovm) {
    return null;
  }
  _resourceMgr.deleteRoutingHost(host, isForced, isForceDeleteStorage);
  return new DeleteHostAnswer(true);
}

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

@Override
public DeleteHostAnswer deleteHost(HostVO host, boolean isForced, boolean isForceDeleteStorage) throws UnableDeleteHostException {
  if (host.getType() != com.cloud.host.Host.Type.Routing || host.getHypervisorType() != HypervisorType.XenServer) {
    return null;
  }
  _resourceMgr.deleteRoutingHost(host, isForced, isForceDeleteStorage);
  return new DeleteHostAnswer(true);
}

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

@Override
public final DeleteHostAnswer deleteHost(final HostVO host, final boolean isForced, final boolean isForceDeleteStorage) throws UnableDeleteHostException {
  // assert
  if (host.getType() != Host.Type.Routing || host.getHypervisorType() != HypervisorType.Hyperv) {
    return null;
  }
  _resourceMgr.deleteRoutingHost(host, isForced, isForceDeleteStorage);
  return new DeleteHostAnswer(true);
}

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

@Override
public DeleteHostAnswer deleteHost(HostVO host, boolean isForced, boolean isForceDeleteStorage) throws UnableDeleteHostException {
  if (host.getType() != Host.Type.Routing || (host.getHypervisorType() != HypervisorType.KVM && host.getHypervisorType() != HypervisorType.LXC)) {
    return null;
  }
  _resourceMgr.deleteRoutingHost(host, isForced, isForceDeleteStorage);
  try {
    ShutdownCommand cmd = new ShutdownCommand(ShutdownCommand.DeleteHost, null);
    agentMgr.send(host.getId(), cmd);
  } catch (AgentUnavailableException e) {
    s_logger.warn("Sending ShutdownCommand failed: ", e);
  } catch (OperationTimedoutException e) {
    s_logger.warn("Sending ShutdownCommand failed: ", e);
  }
  return new DeleteHostAnswer(true);
}

相关文章