Interface MorpheusNetworkDomainService


  • public interface MorpheusNetworkDomainService
    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:
    MorpheusNetworkService
    • Method Detail

      • listIdentityProjections

        io.reactivex.Observable<NetworkDomainIdentityProjection> listIdentityProjections​(java.lang.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.
      • listById

        io.reactivex.Observable<NetworkDomain> listById​(java.util.Collection<java.lang.Long> ids)
        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.
      • get

        io.reactivex.Single<NetworkDomain> get​(java.lang.Long id)
        Gets a Network Domain by the id
        Parameters:
        id - the Identifier of the NetworkDomain that is being requested.
        Returns:
        an instance of the NetworkDomain with all metadata pertaining to it.
      • findByServer

        io.reactivex.Single<NetworkDomain> findByServer​(java.lang.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.Single<NetworkDomain> findByWorkload​(java.lang.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.Single<java.lang.Boolean> remove​(java.lang.Long integrationId,
                                                      java.util.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.Single<java.lang.Boolean> create​(java.lang.Long integrationId,
                                                      java.util.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

        io.reactivex.Single<java.lang.Boolean> save​(java.util.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.
        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
      • save

        io.reactivex.Single<java.lang.Boolean> save​(NetworkDomain domainToSave)
        Saves a NetworkDomain object. Be mindful this is an RxJava implementation and must be subscribed to for any action to actually take place.
        Parameters:
        domainToSave - a Domain Object that need to be updated in the database.
        Returns:
        the Single Observable stating the success state of the save attempt