Package com.morpheusdata.core.providers
Interface CloudCostingProvider
- All Superinterfaces:
PluginProvider
,UIExtensionProvider
- All Known Implementing Classes:
AbstractCloudCostingProvider
Morpheus provides a way to generate monthly invoices based on resources in a
Cloud
. For most On-Prem clouds
this is handled automatically as the Morpheus Usage/Metering engine automatically tracks usage and applies Standard
Costing invoices based on the price tables imported. However, when dealing with external public clouds, the source
of usage truth is the cloud and not Morpheus. Therefore, to provide accurate costing data for the end user, that data
needs imported from the third party cloud. Amazon, for example creates a CUR report file in S3. Azure provides thirteen
million different APIs depending on your account type.- Since:
- 0.15.3
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
refreshDailyZoneCosting
(Cloud cloud, Date costDate, CloudCostingProvider.CloudRefreshOptions opts) The primary method that needs implemented for syncing in pricing data.default HTMLResponse
renderTemplate
(Cloud cloud) The render method for rendering Costing Summary information on the Costing section.default Boolean
Provide logic when costing cloud summary should be displayed.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
-
refreshDailyZoneCosting
void refreshDailyZoneCosting(Cloud cloud, Date costDate, CloudCostingProvider.CloudRefreshOptions opts) The primary method that needs implemented for syncing in pricing data. This is called nightly by Morpheus to update costing data.- Parameters:
cloud
- the current cloud object with costing data we will be refreshingcostDate
- the current costing date of the run. This is important if regenerating data from a previous billing periodopts
- Any custom refresh options that may be passed by the manual refresh trigger
-
renderTemplate
The render method for rendering Costing Summary information on the Costing section. By default there is already some generalized costing data shown and this is an optional snippet that can be added.- Parameters:
cloud
- details of the current cloud- Returns:
- result of rendering a template
-
show
Provide logic when costing cloud summary should be displayed. This logic is checked after permissions are validated.- Parameters:
cloud
- Cloud detailsuser
- current User detailsaccount
- Account details- Returns:
- whether the tab should be displayed
-