Interface MorpheusNetworkPoolIpService

All Superinterfaces:
MorpheusDataQueryService<NetworkPoolIp>, 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 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 the NetworkPool to list all ip reservations against.
      Returns:
      an RxJava Observable stream of projection objects
    • listById

      @Deprecated io.reactivex.rxjava3.core.Observable<NetworkPoolIp> listById(Collection<Long> ids)
      Deprecated.
      Lists all NetworkPoolIp objects by a list of Identifiers. This is commonly used in sync / caching logic.
      Parameters:
      ids - list of ids to grab NetworkPoolIp 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 occur

      Example:

      
       morpheusContext.getNetwork().getPool().getPoolIp().remove(pool.id, removeItems).blockingGet()
       
      Parameters:
      poolId - The NetworkPool id of the network pool
      removeList - a list of NetworkPoolIpIdentityProjection 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 new NetworkPoolIp 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)
      Saves a list of NetworkPoolIp objects returning the final result save status.
      Specified by:
      save in interface MorpheusDataService<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: