PHP Class Scalr_UI_Controller_Admin_Analytics_Pricing

Inheritance: extends Scalr_UI_Controller
Mostrar archivo Open project: scalr/scalr

Public Methods

Method Description
defaultAction ( )
getPlatformPricing ( string $platform, string $cloudLocation, string $url, DateTime $effectiveDate ) : Scalr\Stats\CostAnalytics\Entity\PriceHistoryEntity Gets pricing
getPrice ( Scalr\Stats\CostAnalytics\Entity\PriceHistoryEntity $price ) : array Loads price details
hasAccess ( )
xDeleteAction ( string $platform, string $cloudLocation, string $effectiveDate, string $url = '' ) Removes prices on the future effective date
xGetPlatformEndpointsAction ( string $platform ) xGetPlatformEndpointsAction
xGetPlatformInstanceTypesAction ( string $platform, string $cloudLocation, string $envId = null, string $effectiveDate = null ) xGetPlatformInstanceTypesAction
xGetPlatformLocationsAction ( string $platform, string $url = '', string $envId = null ) xGetPlatformLocationsAction
xGetPlatformPricingAction ( string $platform, string $cloudLocation, string $url = '', string $effectiveDate = null ) xGetPlatformPricingAction
xGetPlatformPricingHistoryAction ( string $platform, string $cloudLocation, string $url = '' ) xGetPlatformPricingHistoryAction
xSavePriceAction ( string $platform, string $cloudLocation, JsonData $prices, string $url = '', string $effectiveDate = null, boolean $forbidAutomaticUpdate = false ) xSavePriceAction

Private Methods

Method Description
getEnvIdByPlatform ( string $platform ) : integer Gets envId for Ec2 or GCE platform module
getTypesWithPrices ( string $cloudLocation, string $url, Scalr\Modules\PlatformModuleInterface $pm, string $platformName, DateTime $effectiveDate = null, Scalr_Environment $env = null ) : array Gets instance types with its prices
handleEffectiveDate ( string $effectiveDate ) : array Handles effective date

Method Details

defaultAction() public method

public defaultAction ( )

getPlatformPricing() public method

Gets pricing
public getPlatformPricing ( string $platform, string $cloudLocation, string $url, DateTime $effectiveDate ) : Scalr\Stats\CostAnalytics\Entity\PriceHistoryEntity
$platform string The cloud platform
$cloudLocation string The cloud location
$url string The cloud endpoint url
$effectiveDate DateTime The date on wich prices should be applied
return Scalr\Stats\CostAnalytics\Entity\PriceHistoryEntity

getPrice() public method

Loads price details
public getPrice ( Scalr\Stats\CostAnalytics\Entity\PriceHistoryEntity $price ) : array
$price Scalr\Stats\CostAnalytics\Entity\PriceHistoryEntity Existing price history entity
return array Returns list of the prices

hasAccess() public method

public hasAccess ( )

xDeleteAction() public method

Removes prices on the future effective date
public xDeleteAction ( string $platform, string $cloudLocation, string $effectiveDate, string $url = '' )
$platform string
$cloudLocation string
$effectiveDate string The date when the prices will be applied
$url string optional

xGetPlatformEndpointsAction() public method

xGetPlatformEndpointsAction
public xGetPlatformEndpointsAction ( string $platform )
$platform string The cloud platform

xGetPlatformInstanceTypesAction() public method

xGetPlatformInstanceTypesAction
public xGetPlatformInstanceTypesAction ( string $platform, string $cloudLocation, string $envId = null, string $effectiveDate = null )
$platform string The name of the cloud platform
$cloudLocation string The cloud location
$envId string optional The identifier of the environment
$effectiveDate string optional The date on which prices should be applied YYYY-MM-DD

xGetPlatformLocationsAction() public method

xGetPlatformLocationsAction
public xGetPlatformLocationsAction ( string $platform, string $url = '', string $envId = null )
$platform string Platform name
$url string optional The endpoint url
$envId string optional The identifier of the environment

xGetPlatformPricingAction() public method

xGetPlatformPricingAction
public xGetPlatformPricingAction ( string $platform, string $cloudLocation, string $url = '', string $effectiveDate = null )
$platform string The cloud platform
$cloudLocation string The cloud location
$url string optional The cloud's endpoint url
$effectiveDate string optional The date on which prises should be applied

xGetPlatformPricingHistoryAction() public method

xGetPlatformPricingHistoryAction
public xGetPlatformPricingHistoryAction ( string $platform, string $cloudLocation, string $url = '' )
$platform string The cloud platform
$cloudLocation string The cloud location
$url string optional The cloud's endpoint url

xSavePriceAction() public method

xSavePriceAction
public xSavePriceAction ( string $platform, string $cloudLocation, JsonData $prices, string $url = '', string $effectiveDate = null, boolean $forbidAutomaticUpdate = false )
$platform string The cloud platform
$cloudLocation string The cloud location
$prices Scalr\UI\Request\JsonData Price list
$url string optional The url of the cloud
$effectiveDate string optional The date when the prices will be applied
$forbidAutomaticUpdate boolean optional