Interface MorpheusNetworkPoolService

    • Method Detail

      • getPoolIp

        MorpheusNetworkPoolIpService getPoolIp()
        Returns the Pool IP Context for dealing with managing IP Allocations regarding Host Records within a NetworkPool
        Returns:
        the Pool IP Context to use for performing IPAM operations within Morpheus.
      • listIdentityProjections

        io.reactivex.Observable<NetworkPoolIdentityProjection> listIdentityProjections​(java.lang.Long poolServerId)
        Lists all network pool projection objects for a specified pool server id aka NetworkPoolServer. The projection is a subset of the properties on a full NetworkPool object for sync matching.
        Parameters:
        poolServerId - the NetworkPoolServer 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 full NetworkPool 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 all NetworkPool objects by a list of Identifiers. This is commonly used in sync / caching logic.
        Parameters:
        ids - list of ids to grab NetworkPool 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 occur

        Example:

        
         morpheusContext.network.removeMissingPools(poolServer.id, removeItems).blockingGet()
         
        Parameters:
        poolServerId - The NetworkPoolServer id of the server syncing domains
        removeList - a list of NetworkPool 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 occur

        Example:

        
         morpheusContext.network.removeMissingPools(removeItems).blockingGet()
         
        Parameters:
        removeList - a list of NetworkPool 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 the NetworkPoolServer we are saving into
        addList - List of new NetworkPool 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 new NetworkPool 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 of NetworkPool objects. Be mindful this is an RxJava implementation and must be subscribed to for any action to actually take place.
        Parameters:
        poolsToSave - a list oof NetworkPool objects to be updated in bulk
        Returns:
        the Single Observable stating the success state of the save attempt