Interface CloudProvider
- All Superinterfaces:
 PluginProvider
- All Known Subinterfaces:
 CloudProvider
ProvisionProvider is also available.
 There are a few concepts to be aware of when making a cloud plugin. Firstly, there are 2 main required providers
 when developing one. The CloudProvider and the ProvisionProvider. A cloud provider is responsible for defining
 all the cloud connectivity information, metadata, and for syncing all the relevant objects needed to facilitate both discovery
 and provisioning of a compute workload.
A ProvisionProvider registers various provision types within the cloud. For example, with AWS there is one for
 EC2 Virtual Machines, another for RDS Database Service deployment, and even a CloudFormation provider for deploying arbitrary
 cloud-native services.
More advanced clouds may need additional providers to provide full functionality or service offerings. AWS is probably the most
 feature rich of all the plugins. You may need a HostProvider for custom Cluster Types, or a NetworkProvider
 for creating/managing Software-defined Networks/Subnets. 
- Since:
 - 0.15.2
 
- 
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAdds support to aCloudProviderfor managing Affinity and anti-affinity groups.Nested classes/interfaces inherited from interface com.morpheusdata.core.providers.PluginProvider
PluginProvider.EventSubscriberFacet<E extends Event> - 
Method Summary
Modifier and TypeMethodDescriptiondefault BooleanSpecifies whether the current cloud allows the user to create custom pools such as VPCs in AWS or Clusters in Vmwaredefault BooleanSpecifies whether the current cloud allows the user to create new datastoresdefault BooleanSpecifies whether the current cloud allows the user to create new networksdefault BooleanSpecifies whether the current cloud allows the user to delete custom pools such as VPCs in AWS or Clusters in Vmwaredefault ServiceResponse<CloudPool>createCloudPool(Cloud cloud, CloudPool cloudPool) deleteCloud(Cloud cloudInfo) Called when a Cloud From Morpheus is removed.deleteServer(ComputeServer computeServer) Called when a server should be deleted from the Cloud.default Collection<Datastore>filterDatastores(Cloud cloud, Collection<Datastore> datastores, Collection<CloudPool> resourcePools) Support for additional datastore filtering during provisioningdefault Collection<Network>filterNetworks(Cloud cloud, Collection<Network> networks, CloudPool cloudPool) Support for additional network filtering during provisioningdefault Collection<ServicePlan>filterServicePlans(Cloud cloud, Collection<ServicePlan> servicePlans, FilterServicePlansCriteria criteria) Support for additional service plan filtering during provisioningGrabs available backup providers related to the target Cloud Plugin.default Collection<ProvisionProvider>Deprecated.Grabs available provisioning providers related to the target Cloud Plugin.Returns the circular Cloud logo for display when a user needs to view or add this cloud.default CloudCostingProviderReturns the Costing Provider to be used for costing services.Grabs allComputeServerTypeobjects that this CloudProvider can represent during a sync or during a provision.default StringReturns the default network code for fetching aNetworkProviderfor this cloud.default StringReturns the default provision code for fetching aProvisionProviderfor this cloud.Grabs the description for the CloudProviderdefault IacResourceMappingProviderIf the cloud supports IaC based provisioning, return the mapping provider here and implement theProvisionProvider.IacResourceFacetin your ProvisionProvidergetIcon()Returns the Cloud logo for display when a user needs to view or add this cloud.Provides a Collection ofNetworkTyperelated to this CloudProviderProvides a Collection of OptionType inputs that define the required input fields for defining a cloud integrationdefault ProvisionProvidergetProvisioningProvider(String providerCode) Deprecated.replaced by {getProvisionProvider(String)}getProvisionProvider(String providerCode) Grabs the singleton instance of the provisioning provider based on the code defined in its implementation.Provides a Collection ofStorageControllerTyperelated to this CloudProviderProvides a Collection ofStorageVolumeTyperelated to this CloudProviderProvides a Collection ofNetworkSubnetTyperelated to this CloudProviderdefault Collection<String>A list of supported NetworkProviders that can be used for networking services on this cloudReturns whether a cloud supports bare metal VMsIndicates if the cloud supports cloud-init.Returns whether the cloud supportsComputeZonePoolReturns whether a cloud supportsDatastoreReturns whether a cloud supportsComputeZoneFolderReturns whether a cloud supportsNetworkinitializeCloud(Cloud cloudInfo) Called when a Cloud From Morpheus is first saved.default BooleanReturns whether the cloud requires a resource pool to be selected for provisioningZones/Clouds are refreshed periodically by the Morpheus Environment.voidrefreshDaily(Cloud cloudInfo) Zones/Clouds are refreshed periodically by the Morpheus Environment.default voidZones/Clouds sometimes need to have a daily sync for all instances of the same type on a daily basis.default ServiceResponse<CloudPool>removeCloudPool(Cloud cloud, CloudPool cloudPool) startServer(ComputeServer computeServer) Called when a server should be started.stopServer(ComputeServer computeServer) Called when a server should be stopped.Indicates if the cloud supports the distributed worker functionalitydefault ServiceResponse<CloudPool>updateCloudPool(Cloud cloud, CloudPool cloudPool) validate(Cloud cloudInfo, ValidateCloudRequest validateCloudRequest) Validates the submitted cloud information to make sure it is functioning correctly.Methods inherited from interface com.morpheusdata.core.providers.PluginProvider
getCode, getMorpheus, getName, getPlugin, isPlugin 
- 
Method Details
- 
getDescription
String getDescription()Grabs the description for the CloudProvider- Returns:
 - String
 
 - 
