Package com.morpheusdata.core.network
Interface MorpheusNetworkDomainService
- All Superinterfaces:
MorpheusDataQueryService<NetworkDomain>,MorpheusDataService<NetworkDomain,,NetworkDomainIdentityProjection> MorpheusIdentityService<NetworkDomainIdentityProjection>
public interface MorpheusNetworkDomainService
extends 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 Summary
Modifier and TypeMethodDescriptionio.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 defaultio.reactivex.rxjava3.core.Single<NetworkDomain>findByServer(Long computeServerId) Gets the network domain assigned to a server.io.reactivex.rxjava3.core.Single<NetworkDomain>findByWorkload(Long workloadId) Gets the network domain assigned to a workload/container.Returns the context for interacting withNetworkDomainRecordobjectsio.reactivex.rxjava3.core.Observable<NetworkDomain>listById(Collection<Long> ids) Deprecated.io.reactivex.rxjava3.core.Observable<NetworkDomainIdentityProjection>listIdentityProjections(Long accountIntegrationId) Lists all network domain projection objects for a specified integration id.io.reactivex.rxjava3.core.Observable<NetworkDomainIdentityProjection>listIdentityProjections(Long accountIntegrationId, String region) Lists all network domain projection objects for a specified integration id and region.io.reactivex.rxjava3.core.Single<Boolean>remove(Long integrationId, List<NetworkDomainIdentityProjection> removeList) Removes Missing Network Domains on the Morpheus side.io.reactivex.rxjava3.core.Single<Boolean>save(List<NetworkDomain> domainsToSave) Deprecated.Methods inherited from interface com.morpheusdata.core.MorpheusDataQueryService
count, find, get, list, list, listById, listOptions, listOptions, searchMethods inherited from interface com.morpheusdata.core.MorpheusDataService
bulkCreate, bulkRemove, bulkSave, create, create, remove, remove, saveMethods inherited from interface com.morpheusdata.core.MorpheusIdentityService
getIdentityProperties, listIdentityProjections
-
Method Details
-
getRecord
MorpheusNetworkDomainRecordService getRecord()Returns the context for interacting withNetworkDomainRecordobjects- 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 fullNetworkDomainobject for sync matching.- Parameters:
accountIntegrationId- theAccountIntegrationidentifier 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 fullNetworkDomainobject for sync matching.- Parameters:
accountIntegrationId- theAccountIntegrationidentifier 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 allNetworkDomainobjects by a list of Identifiers. This is commonly used in sync / caching logic.- Parameters:
ids- list of ids to grabNetworkDomainobjects from.- Returns:
- an RxJava Observable stream of
NetworkDomainto be subscribed to.
-
findByServer
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
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 occurExample:
morpheusContext.getNetwork().removeMissingNetworkDomains(poolServer.integration.id, removeItems).blockingGet()- Parameters:
integrationId- The integration id of the integration syncing domainsremoveList- a list of domain projections to be removed- Returns:
- a Single
Observablereturning the success status of the operation.
-
create
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 theAccountIntegrationwe are saving intoaddList- List of newNetworkDomainobjects 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) Deprecated.useMorpheusDataService.bulkSave(java.util.List<M>)insteadSaves a list ofNetworkDomainobjects. Be mindful this is an RxJava implementation and must be subscribed to for any action to actually take place.- Specified by:
savein interfaceMorpheusDataService<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:
-
MorpheusDataService.bulkSave(java.util.List<M>)instead