Package com.morpheusdata.core.network
Interface MorpheusNetworkDomainRecordService
-
public interface MorpheusNetworkDomainRecordService
This Context deals with interactions related toNetworkDomainRecord
objects. It can normally be accessed via the primaryMorpheusContext
via theMorpheusNetworkService
and finally via theMorpheusNetworkDomainService
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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description io.reactivex.Single<NetworkDomainRecord>
create(NetworkDomainRecord domainRecord)
Creates a singleNetworkDomain
object returning the final result object if any changes occurred during save.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.io.reactivex.Single<NetworkDomainRecord>
findByNetworkDomainAndServerId(NetworkDomainIdentityProjection domainMatch, java.lang.Long serverId)
Finds the DNS Record associated with the specified serverId fromComputeServer
within the specifiedNetworkDomain
io.reactivex.Single<NetworkDomainRecord>
findByNetworkDomainAndWorkloadId(NetworkDomainIdentityProjection domainMatch, java.lang.Long workloadId)
Finds the DNS Record associated with the specified workloadId (aka containerId) within the specifiedNetworkDomain
io.reactivex.Observable<NetworkDomainRecord>
listById(java.util.Collection<java.lang.Long> ids)
Lists allNetworkDomainRecord
objects by a list of Identifiers.io.reactivex.Observable<NetworkDomainRecordIdentityProjection>
listIdentityProjections(NetworkDomainIdentityProjection networkDomain, java.lang.String recordType)
Lists all network domain record projection objects for a specified integration id.io.reactivex.Single<java.lang.Boolean>
remove(NetworkDomainIdentityProjection domain, NetworkDomainRecordIdentityProjection removeRecord)
Removes aNetworkDomainRecord
object from a DNS Domain.io.reactivex.Single<java.lang.Boolean>
remove(NetworkDomainIdentityProjection domain, java.util.List<NetworkDomainRecordIdentityProjection> removeList)
RemovesNetworkDomainRecord
objects from a DNS Domain in bulk.io.reactivex.Single<NetworkDomainRecord>
save(NetworkDomainRecord domainRecord)
1 Saves a singleNetworkDomainRecord
object returning the final result object if any changes occurred during save.io.reactivex.Single<java.lang.Boolean>
save(java.util.List<NetworkDomainRecord> domainRecords)
Saves a list ofNetworkDomain
objects returning the final result save status.
-
-
-
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 fullNetworkDomainRecord
object for sync matching.- Parameters:
networkDomain
- theNetworkDomain
identity scope for listing all zone recordsrecordType
- the Record Type (i.e. A, AAAA, TXT, CNAME, MX , PTR) to list records by.- Returns:
- an RxJava Observable stream of result projection objects.
-
listById
io.reactivex.Observable<NetworkDomainRecord> listById(java.util.Collection<java.lang.Long> ids)
Lists allNetworkDomainRecord
objects by a list of Identifiers. This is commonly used in sync / caching logic.- Parameters:
ids
- list of ids to grabNetworkDomainRecord
objects from.- Returns:
- an RxJava Observable stream of
NetworkDomainRecord
to be subscribed to.
-
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 specifiedNetworkDomain
- Parameters:
domainMatch
- the current domain we are querying againstworkloadId
- 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 fromComputeServer
within the specifiedNetworkDomain
- Parameters:
domainMatch
- the current domain we are querying againstserverId
- 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)
RemovesNetworkDomainRecord
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 aNetworkDomainRecord
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 singleNetworkDomain
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 newNetworkDomainRecord
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 singleNetworkDomainRecord
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 ofNetworkDomain
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
-
-