mirror of https://github.com/apache/jclouds.git
Fixes the metadata to specify Ubuntu by default.
This commit is contained in:
parent
bdfd1facb9
commit
99d0fcaaad
|
@ -16,6 +16,7 @@
|
|||
*/
|
||||
package org.jclouds.rackspace.cloudservers.uk;
|
||||
|
||||
import static org.jclouds.compute.config.ComputeServiceProperties.TEMPLATE;
|
||||
import static org.jclouds.location.reference.LocationConstants.ISO3166_CODES;
|
||||
import static org.jclouds.location.reference.LocationConstants.PROPERTY_REGION;
|
||||
import static org.jclouds.location.reference.LocationConstants.PROPERTY_REGIONS;
|
||||
|
@ -67,6 +68,7 @@ public class CloudServersUKProviderMetadata extends BaseProviderMetadata {
|
|||
properties.setProperty(CREDENTIAL_TYPE, CloudIdentityCredentialTypes.API_KEY_CREDENTIALS);
|
||||
properties.setProperty(PROPERTY_REGIONS, "LON");
|
||||
properties.setProperty(PROPERTY_REGION + ".LON." + ISO3166_CODES, "GB-SLG");
|
||||
properties.setProperty(TEMPLATE, "imageNameMatches=.*Ubuntu 14\\.10.*");
|
||||
return properties;
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ import static org.jclouds.location.reference.LocationConstants.ISO3166_CODES;
|
|||
import static org.jclouds.location.reference.LocationConstants.PROPERTY_REGION;
|
||||
import static org.jclouds.location.reference.LocationConstants.PROPERTY_REGIONS;
|
||||
import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.CREDENTIAL_TYPE;
|
||||
import static org.jclouds.compute.config.ComputeServiceProperties.TEMPLATE;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.Properties;
|
||||
|
@ -71,6 +72,7 @@ public class CloudServersUSProviderMetadata extends BaseProviderMetadata {
|
|||
properties.setProperty(PROPERTY_REGION + ".IAD." + ISO3166_CODES, "US-VA");
|
||||
properties.setProperty(PROPERTY_REGION + ".SYD." + ISO3166_CODES, "AU-NSW");
|
||||
properties.setProperty(PROPERTY_REGION + ".HKG." + ISO3166_CODES, "HK");
|
||||
properties.setProperty(TEMPLATE, "imageNameMatches=.*Ubuntu 14\\.10.*");
|
||||
return properties;
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ public class CloudServersUSTemplateBuilderLiveTest extends BaseTemplateBuilderLi
|
|||
|
||||
@Test
|
||||
public void testTemplateBuilder() {
|
||||
Template defaultTemplate = this.view.getComputeService().templateBuilder().imageNameMatches(".*Ubuntu 14\\.10.*").build();
|
||||
Template defaultTemplate = this.view.getComputeService().templateBuilder().build();
|
||||
assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true);
|
||||
assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "14.10");
|
||||
assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU);
|
||||
|
|
Loading…
Reference in New Issue