Package com.morpheusdata.core.network
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 primaryMorpheusContext
.- Since:
- 0.11.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description io.reactivex.Single<java.lang.Boolean>
create(java.util.List<NetworkSubnet> addList, Network network)
Creates new NetworkSubnet Domains from cache / sync implementationsio.reactivex.Observable<NetworkSubnet>
listById(java.util.Collection<java.lang.Long> ids)
Lists allNetworkSubnet
objects by a list of Identifiers.io.reactivex.Observable<NetworkSubnetIdentityProjection>
listIdentityProjections(Network network)
Lists all subnet projection objects for a specified network.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.io.reactivex.Single<java.lang.Boolean>
remove(java.util.List<NetworkSubnetIdentityProjection> removeList)
Removes Missing NetworkSubnets on the Morpheus side.io.reactivex.Single<NetworkSubnet>
save(NetworkSubnet networkSubnetToSave)
Saves aNetworkSubnet
object.io.reactivex.Single<java.lang.Boolean>
save(java.util.List<NetworkSubnet> networkSubnetsToSave)
Saves a list ofNetworkSubnet
objects.
-
-
-
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 fullNetworkSubnet
object for sync matching.- Parameters:
network
- theNetwork
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 fullNetworkSubnet
object for sync matching.- Parameters:
cloudId
- id of theCloud
identifier associated to the subnets to be listed.computeZonePoolId
- (optional) id of theComputeZonePool
that the associated Network must be associated with via assignedZonePoolscategory
- (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 allNetworkSubnet
objects by a list of Identifiers. This is commonly used in sync / caching logic.- Parameters:
ids
- list of ids to grabNetworkSubnet
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 occurExample:
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 newNetworkSubnet
objects to be inserted into the databasenetwork
- 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 ofNetworkSubnet
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 aNetworkSubnet
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
-
-