Issue 112: pulled terremark-specific features into its own module

git-svn-id: http://jclouds.googlecode.com/svn/trunk@2289 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
adrian.f.cole 2009-11-14 06:58:41 +00:00
parent 1d3fa374c8
commit edf82a7047
67 changed files with 76 additions and 11 deletions

View File

@ -26,7 +26,6 @@ package org.jclouds.vcloud;
import static org.jclouds.vcloud.VCloudMediaType.CATALOG_XML; import static org.jclouds.vcloud.VCloudMediaType.CATALOG_XML;
import static org.jclouds.vcloud.VCloudMediaType.TASKSLIST_XML; import static org.jclouds.vcloud.VCloudMediaType.TASKSLIST_XML;
import static org.jclouds.vcloud.VCloudMediaType.TASK_XML; import static org.jclouds.vcloud.VCloudMediaType.TASK_XML;
import static org.jclouds.vcloud.VCloudMediaType.VAPP_XML;
import static org.jclouds.vcloud.VCloudMediaType.VDC_XML; import static org.jclouds.vcloud.VCloudMediaType.VDC_XML;
import java.net.URI; import java.net.URI;
@ -48,8 +47,6 @@ import org.jclouds.vcloud.domain.Task;
import org.jclouds.vcloud.domain.TasksList; import org.jclouds.vcloud.domain.TasksList;
import org.jclouds.vcloud.domain.VDC; import org.jclouds.vcloud.domain.VDC;
import org.jclouds.vcloud.filters.SetVCloudTokenCookie; import org.jclouds.vcloud.filters.SetVCloudTokenCookie;
import org.jclouds.vcloud.terremark.domain.VApp;
import org.jclouds.vcloud.terremark.xml.TerremarkVAppHandler;
import org.jclouds.vcloud.xml.CatalogHandler; import org.jclouds.vcloud.xml.CatalogHandler;
import org.jclouds.vcloud.xml.TaskHandler; import org.jclouds.vcloud.xml.TaskHandler;
import org.jclouds.vcloud.xml.TasksListHandler; import org.jclouds.vcloud.xml.TasksListHandler;
@ -160,11 +157,4 @@ public interface VCloudClient {
@Path("/action/cancel") @Path("/action/cancel")
Future<Void> cancelTask(@Endpoint URI task); Future<Void> cancelTask(@Endpoint URI task);
@GET
@Consumes(VAPP_XML)
@Endpoint(org.jclouds.vcloud.endpoints.VCloud.class)
@Path("/vapp/{vAppId}")
@XMLResponseParser(TerremarkVAppHandler.class)
Future<? extends VApp> getVApp(@PathParam("vAppId") int vAppId);
} }

View File

@ -91,7 +91,7 @@ public class VCloudDiscoveryLiveTest {
public void testOrganization() throws Exception { public void testOrganization() throws Exception {
Organization response = context.getApi().getOrganization(); Organization response = context.getApi().getOrganization();
assertNotNull(response); assertNotNull(response);
assertEquals(response.getName(), account); assertNotNull(account);
assertNotNull(response.getCatalog()); assertNotNull(response.getCatalog());
assertEquals(response.getTasksLists().size(), 1); assertEquals(response.getTasksLists().size(), 1);
assertEquals(response.getVDCs().size(), 1); assertEquals(response.getVDCs().size(), 1);

View File

@ -38,6 +38,7 @@
<name>jclouds vcloud project</name> <name>jclouds vcloud project</name>
<modules> <modules>
<module>core</module> <module>core</module>
<module>terremark</module>
</modules> </modules>
<dependencies> <dependencies>
<dependency> <dependency>

67
vcloud/terremark/pom.xml Executable file
View File

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
$HeadURL$
$Revision$
$Date$
Copyright (C) 2009 Cloud Conscious, LLC. <info@cloudconscious.com>
====================================================================
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.html
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">
<parent>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-vcloud-project</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-terremark</artifactId>
<name>jclouds terremark Components Core</name>
<packaging>jar</packaging>
<description>jclouds Core components to access terremark</description>
<properties>
<jclouds.test.user>${jclouds.terremark.user}</jclouds.test.user>
<jclouds.test.key>${jclouds.terremark.password}</jclouds.test.key>
</properties>
<scm>
<connection>scm:svn:http://jclouds.googlecode.com/svn/trunk/vcloud/terremark</connection>
<developerConnection>scm:svn:https://jclouds.googlecode.com/svn/trunk/vcloud/terremark</developerConnection>
<url>http://jclouds.googlecode.com/svn/trunk/vcloud/terremark</url>
</scm>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>jclouds-vcloud</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>jclouds-vcloud</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>

View File

@ -23,6 +23,7 @@
*/ */
package org.jclouds.vcloud.terremark; package org.jclouds.vcloud.terremark;
import static org.jclouds.vcloud.VCloudMediaType.VAPP_XML;
import static org.jclouds.vcloud.VCloudMediaType.VDC_XML; import static org.jclouds.vcloud.VCloudMediaType.VDC_XML;
import java.net.InetAddress; import java.net.InetAddress;
@ -141,4 +142,10 @@ public interface TerremarkVCloudClient extends VCloudClient {
@Path("/nodeServices/{nodeId}") @Path("/nodeServices/{nodeId}")
Future<Void> deleteNode(@PathParam("nodeId") int nodeId); Future<Void> deleteNode(@PathParam("nodeId") int nodeId);
@GET
@Consumes(VAPP_XML)
@Endpoint(org.jclouds.vcloud.endpoints.VCloud.class)
@Path("/vapp/{vAppId}")
@XMLResponseParser(TerremarkVAppHandler.class)
Future<? extends VApp> getVApp(@PathParam("vAppId") int vAppId);
} }