Pom fixes and cleanup, properties convention and other fixes commented in the pull-request

This commit is contained in:
Ignasi Barrera 2012-09-07 12:56:46 +02:00
parent 063e7e7168
commit e43f16ff5d
18 changed files with 34 additions and 56 deletions

View File

@ -22,4 +22,8 @@ Copyright 2009-2011 jclouds, Inc.
This product includes software developed at
Abiquo Holdings S.L. (http://www.abiquo.com/).
distributed under the GNU Lesser General Public License version 3
The following Abiquo dependencies are distributed under
the GNU Lesser General Public License version 3:
com.abiquo:api-model-transport
com.abiquo:am-model

View File

@ -16,8 +16,9 @@
<properties>
<abiquo.version>2.1-SNAPSHOT</abiquo.version>
<test.abiquo.identity></test.abiquo.identity>
<test.abiquo.credential></test.abiquo.credential>
<test.abiquo.endpoint>http://localhost/api</test.abiquo.endpoint>
<test.abiquo.identity>FIXME</test.abiquo.identity>
<test.abiquo.credential>FIXME</test.abiquo.credential>
<test.abiquo.api-version></test.abiquo.api-version>
<test.abiquo.build-version></test.abiquo.build-version>
<jclouds.osgi.export>org.jclouds.abiquo*;version="${project.version}"</jclouds.osgi.export>
@ -112,7 +113,7 @@
</dependency>
<dependency>
<groupId>org.jclouds.driver</groupId>
<artifactId>jclouds-jsch</artifactId>
<artifactId>jclouds-sshj</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
@ -122,12 +123,6 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
@ -140,20 +135,6 @@
<version>1.0.0</version>
<scope>test</scope>
</dependency>
<!--
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.0.1</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
-->
</dependencies>
<build>

View File

@ -20,8 +20,8 @@
package org.jclouds.abiquo;
import static org.jclouds.Constants.PROPERTY_MAX_REDIRECTS;
import static org.jclouds.abiquo.reference.AbiquoConstants.ASYNC_TASK_MONITOR_DELAY;
import static org.jclouds.abiquo.reference.AbiquoConstants.CREDENTIAL_IS_TOKEN;
import static org.jclouds.abiquo.config.AbiquoProperties.ASYNC_TASK_MONITOR_DELAY;
import static org.jclouds.abiquo.config.AbiquoProperties.CREDENTIAL_IS_TOKEN;
import java.net.URI;
import java.util.Properties;

View File

@ -30,7 +30,6 @@ import org.jclouds.abiquo.domain.cloud.VirtualMachineTemplate;
import org.jclouds.abiquo.domain.infrastructure.Datacenter;
import org.jclouds.compute.ComputeServiceAdapter;
import org.jclouds.compute.config.ComputeServiceAdapterContextModule;
import org.jclouds.compute.config.ComputeServiceAdapterContextModule.LocationsFromComputeServiceAdapterModule;
import org.jclouds.compute.domain.Hardware;
import org.jclouds.compute.domain.Image;
import org.jclouds.compute.domain.NodeMetadata;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.jclouds.abiquo.reference;
package org.jclouds.abiquo.config;
/**
* The Abiquo Edition (Community or Enterprise).

View File

@ -17,16 +17,16 @@
* under the License.
*/
package org.jclouds.abiquo.reference;
package org.jclouds.abiquo.config;
import org.jclouds.abiquo.features.services.MonitoringService;
/**
* Global constants used in the Abiquo provider.
* Configuration properties and constants used in Abiquo connections.
*
* @author Ignasi Barrera
*/
public interface AbiquoConstants
public interface AbiquoProperties
{
/**
* Boolean property indicating if the provided credential is an api token.

View File

@ -25,6 +25,7 @@ import java.util.List;
import org.jclouds.abiquo.AbiquoApi;
import org.jclouds.abiquo.AbiquoAsyncApi;
import org.jclouds.abiquo.config.AbiquoEdition;
import org.jclouds.abiquo.domain.DomainWrapper;
import org.jclouds.abiquo.domain.cloud.VirtualMachineTemplate;
import org.jclouds.abiquo.domain.enterprise.Enterprise;
@ -34,7 +35,6 @@ import org.jclouds.abiquo.domain.infrastructure.options.IpmiOptions;
import org.jclouds.abiquo.domain.infrastructure.options.MachineOptions;
import org.jclouds.abiquo.domain.network.Network;
import org.jclouds.abiquo.domain.network.options.NetworkOptions;
import org.jclouds.abiquo.reference.AbiquoEdition;
import org.jclouds.abiquo.reference.annotations.EnterpriseEdition;
import org.jclouds.rest.RestContext;

View File

@ -20,7 +20,7 @@
package org.jclouds.abiquo.http.filters;
import static com.google.common.base.Preconditions.checkNotNull;
import static org.jclouds.abiquo.reference.AbiquoConstants.CREDENTIAL_IS_TOKEN;
import static org.jclouds.abiquo.config.AbiquoProperties.CREDENTIAL_IS_TOKEN;
import java.io.UnsupportedEncodingException;

View File

@ -21,7 +21,7 @@ package org.jclouds.abiquo.internal;
import static com.google.common.base.Preconditions.checkNotNull;
import static org.jclouds.Constants.PROPERTY_SCHEDULER_THREADS;
import static org.jclouds.abiquo.reference.AbiquoConstants.ASYNC_TASK_MONITOR_DELAY;
import static org.jclouds.abiquo.config.AbiquoProperties.ASYNC_TASK_MONITOR_DELAY;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledExecutorService;
@ -31,8 +31,8 @@ import javax.annotation.Resource;
import javax.inject.Named;
import javax.inject.Singleton;
import org.jclouds.abiquo.AbiquoAsyncApi;
import org.jclouds.abiquo.AbiquoApi;
import org.jclouds.abiquo.AbiquoAsyncApi;
import org.jclouds.abiquo.events.handlers.AbstractEventHandler;
import org.jclouds.abiquo.events.handlers.BlockingEventHandler;
import org.jclouds.abiquo.events.monitor.CompletedEvent;

View File

@ -21,7 +21,7 @@ package org.jclouds.abiquo.monitor.internal;
import static com.google.common.base.Preconditions.checkNotNull;
import static org.jclouds.Constants.PROPERTY_SCHEDULER_THREADS;
import static org.jclouds.abiquo.reference.AbiquoConstants.ASYNC_TASK_MONITOR_DELAY;
import static org.jclouds.abiquo.config.AbiquoProperties.ASYNC_TASK_MONITOR_DELAY;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
@ -30,8 +30,8 @@ import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;
import org.jclouds.abiquo.AbiquoAsyncApi;
import org.jclouds.abiquo.AbiquoApi;
import org.jclouds.abiquo.AbiquoAsyncApi;
import org.jclouds.abiquo.domain.task.AsyncTask;
import org.jclouds.abiquo.internal.BaseMonitoringService;
import org.jclouds.abiquo.monitor.AsyncTaskMonitor;

View File

@ -21,7 +21,7 @@ package org.jclouds.abiquo.monitor.internal;
import static com.google.common.base.Preconditions.checkNotNull;
import static org.jclouds.Constants.PROPERTY_SCHEDULER_THREADS;
import static org.jclouds.abiquo.reference.AbiquoConstants.ASYNC_TASK_MONITOR_DELAY;
import static org.jclouds.abiquo.config.AbiquoProperties.ASYNC_TASK_MONITOR_DELAY;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
@ -30,8 +30,8 @@ import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;
import org.jclouds.abiquo.AbiquoAsyncApi;
import org.jclouds.abiquo.AbiquoApi;
import org.jclouds.abiquo.AbiquoAsyncApi;
import org.jclouds.abiquo.domain.cloud.Conversion;
import org.jclouds.abiquo.internal.BaseMonitoringService;
import org.jclouds.abiquo.monitor.ConversionMonitor;

View File

@ -21,7 +21,7 @@ package org.jclouds.abiquo.monitor.internal;
import static com.google.common.base.Preconditions.checkNotNull;
import static org.jclouds.Constants.PROPERTY_SCHEDULER_THREADS;
import static org.jclouds.abiquo.reference.AbiquoConstants.ASYNC_TASK_MONITOR_DELAY;
import static org.jclouds.abiquo.config.AbiquoProperties.ASYNC_TASK_MONITOR_DELAY;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
@ -30,8 +30,8 @@ import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;
import org.jclouds.abiquo.AbiquoAsyncApi;
import org.jclouds.abiquo.AbiquoApi;
import org.jclouds.abiquo.AbiquoAsyncApi;
import org.jclouds.abiquo.domain.cloud.VirtualAppliance;
import org.jclouds.abiquo.internal.BaseMonitoringService;
import org.jclouds.abiquo.monitor.VirtualApplianceMonitor;

View File

@ -21,7 +21,7 @@ package org.jclouds.abiquo.monitor.internal;
import static com.google.common.base.Preconditions.checkNotNull;
import static org.jclouds.Constants.PROPERTY_SCHEDULER_THREADS;
import static org.jclouds.abiquo.reference.AbiquoConstants.ASYNC_TASK_MONITOR_DELAY;
import static org.jclouds.abiquo.config.AbiquoProperties.ASYNC_TASK_MONITOR_DELAY;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
@ -30,8 +30,8 @@ import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;
import org.jclouds.abiquo.AbiquoAsyncApi;
import org.jclouds.abiquo.AbiquoApi;
import org.jclouds.abiquo.AbiquoAsyncApi;
import org.jclouds.abiquo.domain.cloud.VirtualMachine;
import org.jclouds.abiquo.internal.BaseMonitoringService;
import org.jclouds.abiquo.monitor.VirtualMachineMonitor;

View File

@ -32,7 +32,7 @@ import org.jclouds.compute.domain.NodeMetadata;
import org.jclouds.compute.internal.BaseComputeServiceLiveTest;
import org.jclouds.logging.config.LoggingModule;
import org.jclouds.logging.slf4j.config.SLF4JLoggingModule;
import org.jclouds.ssh.jsch.config.JschSshClientModule;
import org.jclouds.sshj.config.SshjSshClientModule;
import org.testng.annotations.Test;
import com.google.common.collect.ImmutableMap;
@ -89,7 +89,7 @@ public class AbiquoComputeServiceLiveTest extends BaseComputeServiceLiveTest
@Override
protected Module getSshModule()
{
return new JschSshClientModule();
return new SshjSshClientModule();
}
@Override

View File

@ -54,12 +54,6 @@ public class VirtualMachineTemplateLiveApiTest extends BaseAbiquoApiLiveApiTest
assertNotNull(category);
}
public void testGetIcon()
{
String iconUrl = env.virtualMachine.getTemplate().getIconUrl();
assertNotNull(iconUrl);
}
public void testRequestConversionToSameFormat()
{
try

View File

@ -33,6 +33,7 @@ import java.util.List;
import java.util.UUID;
import org.jclouds.abiquo.AbiquoContext;
import org.jclouds.abiquo.config.AbiquoEdition;
import org.jclouds.abiquo.domain.config.License;
import org.jclouds.abiquo.domain.enterprise.Enterprise;
import org.jclouds.abiquo.domain.enterprise.Limits;
@ -62,7 +63,6 @@ import org.jclouds.abiquo.predicates.infrastructure.RemoteServicePredicates;
import org.jclouds.abiquo.predicates.infrastructure.StorageDeviceMetadataPredicates;
import org.jclouds.abiquo.predicates.infrastructure.StoragePoolPredicates;
import org.jclouds.abiquo.predicates.infrastructure.TierPredicates;
import org.jclouds.abiquo.reference.AbiquoEdition;
import org.jclouds.abiquo.util.Config;
import com.abiquo.model.enumerator.HypervisorType;

View File

@ -38,7 +38,7 @@ import javax.ws.rs.core.HttpHeaders;
import org.jclouds.ContextBuilder;
import org.jclouds.abiquo.AbiquoApiMetadata;
import org.jclouds.abiquo.AbiquoContext;
import org.jclouds.abiquo.reference.AbiquoConstants;
import org.jclouds.abiquo.config.AbiquoProperties;
import org.jclouds.http.HttpRequest;
import org.jclouds.http.HttpResponse;
import org.jclouds.logging.slf4j.config.SLF4JLoggingModule;
@ -79,7 +79,7 @@ public class AbiquoAuthenticationLiveApiTest
String token = getAuthtenticationToken();
Properties props = new Properties();
props.setProperty(AbiquoConstants.CREDENTIAL_IS_TOKEN, "true");
props.setProperty(AbiquoProperties.CREDENTIAL_IS_TOKEN, "true");
// Create a new context that uses the generated token to perform the API calls
AbiquoContext tokenContext = ContextBuilder.newBuilder(new AbiquoApiMetadata()) //
@ -111,7 +111,7 @@ public class AbiquoAuthenticationLiveApiTest
String token = getAuthtenticationToken() + "INVALID";
Properties props = new Properties();
props.setProperty(AbiquoConstants.CREDENTIAL_IS_TOKEN, "true");
props.setProperty(AbiquoProperties.CREDENTIAL_IS_TOKEN, "true");
// Create a new context that uses the generated token to perform the API calls
AbiquoContext tokenContext = ContextBuilder.newBuilder(new AbiquoApiMetadata()) //

View File

@ -19,7 +19,7 @@
package org.jclouds.abiquo.internal;
import static org.jclouds.abiquo.reference.AbiquoConstants.ASYNC_TASK_MONITOR_DELAY;
import static org.jclouds.abiquo.config.AbiquoProperties.ASYNC_TASK_MONITOR_DELAY;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotNull;