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 iddefault ServiceResponseattachFloatingIp(ComputeServer server, ComputeServerInterface iface, NetworkFloatingIp floatingIp) Attaches a floating ip to a server with specific network interface targetattachFloatingIp(ComputeServer server, NetworkFloatingIp floatingIp) Attaches a floating ip to a serverdefault ServiceResponse<NetworkFloatingIpPool>Called when a NetworkFloatingIpPool is created in Morpheusdefault ServiceResponse<NetworkFloatingIpPool>Called when a NetworkFloatingIpPool is deleted in MorpheusdetachFloatingIp(ComputeServer server, NetworkFloatingIp floatingIp) Detaches a floating ip from a serverdefault BooleanIndicates whether this provider supports creating floating ip pools.default Collection<OptionType>Deprecated.default Collection<OptionType>Get the list of floating ip option types.releaseFloatingIp(NetworkFloatingIp floatingIp) Releases a floating ipdefault ServiceResponse<NetworkFloatingIpPool>Called when a NetworkFloatingIpPool is updated in Morpheusdefault ServiceResponse<NetworkFloatingIpPool>Called when a NetworkFloatingIpPool is validated in Morpheus.Methods 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
-
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 toiface- the network interface to targetfloatingIp- 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
-
createFloatingIpPool
Called when a NetworkFloatingIpPool is created in Morpheus- Parameters:
pool- theNetworkFloatingIpPoolthat was created- Returns:
- ServiceResponse containing the resulting
NetworkFloatingIp. The resulting NetworkFloatingIp should contain the external system object
-
updateFloatingIpPool
Called when a NetworkFloatingIpPool is updated in Morpheus- Parameters:
pool- theNetworkFloatingIpPoolthat was updated- Returns:
- ServiceResponse containing the resulting
NetworkFloatingIp. The resulting NetworkFloatingIp should contain the external system object
-
deleteFloatingIpPool
Called when a NetworkFloatingIpPool is deleted in Morpheus- Parameters:
pool- theNetworkFloatingIpPoolthat was deleted- Returns:
- ServiceResponse containing the resulting
NetworkFloatingIp. The resulting NetworkFloatingIp should contain the external system object
-
validateFloatingIpPool
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- theNetworkFloatingIpPoolto 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.Deprecated. UsegetOptionTypes()instead.- Returns:
- a collection of
OptionTypeobjects representing the supported floating ip option types
-
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
OptionTypeobjects representing the supported floating ip option types
-
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
-