Skip to content

Commit

Permalink
Lint i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
fdaugan committed Mar 3, 2024
1 parent 06b2af4 commit ca4a200
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ Provides the following features :
- Prices are indirectly read from Outscale console.
- Supported services : Compute, Storage and database

# Susbcription parameters
# Subscription parameters
* (none for now)
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,8 @@ public void install(final boolean force) throws IOException, URISyntaxException

// Support
nextStep(context, "install-support");
csvForBean.toBean(ProvSupportType.class, PREFIX + "/prov-support-type.csv").forEach(t -> {
installSupportType(context, t.getCode(), t);
});
csvForBean.toBean(ProvSupportPrice.class, PREFIX + "/prov-support-price.csv").forEach(t -> {
installSupportPrice(context, t.getCode(), t);
});
csvForBean.toBean(ProvSupportType.class, PREFIX + "/prov-support-type.csv").forEach(t -> installSupportType(context, t.getCode(), t));
csvForBean.toBean(ProvSupportPrice.class, PREFIX + "/prov-support-price.csv").forEach(t -> installSupportPrice(context, t.getCode(), t));
}

/**
Expand Down Expand Up @@ -317,7 +313,7 @@ private ProvStorageType installStorageType(final UpdateContext context, final St
});

return copyAsNeeded(context, type, t -> {
t.setName(code /* human readable name */);
t.setName(code /* human-readable name */);
t.setIncrement(null);
t.setAvailability(99d);
t.setMaximal(14901d);
Expand Down Expand Up @@ -488,7 +484,7 @@ private void installStoragePrices(final UpdateContext context, final CsvPrice pr
final var typeParts = price.getCode().split("_");
final var last = typeParts[typeParts.length - 1];
final var service = price.getService().toLowerCase();
List.of(last, service + "-" + last, service + "-" + last.replace("std", "standard")).stream()
Stream.of(last, service + "-" + last, service + "-" + last.replace("std", "standard"))
.map(context.getStorageTypes()::get).filter(Objects::nonNull).findFirst()
.ifPresent(type -> installStoragePrice(context, region.getName(), type, costGb));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,39 +17,35 @@
* A defined term.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@Getter
public class Term {

/**
* Hourly, monthly, ...
*/
@Getter
@Setter
private BillingPeriod billingPeriod;

/**
* Period in month.
*/
@Getter
@Setter
private int period;

/**
* 1 minus Discount rate
*/
@Getter
@Setter
private double rate;

/**
* Resolved price term entity
*/
@Getter
@Setter
private ProvInstancePriceTerm entity;

/**
* Rates table to convert a cost associated to a given {@link BillingPeriod} to this term exprimed in month.
* Rates table to convert a cost associated to a given {@link BillingPeriod} to this term expressed in month.
*/
@Getter
private Map<BillingPeriod, Double> converters = new EnumMap<>(BillingPeriod.class);
private final Map<BillingPeriod, Double> converters = new EnumMap<>(BillingPeriod.class);
}

0 comments on commit ca4a200

Please sign in to comment.