Package com.morpheusdata.core.network
Interface MorpheusNetworkPoolService
-
public interface MorpheusNetworkPoolService
This Context deals with interactions related toNetworkPool
objects. It can normally be accessed via the primaryMorpheusContext
via theMorpheusNetworkService
Examples:
morpheusContext.getNetwork().getPool()
- 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 poolServerId, java.util.List<NetworkPool> addList)
Creates new Network Pools from cache / sync implementations This ensures proper ownership and pool server association.io.reactivex.Single<java.lang.Boolean>
create(java.util.List<NetworkPool> addList)
Creates new Network Pools of type Morpheus This ensures proper ownership and pool server association.MorpheusNetworkPoolIpService
getPoolIp()
Returns the Pool IP Context for dealing with managing IP Allocations regarding Host Records within aNetworkPool
MorpheusNetworkPoolRangeService
getPoolRange()
Returns the Pool Range Contextio.reactivex.Observable<NetworkPool>
listById(java.util.Collection<java.lang.Long> ids)
Lists allNetworkPool
objects by a list of Identifiers.io.reactivex.Observable<NetworkPoolIdentityProjection>
listIdentityProjections()
Lists all network pool projection objects The projection is a subset of the properties on a fullNetworkPool
object for sync matching.io.reactivex.Observable<NetworkPoolIdentityProjection>
listIdentityProjections(java.lang.Long poolServerId)
Lists all network pool projection objects for a specified pool server id akaNetworkPoolServer
.io.reactivex.Single<java.lang.Boolean>
remove(java.lang.Long poolServerId, java.util.List<NetworkPoolIdentityProjection> removeList)
Removes Missing Network Pools on the Morpheus side.io.reactivex.Single<java.lang.Boolean>
remove(java.util.List<NetworkPoolIdentityProjection> removeList)
Removes Missing Network Pools on the Morpheus side.io.reactivex.Single<java.lang.Boolean>
save(java.util.List<NetworkPool> poolsToSave)
Saves a list ofNetworkPool
objects.
-
-
-
Method Detail
-
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.Observable<NetworkPoolIdentityProjection> listIdentityProjections(java.lang.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.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
io.reactivex.Observable<NetworkPool> listById(java.util.Collection<java.lang.Long> ids)
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.Single<java.lang.Boolean> remove(java.lang.Long poolServerId, java.util.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
io.reactivex.Single<java.lang.Boolean> remove(java.util.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(removeItems).blockingGet()
- Parameters:
removeList
- a list ofNetworkPool
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 poolServerId, java.util.List<NetworkPool> addList)
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
io.reactivex.Single<java.lang.Boolean> create(java.util.List<NetworkPool> addList)
Creates new Network Pools of type Morpheus This ensures proper ownership and pool server association. It also creates the poolRanges attached to the model.- Parameters:
addList
- List of newNetworkPool
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<NetworkPool> poolsToSave)
Saves a list ofNetworkPool
objects. Be mindful this is an RxJava implementation and must be subscribed to for any action to actually take place.- Parameters:
poolsToSave
- a list oofNetworkPool
objects to be updated in bulk- Returns:
- the Single Observable stating the success state of the save attempt
-
-