Interface MorpheusNetworkDomainRecordService


  • public interface MorpheusNetworkDomainRecordService
    This Context deals with interactions related to NetworkDomainRecord objects. It can normally be accessed via the primary MorpheusContext via the MorpheusNetworkService and finally via the MorpheusNetworkDomainService traversal. Network Domain Records are Zone Records entities within a DNS Zone. These are create/destroyed based on provisioning integrations as well as syncing with DNS Integration types.

    Examples:

    
     morpheusContext.getNetwork().getDomain().getRecord()
     
    Since:
    0.8.0
    See Also:
    MorpheusNetworkDomainService
    • Method Detail

      • listIdentityProjections

        io.reactivex.Observable<NetworkDomainRecordIdentityProjection> listIdentityProjections​(NetworkDomainIdentityProjection networkDomain,
                                                                                               java.lang.String recordType)
        Lists all network domain record projection objects for a specified integration id. The projection is a subset of the properties on a full NetworkDomainRecord object for sync matching.
        Parameters:
        networkDomain - the NetworkDomain identity scope for listing all zone records
        recordType - the Record Type (i.e. A, AAAA, TXT, CNAME, MX , PTR) to list records by.
        Returns:
        an RxJava Observable stream of result projection objects.
      • findByNetworkDomainAndWorkloadId

        io.reactivex.Single<NetworkDomainRecord> findByNetworkDomainAndWorkloadId​(NetworkDomainIdentityProjection domainMatch,
                                                                                  java.lang.Long workloadId)
        Finds the DNS Record associated with the specified workloadId (aka containerId) within the specified NetworkDomain
        Parameters:
        domainMatch - the current domain we are querying against
        workloadId - the id of the container/workload element associated to the record
        Returns:
        the DNS Zone record associated with the workload
      • findByNetworkDomainAndServerId

        io.reactivex.Single<NetworkDomainRecord> findByNetworkDomainAndServerId​(NetworkDomainIdentityProjection domainMatch,
                                                                                java.lang.Long serverId)
        Finds the DNS Record associated with the specified serverId from ComputeServer within the specified NetworkDomain
        Parameters:
        domainMatch - the current domain we are querying against
        serverId - the id of the server element associated to the record
        Returns:
        the DNS Zone record associated with the server
      • remove

        io.reactivex.Single<java.lang.Boolean> remove​(NetworkDomainIdentityProjection domain,
                                                      java.util.List<NetworkDomainRecordIdentityProjection> removeList)
        Removes NetworkDomainRecord objects from a DNS Domain in bulk. This is typically used when syncing with the DNS Integration.
        Parameters:
        domain - The Domain scope for the records being deleted. This method is scoped to the Zone for safety.
        removeList - the list of Zone Records that are to be deleted.
        Returns:
        the success state Observable of the operation. make sure you subscribe.
      • remove

        io.reactivex.Single<java.lang.Boolean> remove​(NetworkDomainIdentityProjection domain,
                                                      NetworkDomainRecordIdentityProjection removeRecord)
        Removes a NetworkDomainRecord object from a DNS Domain. This is often used when handling teardown implementations of DNS Providers.
        Parameters:
        domain - The Domain scope for the record being deleted. This method is scoped to the Zone for safety.
        removeRecord - the Zone record that is to be deleted
        Returns:
        the success state Observable of the operation. make sure you subscribe.
      • create

        io.reactivex.Single<NetworkDomainRecord> create​(NetworkDomainRecord domainRecord)
        Creates a single NetworkDomain object returning the final result object if any changes occurred during save.
        Parameters:
        domainRecord - the Domain Zone Record we wish to persist changes to
        Returns:
        the resultant Domain Object containing any additional metadata that may have been applied
      • create

        io.reactivex.Single<java.lang.Boolean> create​(NetworkDomainIdentityProjection domain,
                                                      java.util.List<NetworkDomainRecord> addList)
        Creates new Network Domain Records from cache / sync implementations This ensures the owner of the zone record is correct upon creation.
        Parameters:
        domain - The {NetworkDomain} we are bulk creating zone records into.
        addList - List of new NetworkDomainRecord objects to be inserted into the database
        Returns:
        notification of completion if someone really cares about it
      • save

        io.reactivex.Single<NetworkDomainRecord> save​(NetworkDomainRecord domainRecord)
        1 Saves a single NetworkDomainRecord object returning the final result object if any changes occurred during save.
        Parameters:
        domainRecord - the Domain Zone Record we wish to persist changes to
        Returns:
        the resultant Domain Object containing any additional metadata that may have been applied
      • save

        io.reactivex.Single<java.lang.Boolean> save​(java.util.List<NetworkDomainRecord> domainRecords)
        Saves a list of NetworkDomain objects returning the final result save status.
        Parameters:
        domainRecords - the Domain Zone Records we wish to persist changes to
        Returns:
        the success state of the bulk save request