示例#1
0
  public static Host rndHostPost() {
    Host h;
    h = new Host();

    h.setName(String.format("Host.%s", rndInt(0, 10000)));
    h.setClusterId(rndInt(0, 10000));
    h.setCoreDeviceId(rndInt(0, 10000).toString());
    h.setStatus((HostStatus) rndChoice(HostStatus.values()));
    h.setManagementIp(rndIp());
    h.setManagementSoapInterface(String.format("http://%s:8080/soap", rndIp()));
    h.setMaxConcurrentConnections(rndInt(0, 900));
    h.setType((HostType) rndChoice(HostType.values()));
    return h;
  }