Package com.morpheusdata.core.network
Interface MorpheusNetworkPoolService
- All Superinterfaces:
MorpheusDataQueryService<NetworkPool>,MorpheusDataService<NetworkPool,,NetworkPoolIdentityProjection> MorpheusIdentityService<NetworkPoolIdentityProjection>
public interface MorpheusNetworkPoolService
extends MorpheusDataService<NetworkPool,NetworkPoolIdentityProjection>, MorpheusIdentityService<NetworkPoolIdentityProjection>
This Context deals with interactions related to
NetworkPool objects. It can normally
be accessed via the primary MorpheusContext via the MorpheusNetworkService
Examples:
morpheusContext.getNetwork().getPool()
- Since:
- 0.8.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Single<Boolean>create(Long poolServerId, List<NetworkPool> addList) Creates new Network Pools from cache / sync implementations This ensures proper ownership and pool server association.io.reactivex.rxjava3.core.Single<Boolean>create(List<NetworkPool> addList) Deprecated.Returns the Pool IP Context for dealing with managing IP Allocations regarding Host Records within aNetworkPoolReturns the Pool Range Contextio.reactivex.rxjava3.core.Observable<NetworkPool>listById(Collection<Long> ids) Deprecated.io.reactivex.rxjava3.core.Observable<NetworkPoolIdentityProjection>Lists all network pool projection objects The projection is a subset of the properties on a fullNetworkPoolobject for sync matching.io.reactivex.rxjava3.core.Observable<NetworkPoolIdentityProjection>listIdentityProjections(Long poolServerId) Lists all network pool projection objects for a specified pool server id akaNetworkPoolServer.io.reactivex.rxjava3.core.Single<Boolean>remove(Long poolServerId, List<NetworkPoolIdentityProjection> removeList) Removes Missing Network Pools on the Morpheus side.io.reactivex.rxjava3.core.Single<Boolean>remove(List<NetworkPoolIdentityProjection> removeList) Deprecated.io.reactivex.rxjava3.core.Single<Boolean>save(List<NetworkPool> poolsToSave) Deprecated.useMorpheusDataService.bulkSave(java.util.List<M>)insteadMethods 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, remove, saveMethods inherited from interface com.morpheusdata.core.MorpheusIdentityService
getIdentityProperties, listIdentityProjections
-
Method Details
-
getPoolIp
MorpheusNetworkPoolIpService getPoolIp()Returns the Pool IP Context for dealing with managing IP Allocations regarding Host Records within aNetworkPool- Returns:
- the Pool IP Context to use for performing IPAM operations within Morpheus.
-
getPoolRange
MorpheusNetworkPoolRangeService getPoolRange()Returns the Pool Range Context- Returns:
- the Pool Range Context to use for listing
NetworkPoolIpon a range
-
listIdentityProjections
io.reactivex.rxjava3.core.Observable<NetworkPoolIdentityProjection> listIdentityProjections(Long poolServerId) Lists all network pool projection objects for a specified pool server id akaNetworkPoolServer. The projection is a subset of the properties on a fullNetworkPoolobject for sync matching.- Parameters:
poolServerId- theNetworkPoolServerIdentifier associated with the pools to be listed.- Returns:
- an RxJava Observable stream of projection objects
-
listIdentityProjections
io.reactivex.rxjava3.core.Observable<NetworkPoolIdentityProjection> listIdentityProjections()Lists all network pool projection objects The projection is a subset of the properties on a fullNetworkPoolobject for sync matching.- Returns:
- an RxJava Observable stream of projection objects
-
listById
@Deprecated(since="0.15.4") io.reactivex.rxjava3.core.Observable<NetworkPool> listById(Collection<Long> ids) Deprecated.Lists allNetworkPoolobjects by a list of Identifiers. This is commonly used in sync / caching logic.- Parameters:
ids- list of ids to grabNetworkPoolobjects from.- Returns:
- an RxJava Observable stream of
NetworkPoolto be subscribed to.
-
remove
io.reactivex.rxjava3.core.Single<Boolean> remove(Long poolServerId, List<NetworkPoolIdentityProjection> removeList) Removes Missing Network Pools 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.network.removeMissingPools(poolServer.id, removeItems).blockingGet()- Parameters:
poolServerId- TheNetworkPoolServerid of the server syncing domainsremoveList- a list ofNetworkPoolprojections to be removed- Returns:
- a Single
Observablereturning the success status of the operation.
-
remove
@Deprecated(since="0.15.4") io.reactivex.rxjava3.core.Single<Boolean> remove(List<NetworkPoolIdentityProjection> removeList) Deprecated.Removes Missing Network Pools 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.network.removeMissingPools(removeItems).blockingGet()- Specified by:
removein interfaceMorpheusDataService<NetworkPool,NetworkPoolIdentityProjection> - Parameters:
removeList- a list ofNetworkPoolprojections to be removed- Returns:
- a Single
Observablereturning the success status of the operation. - See Also:
-
create
Creates new Network Pools from cache / sync implementations This ensures proper ownership and pool server association. It also creates the poolRanges attached to the model.- Parameters:
poolServerId- The id of theNetworkPoolServerwe are saving intoaddList- List of newNetworkPoolobjects to be inserted into the database- Returns:
- notification of completion if someone really cares about it
-
create
@Deprecated(since="0.15.4") io.reactivex.rxjava3.core.Single<Boolean> create(List<NetworkPool> addList) Deprecated.Creates new Network Pools of type Morpheus This ensures proper ownership and pool server association. It also creates the poolRanges attached to the model.- Specified by:
createin interfaceMorpheusDataService<NetworkPool,NetworkPoolIdentityProjection> - Parameters:
addList- List of newNetworkPoolobjects to be inserted into the database- Returns:
- notification of completion if someone really cares about it
- See Also:
-
save
@Deprecated(since="0.15.4") io.reactivex.rxjava3.core.Single<Boolean> save(List<NetworkPool> poolsToSave) Deprecated.useMorpheusDataService.bulkSave(java.util.List<M>)insteadSaves a list ofNetworkPoolobjects. Be mindful this is an RxJava implementation and must be subscribed to for any action to actually take place.- Specified by:
savein interfaceMorpheusDataService<NetworkPool,NetworkPoolIdentityProjection> - Parameters:
poolsToSave- a list oofNetworkPoolobjects to be updated in bulk- Returns:
- the Single Observable stating the success state of the save attempt
- See Also:
-
MorpheusDataService.bulkCreate(java.util.List<M>)instead