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 aNetworkPool
Returns 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 fullNetworkPool
object 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, search
Methods inherited from interface com.morpheusdata.core.MorpheusDataService
bulkCreate, bulkRemove, bulkSave, create, remove, save
Methods 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
NetworkPoolIp
on 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 fullNetworkPool
object for sync matching.- Parameters:
poolServerId
- theNetworkPoolServer
Identifier 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 fullNetworkPool
object 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 allNetworkPool
objects by a list of Identifiers. This is commonly used in sync / caching logic.- Parameters:
ids
- list of ids to grabNetworkPool
objects from.- Returns:
- an RxJava Observable stream of
NetworkPool
to 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
- TheNetworkPoolServer
id of the server syncing domainsremoveList
- a list ofNetworkPool
projections to be removed- Returns:
- a Single
Observable
returning 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:
remove
in interfaceMorpheusDataService<NetworkPool,
NetworkPoolIdentityProjection> - Parameters:
removeList
- a list ofNetworkPool
projections to be removed- Returns:
- a Single
Observable
returning 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 theNetworkPoolServer
we are saving intoaddList
- List of newNetworkPool
objects 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:
create
in interfaceMorpheusDataService<NetworkPool,
NetworkPoolIdentityProjection> - Parameters:
addList
- List of newNetworkPool
objects 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 ofNetworkPool
objects. Be mindful this is an RxJava implementation and must be subscribed to for any action to actually take place.- Specified by:
save
in interfaceMorpheusDataService<NetworkPool,
NetworkPoolIdentityProjection> - Parameters:
poolsToSave
- a list oofNetworkPool
objects 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