Interface NetworkProvider

All Superinterfaces:
PluginProvider
All Known Subinterfaces:
NetworkProvider

public interface NetworkProvider extends PluginProvider
Provides a standard set of methods for interacting with networks. This includes creating, editing, etc.
Since:
0.15.1
  • Method Details

    • getNetworkServerTypeCode

      default String 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 providers CloudProvider.getDefaultNetworkServerTypeCode() method.
      Returns:
      code for overriding the ProvisionType record code property
    • getCloudProviderCode

      String 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
    • 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()
    • getScopeOptionTypes

      default Collection<OptionType> getScopeOptionTypes()
    • getSwitchOptionTypes

      default Collection<OptionType> getSwitchOptionTypes()
    • getNetworkOptionTypes

      default Collection<OptionType> getNetworkOptionTypes()
    • getGatewayOptionTypes

      default Collection<OptionType> getGatewayOptionTypes()
    • getRouterOptionTypes

      default Collection<OptionType> getRouterOptionTypes()
    • getLoadBalancerOptionTypes

      default Collection<OptionType> getLoadBalancerOptionTypes()
    • getRouteTableOptionTypes

      default Collection<OptionType> getRouteTableOptionTypes()
    • getSecurityGroupOptionTypes

      default Collection<OptionType> getSecurityGroupOptionTypes()
    • getRuleOptionTypes

      default Collection<OptionType> getRuleOptionTypes()
    • getFirewallGroupOptionTypes

      default Collection<OptionType> getFirewallGroupOptionTypes()
    • getEdgeClusterOptionTypes

      default Collection<OptionType> getEdgeClusterOptionTypes()
    • getDhcpServerOptionTypes

      default Collection<OptionType> getDhcpServerOptionTypes()
    • getDhcpRelayOptionTypes

      default Collection<OptionType> getDhcpRelayOptionTypes()
    • getGroupOptionTypes

      default Collection<OptionType> getGroupOptionTypes()
    • getSecurityGroupProvider

      default SecurityGroupProvider getSecurityGroupProvider()
    • refresh

      default ServiceResponse refresh()
    • prepareNetwork

      default ServiceResponse<Network> prepareNetwork(Network network, Map opts)
      Prepare the network information before validate, create, and update. If a ServiceResponse is not marked as successful the parent process will be terminated and the results may be presented to the user.
      Parameters:
      network - Network information
      opts - additional configuration options
      Returns:
      ServiceResponse
    • validateNetwork

      default ServiceResponse validateNetwork(Network network, Map opts)
      Validates the submitted network information. If a ServiceResponse is not marked as successful the validation results will be bubbled up to the user.
      Parameters:
      network - Network information
      opts - additional configuration options
      Returns:
      ServiceResponse
    • createNetwork

      ServiceResponse<Network> createNetwork(Network network, Map opts)
      Creates the Network submitted
      Parameters:
      network - Network information
      opts - additional configuration options
      Returns:
      ServiceResponse
    • updateNetwork

      ServiceResponse<Network> updateNetwork(Network network, Map opts)
      Updates the Network submitted
      Parameters:
      network - Network information
      opts - additional configuration options
      Returns:
      ServiceResponse
    • deleteNetwork

      ServiceResponse deleteNetwork(Network network, Map opts)
      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 a ServiceResponse is not marked as successful the parent process will be terminated and the results may be presented to the user.
      Parameters:
      subnet - NetworkSubnet information
      opts - additional configuration options
      Returns:
      ServiceResponse
    • validateSubnet

      default ServiceResponse validateSubnet(NetworkSubnet subnet, Network network, Map opts)
      Validates the submitted subnet information. If a ServiceResponse is not marked as successful the validation results will be bubbled up to the user.
      Parameters:
      subnet - NetworkSubnet information
      network - Network to create the NetworkSubnet on
      opts - additional configuration options. Mode value will be 'update' for validations during an update vs creation
      Returns:
      ServiceResponse
    • createSubnet

      ServiceResponse<NetworkSubnet> createSubnet(NetworkSubnet subnet, Network network, Map opts)
      Creates the NetworkSubnet submitted
      Parameters:
      subnet - Network information
      network - Network to create the NetworkSubnet on
      opts - additional configuration options
      Returns:
      ServiceResponse
    • updateSubnet

      ServiceResponse<NetworkSubnet> updateSubnet(NetworkSubnet subnet, Network network, Map opts)
      Updates the NetworkSubnet submitted
      Parameters:
      subnet - NetworkSubnet information
      opts - additional configuration options
      network - Network that this NetworkSubnet is attached to
      Returns:
      ServiceResponse
    • deleteSubnet

      ServiceResponse deleteSubnet(NetworkSubnet subnet, Network network, Map opts)
      Deletes the NetworkSubnet submitted
      Parameters:
      subnet - NetworkSubnet information
      network - 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 a ServiceResponse is not marked as successful the parent process will be terminated and the results may be presented to the user.
      Parameters:
      network - Network information
      networkRoute - NetworkRoute to prepare
      routeConfig - configuration options for the NetworkRoute
      opts - additional configuration options
      Returns:
      ServiceResponse
    • validateNetworkRoute

      default ServiceResponse validateNetworkRoute(Network network, NetworkRoute networkRoute, Map opts)
      Validate the submitted NetworkRoute information. If a ServiceResponse is not marked as successful the validation results will be bubbled up to the user.
      Parameters:
      network - Network information
      networkRoute - NetworkRoute information
      opts - 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 information
      networkRoute - NetworkRoute information
      opts - additional configuration options
      Returns:
      ServiceResponse
    • updateNetworkRoute

      default ServiceResponse<NetworkRoute> updateNetworkRoute(Network network, NetworkRoute networkRoute, Map opts)
      Update the NetworkRoute submitted
      Parameters:
      network - Network information
      networkRoute - NetworkRoute information
      opts - additional configuration options
      Returns:
      ServiceResponse
    • deleteNetworkRoute

      default ServiceResponse deleteNetworkRoute(NetworkRoute networkRoute, Map opts)
      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 a ServiceResponse is not marked as successful the parent process will be terminated and the results may be presented to the user.
      Parameters:
      router - NetworkRouter information
      routerConfig - router configuration options
      opts - additional configuration options
      Returns:
      ServiceResponse
    • validateRouter

      default ServiceResponse validateRouter(NetworkRouter router, Map opts)
      Validate the submitted NetworkRouter information. If a ServiceResponse is not marked as successful the validation results will be bubbled up to the user.
      Parameters:
      router - NetworkRouter information
      opts - additional configuration options. Mode value will be 'update' for validations during an update vs creation
      Returns:
      ServiceResponse
    • createRouter

      default ServiceResponse<NetworkRouter> createRouter(NetworkRouter router, Map opts)
      Create the NetworkRouter submitted
      Parameters:
      router - NetworkRouter information
      opts - additional configuration options
      Returns:
      ServiceResponse
    • updateRouter

      default ServiceResponse<NetworkRouter> updateRouter(NetworkRouter router, Map opts)
      Update the NetworkRouter submitted
      Parameters:
      router - NetworkRouter information
      opts - additional configuration options
      Returns:
      ServiceResponse
    • deleteRouter

      default ServiceResponse deleteRouter(NetworkRouter router, Map opts)
      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 a ServiceResponse is not marked as successful the parent process will be terminated and the results may be presented to the user.
      Parameters:
      router - NetworkRouter information
      route - NetworkRoute to prepare
      routeConfig - configuration options for the NetworkRoute
      opts - additional configuration options
      Returns:
      ServiceResponse
    • validateRouterRoute

      default ServiceResponse validateRouterRoute(NetworkRouter router, NetworkRoute route, Map opts)
      Validate the submitted NetworkRoute information. If a ServiceResponse is not marked as successful the validation results will be bubbled up to the user.
      Parameters:
      router - NetworkRouter information
      route - NetworkRoute information
      opts - 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 information
      route - NetworkRoute information
      opts - additional configuration options
      Returns:
      ServiceResponse
    • updateRouterRoute

      default ServiceResponse<NetworkRoute> updateRouterRoute(NetworkRouter router, NetworkRoute route, Map opts)
      Update the NetworkRoute submitted
      Parameters:
      router - NetworkRouter information
      route - NetworkRoute information
      opts - additional configuration options
      Returns:
      ServiceResponse
    • deleteRouterRoute

      default ServiceResponse deleteRouterRoute(NetworkRouter router, NetworkRoute route, Map opts)
      Delete the NetworkRoute submitted
      Parameters:
      router - NetworkRouter information
      route - NetworkRoute information
      Returns:
      ServiceResponse
    • prepareSecurityGroup

      default ServiceResponse<SecurityGroup> prepareSecurityGroup(SecurityGroup securityGroup, Map opts)
      Prepare the security group before validate, create, and update. If a ServiceResponse is not marked as successful the parent process will be terminated and the results may be presented to the user.
      Parameters:
      securityGroup - SecurityGroup information
      opts - additional configuration options including all form data
      Returns:
      ServiceResponse
    • validateSecurityGroup

      default ServiceResponse validateSecurityGroup(SecurityGroup securityGroup, Map opts)
      Validates the submitted security group information. If a ServiceResponse is not marked as successful the validation results will be bubbled up to the user.
      Parameters:
      securityGroup - SecurityGroup information
      opts - additional configuration options
      Returns:
      ServiceResponse
    • createSecurityGroup

      default ServiceResponse<SecurityGroupLocation> createSecurityGroup(SecurityGroup securityGroup, Map opts)
      Creates a SecurityGroupLocation from the submitted SecurityGroup
      Parameters:
      securityGroup - SecurityGroup object
      opts - 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

      default ServiceResponse<SecurityGroup> updateSecurityGroup(SecurityGroup securityGroup, Map opts)
      Update the security group
      Parameters:
      securityGroup - SecurityGroup object
      opts - additional configuration options
      Returns:
      ServiceResponse
    • deleteSecurityGroup

      default ServiceResponse deleteSecurityGroup(SecurityGroup securityGroup)
      Delete a SecurityGroup
      Parameters:
      securityGroup - SecurityGroup object
      Returns:
      ServiceResponse
    • deleteSecurityGroupLocation

      default ServiceResponse deleteSecurityGroupLocation(SecurityGroupLocation securityGroupLocation)
      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 a ServiceResponse is not marked as successful the parent process will be terminated and the results may be presented to the user.
      Parameters:
      securityGroupRule - SecurityGroupRule object
      opts - additional configuration options including all form data
      Returns:
      ServiceResponse
    • validateSecurityGroupRule

      default ServiceResponse<SecurityGroupRule> validateSecurityGroupRule(SecurityGroupRule securityGroupRule)
      Validate the submitted security group rule object. If a ServiceResponse 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 a SecurityGroupRuleLocation from the submitted SecurityGroupRule
      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 - the SecurityGroupLocation
      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)
      Parameters:
      securityGroupLocation - SecurityGroupLocation object
      rule - SecurityGroupRule to be deleted
      Returns:
      ServiceResponse