getIcon
Icon getIcon()Returns the Cloud logo for display when a user needs to view or add this cloud. SVGs are preferred.- Returns:
 - Icon representation of assets stored in the src/assets of the project.
 - Since:
 - 0.13.0
 
 - 
getCircularIcon
Icon getCircularIcon()Returns the circular Cloud logo for display when a user needs to view or add this cloud. SVGs are preferred.- Returns:
 - Icon
 - Since:
 - 0.13.6
 
 - 
getOptionTypes
Collection<OptionType> getOptionTypes()Provides a Collection of OptionType inputs that define the required input fields for defining a cloud integration- Returns:
 - Collection of OptionType
 
 - 
getComputeServerTypes
Collection<ComputeServerType> getComputeServerTypes()Grabs allComputeServerTypeobjects that this CloudProvider can represent during a sync or during a provision.- Returns:
 - collection of ComputeServerType
 
 - 
getAvailableProvisioningProviders
Deprecated.replaced by {getAvailableProvisionProviders()}Grabs available provisioning providers related to the target Cloud Plugin. Some clouds have multiple provisioning providers or some clouds allow for service based providers on top like (Docker or Kubernetes).- Returns:
 - Collection of ProvisionProvider
 
 - 
getAvailableProvisionProviders
Collection<ProvisionProvider> getAvailableProvisionProviders()Grabs available provisioning providers related to the target Cloud Plugin. Some clouds have multiple provisioning providers or some clouds allow for service based providers on top like (Docker or Kubernetes).- Returns:
 - Collection of ProvisionProvider
 
 - 
getAvailableBackupProviders
Collection<BackupProvider> getAvailableBackupProviders()Grabs available backup providers related to the target Cloud Plugin.- Returns:
 - Collection of BackupProvider
 
 - 
getProvisioningProvider
Deprecated.replaced by {getProvisionProvider(String)}Grabs the singleton instance of the provisioning provider based on the code defined in its implementation. Typically Providers are singleton and instanced in thePluginclass- Parameters:
 providerCode- String representation of the provider short code- Returns:
 - the ProvisionProvider requested
 
 - 
getProvisionProvider
Grabs the singleton instance of the provisioning provider based on the code defined in its implementation. Typically Providers are singleton and instanced in thePluginclass- Parameters:
 providerCode- String representation of the provider short code- Returns:
 - the ProvisionProvider requested
 
 - 
getNetworkTypes
Collection<NetworkType> getNetworkTypes()Provides a Collection ofNetworkTyperelated to this CloudProvider- Returns:
 - Collection of NetworkType
 
 - 
getSupportedNetworkProviderCodes
A list of supported NetworkProviders that can be used for networking services on this cloud- Returns:
 - a list of codes for network providers from either this plugin or other plugins.
 
 - 
getSubnetTypes
Collection<NetworkSubnetType> getSubnetTypes()Provides a Collection ofNetworkSubnetTyperelated to this CloudProvider- Returns:
 - Collection of NetworkSubnetType
 
 - 
getStorageVolumeTypes
Collection<StorageVolumeType> getStorageVolumeTypes()Provides a Collection ofStorageVolumeTyperelated to this CloudProvider- Returns:
 - Collection of StorageVolumeType
 
 - 
getStorageControllerTypes
Collection<StorageControllerType> getStorageControllerTypes()Provides a Collection ofStorageControllerTyperelated to this CloudProvider- Returns:
 - Collection of StorageControllerType
 
 - 
validate
Validates the submitted cloud information to make sure it is functioning correctly. If aServiceResponseis not marked as successful then the validation results will be bubbled up to the user.- Parameters:
 cloudInfo- cloudvalidateCloudRequest- Additional validation information- Returns:
 - ServiceResponse
 
 - 
initializeCloud
Called when a Cloud From Morpheus is first saved. This is a hook provided to take care of initial state assignment that may need to take place.- Parameters:
 cloudInfo- instance of the cloud object that is being initialized.- Returns:
 - ServiceResponse
 
 - 
refresh
Zones/Clouds are refreshed periodically by the Morpheus Environment. This includes things like caching of brownfield environments and resources such as Networks, Datastores, Resource Pools, etc.- Parameters:
 cloudInfo- cloud- Returns:
 - ServiceResponse. If ServiceResponse.success == true, then Cloud status will be set to Cloud.Status.ok. If ServiceResponse.success == false, the Cloud status will be set to ServiceResponse.data['status'] or Cloud.Status.error if not specified. So, to indicate that the Cloud is offline, return `ServiceResponse.error('cloud is not reachable', null, [status: Cloud.Status.offline])`
 
 - 
refreshDaily
Zones/Clouds are refreshed periodically by the Morpheus Environment. This includes things like caching of brownfield environments and resources such as Networks, Datastores, Resource Pools, etc. This represents the long term sync method that happens daily instead of every 5-10 minute cycle- Parameters:
 cloudInfo- cloud
 - 
refreshDailyCloudType
default void refreshDailyCloudType()Zones/Clouds sometimes need to have a daily sync for all instances of the same type on a daily basis. An example may be to refresh common pricing data that is standard regardless of the cloud account. Rather than doing this once per cloud, it may be better to perform it for all the clouds at once. - 
deleteCloud
Called when a Cloud From Morpheus is removed. This is a hook provided to take care of cleaning up any state.- Parameters:
 cloudInfo- instance of the cloud object that is being removed.- Returns:
 - ServiceResponse
 
 - 
hasComputeZonePools
Boolean hasComputeZonePools()Returns whether the cloud supportsComputeZonePool- Returns:
 - Boolean
 
 - 
provisionRequiresResourcePool
Returns whether the cloud requires a resource pool to be selected for provisioning- Returns:
 - Boolean
 
 - 
hasNetworks
Boolean hasNetworks()Returns whether a cloud supportsNetwork- Returns:
 - Boolean
 
 - 
hasFolders
Boolean hasFolders()Returns whether a cloud supportsComputeZoneFolder- Returns:
 - Boolean
 
 - 
hasDatastores
Boolean hasDatastores()Returns whether a cloud supportsDatastore- Returns:
 - Boolean
 
 - 
hasBareMetal
Boolean hasBareMetal()Returns whether a cloud supports bare metal VMs- Returns:
 - Boolean
 
 - 
