Beispiel #1
0
  public static VirtualIp getClusterVirtualIpDetails(
      int id, int lbid, int cid, String address, IpVersion version, VipType vipType) {
    VirtualIp vip = new VirtualIp();

    vip.setId(id);
    vip.setLoadBalancerId(lbid);
    vip.setClusterId(cid);
    vip.setAddress(address);
    vip.setType(vipType);
    return vip;
  }
Beispiel #2
0
  public static VirtualIps getVirtualIpsDetails() {

    VirtualIp vip1 = new VirtualIp();
    vip1.setClusterId(rndInt(0, 1000));
    vip1.setAddress(rndIp());
    vip1.setType((VipType) rndChoice(VipType.values()));
    vip1.setId(rndInt(0, 1000));
    vip1.setLoadBalancerId(rndInt(0, 1000));

    VirtualIp vip2 = new VirtualIp();
    vip2.setClusterId(2);
    vip2.setLoadBalancerId(2);
    vip2.setType(VipType.SERVICENET);
    vip2.setId(1);

    VirtualIps vips = new VirtualIps();
    vips.getVirtualIps().add(vip2);
    vips.getVirtualIps().add(vip1);

    return vips;
  }
Beispiel #3
0
  public static VirtualIp getLoadbalancerVirtualIpDetails(
      int id, int loadBalancerId, int clusterId, String address, VipType vipType) {
    VirtualIp vip = new VirtualIp();
    VirtualIp vip2 = new VirtualIp();

    vip.setId(id);
    vip.setLoadBalancerId(loadBalancerId);
    vip.setClusterId(clusterId);
    vip.setAddress(address);
    vip.setType(vipType);

    vip2.setType(vipType.PUBLIC);
    vip2.setLoadBalancerId(1);
    vip2.setClusterId(1);
    vip2.setAddress("127.0.0.1");
    vip2.setId(1);

    return vip;
  }