Package com.morpheusdata.core.network
Interface MorpheusNetworkPoolIpService
-
public interface MorpheusNetworkPoolIpService
This Context deals with interactions related toNetworkPoolIp
objects. It can normally be accessed via the primaryMorpheusContext
via theMorpheusNetworkService
and finally via theMorpheusNetworkPoolService
traversal. Network Pool Ip Records are Host Records entities within an IPAM Service. These are create/destroyed based on provisioning integrations as well as syncing with Pool Server Integration types.Examples:
morpheusContext.getNetwork().getPool().getPoolIp()
- Since:
- 0.8.0
- See Also:
MorpheusNetworkPoolService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description io.reactivex.Single<NetworkPoolIp>
create(NetworkPoolIp poolIpRecord)
Creates a singleNetworkPoolIp
object returning the final result object if any changes occurred during save.io.reactivex.Single<java.lang.Boolean>
create(NetworkPoolIdentityProjection pool, java.util.List<NetworkPoolIp> addList)
Creates new Network Pool Host Records from cache / sync implementations This ensures the owner of the host/ip record is correct upon creation.io.reactivex.Observable<NetworkPoolIp>
listById(java.util.Collection<java.lang.Long> ids)
Lists allNetworkPoolIp
objects by a list of Identifiers.io.reactivex.Observable<NetworkPoolIpIdentityProjection>
listIdentityProjections(java.lang.Long poolId)
Lists all network pool ip projection objects for a specified network pool within a pool server integration.io.reactivex.Single<java.lang.Boolean>
remove(java.lang.Long poolId, java.util.List<NetworkPoolIpIdentityProjection> removeList)
Removes Missing Network Pools on the Morpheus side.io.reactivex.Single<NetworkPoolIp>
save(NetworkPoolIp poolIpRecord)
Saves a singleNetworkPoolIp
object returning the final result object if any changes occurred during save.io.reactivex.Single<java.lang.Boolean>
save(java.util.List<NetworkPoolIp> poolIpRecords)
Saves a list ofNetworkPoolIp
objects returning the final result save status.
-
-
-
Method Detail
-
listIdentityProjections
io.reactivex.Observable<NetworkPoolIpIdentityProjection> listIdentityProjections(java.lang.Long poolId)
Lists all network pool ip projection objects for a specified network pool within a pool server integration. This is a good way to list all unique host records within a pool. NOTE: Some integrations do not sync existing reservations but only track greenfield reservations. This can depend entirely on the size of the pool. /16 CIDRs to /32 CIDRs should be fine.- Parameters:
poolId
- The Identifier of theNetworkPool
to list all ip reservations against.- Returns:
- an RxJava Observable stream of projection objects
-
listById
io.reactivex.Observable<NetworkPoolIp> listById(java.util.Collection<java.lang.Long> ids)
Lists allNetworkPoolIp
objects by a list of Identifiers. This is commonly used in sync / caching logic.- Parameters:
ids
- list of ids to grabNetworkPoolIp
objects from.- Returns:
- an RxJava Observable stream of
NetworkPoolIp
to be subscribed to.
-
remove
io.reactivex.Single<java.lang.Boolean> remove(java.lang.Long poolId, java.util.List<NetworkPoolIpIdentityProjection> 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.getNetwork().getPool().getPoolIp().remove(pool.id, removeItems).blockingGet()
- Parameters:
poolId
- TheNetworkPool
id of the network poolremoveList
- a list ofNetworkPoolIpIdentityProjection
projections to be removed- Returns:
- a Single
Observable
returning the success status of the operation.
-
create
io.reactivex.Single<NetworkPoolIp> create(NetworkPoolIp poolIpRecord)
Creates a singleNetworkPoolIp
object returning the final result object if any changes occurred during save.- Parameters:
poolIpRecord
- the Pool Host Record we wish to persist changes to- Returns:
- the resultant Host Record Object containing any additional metadata that may have been applied
-
create
io.reactivex.Single<java.lang.Boolean> create(NetworkPoolIdentityProjection pool, java.util.List<NetworkPoolIp> addList)
Creates new Network Pool Host Records from cache / sync implementations This ensures the owner of the host/ip record is correct upon creation.- Parameters:
pool
- The {NetworkPool} we are bulk creating host records into.addList
- List of newNetworkPoolIp
objects to be inserted into the database- Returns:
- notification of completion if someone really cares about it
-
save
io.reactivex.Single<NetworkPoolIp> save(NetworkPoolIp poolIpRecord)
Saves a singleNetworkPoolIp
object returning the final result object if any changes occurred during save.- Parameters:
poolIpRecord
- the Pool Host Record we wish to persist changes to- Returns:
- the resultant Host Record Object containing any additional metadata that may have been applied
-
save
io.reactivex.Single<java.lang.Boolean> save(java.util.List<NetworkPoolIp> poolIpRecords)
Saves a list ofNetworkPoolIp
objects returning the final result save status.- Parameters:
poolIpRecords
- the Pool Host Records we wish to persist changes to- Returns:
- the success state of the bulk save request
-
-