Examples of NeutronPort


Examples of org.apache.cloudstack.network.opendaylight.api.model.NeutronPort

        return new DestroyNetworkAnswer(cmd, true, "Network " + cmd.getNetworkUuid() + " deleted");
    }

    private Answer executeRequest(ConfigurePortCommand cmd) {
        NeutronPortsNorthboundAction configurePort = new NeutronPortsNorthboundAction(controllerUrl, controllerUsername, controllerPassword);
        NeutronPort newPort = new NeutronPort();

        // Configuration from the command
        newPort.setId(cmd.getPortId());
        newPort.setTenantId(cmd.getTennantId());
        newPort.setAdminStateUp(true);
        newPort.setName(cmd.getPortId().toString());
        newPort.setNetworkId(cmd.getNetworkId());
        newPort.setMacAddress(cmd.getMacAddress());
        newPort.setDeviceId(UUID.randomUUID());

        // Static valus
        newPort.setStatus("ACTIVE");
        newPort.setFixedIps(Collections.<String> emptyList());

        NeutronPortWrapper portWrapper = new NeutronPortWrapper();
        portWrapper.setPort(newPort);
        try {
            portWrapper = configurePort.createNeutronPort(portWrapper);
View Full Code Here

Examples of org.apache.cloudstack.network.opendaylight.api.model.NeutronPort

    private final Gson gsonNeutronPort = new GsonBuilder().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).create();

    @Test
    public void gsonNeutronPortMarshalingTest() throws NeutronRestApiException {
        NeutronPort port = new NeutronPort();

        port.setId(UUID.fromString("ca31aa7f-84c7-416d-bc00-1f84927367e0"));
        port.setName("test_gre");
        port.setAdminStateUp(true);
        port.setDeviceId(UUID.fromString("ca31aa7f-84c7-416d-bc00-1f84927367e0"));
        port.setMacAddress("ca31aa7f-84c7-416d-bc00-1f84927367e0");
        port.setNetworkId(UUID.fromString("ca31aa7f-84c7-416d-bc00-1f84927367e0"));
        port.setStatus("ACTIVE");
        port.setTenantId("wilder");

        NeutronPortWrapper portWrapper = new NeutronPortWrapper();
        portWrapper.setPort(port);

        StringRequestEntity entity;
View Full Code Here

Examples of org.apache.cloudstack.network.opendaylight.api.model.NeutronPort

        }
    }

    @Test
    public <T> void gsonNeutronPortUnmarshalingTest() throws NeutronRestApiException {
        NeutronPort port = new NeutronPort();

        port.setId(UUID.fromString("ca31aa7f-84c7-416d-bc00-1f84927367e0"));
        port.setName("test_gre");
        port.setAdminStateUp(true);
        port.setDeviceId(UUID.fromString("ca31aa7f-84c7-416d-bc00-1f84927367e0"));
        port.setMacAddress("ca31aa7f-84c7-416d-bc00-1f84927367e0");
        port.setNetworkId(UUID.fromString("ca31aa7f-84c7-416d-bc00-1f84927367e0"));
        port.setStatus("ACTIVE");
        port.setTenantId("wilder");

        NeutronPortWrapper portWrapper = new NeutronPortWrapper();
        portWrapper.setPort(port);

        NeutronPortWrapper returnValue = (NeutronPortWrapper) gsonNeutronPort.fromJson(jsonString, TypeToken.get(portWrapper.getClass()).getType());
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.