Interface NetworkApi


  • @Beta
    @Path("/networks")
    @Consumes("application/json")
    @Produces("application/json")
    public interface NetworkApi
    Provides access to Network operations for the OpenStack Networking (Neutron) v2 API.

    Each tenant can define one or more networks. A network is a virtual isolated layer-2 broadcast domain reserved to the tenant. A tenant can create several ports for a network, and plug virtual interfaces into these ports.

    See Also:
    api doc
    • Method Detail

      • list

        @Named("network:list")
        @GET
        PagedIterable<Network> list()
        Returns all networks currently defined in Neutron for the current tenant.
        Returns:
        the list of all networks configured for the tenant
      • get

        @Named("network:get")
        @GET
        @Path("/{id}")
        @Nullable
        Network get​(@PathParam("id")
                    String id)
        Return a specific network
        Parameters:
        id - the id of the network to return
        Returns:
        Network or null if not found
      • create

        @Named("network:create")
        @POST
        Network create​(Network.CreateNetwork network)
        Create a new network with the specified type
        Parameters:
        network - Describes the network to be created.
        Returns:
        a reference of the newly-created network
      • createBulk

        @Named("network:createBulk")
        @POST
        com.google.common.collect.FluentIterable<Network> createBulk​(com.google.common.collect.ImmutableList<Network.CreateNetwork> networks)
        Create multiple networks
        Parameters:
        networks - the bulk of networks to create
        Returns:
        list of references of the newly-created networks
      • update

        @Named("network:update")
        @PUT
        @Path("/{id}")
        Network update​(@PathParam("id")
                       String id,
                       Network.UpdateNetwork network)
        Update a network
        Parameters:
        id - the id of the network to update
        network - the network to update
        Returns:
        true if update successful, false if not
      • delete

        @Named("network:delete")
        @DELETE
        @Path("/{id}")
        boolean delete​(@PathParam("id")
                       String id)
        Deletes the specified network
        Parameters:
        id - the id of the network to delete
        Returns:
        true if delete was successful, false if not