lib/cloudcost/azure.rb
# We will collect all us locations but when building the price
# in the azure_build_price_file.rb script we will only get
# eastus data.
#Locations = {
# "eastus"         => "US East",
# "westus"         => "US West",
# "centralus"      => "US Central",
# "eastus2"        => "US East 2",
# "westus2"        => "US West 2",
# "northcentralus" => "US North Central",
# "southcentralus" => "US South Central",
# "westcentralus"  => "US West Central",
# }
We will collect all us locations but when building the price
in the azure_build_price_file.rb script we will only get
eastus data.
We will collect all us locations but when building the price in the azure_build_price_file . rb script we will only get eastus data .
def fetch_azure_data_from_web(service, location)
        Log.info("Request Azure '#{service}' pricing data for location '#{location}'.")
        uri = URI('https://prices.azure.com/api/retail/prices')
        params = { "$filter": "serviceName eq '#{service}' and armRegionName eq '#{location}'" }
        uri.query = URI.encode_www_form(params)
        data = get_pricing_pages(uri)
        return data
    end
def fetch_azure_data_from_web ( service , location ) Log . info ( "Request Azure '#{service}' pricing data for location '#{location}'." ) uri = URI ( 'https://prices.azure.com/api/retail/prices' ) params = { "$filter" : "serviceName eq '#{service}' and armRegionName eq '#{location}'" } uri . query = URI . encode_www_form ( params ) data = get_pricing_pages ( uri ) return data end
We will collect all us locations but when building the price
in the azure_build_price_file.rb script we will only get
eastus data.
We will collect all us locations but when building the price in the azure_build_price_file . rb script we will only get eastus data .
service
location