Interface FloatingIpProvider

All Superinterfaces:
PluginProvider

public interface FloatingIpProvider extends PluginProvider
Provides a standard set of methods for interacting with floating ips.
Since:
1.2.6
  • Method Details

    • attachFloatingIp

      ServiceResponse attachFloatingIp(ComputeServer server, NetworkFloatingIp floatingIp)
      Attaches a floating ip to a server
      Parameters:
      server - the server to attach the floating ip to
      floatingIp - the floating ip to attach
      Returns:
      ServiceResponse
    • attachFloatingIp

      default ServiceResponse attachFloatingIp(ComputeServer server, ComputeServerInterface iface, NetworkFloatingIp floatingIp)
      Attaches a floating ip to a server with specific network interface target
      Parameters:
      server - the server to attach the floating ip to
      iface - the network interface to target
      floatingIp - the floating ip to attach
      Returns:
      ServiceResponse
    • detachFloatingIp

      ServiceResponse detachFloatingIp(ComputeServer server, NetworkFloatingIp floatingIp)
      Detaches a floating ip from a server
      Parameters:
      server - the server to detach the floating ip from
      floatingIp - the floating ip to detach
      Returns:
      ServiceResponse
    • releaseFloatingIp

      ServiceResponse releaseFloatingIp(NetworkFloatingIp floatingIp)
      Releases a floating ip
      Parameters:
      floatingIp - the floating ip to release
      Returns:
      ServiceResponse
    • allocateFloatingIp

      ServiceResponse<NetworkFloatingIp> allocateFloatingIp(NetworkServer networkServer, NetworkFloatingIpPool pool)
      Allocates a floating ip in external system, the result floating ip should contain the external system object id

      Example NetworkFloatingIp To include in ServiceResponse:

      
       def networkFloatingIp = new NetworkFloatingIp(
       	floatingPool:pool, externalId:externalObject.id, internalId:externalObject.port_id, refType:'ComputeZone',
       	refId:cloud.id, active:(externalObject.status == 'ACTIVE' || externalObject.status == 'DOWN'), staticIp:true,
       	ipAddress:externalObject.floating_ip_address, ipStatus:(externalObject.port_id || externalObject.fixed_ip_address ? 'assigned' : 'free'),
       	ptrId:item.fixed_ip_address, category: objCategory)
      
       	networkFloatingIp.setConfigMap(externalObject)
      
       	return ServiceResponse<NetworkFloatingIp>.success(networkFloatingIp)
       
      Parameters:
      networkServer - the network server to allocate the floating ip from
      pool - the floating ip pool to allocate the floating ip from
      Returns:
      ServiceResponse containing the resulting NetworkFloatingIp
    • createFloatingIpPool

      default ServiceResponse<NetworkFloatingIpPool> createFloatingIpPool(NetworkFloatingIpPool pool)
      Called when a NetworkFloatingIpPool is created in Morpheus
      Parameters:
      pool - the NetworkFloatingIpPool that was created
      Returns:
      ServiceResponse containing the resulting NetworkFloatingIp. The resulting NetworkFloatingIp should contain the external system object
    • updateFloatingIpPool

      default ServiceResponse<NetworkFloatingIpPool> updateFloatingIpPool(NetworkFloatingIpPool pool)
      Called when a NetworkFloatingIpPool is updated in Morpheus
      Parameters:
      pool - the NetworkFloatingIpPool that was updated
      Returns:
      ServiceResponse containing the resulting NetworkFloatingIp. The resulting NetworkFloatingIp should contain the external system object
    • deleteFloatingIpPool

      default ServiceResponse<NetworkFloatingIpPool> deleteFloatingIpPool(NetworkFloatingIpPool pool)
      Called when a NetworkFloatingIpPool is deleted in Morpheus
      Parameters:
      pool - the NetworkFloatingIpPool that was deleted
      Returns:
      ServiceResponse containing the resulting NetworkFloatingIp. The resulting NetworkFloatingIp should contain the external system object
    • validateFloatingIpPool

      default ServiceResponse<NetworkFloatingIpPool> validateFloatingIpPool(NetworkFloatingIpPool pool)
      Called when a NetworkFloatingIpPool is validated in Morpheus. This is called before a NetworkFloatingIpPool is created or updated in Morpheus, and can be used to validate the pool against the external system.
      Parameters:
      pool - the NetworkFloatingIpPool to validate
      Returns:
      ServiceResponse containing the resulting NetworkFloatingIp. The resulting NetworkFloatingIp should contain the external system object if validation is successful, or an error message if validation fails.
    • getFloatingIpTypes

      @Deprecated(since="1.3.2") default Collection<OptionType> getFloatingIpTypes()
      Deprecated.
      Deprecated. Use getOptionTypes() instead.
      Returns:
      a collection of OptionType objects representing the supported floating ip option types
    • getOptionTypes

      default Collection<OptionType> getOptionTypes()
      Get the list of floating ip option types. The option types are used when adding Floating IPs to a provisioned server
      Returns:
      a collection of OptionType objects representing the supported floating ip option types
    • floatingPoolsCreatable

      default Boolean floatingPoolsCreatable()
      Indicates whether this provider supports creating floating ip pools. If true, the UI will show the option to create floating ip pools and call the createFloatingIpPool method on this provider.
      Returns:
      true if this provider supports creating floating ip pools, false otherwise