Package com.morpheusdata.core.network
Interface MorpheusNetworkDomainRecordService
- All Superinterfaces:
MorpheusDataQueryService<NetworkDomainRecord>
,MorpheusDataService<NetworkDomainRecord,
,NetworkDomainRecordIdentityProjection> MorpheusIdentityService<NetworkDomainRecordIdentityProjection>
public interface MorpheusNetworkDomainRecordService
extends MorpheusDataService<NetworkDomainRecord,NetworkDomainRecordIdentityProjection>, MorpheusIdentityService<NetworkDomainRecordIdentityProjection>
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:
-
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Single<Boolean>
create
(NetworkDomainIdentityProjection domain, 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.rxjava3.core.Single<NetworkDomainRecord>
findByNetworkDomainAndServerId
(NetworkDomainIdentityProjection domainMatch, Long serverId) Deprecated.io.reactivex.rxjava3.core.Single<NetworkDomainRecord>
findByNetworkDomainAndWorkloadId
(NetworkDomainIdentityProjection domainMatch, Long workloadId) Deprecated.io.reactivex.rxjava3.core.Observable<NetworkDomainRecordIdentityProjection>
listIdentityProjections
(NetworkDomainIdentityProjection networkDomain, String recordType) Lists all network domain record projection objects for a specified integration id.io.reactivex.rxjava3.core.Single<Boolean>
remove
(NetworkDomainIdentityProjection domain, NetworkDomainRecordIdentityProjection removeRecord) Removes aNetworkDomainRecord
object from a DNS Domain.io.reactivex.rxjava3.core.Single<Boolean>
remove
(NetworkDomainIdentityProjection domain, List<NetworkDomainRecordIdentityProjection> removeList) RemovesNetworkDomainRecord
objects from a DNS Domain in bulk.io.reactivex.rxjava3.core.Single<Boolean>
save
(List<NetworkDomainRecord> domainRecords) Deprecated.Methods inherited from interface com.morpheusdata.core.MorpheusDataQueryService
count, find, get, list, list, listById, listOptions, listOptions, search
Methods inherited from interface com.morpheusdata.core.MorpheusDataService
bulkCreate, bulkRemove, bulkSave, create, create, remove, remove, save
Methods inherited from interface com.morpheusdata.core.MorpheusIdentityService
getIdentityProperties, listIdentityProjections
-
Method Details
-
listIdentityProjections
io.reactivex.rxjava3.core.Observable<NetworkDomainRecordIdentityProjection> listIdentityProjections(NetworkDomainIdentityProjection networkDomain, 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.
-
findByNetworkDomainAndWorkloadId
@Deprecated(since="0.15.4") io.reactivex.rxjava3.core.Single<NetworkDomainRecord> findByNetworkDomainAndWorkloadId(NetworkDomainIdentityProjection domainMatch, Long workloadId) Deprecated.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
@Deprecated(since="0.15.4") io.reactivex.rxjava3.core.Single<NetworkDomainRecord> findByNetworkDomainAndServerId(NetworkDomainIdentityProjection domainMatch, Long serverId) Deprecated.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.rxjava3.core.Single<Boolean> remove(NetworkDomainIdentityProjection domain, 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.rxjava3.core.Single<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.rxjava3.core.Single<Boolean> create(NetworkDomainIdentityProjection domain, 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
@Deprecated(since="0.15.4") io.reactivex.rxjava3.core.Single<Boolean> save(List<NetworkDomainRecord> domainRecords) Deprecated.useMorpheusDataService.bulkSave(java.util.List<M>)
insteadSaves a list ofNetworkDomain
objects returning the final result save status.- Specified by:
save
in interfaceMorpheusDataService<NetworkDomainRecord,
NetworkDomainRecordIdentityProjection> - Parameters:
domainRecords
- the Domain Zone Records we wish to persist changes to- Returns:
- the success state of the bulk save request
- See Also:
-
MorpheusDataService.bulkSave(java.util.List<M>)
instead