Package com.cloud.agent.api

Examples of com.cloud.agent.api.CreateVnsPortCommand


        _resource.configure("BigSwitchVnsResource", _parameters);

        Port networkp = mock(Port.class);
        when(networkp.getId()).thenReturn("eeee");

        CreateVnsPortCommand cntkc = new CreateVnsPortCommand("networkid", "portid", "tenantid", "portname", "aa:bb:cc:dd:ee:ff");
        CreateVnsPortAnswer cntka = (CreateVnsPortAnswer) _resource.executeRequest(cntkc);
        assertTrue(cntka.getResult());
    }
View Full Code Here


        Port networkp = mock(Port.class);
        when(networkp.getId()).thenReturn("eeee");
        doThrow(new BigSwitchVnsApiException()).when(_bigswitchVnsApi).createPort((String)any(), (Port)any());

        CreateVnsPortCommand cntkc = new CreateVnsPortCommand("networkid", "portid", "tenantid", "portname", "aa:bb:cc:dd:ee:ff");
        CreateVnsPortAnswer cntka = (CreateVnsPortAnswer) _resource.executeRequest(cntkc);
        assertFalse(cntka.getResult());
    }
View Full Code Here

        Port networkp = mock(Port.class);
        when(networkp.getId()).thenReturn("eeee");
        doThrow(new BigSwitchVnsApiException()).when(_bigswitchVnsApi).modifyPortAttachment((String)any(), (String)any(), (String)any(), (Attachment)any());

        CreateVnsPortCommand cntkc = new CreateVnsPortCommand("networkid", "portid", "tenantid", "portname", "aa:bb:cc:dd:ee:ff");
        CreateVnsPortAnswer cntka = (CreateVnsPortAnswer) _resource.executeRequest(cntkc);
        assertFalse(cntka.getResult());
        verify(_bigswitchVnsApi, atLeastOnce()).deletePort((String) any(), (String) any(), (String) any());
    }
View Full Code Here

TOP

Related Classes of com.cloud.agent.api.CreateVnsPortCommand

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.