Skip to content

Commit

Permalink
Merge pull request #626 from claymccoy/handleInstancePriceFormatChange
Browse files Browse the repository at this point in the history
Handle instance price format change
  • Loading branch information
claymccoy committed Dec 4, 2014
2 parents e1b8e71 + 0297370 commit 5fe7a94
Show file tree
Hide file tree
Showing 4 changed files with 3,579 additions and 2,628 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class InstanceTypeService implements CacheInitializer {
if (hardwareProfile) {
InstanceTypeData instanceTypeData = new InstanceTypeData(
hardwareProfile: hardwareProfile,
linuxOnDemandPrice: onDemandPrices.get(instanceType, InstanceProductType.LINUX_UNIX),
linuxOnDemandPrice: onDemandPrices?.get(instanceType, InstanceProductType.LINUX_UNIX),
)
namesToInstanceTypeDatas[name] = instanceTypeData
} else {
Expand Down Expand Up @@ -263,7 +263,7 @@ class InstanceTypeService implements CacheInitializer {
JSONElement config = pricingJson.config
JSONArray regionJsonArray = config.regions
for (JSONElement regionJsonObject in regionJsonArray) {
Region region = Region.withPricingJsonCode(regionJsonObject.region)
Region region = Region.withCode(regionJsonObject.region)
List<InstanceType> instanceTypes = InstanceType.values() as List
List<InstanceProductType> products = InstanceProductType.values() as List
Table<InstanceType, InstanceProductType, BigDecimal> pricesByHardwareAndProduct =
Expand Down
Loading

0 comments on commit 5fe7a94

Please sign in to comment.