Interface MorpheusNetworkSubnetService


  • public interface MorpheusNetworkSubnetService
    Morpheus Context as it relates to network subnets related operations. This context contains methods for querying subnets, creating, updating and deleting subnets. Typically this class is accessed via the primary MorpheusContext.
    Since:
    0.11.0
    • Method Detail

      • listIdentityProjections

        io.reactivex.Observable<NetworkSubnetIdentityProjection> listIdentityProjections​(Network network)
        Lists all subnet projection objects for a specified network. The projection is a subset of the properties on a full NetworkSubnet object for sync matching.
        Parameters:
        network - the Network identifier associated to the subnets to be listed.
        Returns:
        an RxJava Observable stream of result projection objects.
      • listIdentityProjections

        io.reactivex.Observable<NetworkSubnetIdentityProjection> listIdentityProjections​(java.lang.Long cloudId,
                                                                                         java.lang.Long computeZonePoolId,
                                                                                         java.lang.String category)
        Lists all subnet projection objects for a specified cloud. The projection is a subset of the properties on a full NetworkSubnet object for sync matching.
        Parameters:
        cloudId - id of the Cloud identifier associated to the subnets to be listed.
        computeZonePoolId - (optional) id of the ComputeZonePool that the associated Network must be associated with via assignedZonePools
        category - (optional category name that the network must have
        Returns:
        an RxJava Observable stream of result projection objects.
      • listById

        io.reactivex.Observable<NetworkSubnet> listById​(java.util.Collection<java.lang.Long> ids)
        Lists all NetworkSubnet objects by a list of Identifiers. This is commonly used in sync / caching logic.
        Parameters:
        ids - list of ids to grab NetworkSubnet objects from.
        Returns:
        an RxJava Observable stream of NetworkSubnet to be subscribed to.
      • remove

        io.reactivex.Single<java.lang.Boolean> remove​(java.util.List<NetworkSubnetIdentityProjection> removeList)
        Removes Missing NetworkSubnets 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.getNetworkSubnet().remove(removeItems).blockingGet()
         
        Parameters:
        removeList - list of NetworkSubnets to remove
        Returns:
        a Single Observable returning the success status of the operation.
      • create

        io.reactivex.Single<java.lang.Boolean> create​(java.util.List<NetworkSubnet> addList,
                                                      Network network)
        Creates new NetworkSubnet Domains from cache / sync implementations
        Parameters:
        addList - List of new NetworkSubnet objects to be inserted into the database
        network - Network to add the NetworkSubnet to
        Returns:
        notification of completion if someone really cares about it
      • save

        io.reactivex.Single<java.lang.Boolean> save​(java.util.List<NetworkSubnet> networkSubnetsToSave)
        Saves a list of NetworkSubnet objects. Be mindful this is an RxJava implementation and must be subscribed to for any action to actually take place.
        Parameters:
        networkSubnetsToSave - a List of NetworkSubnet objects that need to be updated in the database.
        Returns:
        the Single Observable stating the success state of the save attempt
      • save

        io.reactivex.Single<NetworkSubnet> save​(NetworkSubnet networkSubnetToSave)
        Saves a NetworkSubnet object. Be mindful this is an RxJava implementation and must be subscribed to for any action to actually take place.
        Parameters:
        networkSubnetToSave - a NetworkSubnet Object that need to be updated in the database.
        Returns:
        the Single Observable stating the resultant NetworkSubnet Object