Package com.morpheusdata.core.network
Interface MorpheusNetworkService
- All Superinterfaces:
MorpheusDataQueryService<Network>,MorpheusDataService<Network,,NetworkIdentityProjection> MorpheusIdentityService<NetworkIdentityProjection>
public interface MorpheusNetworkService
extends MorpheusDataService<Network,NetworkIdentityProjection>, MorpheusIdentityService<NetworkIdentityProjection>
Morpheus Context as it relates to network related operations. This context contains methods for querying things like network pools
network domains, and other network related objects. It also contains methods for applying updates ore creating new objects related to
networks. Typically this class is accessed via the primary
MorpheusContext.-
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Single<Boolean>Deprecated.Returns the NetworkDomainContext used for performing updates/queries onNetworkDomainrelated assets within Morpheus.Returns the NetworkFloatingIpContext used for performing updates or queries onNetworkFloatingIprelated assets within Morpheus.io.reactivex.rxjava3.core.Single<NetworkPoolIp>getNetworkIp(NetworkPool networkPool, String assignedType, Long assignedId, Long subAssignedId) Returns theMorpheusNetworkProxyServiceused for performing updates/queries onNetworkProxyrelated assets within Morpheusio.reactivex.rxjava3.core.Single<NetworkServer>Get aNetworkServerby id.getPool()Returns the NetworkPoolContext used for performing updates or queries onNetworkPoolrelated assets within Morpheus.Returns the NetworkPoolServerContext used for performing updates/queries onNetworkPoolServerrelated assets within Morpheus.io.reactivex.rxjava3.core.Single<NetworkPoolServer>getPoolServerByAccountIntegration(AccountIntegration integration) io.reactivex.rxjava3.core.Single<NetworkPoolServer>Returns theMorpheusNetworkRouterServiceused for performing updates/queries onNetworkRouterrelated assets within MorpheusReturns theMorpheusNetworkRouteTableServiceused for performing updates/queries onNetworkRouteTablerelated assets within MorpheusReturns theMorpheusNetworkServerServiceused for performing updates/queries onNetworkServerrelated assets within MorpheusgetType()Returns the MorpheusNetworkTypeContext used for performing updates/queries onNetworkTyperelated assets within Morpheus.io.reactivex.rxjava3.core.Observable<Network>listByCloudAndExternalIdIn(Long cloudId, Collection<String> externalIds) Deprecated.io.reactivex.rxjava3.core.Observable<Network>listById(Collection<Long> ids) Deprecated.io.reactivex.rxjava3.core.Observable<NetworkIdentityProjection>listIdentityProjections(AccountIntegration accountIntegration) Lists all network projection objects for a specified integration id.io.reactivex.rxjava3.core.Observable<NetworkIdentityProjection>listIdentityProjections(Cloud cloud) Lists all network projection objects for a specified cloud.io.reactivex.rxjava3.core.Observable<NetworkIdentityProjection>listIdentityProjections(Long cloudId) Lists all network projection objects for a specified cloud.io.reactivex.rxjava3.core.Observable<NetworkIdentityProjection>listIdentityProjections(Long cloudId, Long zonePoolId) Lists all network projection objects for a specified cloud.io.reactivex.rxjava3.core.Observable<NetworkIdentityProjection>listIdentityProjections(Long cloudId, String regionCode) Lists all network projection objects for a specified cloud.io.reactivex.rxjava3.core.Observable<NetworkIdentityProjection>listSyncProjections(Long cloudId) Deprecated.replaced bylistIdentityProjections(Long)io.reactivex.rxjava3.core.Observable<NetworkIdentityProjection>listSyncProjections(Long cloudId, Long zonePoolId) Deprecated.replaced bylistIdentityProjections(Long,Long)io.reactivex.rxjava3.core.Single<NetworkPoolIp>loadNetworkPoolIp(NetworkPool pool, String ipAddress) io.reactivex.rxjava3.core.Single<Boolean>remove(List<NetworkIdentityProjection> removeList) Deprecated.io.reactivex.rxjava3.core.Single<Void>removePoolIp(NetworkPool networkPool, NetworkPoolIp ipAddress) io.reactivex.rxjava3.core.Single<Boolean>Deprecated.useMorpheusDataService.bulkSave(java.util.List<M>)insteadio.reactivex.rxjava3.core.Single<Network>setComputeServerNetwork(ComputeServer server, String privateIp, String publicIp, String hostname, Long networkPoolId) io.reactivex.rxjava3.core.CompletableupdateNetworkPoolServerStatus(NetworkPoolServer poolServer, AccountIntegration.Status status) Used for updating the status of aNetworkPoolServerintegration.io.reactivex.rxjava3.core.CompletableupdateNetworkPoolServerStatus(NetworkPoolServer poolServer, AccountIntegration.Status status, String message) Used for updating the status of aNetworkPoolServerintegration.Methods inherited from interface com.morpheusdata.core.MorpheusDataQueryService
count, find, get, list, list, listById, listOptions, listOptions, searchMethods inherited from interface com.morpheusdata.core.MorpheusDataService
bulkCreate, bulkRemove, bulkSave, create, remove, saveMethods inherited from interface com.morpheusdata.core.MorpheusIdentityService
getIdentityProperties, listIdentityProjections
-
Method Details
-
getPool
MorpheusNetworkPoolService getPool()Returns the NetworkPoolContext used for performing updates or queries onNetworkPoolrelated assets within Morpheus. Typically this would be called by aDNSProviderorIPAMProvider.- Returns:
- An instance of the Network Pool Context to be used for calls by various network providers
-
getFloatingIp
MorpheusNetworkFloatingIpService getFloatingIp()Returns the NetworkFloatingIpContext used for performing updates or queries onNetworkFloatingIprelated assets within Morpheus.- Returns:
- An instance of the Network Floating IP Context to be used for calls by various floating ip providers
-
getPoolServer
MorpheusNetworkPoolServerService getPoolServer()Returns the NetworkPoolServerContext used for performing updates/queries onNetworkPoolServerrelated assets within Morpheus.- Returns:
- An instance of the Network Pool ServerContext to be used for calls by various network providers
-
getDomain
MorpheusNetworkDomainService getDomain()Returns the NetworkDomainContext used for performing updates/queries onNetworkDomainrelated assets within Morpheus. Most useful when implementing DNS related services.- Returns:
- An instance of the Network Domain Context to be used for calls by various network providers
-
getType
MorpheusNetworkTypeService getType()Returns the MorpheusNetworkTypeContext used for performing updates/queries onNetworkTyperelated assets within Morpheus.- Returns:
- An instance of the NetworkTypeContext to be used for calls by various network providers
-
getServer
MorpheusNetworkServerService getServer()Returns theMorpheusNetworkServerServiceused for performing updates/queries onNetworkServerrelated assets within Morpheus- Returns:
- An instance of the
MorpheusNetworkServerService
-
getRouter
MorpheusNetworkRouterService getRouter()Returns theMorpheusNetworkRouterServiceused for performing updates/queries onNetworkRouterrelated assets within Morpheus- Returns:
- An instance of the
MorpheusNetworkRouterService
-
getRouteTable
MorpheusNetworkRouteTableService getRouteTable()Returns theMorpheusNetworkRouteTableServiceused for performing updates/queries onNetworkRouteTablerelated assets within Morpheus- Returns:
- An instance of the
MorpheusNetworkRouteTableService
-
getNetworkProxy
MorpheusNetworkProxyService getNetworkProxy()Returns theMorpheusNetworkProxyServiceused for performing updates/queries onNetworkProxyrelated assets within Morpheus- Returns:
- An instance of the
MorpheusNetworkProxyService
-
updateNetworkPoolServerStatus
io.reactivex.rxjava3.core.Completable updateNetworkPoolServerStatus(NetworkPoolServer poolServer, AccountIntegration.Status status, String message) Used for updating the status of aNetworkPoolServerintegration.- Parameters:
poolServer- the pool integration with which we want to update the status.status- the status of the pool server (ok,syncing,error)message- the status message for more details. typically only used when status is 'error'.- Returns:
- a Completable for notification or subscription
-
updateNetworkPoolServerStatus
io.reactivex.rxjava3.core.Completable updateNetworkPoolServerStatus(NetworkPoolServer poolServer, AccountIntegration.Status status) Used for updating the status of aNetworkPoolServerintegration.- Parameters:
poolServer- the pool integration with which we want to update the status.status- the status string of the pool server (ok,syncing,error)- Returns:
- the on complete state
-
listIdentityProjections
io.reactivex.rxjava3.core.Observable<NetworkIdentityProjection> listIdentityProjections(AccountIntegration accountIntegration) Lists all network projection objects for a specified integration id. The projection is a subset of the properties on a fullNetworkobject for sync matching.- Parameters:
accountIntegration- theAccountIntegrationidentifier associated to the networks to be listed.- Returns:
- an RxJava Observable stream of result projection objects.
-
listIdentityProjections
io.reactivex.rxjava3.core.Observable<NetworkIdentityProjection> listIdentityProjections(Cloud cloud) Lists all network projection objects for a specified cloud. The projection is a subset of the properties on a fullNetworkobject for sync matching.- Parameters:
cloud- theCloudidentifier associated to the domains to be listed.- Returns:
- an RxJava Observable stream of result projection objects.
-
listIdentityProjections
io.reactivex.rxjava3.core.Observable<NetworkIdentityProjection> listIdentityProjections(Long cloudId) Lists all network projection objects for a specified cloud. The projection is a subset of the properties on a fullNetworkobject for sync matching.- Parameters:
cloudId- the id of theCloudassociated to the domains to be listed.- Returns:
- an RxJava Observable stream of result projection objects.
-
listIdentityProjections
io.reactivex.rxjava3.core.Observable<NetworkIdentityProjection> listIdentityProjections(Long cloudId, String regionCode) Lists all network projection objects for a specified cloud. The projection is a subset of the properties on a fullNetworkobject for sync matching.- Parameters:
cloudId- the id of theCloudassociated to the domains to be listed.regionCode- theComputeZoneRegionto optionally filter by- Returns:
- an RxJava Observable stream of result projection objects.
-
listIdentityProjections
io.reactivex.rxjava3.core.Observable<NetworkIdentityProjection> listIdentityProjections(Long cloudId, Long zonePoolId) Lists all network projection objects for a specified cloud. The projection is a subset of the properties on a fullNetworkobject for sync matching.- Parameters:
cloudId- the id of theCloudassociated to the domains to be listed.zonePoolId- the id of theComputeZonePoolthat this network may be scoped to. NOTE: if a network is associated with many assignedZonePools this field zonePoolId is not used.- Returns:
- an RxJava Observable stream of result projection objects.
-
listSyncProjections
@Deprecated io.reactivex.rxjava3.core.Observable<NetworkIdentityProjection> listSyncProjections(Long cloudId) Deprecated.replaced bylistIdentityProjections(Long)Lists all network projection objects for a specified cloud. The projection is a subset of the properties on a fullNetworkobject for sync matching.- Parameters:
cloudId- the id of theCloudassociated to the domains to be listed.- Returns:
- an RxJava Observable stream of result projection objects.
-
listSyncProjections
@Deprecated io.reactivex.rxjava3.core.Observable<NetworkIdentityProjection> listSyncProjections(Long cloudId, Long zonePoolId) Deprecated.replaced bylistIdentityProjections(Long,Long)Lists all network projection objects for a specified cloud. The projection is a subset of the properties on a fullNetworkobject for sync matching.- Parameters:
cloudId- the id of theCloudassociated to the domains to be listed.zonePoolId- the id of theComputeZonePoolthat this network may be scoped to. NOTE: if a network is associated with many assignedZonePools this field zonePoolId is not used.- Returns:
- an RxJava Observable stream of result projection objects.
-
listById
@Deprecated(since="0.15.4") io.reactivex.rxjava3.core.Observable<Network> listById(Collection<Long> ids) Deprecated.Lists allNetworkobjects by a list of Identifiers. This is commonly used in sync / caching logic. -
listByCloudAndExternalIdIn
@Deprecated(since="0.15.4") io.reactivex.rxjava3.core.Observable<Network> listByCloudAndExternalIdIn(Long cloudId, Collection<String> externalIds) Deprecated.Lists allNetworkobjects by a list of Identifiers. This is commonly used in sync / caching logic.- Parameters:
cloudId- the cloud to filter the list of networks by.externalIds- a Collection of external Ids to filter the list of networks by- Returns:
- an RxJava Observable stream of
Networkto be subscribed to.
-
remove
@Deprecated(since="0.15.4") io.reactivex.rxjava3.core.Single<Boolean> remove(List<NetworkIdentityProjection> removeList) Deprecated.Removes Missing Networks 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.getNetwork().remove(removeItems).blockingGet()- Specified by:
removein interfaceMorpheusDataService<Network,NetworkIdentityProjection> - Parameters:
removeList- a list of network projections to be removed- Returns:
- a Single
Observablereturning the success status of the operation. - See Also:
-
create
Deprecated.Creates new Network Domains from cache / sync implementations This ensures the refType and refId match the poolServer as well as the owner default- Specified by:
createin interfaceMorpheusDataService<Network,NetworkIdentityProjection> - Parameters:
addList- List of newNetworkobjects to be inserted into the database- Returns:
- notification of completion if someone really cares about it
- See Also:
-
save
@Deprecated(since="0.15.4") io.reactivex.rxjava3.core.Single<Boolean> save(List<Network> networksToSave) Deprecated.useMorpheusDataService.bulkSave(java.util.List<M>)insteadSaves a list ofNetworkobjects. Be mindful this is an RxJava implementation and must be subscribed to for any action to actually take place.- Specified by:
savein interfaceMorpheusDataService<Network,NetworkIdentityProjection> - Parameters:
networksToSave- a List of Network objects that need to be updated in the database.- Returns:
- the Single Observable stating the success state of the save attempt
- See Also:
-
removePoolIp
io.reactivex.rxjava3.core.Single<Void> removePoolIp(NetworkPool networkPool, NetworkPoolIp ipAddress) -
getPoolServerByAccountIntegration
io.reactivex.rxjava3.core.Single<NetworkPoolServer> getPoolServerByAccountIntegration(AccountIntegration integration) -
getPoolServerById
-
getNetworkIp
io.reactivex.rxjava3.core.Single<NetworkPoolIp> getNetworkIp(NetworkPool networkPool, String assignedType, Long assignedId, Long subAssignedId) -
loadNetworkPoolIp
io.reactivex.rxjava3.core.Single<NetworkPoolIp> loadNetworkPoolIp(NetworkPool pool, String ipAddress) -
setComputeServerNetwork
-
getNetworkServerById
Get aNetworkServerby id.- Parameters:
id- NetworkServer id- Returns:
- Observable stream of sync projection
-
MorpheusDataService.bulkCreate(java.util.List<M>)instead