Package com.morpheusdata.core.network
Interface MorpheusNetworkPoolIpService
- All Superinterfaces:
MorpheusDataQueryService<NetworkPoolIp>
,MorpheusDataService<NetworkPoolIp,
,NetworkPoolIpIdentityProjection> MorpheusIdentityService<NetworkPoolIpIdentityProjection>
public interface MorpheusNetworkPoolIpService
extends MorpheusDataService<NetworkPoolIp,NetworkPoolIpIdentityProjection>, MorpheusIdentityService<NetworkPoolIpIdentityProjection>
This Context deals with interactions related to
NetworkPoolIp
objects. It can normally
be accessed via the primary MorpheusContext
via the MorpheusNetworkService
and
finally via the MorpheusNetworkPoolService
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:
-
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Single<Boolean>
create
(NetworkPoolIdentityProjection pool, 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.rxjava3.core.Observable<NetworkPoolIp>
listById
(Collection<Long> ids) Deprecated.io.reactivex.rxjava3.core.Observable<NetworkPoolIpIdentityProjection>
listIdentityProjections
(Long poolId) Lists all network pool ip projection objects for a specified network pool within a pool server integration.io.reactivex.rxjava3.core.Single<Boolean>
remove
(Long poolId, List<NetworkPoolIpIdentityProjection> removeList) Removes Missing Network Pools on the Morpheus side.io.reactivex.rxjava3.core.Single<Boolean>
save
(List<NetworkPoolIp> poolIpRecords) Deprecated.Methods 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, create, remove, remove, save
Methods inherited from interface com.morpheusdata.core.MorpheusIdentityService
getIdentityProperties, listIdentityProjections
-
Method Details
-
listIdentityProjections
io.reactivex.rxjava3.core.Observable<NetworkPoolIpIdentityProjection> listIdentityProjections(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
Deprecated.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.rxjava3.core.Single<Boolean> remove(Long poolId, 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.rxjava3.core.Single<Boolean> create(NetworkPoolIdentityProjection pool, 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
@Deprecated(since="0.15.4") io.reactivex.rxjava3.core.Single<Boolean> save(List<NetworkPoolIp> poolIpRecords) Deprecated.useMorpheusDataService.bulkSave(java.util.List<M>)
insteadSaves a list ofNetworkPoolIp
objects returning the final result save status.- Specified by:
save
in interfaceMorpheusDataService<NetworkPoolIp,
NetworkPoolIpIdentityProjection> - Parameters:
poolIpRecords
- the Pool Host Records we wish to persist changes to- Returns:
- the success state of the bulk save request
- See Also:
-
MorpheusDataService.bulkSave(java.util.List<M>)
instead