startServer
Called when a server should be started. Returning a response of success will cause corresponding updates to usage records, result in the powerState of the computeServer to be set to 'on', and related instances set to 'running'- Parameters:
 computeServer- server to start- Returns:
 - ServiceResponse
 
 - 
stopServer
Called when a server should be stopped. Returning a response of success will cause corresponding updates to usage records, result in the powerState of the computeServer to be set to 'off', and related instances set to 'stopped'- Parameters:
 computeServer- server to stop- Returns:
 - ServiceResponse
 
 - 
deleteServer
Called when a server should be deleted from the Cloud.- Parameters:
 computeServer- server to delete- Returns:
 - ServiceResponse
 
 - 
hasCloudInit
Boolean hasCloudInit()Indicates if the cloud supports cloud-init. Returning true will allow configuration of the Cloud to allow installing the agent remotely via SSH /WinRM or via Cloud Init- Returns:
 - Boolean
 
 - 
supportsDistributedWorker
Boolean supportsDistributedWorker()Indicates if the cloud supports the distributed worker functionality- Returns:
 - Boolean
 
 - 
canCreateCloudPools
Specifies whether the current cloud allows the user to create custom pools such as VPCs in AWS or Clusters in Vmware- Returns:
 - Boolean
 
 - 
canDeleteCloudPools
Specifies whether the current cloud allows the user to delete custom pools such as VPCs in AWS or Clusters in Vmware- Returns:
 - Boolean
 
 - 
canCreateNetworks
Specifies whether the current cloud allows the user to create new networks- Returns:
 - Boolean
 - Since:
 - 0.15.12
 
 - 
canCreateDatastores
Specifies whether the current cloud allows the user to create new datastores- Returns:
 - Boolean
 - Since:
 - 1.2.6
 
 - 
getDefaultProvisionTypeCode
Returns the default provision code for fetching aProvisionProviderfor this cloud. This is only really necessary if the provision type code is the exact same as the cloud code.- Returns:
 - the provision provider code
 
 - 
getDefaultNetworkServerTypeCode
Returns the default network code for fetching aNetworkProviderfor this cloud. This is only really necessary if the network type code is the exact same as the cloud code.- Returns:
 - the network provider code
 
 - 
createCloudPool
 - 
updateCloudPool
 - 
removeCloudPool
 - 
getCloudCostingProvider
Returns the Costing Provider to be used for costing services. If this is not specified a StandardCostingService is utilized based on pricing and Morpheus metering data. This is often used for public clouds such as Amazon or Azure.- Returns:
 - an instance of a cloud specific CostingProvider.
 
 - 
getIacResourceMappingProvider
If the cloud supports IaC based provisioning, return the mapping provider here and implement theProvisionProvider.IacResourceFacetin your ProvisionProvider- Returns:
 - an instance of a cloud specific IacResourceMappingProvider.
 - Since:
 - 0.15.10
 
 - 
filterNetworks
default Collection<Network> filterNetworks(Cloud cloud, Collection<Network> networks, CloudPool cloudPool) Support for additional network filtering during provisioning- Returns:
 - Collection of 
Network - Since:
 - 0.15.13
 
 - 
filterDatastores
default Collection<Datastore> filterDatastores(Cloud cloud, Collection<Datastore> datastores, Collection<CloudPool> resourcePools) Support for additional datastore filtering during provisioning- Returns:
 - Collection of 
Datastore. - Since:
 - 0.15.13
 
 - 
filterServicePlans
default Collection<ServicePlan> filterServicePlans(Cloud cloud, Collection<ServicePlan> servicePlans, FilterServicePlansCriteria criteria) Support for additional service plan filtering during provisioning- Parameters:
 cloud- The cloud that we're provisioning an instance onservicePlans- The set of available service planscriteria- The criteria for filtering the service plans- Returns:
 - the filtered service plans
 - Since:
 - 1.2.6
 
 
 - 
 
getAvailableProvisionProviders()}