예제 #1
0
  public static Host rndHostPut() {
    Host h;
    h = new Host();

    h.setName(String.format("Host.%s", rndInt(0, 10000)));
    return h;
  }
예제 #2
0
 public static Hosts rndHosts(int max) {
   int nhosts = rndInt(0, max);
   Hosts hosts = new Hosts();
   hosts.setSticky((Boolean) StubFactory.rndChoice((new Boolean[] {true, false})));
   for (int i = nhosts; i <= StubFactory.rndInt(1, 5); i++) {
     Host h = StubFactory.rndHostPost();
     h.setId(rndInt(0, 10000));
     hosts.getHosts().add(h);
   }
   return hosts;
 }
예제 #3
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;
  }