Package org.opennebula.client.vnet

Examples of org.opennebula.client.vnet.VirtualNetwork


    public void setUp() throws Exception
    {
        res = VirtualNetwork.allocate(client, template);

        int vnid = !res.isError() ? Integer.parseInt(res.getMessage()) : -1;
        vnet     = new VirtualNetwork(vnid, client);
    }
View Full Code Here


    public void addAr()
    {
        res = VirtualNetwork.allocate(client, second_template);
        assertTrue( res.getErrorMessage(), !res.isError() );

        VirtualNetwork second_vnet =
            new VirtualNetwork(Integer.parseInt(res.getMessage()), client);

        res = second_vnet.addAr("AR = [IP = 130.10.0.5, SIZE = 1, TYPE = IP4]");
        assertTrue( res.getErrorMessage(), !res.isError() );

        res = second_vnet.addAr("AR = [IP = 130.10.0.6, MAC = 50:20:20:20:20:20, SIZE = 1, TYPE = IP4]");
        assertTrue( res.getErrorMessage(), !res.isError() );

        res = second_vnet.addAr("130.10.0.6");
        assertTrue( res.isError() );

        second_vnet.delete();
    }
View Full Code Here

    public void rmAr()
    {
        res = VirtualNetwork.allocate(client, second_template);
        assertTrue( res.getErrorMessage(), !res.isError() );

        VirtualNetwork second_vnet =
            new VirtualNetwork(Integer.parseInt(res.getMessage()), client);

        res = second_vnet.rmAr(0);
        assertTrue( res.getErrorMessage(), !res.isError() );

        res = second_vnet.rmAr(0);
        assertTrue( res.isError() );

        second_vnet.delete();
    }
View Full Code Here

TOP

Related Classes of org.opennebula.client.vnet.VirtualNetwork

Copyright © 2018 www.massapicom. 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.