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.EventSubscriberFacet<E extends Event>
-
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 serverreleaseFloatingIp
(NetworkFloatingIp floatingIp) Releases a floating ipMethods inherited from interface com.morpheusdata.core.providers.PluginProvider
getCode, getMorpheus, getName, getPlugin, isPlugin
-
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
-