Interface SubnetApi


  • @Path("/subnets")
    @Consumes("application/json")
    @Produces("application/json")
    public interface SubnetApi
    Provides access to Subnet operations for the OpenStack Networking (Neutron) v2 API.
    See Also:
    api doc
    • Method Detail

      • list

        @Named("subnet:list")
        @GET
        PagedIterable<Subnet> list()
        Returns the list of all subnets currently defined in Neutron for the current tenant. The list provides the unique identifier of each subnet configured for the tenant.
        Returns:
        the list of all subnet references configured for the tenant
      • get

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

        @Named("subnet:create")
        @POST
        Subnet create​(Subnet.CreateSubnet subnet)
        Create a subnet within a specified network
        Parameters:
        subnet - the subnet to be created
        Returns:
        a reference of the newly-created subnet
      • createBulk

        @Named("subnet:createBulk")
        @POST
        com.google.common.collect.FluentIterable<Subnet> createBulk​(List<Subnet.CreateSubnet> subnets)
        Create multiple subnets
        Parameters:
        subnets - the bulk of subnets to create
        Returns:
        list of references of the newly-created subnets
      • update

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

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