/** * @deprecated since 0.10.0; use {@link #getFilteredLocationProperties(String, String, Map, Map)} */ @Deprecated protected Map<String, Object> getFilteredLocationProperties(String provider, String namedLocation, Map<String, ?> globalProperties) { return new LocationPropertiesFromBrooklynProperties().getLocationProperties(getPrefix(), namedLocation, globalProperties); }
@BeforeMethod(alwaysRun=true) public void setUp() throws Exception { parser = new LocationPropertiesFromBrooklynProperties(); }
@Override protected Map<String, Object> getFilteredLocationProperties(String provider, String namedLocation, Map<String, ?> prioritisedProperties, Map<String, ?> globalProperties) { Map<String, Object> dockerConf = new LocationPropertiesFromBrooklynProperties().getLocationProperties(getPrefix(), namedLocation, globalProperties); Object providerInConf = dockerConf.get("provider"); if (providerInConf != null && !provider.equals(providerInConf)) { throw new IllegalArgumentException(provider + " location configured with provider '" + providerInConf + "', but must be blank or '" + provider + "'"); } String providerOrApi = "docker"; String regionName = (String) prioritisedProperties.get("region"); Map<String, Object> jcloudsConf = new JcloudsPropertiesFromBrooklynProperties().getJcloudsProperties(providerOrApi, regionName, namedLocation, globalProperties); return MutableMap.<String, Object>builder() .putAll(jcloudsConf) .putAll(dockerConf) .put("provider", providerOrApi) .build(); } }
Map<String, Object> filteredProperties = new LocationPropertiesFromBrooklynProperties().getLocationProperties(null, namedLocation, globalProperties); ConfigBag flags = ConfigBag.newInstance(locationFlags).putIfAbsent(filteredProperties); flags.remove(LocationInternal.NAMED_SPEC_NAME);
Map<String, Object> filteredProperties = new LocationPropertiesFromBrooklynProperties().getLocationProperties(null, namedLocation, (Map)globalProperties); MutableMap<Object, Object> flags = MutableMap.<Object, Object>builder() .putAll(filteredProperties)