Package io.fathom.cloud.network.api.os.models

Examples of io.fathom.cloud.network.api.os.models.Network


    @PUT
    @Path("{id}")
    @Produces({ JSON })
    public WrappedNetwork updateNetwork(@PathParam("id") long id, WrappedNetwork request) throws CloudException {
        Network network = request.network;
        NetworkData.Builder b = toBuilder(network);

        NetworkData data = networkService.updateNetwork(getAuth(), id, b);
        if (data == null) {
            throw new WebApplicationException(Status.NOT_FOUND);
View Full Code Here


    }

    @POST
    @Produces({ JSON })
    public WrappedNetwork createNetwork(WrappedNetwork request) throws CloudException {
        Network network = request.network;

        NetworkData.Builder b = toBuilder(network);

        NetworkData data = networkService.createNetwork(getAuth(), b);
View Full Code Here

        return b;
    }

    private Network toModel(NetworkData data) {
        Network model = new Network();
        model.status = data.getStatus();
        model.subnets = Lists.newArrayList();
        model.name = data.getName();
        model.adminStateUp = data.getAdminStateUp();
        model.routerExternal = data.getRouterExternal();
View Full Code Here

TOP

Related Classes of io.fathom.cloud.network.api.os.models.Network

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.