Examples of VnSubnetsType


Examples of net.juniper.contrail.api.types.VnSubnetsType

                "default-network-ipam");
        NetworkIpam ipam = (NetworkIpam) apiConnector.findById(
                NetworkIpam.class, ipamUuid);
        SubnetUtils subnetUtils = new SubnetUtils(subnetAddr, subnetMask)
        String cidr = subnetUtils.getInfo().getCidrSignature();
        VnSubnetsType subnet = new VnSubnetsType();
        String[] addr_pair = cidr.split("\\/");
        subnet.addIpamSubnets(new VnSubnetsType.IpamSubnetType(
                                   new SubnetType(addr_pair[0],
                                       Integer.parseInt(addr_pair[1])), gatewayAddr,
                                       null, UUID.randomUUID().toString(), true, null,
                                       null, false, null, null, vn.getName() + "-subnet"));
View Full Code Here

Examples of net.juniper.contrail.api.types.VnSubnetsType

    public void testAttr() {
        VirtualNetwork vn = new VirtualNetwork();
        vn.setName("testnet");
        NetworkIpam ipam = new NetworkIpam();
        ipam.setName("testipam");
        VnSubnetsType subnets = new VnSubnetsType();
        subnets.addIpamSubnets(new VnSubnetsType.IpamSubnetType(new SubnetType("192.168.0.0", 24), "192.168.0.254", null, UUID.randomUUID().toString(), false, null, null, false, null, null, vn.getName() + "-subnet"));
        vn.setNetworkIpam(ipam, subnets);
        String jsdata = ApiSerializer.serializeObject("virtual-network", vn);
        assertNotSame(jsdata, -1, jsdata.indexOf("192.168.0.0"));
       
        final JsonParser parser = new JsonParser();
View Full Code Here

Examples of net.juniper.contrail.api.types.VnSubnetsType

            assertNotNull(ipam);
        } catch (IOException ex) {
            fail(ex.getMessage());
        }

        VnSubnetsType subnet = new VnSubnetsType();
        subnet.addIpamSubnets(new VnSubnetsType.IpamSubnetType(new SubnetType("10.0.1.0", 24), "10.0.1.254", null, UUID.randomUUID().toString(), false, null, null, false, null, null, net.getName() + "-subnet"));
        net.setNetworkIpam(ipam, subnet);

        VirtualMachine vm = new VirtualMachine();
        vm.setName("aa01");
        try {
View Full Code Here

Examples of net.juniper.contrail.api.types.VnSubnetsType

            assertNotNull(ipam);
        } catch (IOException ex) {
            fail(ex.getMessage());
        }

        VnSubnetsType subnet = new VnSubnetsType();
        subnet.addIpamSubnets(new VnSubnetsType.IpamSubnetType(new SubnetType("10.0.1.0", 24), "10.0.1.254", null, UUID.randomUUID().toString(), false, null, null, false, null, null, net.getName() + "-subnet"));
        net.setNetworkIpam(ipam, subnet);

        VirtualMachine vm = new VirtualMachine();
        vm.setName("aa01");
        try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.