Interface MorpheusNetworkDomainService

All Superinterfaces:
MorpheusDataQueryService<NetworkDomain>, MorpheusDataService<NetworkDomain,NetworkDomainIdentityProjection>, MorpheusIdentityService<NetworkDomainIdentityProjection>

This Context deals with interactions related to NetworkDomain objects. It can normally be accessed via the primary MorpheusContext via the MorpheusNetworkService Network Domains are Domain entities as it relates to DNS and Windows Domain Join Behavior. It contains information regarding FQDN as well as Domain join rules and even credentials when necessary.

Examples:


 morpheusContext.getNetwork().getDomain()
 
Since:
0.8.0
See Also:
  • Method Details

    • getRecord

      Returns the context for interacting with NetworkDomainRecord objects
      Returns:
      the domain record context for DNS Sync and management
    • listIdentityProjections

      io.reactivex.rxjava3.core.Observable<NetworkDomainIdentityProjection> listIdentityProjections(Long accountIntegrationId)
      Lists all network domain projection objects for a specified integration id. The projection is a subset of the properties on a full NetworkDomain object for sync matching.
      Parameters:
      accountIntegrationId - the AccountIntegration identifier associated to the domains to be listed.
      Returns:
      an RxJava Observable stream of result projection objects.
    • listIdentityProjections

      io.reactivex.rxjava3.core.Observable<NetworkDomainIdentityProjection> listIdentityProjections(Long accountIntegrationId, String region)
      Lists all network domain projection objects for a specified integration id and region. This is for amazon where each region has to be loaded separately . The projection is a subset of the properties on a full NetworkDomain object for sync matching.
      Parameters:
      accountIntegrationId - the AccountIntegration identifier associated to the domains to be listed.
      region - The regionCode identifier to filter on
      Returns:
      an RxJava Observable stream of result projection objects.
    • listById

      @Deprecated(since="0.15.4") io.reactivex.rxjava3.core.Observable<NetworkDomain> listById(Collection<Long> ids)
      Deprecated.
      Lists all NetworkDomain objects by a list of Identifiers. This is commonly used in sync / caching logic.
      Parameters:
      ids - list of ids to grab NetworkDomain objects from.
      Returns:
      an RxJava Observable stream of NetworkDomain to be subscribed to.
    • findByServer

      io.reactivex.rxjava3.core.Single<NetworkDomain> findByServer(Long computeServerId)
      Gets the network domain assigned to a server. This is relevant when doing IPAM/DNS operations. It looks for the primary domain object by checking the interfaces and any domain overrides on the server. This method may go away as a server in theory can belong to many domains.
      Parameters:
      computeServerId - the Server Object Identifier to check against
      Returns:
      a NetworkDomain instance of the associated domain. if it exists
    • findByWorkload

      io.reactivex.rxjava3.core.Single<NetworkDomain> findByWorkload(Long workloadId)
      Gets the network domain assigned to a workload/container. This is relevant when doing IPAM/DNS operations. It looks for the primary domain object by checking the interfaces and any domain overrides on the server. This method may go away as a server in theory can belong to many domains.
      Parameters:
      workloadId - the Workload/Container Object Identifier to check against
      Returns:
      a NetworkDomain instance of the associated domain. if it exists
    • remove

      io.reactivex.rxjava3.core.Single<Boolean> remove(Long integrationId, List<NetworkDomainIdentityProjection> removeList)
      Removes Missing Network Domains on the Morpheus side. This accepts the Projection Object instead of the main Object. It is important to note this is a Observer pattern and must be subscribed to in order for the action to occur

      Example:

      
       morpheusContext.getNetwork().removeMissingNetworkDomains(poolServer.integration.id, removeItems).blockingGet()
       
      Parameters:
      integrationId - The integration id of the integration syncing domains
      removeList - a list of domain projections to be removed
      Returns:
      a Single Observable returning the success status of the operation.
    • create

      io.reactivex.rxjava3.core.Single<Boolean> create(Long integrationId, List<NetworkDomain> addList)
      Creates new Network Domains from cache / sync implementations This ensures the refType and refId match the poolServer as well as the owner default
      Parameters:
      integrationId - The id of the AccountIntegration we are saving into
      addList - List of new NetworkDomain objects to be inserted into the database
      Returns:
      notification of completion if someone really cares about it
    • save

      @Deprecated(since="0.15.4") io.reactivex.rxjava3.core.Single<Boolean> save(List<NetworkDomain> domainsToSave)
      Saves a list of NetworkDomain objects. Be mindful this is an RxJava implementation and must be subscribed to for any action to actually take place.
      Specified by:
      save in interface MorpheusDataService<NetworkDomain,NetworkDomainIdentityProjection>
      Parameters:
      domainsToSave - a List of Domain objects that need to be updated in the database.
      Returns:
      the Single Observable stating the success state of the save attempt
      See Also: