Package com.morpheusdata.core.providers
Interface FloatingIpProvider
- All Superinterfaces:
PluginProvider
Provides a standard set of methods for interacting with floating ips.
- Since:
- 1.2.6
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.morpheusdata.core.providers.PluginProvider
PluginProvider.ConfigurationDriftCheckFacet<T>, PluginProvider.EventSubscriberFacet<E extends Event>, PluginProvider.UpdateFacet<T> -
Method Summary
Modifier and TypeMethodDescriptionallocateFloatingIp(NetworkServer networkServer, NetworkFloatingIpPool pool) Allocates a floating ip in external system, the result floating ip should contain the external system object idattachFloatingIp(ComputeServer server, NetworkFloatingIp floatingIp) Attaches a floating ip to a serverdetachFloatingIp(ComputeServer server, NetworkFloatingIp floatingIp) Detaches a floating ip from a serverdefault Collection<OptionType>Get the list of floating ip option types.releaseFloatingIp(NetworkFloatingIp floatingIp) Releases a floating ipMethods inherited from interface com.morpheusdata.core.providers.PluginProvider
getCode, getMorpheus, getName, getPlugin
-
Method Details
-
attachFloatingIp
Attaches a floating ip to a server- Parameters:
server- the server to attach the floating ip tofloatingIp- the floating ip to attach- Returns:
- ServiceResponse
-
detachFloatingIp
Detaches a floating ip from a server- Parameters:
server- the server to detach the floating ip fromfloatingIp- the floating ip to detach- Returns:
- ServiceResponse
-
releaseFloatingIp
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 idExample 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 frompool- the floating ip pool to allocate the floating ip from- Returns:
- ServiceResponse containing the resulting
NetworkFloatingIp
-
getFloatingIpTypes
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
OptionTypeobjects representing the supported floating ip option types
-