@Test public void testGetRdsHourRate() throws Exception { System.out.println("getRdsHourRate"); getRdsHourRate("eu-west-1", "mysql", "db.t1.micro", false); getRdsHourRate("eu-west-1", "mysql", "db.t1.micro", true); getRdsHourRate("eu-west-1", "mysql", "db.m1.small", false); getRdsHourRate("eu-west-1", "mysql", "db.m1.small", true); getRdsHourRate("eu-west-1", "mysql", "db.m1.medium", false); getRdsHourRate("eu-west-1", "mysql", "db.m1.medium", true); getRdsHourRate("eu-west-1", "mysql", "db.m1.large", false); getRdsHourRate("eu-west-1", "mysql", "db.m1.large", true); getRdsHourRate("eu-west-1", "mysql", "db.m1.xlarge", false); getRdsHourRate("eu-west-1", "mysql", "db.m1.xlarge", true); getRdsHourRate("eu-west-1", "mysql", "db.m2.xlarge", false); getRdsHourRate("eu-west-1", "mysql", "db.m2.xlarge", true); getRdsHourRate("eu-west-1", "mysql", "db.m2.2xlarge", false); getRdsHourRate("eu-west-1", "mysql", "db.m2.2xlarge", true); getRdsHourRate("eu-west-1", "mysql", "db.m2.4xlarge", false); getRdsHourRate("eu-west-1", "mysql", "db.m2.4xlarge", true); }
public Price getRdsHourRate(String regionName, String dbEngine, String instanceTypeClass, boolean multiAz) throws IOException { if (dbEngine.equals("mysql")) { getMysqlPrices(); Map<String, Object> region; if (multiAz) { region = getRegion(regionName, mysqlMultiAz); } else { region = getRegion(regionName, mysqlStandard); } if (region != null) { Map<String, Object> size = getRdsInstanceSize(region, instanceTypeClass); if (size != null){ Map<String,String> prices = (Map<String,String>) size.get("prices"); String price = prices.get("USD"); return Price.createUsdHourly(new BigDecimal(price)); } } } return null; }
RdsPriceList extends AbstractPriceList { public Price getRdsHourRate(String regionName, String dbEngine, String instanceTypeClass, boolean multiAz) throws IOException { if (dbEngine.equals("mysql")) { getMysqlPrices(); Map<String, Object> region; if (multiAz) { region = getRegion(regionName, mysqlMultiAz); } else { region = getRegion(regionName, mysqlStandard); } if (region != null) { Map<String, Object> size = getRdsInstanceSize(region, instanceTypeClass); if (size != null){ Map<String,String> prices = (Map<String,String>) size.get("prices"); String price = prices.get("USD"); return Price.createUsdHourly(new BigDecimal(price)); } } } return null; } }
RdsPriceList extends AbstractPriceList { public Price getRdsHourRate(String regionName, String dbEngine, String instanceTypeClass, boolean multiAz) throws IOException { if (dbEngine.equals("mysql")) { getMysqlPrices(); Map<String, Object> region; if (multiAz) { region = getRegion(regionName, mysqlMultiAz); } else { region = getRegion(regionName, mysqlStandard); } if (region != null) { Map<String, Object> size = getRdsInstanceSize(region, instanceTypeClass); if (size != null){ Map<String,String> prices = (Map<String,String>) size.get("prices"); String price = prices.get("USD"); return Price.createUsdHourly(new BigDecimal(price)); } } } return null; } RdsPriceList(); }
RdsPriceList extends AbstractPriceList { public Price getRdsHourRate(String regionName, String dbEngine, String instanceTypeClass, boolean multiAz) throws IOException { if (dbEngine.equals("mysql")) { getMysqlPrices(); Map<String, Object> region; if (multiAz) { region = getRegion(regionName, mysqlMultiAz); } else { region = getRegion(regionName, mysqlStandard); } if (region != null) { Map<String, Object> size = getRdsInstanceSize(region, instanceTypeClass); if (size != null){ Map<String,String> prices = (Map<String,String>) size.get("prices"); String price = prices.get("USD"); return Price.createUsdHourly(new BigDecimal(price)); } } } return null; } RdsPriceList(); Price getRdsHourRate(String regionName, String dbEngine, String instanceTypeClass, boolean multiAz); }
RdsPriceList extends AbstractPriceList { public Price getRdsHourRate(String regionName, String dbEngine, String instanceTypeClass, boolean multiAz) throws IOException { if (dbEngine.equals("mysql")) { getMysqlPrices(); Map<String, Object> region; if (multiAz) { region = getRegion(regionName, mysqlMultiAz); } else { region = getRegion(regionName, mysqlStandard); } if (region != null) { Map<String, Object> size = getRdsInstanceSize(region, instanceTypeClass); if (size != null){ Map<String,String> prices = (Map<String,String>) size.get("prices"); String price = prices.get("USD"); return Price.createUsdHourly(new BigDecimal(price)); } } } return null; } RdsPriceList(); Price getRdsHourRate(String regionName, String dbEngine, String instanceTypeClass, boolean multiAz);  }