Package com.morpheusdata.core.network
Interface MorpheusNetworkService
-
public interface MorpheusNetworkService
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 primaryMorpheusContext
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description io.reactivex.Single<java.lang.Boolean>
create(java.util.List<Network> addList)
Creates new Network Domains from cache / sync implementations This ensures the refType and refId match the poolServer as well as the owner defaultMorpheusNetworkDomainService
getDomain()
Returns the NetworkDomainContext used for performing updates/queries onNetworkDomain
related assets within Morpheus.io.reactivex.Single<NetworkPoolIp>
getNetworkIp(NetworkPool networkPool, java.lang.String assignedType, java.lang.Long assignedId, java.lang.Long subAssignedId)
MorpheusNetworkProxyService
getNetworkProxy()
Returns theMorpheusNetworkProxyService
used for performing updates/queries onNetworkProxy
related assets within Morpheusio.reactivex.Single<NetworkServer>
getNetworkServerById(java.lang.Long id)
Get aNetworkServer
by id.MorpheusNetworkPoolService
getPool()
Returns the NetworkPoolContext used for performing updates or queries onNetworkPool
related assets within Morpheus.io.reactivex.Single<NetworkPoolServer>
getPoolServerByAccountIntegration(AccountIntegration integration)
io.reactivex.Single<NetworkPoolServer>
getPoolServerById(java.lang.Long id)
MorpheusNetworkRouterService
getRouter()
Returns theMorpheusNetworkRouterService
used for performing updates/queries onNetworkRouter
related assets within MorpheusMorpheusNetworkRouteTableService
getRouteTable()
Returns theMorpheusNetworkRouteTableService
used for performing updates/queries onNetworkRouteTable
related assets within MorpheusMorpheusNetworkTypeService
getType()
Returns the MorpheusNetworkTypeContext used for performing updates/queries onNetworkType
related assets within Morpheus.io.reactivex.Observable<Network>
listByCloudAndExternalIdIn(java.lang.Long cloudId, java.util.Collection<java.lang.String> externalIds)
Lists allNetwork
objects by a list of Identifiers.io.reactivex.Observable<Network>
listById(java.util.Collection<java.lang.Long> ids)
Lists allNetwork
objects by a list of Identifiers.io.reactivex.Observable<NetworkIdentityProjection>
listIdentityProjections(AccountIntegration accountIntegration)
Lists all network projection objects for a specified integration id.io.reactivex.Observable<NetworkIdentityProjection>
listIdentityProjections(Cloud cloud)
Lists all network projection objects for a specified cloud.io.reactivex.Observable<NetworkIdentityProjection>
listIdentityProjections(java.lang.Long cloudId)
Lists all network projection objects for a specified cloud.io.reactivex.Observable<NetworkIdentityProjection>
listIdentityProjections(java.lang.Long cloudId, java.lang.Long zonePoolId)
Lists all network projection objects for a specified cloud.io.reactivex.Observable<NetworkIdentityProjection>
listIdentityProjections(java.lang.Long cloudId, java.lang.String regionCode)
Lists all network projection objects for a specified cloud.io.reactivex.Observable<NetworkIdentityProjection>
listSyncProjections(java.lang.Long cloudId)
Deprecated.replaced bylistIdentityProjections(Long)
io.reactivex.Observable<NetworkIdentityProjection>
listSyncProjections(java.lang.Long cloudId, java.lang.Long zonePoolId)
Deprecated.replaced bylistIdentityProjections(Long,Long)
io.reactivex.Single<NetworkPoolIp>
loadNetworkPoolIp(NetworkPool pool, java.lang.String ipAddress)
io.reactivex.Single<java.lang.Boolean>
remove(java.util.List<NetworkIdentityProjection> removeList)
Removes Missing Networks on the Morpheus side.io.reactivex.Single<java.lang.Void>
removePoolIp(NetworkPool networkPool, NetworkPoolIp ipAddress)
io.reactivex.Single<Network>
save(Network networkToSave)
Saves aNetwork
object.io.reactivex.Single<java.lang.Boolean>
save(java.util.List<Network> networksToSave)
Saves a list ofNetwork
objects.io.reactivex.Single<Network>
setComputeServerNetwork(ComputeServer server, java.lang.String privateIp, java.lang.String publicIp, java.lang.String hostname, java.lang.Long networkPoolId)
io.reactivex.Completable
updateNetworkPoolServerStatus(NetworkPoolServer poolServer, AccountIntegration.Status status)
Used for updating the status of aNetworkPoolServer
integration.io.reactivex.Completable
updateNetworkPoolServerStatus(NetworkPoolServer poolServer, AccountIntegration.Status status, java.lang.String message)
Used for updating the status of aNetworkPoolServer
integration.
-
-
-
Method Detail
-
getPool
MorpheusNetworkPoolService getPool()
Returns the NetworkPoolContext used for performing updates or queries onNetworkPool
related assets within Morpheus. Typically this would be called by aDNSProvider
orIPAMProvider
.- Returns:
- An instance of the Network Pool Context to be used for calls by various network providers
-
getDomain
MorpheusNetworkDomainService getDomain()
Returns the NetworkDomainContext used for performing updates/queries onNetworkDomain
related 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 onNetworkType
related assets within Morpheus.- Returns:
- An instance of the NetworkTypeContext to be used for calls by various network providers
-
getRouter
MorpheusNetworkRouterService getRouter()
Returns theMorpheusNetworkRouterService
used for performing updates/queries onNetworkRouter
related assets within Morpheus- Returns:
- An instance of the
MorpheusNetworkRouterService
-
getRouteTable
MorpheusNetworkRouteTableService getRouteTable()
Returns theMorpheusNetworkRouteTableService
used for performing updates/queries onNetworkRouteTable
related assets within Morpheus- Returns:
- An instance of the
MorpheusNetworkRouteTableService
-
getNetworkProxy
MorpheusNetworkProxyService getNetworkProxy()
Returns theMorpheusNetworkProxyService
used for performing updates/queries onNetworkProxy
related assets within Morpheus- Returns:
- An instance of the
MorpheusNetworkProxyService
-
updateNetworkPoolServerStatus
io.reactivex.Completable updateNetworkPoolServerStatus(NetworkPoolServer poolServer, AccountIntegration.Status status, java.lang.String message)
Used for updating the status of aNetworkPoolServer
integration.- 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.Completable updateNetworkPoolServerStatus(NetworkPoolServer poolServer, AccountIntegration.Status status)
Used for updating the status of aNetworkPoolServer
integration.- 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.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 fullNetwork
object for sync matching.- Parameters:
accountIntegration
- theAccountIntegration
identifier associated to the networks to be listed.- Returns:
- an RxJava Observable stream of result projection objects.
-
listIdentityProjections
io.reactivex.Observable<NetworkIdentityProjection> listIdentityProjections(Cloud cloud)
Lists all network projection objects for a specified cloud. The projection is a subset of the properties on a fullNetwork
object for sync matching.- Parameters:
cloud
- theCloud
identifier associated to the domains to be listed.- Returns:
- an RxJava Observable stream of result projection objects.
-
listIdentityProjections
io.reactivex.Observable<NetworkIdentityProjection> listIdentityProjections(java.lang.Long cloudId)
Lists all network projection objects for a specified cloud. The projection is a subset of the properties on a fullNetwork
object for sync matching.- Parameters:
cloudId
- the id of theCloud
associated to the domains to be listed.- Returns:
- an RxJava Observable stream of result projection objects.
-
listIdentityProjections
io.reactivex.Observable<NetworkIdentityProjection> listIdentityProjections(java.lang.Long cloudId, java.lang.String regionCode)
Lists all network projection objects for a specified cloud. The projection is a subset of the properties on a fullNetwork
object for sync matching.- Parameters:
cloudId
- the id of theCloud
associated to the domains to be listed.regionCode
- theComputeZoneRegion
to optionally filter by- Returns:
- an RxJava Observable stream of result projection objects.
-
listIdentityProjections
io.reactivex.Observable<NetworkIdentityProjection> listIdentityProjections(java.lang.Long cloudId, java.lang.Long zonePoolId)
Lists all network projection objects for a specified cloud. The projection is a subset of the properties on a fullNetwork
object for sync matching.- Parameters:
cloudId
- the id of theCloud
associated to the domains to be listed.zonePoolId
- the id of theComputeZonePool
that 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.Observable<NetworkIdentityProjection> listSyncProjections(java.lang.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 fullNetwork
object for sync matching.- Parameters:
cloudId
- the id of theCloud
associated to the domains to be listed.- Returns:
- an RxJava Observable stream of result projection objects.
-
listSyncProjections
@Deprecated io.reactivex.Observable<NetworkIdentityProjection> listSyncProjections(java.lang.Long cloudId, java.lang.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 fullNetwork
object for sync matching.- Parameters:
cloudId
- the id of theCloud
associated to the domains to be listed.zonePoolId
- the id of theComputeZonePool
that 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
io.reactivex.Observable<Network> listById(java.util.Collection<java.lang.Long> ids)
Lists allNetwork
objects by a list of Identifiers. This is commonly used in sync / caching logic.
-
listByCloudAndExternalIdIn
io.reactivex.Observable<Network> listByCloudAndExternalIdIn(java.lang.Long cloudId, java.util.Collection<java.lang.String> externalIds)
Lists allNetwork
objects 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
Network
to be subscribed to.
-
remove
io.reactivex.Single<java.lang.Boolean> remove(java.util.List<NetworkIdentityProjection> removeList)
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()
- Parameters:
removeList
- a list of network projections to be removed- Returns:
- a Single
Observable
returning the success status of the operation.
-
create
io.reactivex.Single<java.lang.Boolean> create(java.util.List<Network> addList)
Creates new Network Domains from cache / sync implementations This ensures the refType and refId match the poolServer as well as the owner default- Parameters:
addList
- List of newNetwork
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<Network> networksToSave)
Saves a list ofNetwork
objects. Be mindful this is an RxJava implementation and must be subscribed to for any action to actually take place.- 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
-
save
io.reactivex.Single<Network> save(Network networkToSave)
Saves aNetwork
object. Be mindful this is an RxJava implementation and must be subscribed to for any action to actually take place.- Parameters:
networkToSave
- a Network Object that need to be updated in the database.- Returns:
- the Single Observable stating the resultant Network Object
-
removePoolIp
io.reactivex.Single<java.lang.Void> removePoolIp(NetworkPool networkPool, NetworkPoolIp ipAddress)
-
getPoolServerByAccountIntegration
io.reactivex.Single<NetworkPoolServer> getPoolServerByAccountIntegration(AccountIntegration integration)
-
getPoolServerById
io.reactivex.Single<NetworkPoolServer> getPoolServerById(java.lang.Long id)
-
getNetworkIp
io.reactivex.Single<NetworkPoolIp> getNetworkIp(NetworkPool networkPool, java.lang.String assignedType, java.lang.Long assignedId, java.lang.Long subAssignedId)
-
loadNetworkPoolIp
io.reactivex.Single<NetworkPoolIp> loadNetworkPoolIp(NetworkPool pool, java.lang.String ipAddress)
-
setComputeServerNetwork
io.reactivex.Single<Network> setComputeServerNetwork(ComputeServer server, java.lang.String privateIp, java.lang.String publicIp, java.lang.String hostname, java.lang.Long networkPoolId)
-
getNetworkServerById
io.reactivex.Single<NetworkServer> getNetworkServerById(java.lang.Long id)
Get aNetworkServer
by id.- Parameters:
id
- NetworkServer id- Returns:
- Observable stream of sync projection
-
-