Package com.morpheusdata.core.providers
Interface NetworkProvider
- All Superinterfaces:
PluginProvider
,UIExtensionProvider
- All Known Subinterfaces:
NetworkProvider
- All Known Implementing Classes:
AbstractNetworkProvider
Provides a standard set of methods for interacting with networks.
This includes creating, editing, etc.
- Since:
- 0.15.1
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
Some ProvisionProvider implementations may need to prepare something on the network server before the interface can be usable.Nested classes/interfaces inherited from interface com.morpheusdata.core.providers.PluginProvider
PluginProvider.EventSubscriberFacet<E extends Event>
-
Method Summary
Modifier and TypeMethodDescriptioncreateNetwork
(Network network, Map opts) Creates the Network submitteddefault ServiceResponse<NetworkRoute>
createNetworkRoute
(Network network, NetworkRoute networkRoute, Map opts) Create the NetworkRoute submitteddefault ServiceResponse<NetworkRouter>
createRouter
(NetworkRouter router, Map opts) Create the NetworkRouter submitteddefault ServiceResponse<NetworkRoute>
createRouterRoute
(NetworkRouter router, NetworkRoute route, Map opts) Create the NetworkRoute submitteddefault ServiceResponse<SecurityGroupLocation>
createSecurityGroup
(SecurityGroup securityGroup, Map opts) Creates aSecurityGroupLocation
from the submittedSecurityGroup
default ServiceResponse<SecurityGroupRuleLocation>
createSecurityGroupRule
(SecurityGroupLocation securityGroupLocation, SecurityGroupRule securityGroupRule) Creates aSecurityGroupRuleLocation
from the submittedSecurityGroupRule
createSubnet
(NetworkSubnet subnet, Network network, Map opts) Creates the NetworkSubnet submitteddeleteNetwork
(Network network, Map opts) Deletes the Network submitteddefault ServiceResponse
deleteNetworkRoute
(NetworkRoute networkRoute, Map opts) Delete the NetworkRoute submitteddefault ServiceResponse
deleteRouter
(NetworkRouter router, Map opts) Delete the NetworkRouter submitteddefault ServiceResponse
deleteRouterRoute
(NetworkRouter router, NetworkRoute route, Map opts) Delete the NetworkRoute submitteddefault ServiceResponse
deleteSecurityGroup
(SecurityGroup securityGroup) Delete aSecurityGroup
default ServiceResponse
deleteSecurityGroupLocation
(SecurityGroupLocation securityGroupLocation) Delete aSecurityGroupLocation
default ServiceResponse
deleteSecurityGroupRule
(SecurityGroupLocation securityGroupLocation, SecurityGroupRule rule) Delete aSecurityGroupRule
deleteSubnet
(NetworkSubnet subnet, Network network, Map opts) Deletes the NetworkSubnet submitteddefault String
The CloudProvider code that this NetworkProvider should be attached to.default Boolean
A NetworkProvider should be marked as creatable if a network server integration can be added independently of a Cloud integrationGrabs the description for the NetworkProviderdefault Collection<OptionType>
default Collection<OptionType>
default Collection<OptionType>
default Collection<OptionType>
default FloatingIpProvider
Gets the floating ip providerdefault Collection<OptionType>
default String
The GenericProvider code that this NetworkProvider should be attached to.default Collection<OptionType>
default Icon
getIcon()
Returns the Network Integration logo for display when a user needs to view or add this integrationdefault Collection<OptionType>
default Collection<OptionType>
default String
Some older clouds have a network server type code that is the exact same as the cloud code.default Collection<NetworkSwitchType>
Provides a Collection of NetworkTypes that can be managed by this providerdefault Collection<OptionType>
Provides a Collection of Router Types that can be managed by this providerdefault Collection<OptionType>
default Collection<OptionType>
default Collection<OptionType>
default Collection<OptionType>
default SecurityGroupProvider
default Collection<OptionType>
default Boolean
Returns whether or not this network implementation supportsNetworkSwitch
.default Boolean
default ServiceResponse<Network>
prepareNetwork
(Network network, Map opts) Prepare the network information before validate, create, and update.default ServiceResponse<NetworkRoute>
prepareNetworkRoute
(Network network, NetworkRoute networkRoute, Map routeConfig, Map opts) Prepare the route information before validate, create, and update.default ServiceResponse<NetworkRouter>
prepareRouter
(NetworkRouter router, Map routerConfig, Map opts) Prepare the router information before validate, create, and update.default ServiceResponse<NetworkRoute>
prepareRouterRoute
(NetworkRouter router, NetworkRoute route, Map routeConfig, Map opts) Prepare the route information before validate, create, and update.default ServiceResponse<SecurityGroup>
prepareSecurityGroup
(SecurityGroup securityGroup, Map opts) Prepare the security group before validate, create, and update.default ServiceResponse<SecurityGroupRule>
prepareSecurityGroupRule
(SecurityGroupRule securityGroupRule, Map opts) Prepare the security group rule before validate, create, and update.default ServiceResponse<NetworkSubnet>
prepareSubnet
(NetworkSubnet subnet, Network network, Map opts) Prepare the subnet information before validate, create, and update.default ServiceResponse
refresh()
Deprecated.default ServiceResponse
refresh
(NetworkServer networkServer) This method is triggered on a schedule to update entity information from the network integration itself.default HTMLResponse
renderTemplate
(NetworkServer networkServer) Integration details provided to your rendering engineupdateNetwork
(Network network, Map opts) Updates the Network submitteddefault ServiceResponse<NetworkRoute>
updateNetworkRoute
(Network network, NetworkRoute networkRoute, Map opts) Update the NetworkRoute submitteddefault ServiceResponse<NetworkRouter>
updateRouter
(NetworkRouter router, Map opts) Update the NetworkRouter submitteddefault ServiceResponse<NetworkRoute>
updateRouterRoute
(NetworkRouter router, NetworkRoute route, Map opts) Update the NetworkRoute submitteddefault ServiceResponse<SecurityGroup>
updateSecurityGroup
(SecurityGroup securityGroup, Map opts) Update the security groupdefault ServiceResponse<SecurityGroupRule>
updateSecurityGroupRule
(SecurityGroupLocation securityGroupLocation, SecurityGroupRule originalRule, SecurityGroupRule updatedRule) Update the security group ruleupdateSubnet
(NetworkSubnet subnet, Network network, Map opts) Updates the NetworkSubnet submitteddefault ServiceResponse
validateNetwork
(Network network, Map opts) Validates the submitted network information.default ServiceResponse
validateNetworkRoute
(Network network, NetworkRoute networkRoute, Map opts) Validate the submitted NetworkRoute information.default ServiceResponse
validateNetworkServer
(NetworkServer networkServer, Map opts) Validates the submitted network server information.default ServiceResponse
validateRouter
(NetworkRouter router, Map opts) Validate the submitted NetworkRouter information.default ServiceResponse
validateRouterRoute
(NetworkRouter router, NetworkRoute route, Map opts) Validate the submitted NetworkRoute information.default ServiceResponse
validateSecurityGroup
(SecurityGroup securityGroup, Map opts) Validates the submitted security group information.default ServiceResponse<SecurityGroupRule>
validateSecurityGroupRule
(SecurityGroupRule securityGroupRule) Validate the submitted security group rule object.default ServiceResponse
validateSubnet
(NetworkSubnet subnet, Network network, Map opts) Validates the submitted subnet information.Methods inherited from interface com.morpheusdata.core.providers.PluginProvider
getCode, getMorpheus, getName, getPlugin, isPlugin
Methods inherited from interface com.morpheusdata.core.providers.UIExtensionProvider
getContentSecurityPolicy, getRenderer
-
Method Details
-
getNetworkServerTypeCode
Some older clouds have a network server type code that is the exact same as the cloud code. This allows one to set it to match and in doing so the provider will be fetched via the cloud providersCloudProvider.getDefaultNetworkServerTypeCode()
method.- Returns:
- code for overriding the ProvisionType record code property
-
getCloudProviderCode
The CloudProvider code that this NetworkProvider should be attached to. When this NetworkProvider is registered with Morpheus, all Clouds that match this code will have a NetworkServer of this type attached to them. Network actions will then be handled via this provider.- Returns:
- String Code of the Cloud type
-
getGenericProviderCode
The GenericProvider code that this NetworkProvider should be attached to. Should be used when there is no CloudProvider.- Returns:
- String Code of the Cloud type
-
getDescription
String getDescription()Grabs the description for the NetworkProvider- Returns:
- String
-
getNetworkTypes
Collection<NetworkType> getNetworkTypes()Provides a Collection of NetworkTypes that can be managed by this provider- Returns:
- Collection of NetworkType
-
getRouterTypes
Collection<NetworkRouterType> getRouterTypes()Provides a Collection of Router Types that can be managed by this provider- Returns:
- Collection of NetworkRouterType
-
getOptionTypes
Collection<OptionType> getOptionTypes() -
isUserVisible
-
getCreatable
A NetworkProvider should be marked as creatable if a network server integration can be added independently of a Cloud integration- Returns:
- whether this NetworkProvider is creatable
-
getIcon
Returns the Network Integration logo for display when a user needs to view or add this integration- Returns:
- Icon representation of assets stored in the src/assets of the project.
- Since:
- 1.2.6
-
getScopeOptionTypes
-
getSwitchOptionTypes
-
getNetworkOptionTypes
-
getGatewayOptionTypes
-
getRouterOptionTypes
-
getLoadBalancerOptionTypes
-
getRouteTableOptionTypes
-
getSecurityGroupOptionTypes
-
getRuleOptionTypes
-
getFirewallGroupOptionTypes
-
getEdgeClusterOptionTypes
-
getDhcpServerOptionTypes
-
getDhcpRelayOptionTypes
-
getGroupOptionTypes
-
getSecurityGroupProvider
-
getNetworkSwitchTypes
-
hasSwitches
Returns whether or not this network implementation supportsNetworkSwitch
. If true, this will enabled the Network Switch management panel in the user interface- Returns:
-
getFloatingIpProvider
Gets the floating ip provider- Returns:
- FloatingIpProvider
-
refresh
Deprecated. -
refresh
This method is triggered on a schedule to update entity information from the network integration itself.- Parameters:
networkServer
-- Returns:
-
validateNetworkServer
Validates the submitted network server information. If aServiceResponse
is not marked as successful the validation results will be bubbled up to the user.- Parameters:
networkServer
- Network server informationopts
- additional configuration options- Returns:
- ServiceResponse
-
prepareNetwork
Prepare the network information before validate, create, and update. If aServiceResponse
is not marked as successful the parent process will be terminated and the results may be presented to the user.- Parameters:
network
- Network informationopts
- additional configuration options- Returns:
- ServiceResponse
-
validateNetwork
Validates the submitted network information. If aServiceResponse
is not marked as successful the validation results will be bubbled up to the user.- Parameters:
network
- Network informationopts
- additional configuration options- Returns:
- ServiceResponse
-
createNetwork
Creates the Network submitted- Parameters:
network
- Network informationopts
- additional configuration options- Returns:
- ServiceResponse
-
updateNetwork
Updates the Network submitted- Parameters:
network
- Network informationopts
- additional configuration options- Returns:
- ServiceResponse
-
deleteNetwork
Deletes the Network submitted- Parameters:
network
- Network information- Returns:
- ServiceResponse
-
prepareSubnet
default ServiceResponse<NetworkSubnet> prepareSubnet(NetworkSubnet subnet, Network network, Map opts) Prepare the subnet information before validate, create, and update. If aServiceResponse
is not marked as successful the parent process will be terminated and the results may be presented to the user.- Parameters:
subnet
- NetworkSubnet informationopts
- additional configuration options- Returns:
- ServiceResponse
-
validateSubnet
Validates the submitted subnet information. If aServiceResponse
is not marked as successful the validation results will be bubbled up to the user.- Parameters:
subnet
- NetworkSubnet informationnetwork
- Network to create the NetworkSubnet onopts
- additional configuration options. Mode value will be 'update' for validations during an update vs creation- Returns:
- ServiceResponse
-
createSubnet
Creates the NetworkSubnet submitted- Parameters:
subnet
- Network informationnetwork
- Network to create the NetworkSubnet onopts
- additional configuration options- Returns:
- ServiceResponse
-
updateSubnet
Updates the NetworkSubnet submitted- Parameters:
subnet
- NetworkSubnet informationopts
- additional configuration optionsnetwork
- Network that this NetworkSubnet is attached to- Returns:
- ServiceResponse
-
deleteSubnet
Deletes the NetworkSubnet submitted- Parameters:
subnet
- NetworkSubnet informationnetwork
- Network that this NetworkSubnet is attached to- Returns:
- ServiceResponse
-
prepareNetworkRoute
default ServiceResponse<NetworkRoute> prepareNetworkRoute(Network network, NetworkRoute networkRoute, Map routeConfig, Map opts) Prepare the route information before validate, create, and update. If aServiceResponse
is not marked as successful the parent process will be terminated and the results may be presented to the user.- Parameters:
network
- Network informationnetworkRoute
- NetworkRoute to preparerouteConfig
- configuration options for the NetworkRouteopts
- additional configuration options- Returns:
- ServiceResponse
-
validateNetworkRoute
Validate the submitted NetworkRoute information. If aServiceResponse
is not marked as successful the validation results will be bubbled up to the user.- Parameters:
network
- Network informationnetworkRoute
- NetworkRoute informationopts
- additional configuration options. Mode value will be 'update' for validations during an update vs creation- Returns:
- ServiceResponse
-
createNetworkRoute
default ServiceResponse<NetworkRoute> createNetworkRoute(Network network, NetworkRoute networkRoute, Map opts) Create the NetworkRoute submitted- Parameters:
network
- Network informationnetworkRoute
- NetworkRoute informationopts
- additional configuration options- Returns:
- ServiceResponse
-
updateNetworkRoute
default ServiceResponse<NetworkRoute> updateNetworkRoute(Network network, NetworkRoute networkRoute, Map opts) Update the NetworkRoute submitted- Parameters:
network
- Network informationnetworkRoute
- NetworkRoute informationopts
- additional configuration options- Returns:
- ServiceResponse
-
deleteNetworkRoute
Delete the NetworkRoute submitted- Parameters:
networkRoute
- NetworkRoute information- Returns:
- ServiceResponse
-
prepareRouter
default ServiceResponse<NetworkRouter> prepareRouter(NetworkRouter router, Map routerConfig, Map opts) Prepare the router information before validate, create, and update. If aServiceResponse
is not marked as successful the parent process will be terminated and the results may be presented to the user.- Parameters:
router
- NetworkRouter informationrouterConfig
- router configuration optionsopts
- additional configuration options- Returns:
- ServiceResponse
-
validateRouter
Validate the submitted NetworkRouter information. If aServiceResponse
is not marked as successful the validation results will be bubbled up to the user.- Parameters:
router
- NetworkRouter informationopts
- additional configuration options. Mode value will be 'update' for validations during an update vs creation- Returns:
- ServiceResponse
-
createRouter
Create the NetworkRouter submitted- Parameters:
router
- NetworkRouter informationopts
- additional configuration options- Returns:
- ServiceResponse
-
updateRouter
Update the NetworkRouter submitted- Parameters:
router
- NetworkRouter informationopts
- additional configuration options- Returns:
- ServiceResponse
-
deleteRouter
Delete the NetworkRouter submitted- Parameters:
router
- NetworkRouter information- Returns:
- ServiceResponse
-
prepareRouterRoute
default ServiceResponse<NetworkRoute> prepareRouterRoute(NetworkRouter router, NetworkRoute route, Map routeConfig, Map opts) Prepare the route information before validate, create, and update. If aServiceResponse
is not marked as successful the parent process will be terminated and the results may be presented to the user.- Parameters:
router
- NetworkRouter informationroute
- NetworkRoute to preparerouteConfig
- configuration options for the NetworkRouteopts
- additional configuration options- Returns:
- ServiceResponse
-
validateRouterRoute
Validate the submitted NetworkRoute information. If aServiceResponse
is not marked as successful the validation results will be bubbled up to the user.- Parameters:
router
- NetworkRouter informationroute
- NetworkRoute informationopts
- additional configuration options. Mode value will be 'update' for validations during an update vs creation- Returns:
- ServiceResponse
-
createRouterRoute
default ServiceResponse<NetworkRoute> createRouterRoute(NetworkRouter router, NetworkRoute route, Map opts) Create the NetworkRoute submitted- Parameters:
router
- NetworkRouter informationroute
- NetworkRoute informationopts
- additional configuration options- Returns:
- ServiceResponse
-
updateRouterRoute
default ServiceResponse<NetworkRoute> updateRouterRoute(NetworkRouter router, NetworkRoute route, Map opts) Update the NetworkRoute submitted- Parameters:
router
- NetworkRouter informationroute
- NetworkRoute informationopts
- additional configuration options- Returns:
- ServiceResponse
-
deleteRouterRoute
Delete the NetworkRoute submitted- Parameters:
router
- NetworkRouter informationroute
- NetworkRoute information- Returns:
- ServiceResponse
-
prepareSecurityGroup
Prepare the security group before validate, create, and update. If aServiceResponse
is not marked as successful the parent process will be terminated and the results may be presented to the user.- Parameters:
securityGroup
- SecurityGroup informationopts
- additional configuration options including all form data- Returns:
- ServiceResponse
-
validateSecurityGroup
Validates the submitted security group information. If aServiceResponse
is not marked as successful the validation results will be bubbled up to the user.- Parameters:
securityGroup
- SecurityGroup informationopts
- additional configuration options- Returns:
- ServiceResponse
-
createSecurityGroup
default ServiceResponse<SecurityGroupLocation> createSecurityGroup(SecurityGroup securityGroup, Map opts) Creates aSecurityGroupLocation
from the submittedSecurityGroup
- Parameters:
securityGroup
- SecurityGroup objectopts
- additional configuration options- Returns:
- ServiceResponse containing the resulting
SecurityGroupLocation
including the information (externalId, etc.) which identifies the security group within the current context (usually a cloud).
-
updateSecurityGroup
Update the security group- Parameters:
securityGroup
- SecurityGroup objectopts
- additional configuration options- Returns:
- ServiceResponse
-
deleteSecurityGroup
Delete aSecurityGroup
- Parameters:
securityGroup
- SecurityGroup object- Returns:
- ServiceResponse
-
deleteSecurityGroupLocation
Delete aSecurityGroupLocation
- Parameters:
securityGroupLocation
- SecurityGroupLocation information- Returns:
- ServiceResponse
-
prepareSecurityGroupRule
default ServiceResponse<SecurityGroupRule> prepareSecurityGroupRule(SecurityGroupRule securityGroupRule, Map opts) Prepare the security group rule before validate, create, and update. If aServiceResponse
is not marked as successful the parent process will be terminated and the results may be presented to the user.- Parameters:
securityGroupRule
- SecurityGroupRule objectopts
- additional configuration options including all form data- Returns:
- ServiceResponse
-
validateSecurityGroupRule
default ServiceResponse<SecurityGroupRule> validateSecurityGroupRule(SecurityGroupRule securityGroupRule) Validate the submitted security group rule object. If aServiceResponse
is not marked as successful the validation results in the errors and msg properties will be surfaced to the user interface.- Parameters:
securityGroupRule
- SecurityGroupRule object- Returns:
- ServiceResponse
-
createSecurityGroupRule
default ServiceResponse<SecurityGroupRuleLocation> createSecurityGroupRule(SecurityGroupLocation securityGroupLocation, SecurityGroupRule securityGroupRule) Creates aSecurityGroupRuleLocation
from the submittedSecurityGroupRule
- Parameters:
securityGroupRule
- SecurityGroupRule object- Returns:
- ServiceResponse containing the resulting
SecurityGroupRuleLocation
including the information (externalId, etc.) which identifies the security group rule within the current context (usually a cloud).
-
updateSecurityGroupRule
default ServiceResponse<SecurityGroupRule> updateSecurityGroupRule(SecurityGroupLocation securityGroupLocation, SecurityGroupRule originalRule, SecurityGroupRule updatedRule) Update the security group rule- Parameters:
securityGroupLocation
- theSecurityGroupLocation
originalRule
- the rule before any updates were applied.updatedRule
- the rule with all updates applied- Returns:
ServiceResponse
-
deleteSecurityGroupRule
default ServiceResponse deleteSecurityGroupRule(SecurityGroupLocation securityGroupLocation, SecurityGroupRule rule) Delete aSecurityGroupRule
- Parameters:
securityGroupLocation
- SecurityGroupLocation objectrule
- SecurityGroupRule to be deleted- Returns:
- ServiceResponse
-
renderTemplate
Integration details provided to your rendering engine- Parameters:
networkServer
- details of a network server- Returns:
- result of rendering a template
-