Updated Branches: refs/heads/1.6.x f8c115b39 -> 7cac0ef1a
http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/7cac0ef1/jclouds-representations/representations-core/src/main/java/org/jclouds/representations/ProviderMetadata.java ---------------------------------------------------------------------- diff --git a/jclouds-representations/representations-core/src/main/java/org/jclouds/representations/ProviderMetadata.java b/jclouds-representations/representations-core/src/main/java/org/jclouds/representations/ProviderMetadata.java new file mode 100644 index 0000000..ab18fff --- /dev/null +++ b/jclouds-representations/representations-core/src/main/java/org/jclouds/representations/ProviderMetadata.java @@ -0,0 +1,262 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jclouds.representations; + +import com.google.common.base.Objects; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Maps; + +import java.io.Serializable; +import java.net.URI; +import java.util.Map; +import java.util.Properties; +import java.util.Set; + +public class ProviderMetadata implements Serializable { + + private static final long serialVersionUID = -8444359103759144528L; + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String id; + private String name; + private String endpointName; + private String identityName; + private String credentialName; + private Set<String> defaultModules = ImmutableSet.of(); + private String documentation; + private Set<String> views = ImmutableSet.of(); + private String endpoint; + private Map<String, String> defaultProperties = ImmutableMap.of(); + private String console; + private String homePage; + private Set<String> linkedServices = ImmutableSet.of(); + private Set<String> iso3166Codes = ImmutableSet.of(); + + public Builder id(final String id) { + this.id = id; + return this; + } + + public Builder name(final String name) { + this.name = name; + return this; + } + + public Builder endpointName(final String endpointName) { + this.endpointName = endpointName; + return this; + } + + public Builder identityName(final String identityName) { + this.identityName = identityName; + return this; + } + + public Builder credentialName(final String credentialName) { + this.credentialName = credentialName; + return this; + } + + public Builder defaultModules(final Set<String> defaultModules) { + this.defaultModules = defaultModules; + return this; + } + + public Builder documentation(final String documentation) { + this.documentation = documentation; + return this; + } + + public Builder views(final Set<String> views) { + this.views = views; + return this; + } + + public Builder endpoint(final String endpoint) { + this.endpoint = endpoint; + return this; + } + + public Builder defaultProperties(final Properties defaultProperties) { + if (defaultProperties != null) { + this.defaultProperties = Maps.fromProperties(defaultProperties); + } + return this; + } + + public Builder defaultProperties(final Map<String, String> defaultProperties) { + this.defaultProperties = defaultProperties; + return this; + } + + public Builder console(final URI console) { + if (console != null) { + this.console = console.toString(); + } + return this; + } + + public Builder console(final String console) { + this.console = console; + return this; + } + + public Builder homePage(final URI homePage) { + if (homePage != null) { + this.homePage = homePage.toString(); + } + return this; + } + + public Builder homePage(final String homePage) { + this.homePage = homePage; + return this; + } + + public Builder linkedServices(final Set<String> linkedServices) { + this.linkedServices = ImmutableSet.copyOf(linkedServices); + return this; + } + + public Builder iso3166Codes(final Set<String> iso3166Codes) { + this.iso3166Codes = ImmutableSet.copyOf(iso3166Codes); + return this; + } + + public ProviderMetadata build() { + return new ProviderMetadata(id, name, documentation, endpointName, identityName, credentialName, defaultModules, views, endpoint, defaultProperties, console, homePage, linkedServices, iso3166Codes); + } + } + + private final String id; + private final String name; + private final String documentation; + private final String endpointName; + private final String identityName; + private final String credentialName; + private final Set<String> defaultModules; + private final Set<String> views; + private final String endpoint; + private final Map<String, String> defaultProperties; + private final String console; + private final String homePage; + private final Set<String> linkedServices; + private final Set<String> iso3166Codes; + + public ProviderMetadata(String id, String name, String documentation, String endpointName, String identityName, String credentialName, + Set<String> defaultModules, Set<String> views, + String endpoint, Map<String, String> defaultProperties, String console, String homePage, + Set<String> linkedServices, Set<String> iso3166Codes) { + this.id = id; + this.name = name; + this.documentation = documentation; + this.endpointName = endpointName; + this.identityName = identityName; + this.credentialName = credentialName; + this.defaultModules = defaultModules; + this.views = views; + this.endpoint = endpoint; + this.defaultProperties = defaultProperties; + this.console = console; + this.homePage = homePage; + this.linkedServices = linkedServices; + this.iso3166Codes = iso3166Codes; + } + + public String getId() { + return id; + } + + public String getName() { + return name; + } + + public String getEndpointName() { + return endpointName; + } + + public String getIdentityName() { + return identityName; + } + + public String getCredentialName() { + return credentialName; + } + + public Set<String> getDefaultModules() { + return defaultModules; + } + + public String getDocumentation() { + return documentation; + } + + public Set<String> getViews() { + return views; + } + + public String getEndpoint() { + return endpoint; + } + + public Map<String, String> getDefaultProperties() { + return defaultProperties; + } + + public String getConsole() { + return console; + } + + public String getHomePage() { + return homePage; + } + + public Set<String> getLinkedServices() { + return ImmutableSet.copyOf(linkedServices); + } + + public Set<String> getIso3166Codes() { + return ImmutableSet.copyOf(iso3166Codes); + } + + @Override + public int hashCode() { + return Objects.hashCode(id); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + return Objects.equal(this.toString(), that.toString()); + } + + @Override + public String toString() { + return Objects.toStringHelper(this).add("id", id).add("name", name).add("endpointName", endpointName) + .add("identityName", identityName).add("credentialName", credentialName).add("defaultModules", defaultModules) + .add("documentation", documentation).add("views", views) + .add("endpoint", endpoint).add("defaultProperties", defaultProperties).add("console", console) + .add("homePage", homePage).add("linkedServices", linkedServices).add("iso3166Codes", iso3166Codes).toString(); + } +} http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/7cac0ef1/jclouds-representations/representations-core/src/main/java/org/jclouds/representations/Representations.java ---------------------------------------------------------------------- diff --git a/jclouds-representations/representations-core/src/main/java/org/jclouds/representations/Representations.java b/jclouds-representations/representations-core/src/main/java/org/jclouds/representations/Representations.java new file mode 100644 index 0000000..ca75072 --- /dev/null +++ b/jclouds-representations/representations-core/src/main/java/org/jclouds/representations/Representations.java @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jclouds.representations; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; + +public final class Representations { + + private Representations() { + //Utility Class + } + + public static final DateFormat DATE_FORMAT = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss zzz"); + + public static String dateFormat(Date date) { + return date != null ? DATE_FORMAT.format(date) : ""; + } +} http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/7cac0ef1/jclouds-representations/representations-core/src/test/java/org/jclouds/blobstore/representations/StorageMetadataTest.java ---------------------------------------------------------------------- diff --git a/jclouds-representations/representations-core/src/test/java/org/jclouds/blobstore/representations/StorageMetadataTest.java b/jclouds-representations/representations-core/src/test/java/org/jclouds/blobstore/representations/StorageMetadataTest.java new file mode 100644 index 0000000..dae5ad3 --- /dev/null +++ b/jclouds-representations/representations-core/src/test/java/org/jclouds/blobstore/representations/StorageMetadataTest.java @@ -0,0 +1,58 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jclouds.blobstore.representations; + +import com.google.common.base.Charsets; +import com.google.common.io.Resources; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonElement; +import org.testng.annotations.Test; + +import java.io.IOException; +import java.util.Calendar; + +import static com.google.common.io.Resources.getResource; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNotNull; + +@Test +public class StorageMetadataTest { + + @Test + void testToJson() { + StorageMetadata storage = StorageMetadata.builder().creationDate(Calendar.getInstance().getTime()).name("file.txt") + .uri("https://somehost/file.txt") + .build(); + Gson gson = new GsonBuilder().create(); + JsonElement json = gson.toJsonTree(storage); + assertNotNull(json); + assertEquals("file.txt", json.getAsJsonObject().get("name").getAsString()); + assertEquals("https://somehost/file.txt", json.getAsJsonObject().get("uri").getAsString()); + } + + @Test + void testFromJson() throws IOException { + Gson gson = new GsonBuilder().create(); + String json = Resources.toString(getResource("blobstore/StorageMetadata-aws-s3-repo.json"), Charsets.UTF_8); + StorageMetadata storage = gson.fromJson(json, StorageMetadata.class); + assertNotNull(storage); + assertEquals("file.txt", storage.getName()); + assertEquals("https://somecontainer.s3.amazonaws.com/file.txt", storage.getUri()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/7cac0ef1/jclouds-representations/representations-core/src/test/java/org/jclouds/compute/representations/HardwareTest.java ---------------------------------------------------------------------- diff --git a/jclouds-representations/representations-core/src/test/java/org/jclouds/compute/representations/HardwareTest.java b/jclouds-representations/representations-core/src/test/java/org/jclouds/compute/representations/HardwareTest.java new file mode 100644 index 0000000..a167568 --- /dev/null +++ b/jclouds-representations/representations-core/src/test/java/org/jclouds/compute/representations/HardwareTest.java @@ -0,0 +1,64 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jclouds.compute.representations; + +import com.google.common.base.Charsets; +import com.google.common.collect.ImmutableList; +import com.google.common.io.Resources; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonElement; +import org.testng.annotations.Test; + +import java.io.IOException; + +import static com.google.common.io.Resources.getResource; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNotNull; + + +@Test +public class HardwareTest { + + @Test + void testToJson() { + Hardware hardware = Hardware.builder().id("test-hardware-profile") + .processors(ImmutableList.of(Processor.builder().cores(4).speed(2).build())) + .volumes(ImmutableList.of(Volume.builder().device("/dev/tst1").size(100f).bootDevice(true).build())) + .build(); + + Gson gson = new GsonBuilder().create(); + JsonElement json = gson.toJsonTree(hardware); + assertNotNull(json); + assertEquals("test-hardware-profile", json.getAsJsonObject().get("id").getAsString()); + assertEquals("4.0", json.getAsJsonObject().get("processors").getAsJsonArray().get(0).getAsJsonObject().get("cores").getAsString()); + assertEquals("2.0", json.getAsJsonObject().get("processors").getAsJsonArray().get(0).getAsJsonObject().get("speed").getAsString()); + } + + @Test + void testFromJson() throws IOException { + Gson gson = new GsonBuilder().create(); + String json = Resources.toString(getResource("compute/Hardware-stub-large.json"), Charsets.UTF_8); + Hardware hardware = gson.fromJson(json, Hardware.class); + assertNotNull(hardware); + assertEquals("large", hardware.getId()); + assertEquals(1, hardware.getProcessors().size()); + assertEquals(8.0, hardware.getProcessors().get(0).getCores()); + assertEquals(1.0, hardware.getProcessors().get(0).getSpeed()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/7cac0ef1/jclouds-representations/representations-core/src/test/java/org/jclouds/compute/representations/ImageTest.java ---------------------------------------------------------------------- diff --git a/jclouds-representations/representations-core/src/test/java/org/jclouds/compute/representations/ImageTest.java b/jclouds-representations/representations-core/src/test/java/org/jclouds/compute/representations/ImageTest.java new file mode 100644 index 0000000..a778dc6 --- /dev/null +++ b/jclouds-representations/representations-core/src/test/java/org/jclouds/compute/representations/ImageTest.java @@ -0,0 +1,62 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jclouds.compute.representations; + +import com.google.common.base.Charsets; +import com.google.common.io.Resources; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonElement; +import org.testng.annotations.Test; + +import java.io.IOException; + +import static com.google.common.io.Resources.getResource; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNotNull; + + +@Test +public class ImageTest { + + @Test + void testToJson() { + Image image = Image.builder().id("1").name("My image").version("1.0") + .operatingSystem(OperatingSystem.builder() + .family("UBUNTU") + .is64Bit(true) + .build()) + .build(); + + Gson gson = new GsonBuilder().create(); + JsonElement json = gson.toJsonTree(image); + assertNotNull(json); + assertEquals("1", json.getAsJsonObject().get("id").getAsString()); + assertEquals("My image", json.getAsJsonObject().get("name").getAsString()); + assertEquals("UBUNTU", json.getAsJsonObject().getAsJsonObject("operatingSystem").get("family").getAsString()); + } + + @Test + void testFromJson() throws IOException { + Gson gson = new GsonBuilder().create(); + String json = Resources.toString(getResource("compute/Image-stub-1.json"), Charsets.UTF_8); + Image image = gson.fromJson(json, Image.class); + assertNotNull(image); + assertEquals("1", image.getId()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/7cac0ef1/jclouds-representations/representations-core/src/test/java/org/jclouds/compute/representations/NodeTest.java ---------------------------------------------------------------------- diff --git a/jclouds-representations/representations-core/src/test/java/org/jclouds/compute/representations/NodeTest.java b/jclouds-representations/representations-core/src/test/java/org/jclouds/compute/representations/NodeTest.java new file mode 100644 index 0000000..d0a65c4 --- /dev/null +++ b/jclouds-representations/representations-core/src/test/java/org/jclouds/compute/representations/NodeTest.java @@ -0,0 +1,68 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jclouds.compute.representations; + +import com.google.common.base.Charsets; +import com.google.common.io.Resources; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonElement; +import org.testng.annotations.Test; + +import java.io.IOException; + +import static com.google.common.io.Resources.getResource; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNotNull; + + +@Test +public class NodeTest { + + @Test + void testToJson() { + NodeMetadata nodeMetadata = NodeMetadata.builder().id("1").name("testnode-1").group("test-group").imageId("myimage").locationId("mylocation") + .defaultCredentials(LoginCredentials.builder() + .username("root") + .password("password1") + .authenticateSudo(false) + .build()) + + .build(); + + Gson gson = new GsonBuilder().create(); + JsonElement json = gson.toJsonTree(nodeMetadata); + assertNotNull(json); + assertEquals("1", json.getAsJsonObject().get("id").getAsString()); + assertEquals("testnode-1", json.getAsJsonObject().get("name").getAsString()); + assertEquals("root", json.getAsJsonObject().getAsJsonObject("defaultCredentials").get("username").getAsString()); + assertEquals("password1", json.getAsJsonObject().getAsJsonObject("defaultCredentials").get("password").getAsString()); + } + + @Test + void testFromJson() throws IOException { + Gson gson = new GsonBuilder().create(); + String json = Resources.toString(getResource("compute/Node-stub.json"), Charsets.UTF_8); + NodeMetadata node = gson.fromJson(json, NodeMetadata.class); + assertNotNull(node); + assertEquals("1", node.getId()); + assertEquals("test-695", node.getName()); + assertEquals("root", node.getDefaultCredentials().getUsername()); + + } +} http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/7cac0ef1/jclouds-representations/representations-core/src/test/java/org/jclouds/representations/ApiMetadataTest.java ---------------------------------------------------------------------- diff --git a/jclouds-representations/representations-core/src/test/java/org/jclouds/representations/ApiMetadataTest.java b/jclouds-representations/representations-core/src/test/java/org/jclouds/representations/ApiMetadataTest.java new file mode 100644 index 0000000..9d2fa33 --- /dev/null +++ b/jclouds-representations/representations-core/src/test/java/org/jclouds/representations/ApiMetadataTest.java @@ -0,0 +1,70 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jclouds.representations; + +import com.beust.jcommander.internal.Maps; +import com.google.common.base.Charsets; +import com.google.common.io.Resources; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonElement; +import org.testng.annotations.Test; + +import java.io.IOException; +import java.util.Map; + +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNotNull; +import static com.google.common.io.Resources.getResource; +import static org.testng.Assert.assertTrue; + + +@Test +public class ApiMetadataTest { + + @Test + void testToJson() { + Map<String, String> props = Maps.newHashMap(); + props.put("key1", "value1"); + props.put("key2", "value2"); + props.put("key3", "value3"); + ApiMetadata apiMetadata = ApiMetadata.builder().id("test-api").defaultIdentity("identity") + .credentialName("credential") + .documentation("http://somehost.org/doc") + .defaultProperties(props).build(); + + Gson gson = new GsonBuilder().create(); + JsonElement json = gson.toJsonTree(apiMetadata); + assertNotNull(json); + assertEquals("test-api", json.getAsJsonObject().get("id").getAsString()); + assertEquals("value1", json.getAsJsonObject().getAsJsonObject("defaultProperties").get("key1").getAsString()); + assertEquals("value2", json.getAsJsonObject().getAsJsonObject("defaultProperties").get("key2").getAsString()); + assertEquals("value3", json.getAsJsonObject().getAsJsonObject("defaultProperties").get("key3").getAsString()); + } + + @Test + void testFromJson() throws IOException { + Gson gson = new GsonBuilder().create(); + String json = Resources.toString(getResource("ApiMetadata-stub.json"), Charsets.UTF_8); + ApiMetadata apiMetadata = gson.fromJson(json, ApiMetadata.class); + assertNotNull(apiMetadata); + assertEquals("stub", apiMetadata.getId()); + assertEquals("stub", apiMetadata.getDefaultIdentity()); + assertEquals("stub", apiMetadata.getDefaultCredential()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/7cac0ef1/jclouds-representations/representations-core/src/test/java/org/jclouds/representations/ContextTest.java ---------------------------------------------------------------------- diff --git a/jclouds-representations/representations-core/src/test/java/org/jclouds/representations/ContextTest.java b/jclouds-representations/representations-core/src/test/java/org/jclouds/representations/ContextTest.java new file mode 100644 index 0000000..91b6e32 --- /dev/null +++ b/jclouds-representations/representations-core/src/test/java/org/jclouds/representations/ContextTest.java @@ -0,0 +1,60 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jclouds.representations; + +import com.beust.jcommander.internal.Maps; +import com.google.common.base.Charsets; +import com.google.common.io.Resources; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonElement; +import org.testng.annotations.Test; + +import java.io.IOException; +import java.util.Map; + +import static com.google.common.io.Resources.getResource; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNotNull; + + +@Test +public class ContextTest { + + @Test + void testToJson() { + Context context = Context.builder().name("my-context").identity("me").providerId("test-provider").build(); + Gson gson = new GsonBuilder().create(); + JsonElement json = gson.toJsonTree(context); + assertNotNull(json); + assertEquals("my-context", json.getAsJsonObject().get("name").getAsString()); + assertEquals("me", json.getAsJsonObject().get("identity").getAsString()); + assertEquals("test-provider", json.getAsJsonObject().get("providerId").getAsString()); + } + + @Test + void testFromJson() throws IOException { + Gson gson = new GsonBuilder().create(); + String json = Resources.toString(getResource("Context-stub.json"), Charsets.UTF_8); + Context context = gson.fromJson(json, Context.class); + assertNotNull(context); + assertEquals("stub", context.getName()); + assertEquals("myid", context.getIdentity()); + assertEquals("stub", context.getProviderId()); + } +} http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/7cac0ef1/jclouds-representations/representations-core/src/test/java/org/jclouds/representations/LocationTest.java ---------------------------------------------------------------------- diff --git a/jclouds-representations/representations-core/src/test/java/org/jclouds/representations/LocationTest.java b/jclouds-representations/representations-core/src/test/java/org/jclouds/representations/LocationTest.java new file mode 100644 index 0000000..a000b60 --- /dev/null +++ b/jclouds-representations/representations-core/src/test/java/org/jclouds/representations/LocationTest.java @@ -0,0 +1,63 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jclouds.representations; + +import com.google.common.base.Charsets; +import com.google.common.collect.ImmutableSet; +import com.google.common.io.Resources; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonElement; +import org.testng.annotations.Test; + +import java.io.IOException; + +import static com.google.common.io.Resources.getResource; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNotNull; +import static org.testng.Assert.assertTrue; + + +@Test +public class LocationTest { + + @Test + void testToJson() { + Location location = Location.builder().id("region-1a").scope("ZONE").parentId("region-1").iso3166Codes(ImmutableSet.of("IE")).build(); + Gson gson = new GsonBuilder().create(); + JsonElement json = gson.toJsonTree(location); + assertNotNull(json); + assertEquals("region-1a", json.getAsJsonObject().get("id").getAsString()); + assertEquals("ZONE", json.getAsJsonObject().get("scope").getAsString()); + assertEquals("region-1", json.getAsJsonObject().get("parentId").getAsString()); + assertEquals("IE", json.getAsJsonObject().get("iso3166Codes").getAsJsonArray().get(0).getAsString()); + } + + @Test + void testFromJson() throws IOException { + Gson gson = new GsonBuilder().create(); + String json = Resources.toString(getResource("Location-aws-ec2-eu-west-1a.json"), Charsets.UTF_8); + Location location = gson.fromJson(json, Location.class); + assertNotNull(location); + assertEquals("eu-west-1a", location.getId()); + assertEquals("eu-west-1", location.getParentId()); + assertEquals("ZONE", location.getScope()); + assertEquals(1, location.getIso3166Codes().size()); + assertTrue(location.getIso3166Codes().contains("IE")); + } +} http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/7cac0ef1/jclouds-representations/representations-core/src/test/java/org/jclouds/representations/ProviderMetadataTest.java ---------------------------------------------------------------------- diff --git a/jclouds-representations/representations-core/src/test/java/org/jclouds/representations/ProviderMetadataTest.java b/jclouds-representations/representations-core/src/test/java/org/jclouds/representations/ProviderMetadataTest.java new file mode 100644 index 0000000..faf2803 --- /dev/null +++ b/jclouds-representations/representations-core/src/test/java/org/jclouds/representations/ProviderMetadataTest.java @@ -0,0 +1,70 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jclouds.representations; + +import com.beust.jcommander.internal.Maps; +import com.google.common.base.Charsets; +import com.google.common.io.Resources; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonElement; +import org.testng.annotations.Test; + +import java.io.IOException; +import java.util.Map; + +import static com.google.common.io.Resources.getResource; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNotNull; +import static org.testng.Assert.assertTrue; + + +@Test +public class ProviderMetadataTest { + + @Test + void testToJson() { + Map<String, String> props = Maps.newHashMap(); + props.put("key1", "value1"); + props.put("key2", "value2"); + props.put("key3", "value3"); + + + ProviderMetadata providerMetadata = ProviderMetadata.builder() + .id("test-provider").defaultProperties(props) + .name("My test provider").build(); + + Gson gson = new GsonBuilder().create(); + JsonElement json = gson.toJsonTree(providerMetadata); + assertNotNull(json); + assertEquals("test-provider", json.getAsJsonObject().get("id").getAsString()); + assertEquals("value1", json.getAsJsonObject().getAsJsonObject("defaultProperties").get("key1").getAsString()); + assertEquals("value2", json.getAsJsonObject().getAsJsonObject("defaultProperties").get("key2").getAsString()); + assertEquals("value3", json.getAsJsonObject().getAsJsonObject("defaultProperties").get("key3").getAsString()); + } + + @Test + void testFromJson() throws IOException { + Gson gson = new GsonBuilder().create(); + String json = Resources.toString(getResource("ProviderMetadata-aws-ec2.json"), Charsets.UTF_8); + ProviderMetadata providerMetadata = gson.fromJson(json, ProviderMetadata.class); + assertNotNull(providerMetadata); + assertEquals("aws-ec2", providerMetadata.getId()); + assertTrue(providerMetadata.getDefaultModules().contains("org.jclouds.aws.ec2.config.AWSEC2RestClientModule")); + } +} http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/7cac0ef1/jclouds-representations/representations-core/src/test/resources/ApiMetadata-stub.json ---------------------------------------------------------------------- diff --git a/jclouds-representations/representations-core/src/test/resources/ApiMetadata-stub.json b/jclouds-representations/representations-core/src/test/resources/ApiMetadata-stub.json new file mode 100644 index 0000000..416e96d --- /dev/null +++ b/jclouds-representations/representations-core/src/test/resources/ApiMetadata-stub.json @@ -0,0 +1,34 @@ +{ + defaultEndpoint: "stub", + credentialName: null, + builderVersion: "", + defaultProperties: { + jclouds.max-connections-per-host: "0", + jclouds.user-threads: "0", + jclouds.connection-timeout: "60000", + jclouds.max-connections-per-context: "20", + jclouds.iso3166-codes: "", + jclouds.max-connection-reuse: "75", + jclouds.payloads.pretty-print: "true", + jclouds.scheduler-threads: "10", + jclouds.io-worker-threads: "20", + jclouds.max-session-failures: "2", + jclouds.session-interval: "60", + jclouds.so-timeout: "60000" +}, +version: "", +id: "stub", +defaultCredential: "stub", +defaultIdentity: "stub", +views: [ +"org.jclouds.compute.ComputeServiceContext" +], +name: "in-memory (Stub) API", +documentation: "http://www.jclouds.org/documentation/userguide/compute", +context: "interface org.jclouds.Context", +identityName: "Unused", +endpointName: "https endpoint", +defaultModules: [ +"org.jclouds.compute.stub.config.StubComputeServiceContextModule" +] +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/7cac0ef1/jclouds-representations/representations-core/src/test/resources/Context-stub.json ---------------------------------------------------------------------- diff --git a/jclouds-representations/representations-core/src/test/resources/Context-stub.json b/jclouds-representations/representations-core/src/test/resources/Context-stub.json new file mode 100644 index 0000000..976bfd5 --- /dev/null +++ b/jclouds-representations/representations-core/src/test/resources/Context-stub.json @@ -0,0 +1,5 @@ +{ + identity: "myid", + name: "stub", + providerId: "stub" +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/7cac0ef1/jclouds-representations/representations-core/src/test/resources/Location-aws-ec2-eu-west-1a.json ---------------------------------------------------------------------- diff --git a/jclouds-representations/representations-core/src/test/resources/Location-aws-ec2-eu-west-1a.json b/jclouds-representations/representations-core/src/test/resources/Location-aws-ec2-eu-west-1a.json new file mode 100644 index 0000000..daf3f4e --- /dev/null +++ b/jclouds-representations/representations-core/src/test/resources/Location-aws-ec2-eu-west-1a.json @@ -0,0 +1,9 @@ +{ + id: "eu-west-1a", + parentId: "eu-west-1", + scope: "ZONE", + iso3166Codes: [ + "IE" + ], + description: "eu-west-1a" +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/7cac0ef1/jclouds-representations/representations-core/src/test/resources/ProviderMetadata-aws-ec2.json ---------------------------------------------------------------------- diff --git a/jclouds-representations/representations-core/src/test/resources/ProviderMetadata-aws-ec2.json b/jclouds-representations/representations-core/src/test/resources/ProviderMetadata-aws-ec2.json new file mode 100644 index 0000000..cfe2d89 --- /dev/null +++ b/jclouds-representations/representations-core/src/test/resources/ProviderMetadata-aws-ec2.json @@ -0,0 +1,72 @@ +{ + credentialName: "Secret Access Key", + linkedServices: [ + "aws-ec2", + "aws-elb", + "aws-cloudwatch", + "aws-s3", + "aws-simpledb" + ], + endpoint: "https://ec2.us-east-1.amazonaws.com", + defaultProperties: { + jclouds.template: "osFamily=AMZN_LINUX,os64Bit=true", + jclouds.region.ap-southeast-2.iso3166-codes: "AU-NSW", + jclouds.region.eu-west-1.iso3166-codes: "IE", + jclouds.iso3166-codes: "US-VA,US-CA,US-OR,BR-SP,IE,SG,AU-NSW,JP-13", + jclouds.scheduler-threads: "10", + jclouds.compute.timeout.node-suspended: "120000", + jclouds.io-worker-threads: "20", + jclouds.ssh.max-retries: "7", + jclouds.ssh.retry-auth: "true", + jclouds.ec2.timeout.securitygroup-present: "500", + jclouds.max-connections-per-context: "20", + jclouds.region.sa-east-1.iso3166-codes: "BR-SP", + jclouds.ec2.auto-allocate-elastic-ips: "false", + jclouds.ec2.cc-ami-query: "virtualization-type=hvm;architecture=x86_64;owner-id=137112412989,099720109477;hypervisor=xen;state=available;image-type=machine;root-device-type=ebs", + jclouds.payloads.pretty-print: "true", + jclouds.session-interval: "60", + jclouds.ec2.generate-instance-names: "true", + jclouds.so-timeout: "60000", + jclouds.region.us-east-1.iso3166-codes: "US-VA", + jclouds.region.us-west-2.iso3166-codes: "US-OR", + jclouds.user-threads: "0", + jclouds.region.us-west-1.iso3166-codes: "US-CA", + jclouds.compute.resourcename-delimiter: "#", + jclouds.regions: "us-east-1,us-west-1,us-west-2,sa-east-1,eu-west-1,ap-southeast-1,ap-southeast-2,ap-northeast-1", + jclouds.aws.auth.tag: "AWS", + jclouds.max-connections-per-host: "0", + jclouds.region.ap-northeast-1.iso3166-codes: "JP-13", + jclouds.connection-timeout: "60000", + jclouds.ec2.ami-query: "owner-id=137112412989,801119661308,063491364108,099720109477,411009282317;state=available;image-type=machine", + jclouds.max-connection-reuse: "75", + jclouds.ec2.cc-regions: "us-east-1,us-west-2,eu-west-1", + jclouds.max-session-failures: "2", + jclouds.aws.header.tag: "amz", + jclouds.region.ap-southeast-1.iso3166-codes: "SG" + }, + id: "aws-ec2", + console: "https://console.aws.amazon.com/ec2/home", + iso3166Codes: [ + "US-VA", + "US-CA", + "US-OR", + "BR-SP", + "IE", + "SG", + "AU-NSW", + "JP-13" + ], + views: [ + "org.jclouds.aws.ec2.compute.AWSEC2ComputeServiceContext" + ], + name: "Amazon Elastic Compute Cloud (EC2)", + documentation: "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference", + identityName: "Access Key ID", + endpointName: "https endpoint", + defaultModules: [ + "org.jclouds.aws.ec2.config.AWSEC2RestClientModule", + "org.jclouds.ec2.compute.config.EC2ResolveImagesModule", + "org.jclouds.aws.ec2.compute.config.AWSEC2ComputeServiceContextModule" + ], + homePage: "http://aws.amazon.com/ec2" +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/7cac0ef1/jclouds-representations/representations-core/src/test/resources/blobstore/Blob-aws-s2-test.json ---------------------------------------------------------------------- diff --git a/jclouds-representations/representations-core/src/test/resources/blobstore/Blob-aws-s2-test.json b/jclouds-representations/representations-core/src/test/resources/blobstore/Blob-aws-s2-test.json new file mode 100644 index 0000000..5f8cef4 --- /dev/null +++ b/jclouds-representations/representations-core/src/test/resources/blobstore/Blob-aws-s2-test.json @@ -0,0 +1,47 @@ +{ + allHeaders: { + x-amz-request-id: [ + "DFE7296CE8E01DFC" + ], + ETag: [ + ""27cd600dadfa81d502e2cd1491b00725"" + ], + Date: [ + "Sun, 14 Apr 2013 20:04:41 GMT" + ], + x-amz-id-2: [ + "vH5MToKQVwgYTzAK771VQkWdv5DETmLC1xYjBeEsNz3WVauTL+MjiDhE/wvIJ7mo" + ], + Last-Modified: [ + "Wed, 09 Jan 2013 20:48:14 GMT" + ], + Accept-Ranges: [ + "bytes" + ], + Server: [ + "AmazonS3" + ], + Cache-Control: [ + "no-cache" + ] + }, +blobMetadata: { + creationDate: null, + name: "pom.xml", + lastModifiedDate: "2013-01-09T22:48:14+02:00", + providerId: null, + userMetadata: { }, + publicUri: null, + type: "BLOB", + uri: "https://somecontainer.s3.amazonaws.com/file.txt", + contentMetadata: { + expires: null, + md5: null, + encoding: null, + length: 64021, + language: null, + type: "application/unknown", + disposition: null + } +} +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/7cac0ef1/jclouds-representations/representations-core/src/test/resources/blobstore/StorageMetadata-aws-s3-repo.json ---------------------------------------------------------------------- diff --git a/jclouds-representations/representations-core/src/test/resources/blobstore/StorageMetadata-aws-s3-repo.json b/jclouds-representations/representations-core/src/test/resources/blobstore/StorageMetadata-aws-s3-repo.json new file mode 100644 index 0000000..8feb9d4 --- /dev/null +++ b/jclouds-representations/representations-core/src/test/resources/blobstore/StorageMetadata-aws-s3-repo.json @@ -0,0 +1,9 @@ +{ + creationDate: null, + name: "file.txt", + lastModifiedDate: "2013-01-09T22:48:14+02:00", + providerId: null, + userMetadata: { }, + type: "BLOB", + uri: "https://somecontainer.s3.amazonaws.com/file.txt" +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/7cac0ef1/jclouds-representations/representations-core/src/test/resources/compute/Hardware-stub-large.json ---------------------------------------------------------------------- diff --git a/jclouds-representations/representations-core/src/test/resources/compute/Hardware-stub-large.json b/jclouds-representations/representations-core/src/test/resources/compute/Hardware-stub-large.json new file mode 100644 index 0000000..4a4275c --- /dev/null +++ b/jclouds-representations/representations-core/src/test/resources/compute/Hardware-stub-large.json @@ -0,0 +1,23 @@ +{ + tags: [ ], + id: "large", + ram: 15360, + hypervisor: null, + name: "large", + volumes: [ + { + id: null, + bootDevice: true, + device: null, + durable: false, + type: "LOCAL", + size: 1690 + } + ], + processors: [ + { + speed: 1, + cores: 8 + } + ] +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/7cac0ef1/jclouds-representations/representations-core/src/test/resources/compute/Image-aws-5e7de437.json ---------------------------------------------------------------------- diff --git a/jclouds-representations/representations-core/src/test/resources/compute/Image-aws-5e7de437.json b/jclouds-representations/representations-core/src/test/resources/compute/Image-aws-5e7de437.json new file mode 100644 index 0000000..5e9bf7f --- /dev/null +++ b/jclouds-representations/representations-core/src/test/resources/compute/Image-aws-5e7de437.json @@ -0,0 +1,22 @@ +{ + tags: [ ], + id: "us-east-1/ami-5e7de437", + operatingSystem: { + arch: "paravirtual", + family: "AMZN_LINUX", + description: null, + name: null, + is64Bit: true, + version: "minimal-pv-2013.03.rc-1" + }, + defaultCredentials: { + username: "ec2-user", + authenticatedSudo: false, + credentialUrl: null, + password: null + }, + status: "AVAILABLE", + description: "Amazon Linux AMI x86_64 EBS", + name: "amzn-ami-minimal-pv-2013.03.rc-1.x86_64-ebs", + version: "minimal-pv-2013.03.rc-1" +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/7cac0ef1/jclouds-representations/representations-core/src/test/resources/compute/Image-stub-1.json ---------------------------------------------------------------------- diff --git a/jclouds-representations/representations-core/src/test/resources/compute/Image-stub-1.json b/jclouds-representations/representations-core/src/test/resources/compute/Image-stub-1.json new file mode 100644 index 0000000..6d2add8 --- /dev/null +++ b/jclouds-representations/representations-core/src/test/resources/compute/Image-stub-1.json @@ -0,0 +1,22 @@ +{ + tags: [ ], + id: "1", + operatingSystem: { + arch: null, + family: "SUSE", + description: null, + name: "stub suse true", + is64Bit: true, + version: "" + }, + defaultCredentials: { + username: "root", + authenticatedSudo: false, + credentialUrl: null, + password: null + }, + status: "AVAILABLE", + description: "stub suse true", + name: "SUSE", + version: null +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/7cac0ef1/jclouds-representations/representations-core/src/test/resources/compute/Node-stub.json ---------------------------------------------------------------------- diff --git a/jclouds-representations/representations-core/src/test/resources/compute/Node-stub.json b/jclouds-representations/representations-core/src/test/resources/compute/Node-stub.json new file mode 100644 index 0000000..2258051 --- /dev/null +++ b/jclouds-representations/representations-core/src/test/resources/compute/Node-stub.json @@ -0,0 +1,19 @@ +{ + tags: [ ], + id: "1", + imageId: "34", + defaultCredentials: { + username: "root", + authenticatedSudo: false, + credentialUrl: null, + password: "password1" + }, + status: "RUNNING", + description: null, + name: "test-695", + locationId: "stub", + hostname: "testhost", + loginPort: 22, + group: "testgroup", + metadata: { } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/7cac0ef1/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 075b48b..ecb3534 100644 --- a/pom.xml +++ b/pom.xml @@ -84,6 +84,8 @@ <module>abiquo</module> <module>oauth</module> <module>openstack</module> + <module>jclouds-representations</module> + <module>jclouds-management</module> </modules> <build> http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/7cac0ef1/rackspace-clouddns-uk/pom.xml ---------------------------------------------------------------------- diff --git a/rackspace-clouddns-uk/pom.xml b/rackspace-clouddns-uk/pom.xml index aa55631..2d8fd45 100644 --- a/rackspace-clouddns-uk/pom.xml +++ b/rackspace-clouddns-uk/pom.xml @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. @@ -8,15 +7,14 @@ (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ---> + --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/7cac0ef1/rackspace-clouddns-us/pom.xml ---------------------------------------------------------------------- diff --git a/rackspace-clouddns-us/pom.xml b/rackspace-clouddns-us/pom.xml index 8837fb3..ad38598 100644 --- a/rackspace-clouddns-us/pom.xml +++ b/rackspace-clouddns-us/pom.xml @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. @@ -8,15 +7,14 @@ (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ---> + --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs/blob/7cac0ef1/rackspace-clouddns/pom.xml ---------------------------------------------------------------------- diff --git a/rackspace-clouddns/pom.xml b/rackspace-clouddns/pom.xml index 4df9fec..84a6b9b 100644 --- a/rackspace-clouddns/pom.xml +++ b/rackspace-clouddns/pom.xml @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. @@ -8,15 +7,14 @@ (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - ---> + --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <parent>
