Interface MorpheusNetworkPoolIpService


  • public interface MorpheusNetworkPoolIpService
    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:
    MorpheusNetworkPoolService
    • 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 the NetworkPool 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 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.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 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.Single<NetworkPoolIp> create​(NetworkPoolIp poolIpRecord)
        Creates a single NetworkPoolIp 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 new NetworkPoolIp 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 single NetworkPoolIp 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 of NetworkPoolIp 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