Package com.morpheusdata.core.network
Interface MorpheusNetworkDomainService
-
public interface MorpheusNetworkDomainService
This Context deals with interactions related toNetworkDomain
objects. It can normally be accessed via the primaryMorpheusContext
via theMorpheusNetworkService
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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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 defaultio.reactivex.Single<NetworkDomain>
findByServer(java.lang.Long computeServerId)
Gets the network domain assigned to a server.io.reactivex.Single<NetworkDomain>
findByWorkload(java.lang.Long workloadId)
Gets the network domain assigned to a workload/container.io.reactivex.Single<NetworkDomain>
get(java.lang.Long id)
Gets a Network Domain by the idMorpheusNetworkDomainRecordService
getRecord()
Returns the context for interacting withNetworkDomainRecord
objectsio.reactivex.Observable<NetworkDomain>
listById(java.util.Collection<java.lang.Long> ids)
Lists allNetworkDomain
objects by a list of Identifiers.io.reactivex.Observable<NetworkDomainIdentityProjection>
listIdentityProjections(java.lang.Long accountIntegrationId)
Lists all network domain projection objects for a specified integration id.io.reactivex.Single<java.lang.Boolean>
remove(java.lang.Long integrationId, java.util.List<NetworkDomainIdentityProjection> removeList)
Removes Missing Network Domains on the Morpheus side.io.reactivex.Single<java.lang.Boolean>
save(NetworkDomain domainToSave)
Saves aNetworkDomain
object.io.reactivex.Single<java.lang.Boolean>
save(java.util.List<NetworkDomain> domainsToSave)
Saves a list ofNetworkDomain
objects.
-
-
-
Method Detail
-
getRecord
MorpheusNetworkDomainRecordService getRecord()
Returns the context for interacting withNetworkDomainRecord
objects- Returns:
- the domain record context for DNS Sync and management
-
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 fullNetworkDomain
object for sync matching.- Parameters:
accountIntegrationId
- theAccountIntegration
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 allNetworkDomain
objects by a list of Identifiers. This is commonly used in sync / caching logic.- Parameters:
ids
- list of ids to grabNetworkDomain
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 theNetworkDomain
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 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
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 theAccountIntegration
we are saving intoaddList
- List of newNetworkDomain
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 ofNetworkDomain
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 aNetworkDomain
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
-
-