Interface MorpheusLoadBalancerService
- All Superinterfaces:
MorpheusDataQueryService<NetworkLoadBalancer>
,MorpheusDataService<NetworkLoadBalancer,
,NetworkLoadBalancerIdentityProjection> MorpheusIdentityService<NetworkLoadBalancerIdentityProjection>
public interface MorpheusLoadBalancerService
extends MorpheusDataService<NetworkLoadBalancer,NetworkLoadBalancerIdentityProjection>, MorpheusIdentityService<NetworkLoadBalancerIdentityProjection>
Morpheus context as it relates to load balancer operations. Used to retrieve and query various entities related to
load balancers
-
Method Summary
Modifier and TypeMethodDescriptionbuildNamingConfig
(ComputeServer server, Map opts, NetworkLoadBalancerInstance loadBalancerInstance) Helper method for load balancer operations to build naming configuration to certain itemsbuildNamingConfig
(Workload container, Map opts, NetworkLoadBalancerInstance loadBalancerInstance) Helper method for load balancer operations to build naming configuration to certain itemsbuildPoolName
(String namePattern, Long id, Boolean ssl, Map nameConfig) Build a name for a pool that applies any additional morpheus naming substitutionsbuildServerName
(String namePattern, Long id, Map nameConfig) This is a helper method to generate a name and applying morpheus naming substitutionsBuild a name for a virtual server that applies any additional morpheus naming substitutionsio.reactivex.rxjava3.core.Single<Void>
clearLoadBalancerAlarm
(NetworkLoadBalancer loadBalancer) Method used to clear alarms on a load balancer when it is back to normal functional stateio.reactivex.rxjava3.core.Single<Account>
getAccountById
(Long id) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.getContainerIp
(Workload container, Boolean externalAddress) Retrieve the correct IP address to use for load balancing from a containerio.reactivex.rxjava3.core.Single<NetworkLoadBalancer>
io.reactivex.rxjava3.core.Observable<Long>
getLoadBalancerServerIds
(NetworkLoadBalancer loadBalancer, Long excludedInstance) retrieve all server ids that are associated to a given load balancergetNode()
getPool()
getServerIp
(ComputeServer server, Boolean externalAddress) Retrieve the correct IP address to use for load balancing from a servergetType()
io.reactivex.rxjava3.core.Observable<NetworkLoadBalancerIdentityProjection>
listIdentityProjections
(Long cloudId, String regionCode, String typeCode) Lists all network load balancer projection objects for a specified cloud and type.void
loadLoadBalancerCredentials
(NetworkLoadBalancer loadBalancer) this method will populate credential data onto the load balancer model if it existsio.reactivex.rxjava3.core.Single<Void>
restartLoadBalancerUsage
(Long loadBalancerId, Boolean queue) This method will restart the usage records for a load balancer, which is used in reporting related to resource usageio.reactivex.rxjava3.core.Single<Void>
startLoadBalancerAlarm
(NetworkLoadBalancer loadBalancer, String statusMessage) Method is used to create a load balancer alarm if the load balancer is not in standard operating modeio.reactivex.rxjava3.core.Single<Void>
updateLoadBalancerStatus
(NetworkLoadBalancer lb, String status, String message) Method is used to persist a change in load balancer status to the databaseMethods inherited from interface com.morpheusdata.core.MorpheusDataQueryService
count, find, get, list, list, listById, listOptions, listOptions, search
Methods inherited from interface com.morpheusdata.core.MorpheusDataService
bulkCreate, bulkRemove, bulkSave, create, create, remove, remove, save, save
Methods inherited from interface com.morpheusdata.core.MorpheusIdentityService
getIdentityProperties, listIdentityProjections
-
Method Details
-
getPartition
MorpheusLoadBalancerPartitionService getPartition() -
getMonitor
MorpheusLoadBalancerMonitorService getMonitor() -
getNode
MorpheusLoadBalancerNodeService getNode() -
getProfile
MorpheusLoadBalancerProfileService getProfile() -
getPool
MorpheusLoadBalancerPoolService getPool() -
getPolicy
MorpheusLoadBalancerPolicyService getPolicy() -
getCertificate
MorpheusLoadBalancerCertificateService getCertificate() -
getScript
MorpheusLoadBalancerScriptService getScript() -
getInstance
MorpheusLoadBalancerInstanceService getInstance() -
getType
MorpheusLoadBalancerTypeService getType() -
getLoadBalancerById
-
listIdentityProjections
io.reactivex.rxjava3.core.Observable<NetworkLoadBalancerIdentityProjection> listIdentityProjections(Long cloudId, String regionCode, String typeCode) Lists all network load balancer projection objects for a specified cloud and type. The projection is a subset of the properties on a fullNetworkDomain
object for sync matching.- Parameters:
cloudId
- theCloud
identifier associated to the domains to be listed.regionCode
- theComputeZoneRegion
to optionally filter bytypeCode
- theNetworkLoadBalancerType
code for filtering by (optional)- Returns:
- an RxJava Observable stream of result projection objects.
-
updateLoadBalancerStatus
io.reactivex.rxjava3.core.Single<Void> updateLoadBalancerStatus(NetworkLoadBalancer lb, String status, String message) Method is used to persist a change in load balancer status to the database- Parameters:
lb
-NetworkLoadBalancer
status
- is the current status of the load balancermessage
- a message to accompany the changing status- Returns:
- nada
-
startLoadBalancerAlarm
io.reactivex.rxjava3.core.Single<Void> startLoadBalancerAlarm(NetworkLoadBalancer loadBalancer, String statusMessage) Method is used to create a load balancer alarm if the load balancer is not in standard operating mode- Parameters:
loadBalancer
-NetworkLoadBalancer
statusMessage
- describe the alarm to create for the load balancer- Returns:
- nada
-
clearLoadBalancerAlarm
Method used to clear alarms on a load balancer when it is back to normal functional state- Parameters:
loadBalancer
-NetworkLoadBalancer
- Returns:
- nada
-
restartLoadBalancerUsage
This method will restart the usage records for a load balancer, which is used in reporting related to resource usage- Parameters:
loadBalancerId
- the morpheus id of the load balancer to restart usage onqueue
- whether to queue the operation for asynchronos operation as opposed to wait for completion- Returns:
- nothing
-
getAccountById
@Deprecated(since="0.15.4", forRemoval=true) io.reactivex.rxjava3.core.Single<Account> getAccountById(Long id) Deprecated, for removal: This API element is subject to removal in a future version.This is a helper method to retrieve an account by id (primary key). Will eventually get moved out into an account specific service- Parameters:
id
- morpheus id of the account- Returns:
Account
-
buildNamingConfig
Map buildNamingConfig(Workload container, Map opts, NetworkLoadBalancerInstance loadBalancerInstance) Helper method for load balancer operations to build naming configuration to certain items- Parameters:
container
-Workload
opts
- optional parameters used in the naming implementationloadBalancerInstance
- theNetworkLoadBalancerInstance
to build a name for- Returns:
- a collection of naming details
-
buildNamingConfig
Map buildNamingConfig(ComputeServer server, Map opts, NetworkLoadBalancerInstance loadBalancerInstance) Helper method for load balancer operations to build naming configuration to certain items- Parameters:
server
-ComputeServer
opts
- optional parameters used in the naming implementationloadBalancerInstance
- theNetworkLoadBalancerInstance
to build a name for- Returns:
- a collection of naming details
-
buildServerName
This is a helper method to generate a name and applying morpheus naming substitutions- Parameters:
namePattern
- naming pattern to applyid
- idnameConfig
- a map of naming details- Returns:
- a name
-
getContainerIp
Retrieve the correct IP address to use for load balancing from a container- Parameters:
container
-Workload
externalAddress
- a boolean on whether to prefer using an external address or nat- Returns:
- an ip address
-
getServerIp
Retrieve the correct IP address to use for load balancing from a server- Parameters:
server
-ComputeServer
externalAddress
- a boolean on whether to prefer using an external address or nat- Returns:
- an ip address
-
buildPoolName
Build a name for a pool that applies any additional morpheus naming substitutions- Parameters:
namePattern
- naming patternid
- idssl
- use ssl?nameConfig
- the naming details- Returns:
- a name
-
buildVirtualServerName
String buildVirtualServerName(String namePattern, Long id, String vipName, Boolean ssl, Map nameConfig) Build a name for a virtual server that applies any additional morpheus naming substitutions- Parameters:
namePattern
- naming patternid
- idvipName
- the name of vipssl
- use ssl?nameConfig
- the naming details- Returns:
- a name
-
getApplianceUrl
Deprecated, for removal: This API element is subject to removal in a future version.Will return the base URL of the morpheus appliace this is running on. Generally used to build download URLs for load balancers to install ssl certificates- Returns:
- a url of the morpheus appliance
-
getLoadBalancerServerIds
io.reactivex.rxjava3.core.Observable<Long> getLoadBalancerServerIds(NetworkLoadBalancer loadBalancer, Long excludedInstance) retrieve all server ids that are associated to a given load balancer- Parameters:
loadBalancer
-NetworkLoadBalancer
excludedInstance
- a list of ids to exclude from the results- Returns:
- an observable stream of server ids
-
loadLoadBalancerCredentials
this method will populate credential data onto the load balancer model if it exists- Parameters:
loadBalancer
-NetworkLoadBalancer
-