Interface MorpheusLoadBalancerService

All Superinterfaces:
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 Details

    • getPartition

    • getMonitor

    • getNode

    • getProfile

    • getPool

    • getPolicy

    • getCertificate

    • getScript

    • getInstance

    • getType

    • getLoadBalancerById

      io.reactivex.rxjava3.core.Single<NetworkLoadBalancer> getLoadBalancerById(Long id)
    • 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 full NetworkDomain object for sync matching.
      Parameters:
      cloudId - the Cloud identifier associated to the domains to be listed.
      regionCode - the ComputeZoneRegion to optionally filter by
      typeCode - the NetworkLoadBalancerType 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 balancer
      message - 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

      io.reactivex.rxjava3.core.Single<Void> clearLoadBalancerAlarm(NetworkLoadBalancer loadBalancer)
      Method used to clear alarms on a load balancer when it is back to normal functional state
      Parameters:
      loadBalancer - NetworkLoadBalancer
      Returns:
      nada
    • restartLoadBalancerUsage

      io.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 usage
      Parameters:
      loadBalancerId - the morpheus id of the load balancer to restart usage on
      queue - 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 implementation
      loadBalancerInstance - the NetworkLoadBalancerInstance to build a name for
      Returns:
      a collection of naming details
    • buildServerName

      String buildServerName(String namePattern, Long id, Map nameConfig)
      This is a helper method to generate a name and applying morpheus naming substitutions
      Parameters:
      namePattern - naming pattern to apply
      id - id
      nameConfig - a map of naming details
      Returns:
      a name
    • getContainerIp

      String getContainerIp(Workload container, Boolean externalAddress)
      Retrive 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
    • buildPoolName

      String buildPoolName(String namePattern, Long id, Boolean ssl, Map nameConfig)
      Build a name for a pool that applies any additional morpheus naming substitutions
      Parameters:
      namePattern - naming pattern
      id - id
      ssl - 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 pattern
      id - id
      vipName - the name of vip
      ssl - use ssl?
      nameConfig - the naming details
      Returns:
      a name
    • getApplianceUrl

      @Deprecated(since="0.15.4", forRemoval=true) String 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

      void loadLoadBalancerCredentials(NetworkLoadBalancer loadBalancer)
      this method will populate credential data onto the load balancer model if it exists
      Parameters:
      loadBalancer - NetworkLoadBalancer