Interface FloatingIPApi


  • @Beta
    @Consumes("application/json")
    public interface FloatingIPApi
    Provides access to the OpenStack Compute (Nova) Floating IP extension API.
    • Method Detail

      • list

        @Named("floatingIP:list")
        @GET
        @Path("/os-floating-ips")
        com.google.common.collect.FluentIterable<FloatingIP> list()
        Lists all Floating IP addresses
        Returns:
        all Floating IPs
      • get

        @Named("floatingIP:get")
        @GET
        @Path("/os-floating-ips/{id}")
        @Nullable
        FloatingIP get​(@PathParam("id")
                       String id)
        Gets a specific Floating IP address
        Returns:
        all Floating IPs
      • create

        @Named("floatingIP:create")
        @POST
        @Path("/os-floating-ips")
        @Produces("application/json")
        @Nullable
        FloatingIP create()
        Allocates a Floating IP address
        Returns:
        a newly created FloatingIP
      • allocateFromPool

        @Named("floatingIP:allocateFromPool")
        @POST
        @Path("/os-floating-ips")
        @Produces("application/json")
        @Nullable
        FloatingIP allocateFromPool​(String pool)
        Allocates a Floating IP address from a pool
        Parameters:
        pool - Pool to allocate IP address from
        Returns:
        a newly created FloatingIP
      • delete

        @Named("floatingIP:delete")
        @DELETE
        @Path("/os-floating-ips/{id}")
        void delete​(@PathParam("id")
                    String id)
        Deletes a Floating IP address
        Parameters:
        id - the Floating IP id
      • addToServer

        @Named("floatingIP:add")
        @POST
        @Path("/servers/{id}/action")
        @Produces("application/json")
        void addToServer​(String address,
                         @PathParam("id")
                         String serverId)
        Adds a Floating IP address to a Server
        Parameters:
        serverId - the server id
        address - the IP address to add NOTE: Possibly move this to ServerApi?
      • removeFromServer

        @Named("floatingIP:remove")
        @POST
        @Path("/servers/{id}/action")
        @Produces("application/json")
        void removeFromServer​(String address,
                              @PathParam("id")
                              String serverId)
        Removes a Floating IP address from a Server
        Parameters:
        serverId - the server id
        address - the IP address to remove NOTE: Possibly move this to ServerApi?