Issue 550: added providermetadata for Bluelock

This commit is contained in:
Adrian Cole 2011-05-29 22:44:00 -07:00
parent 1d23698300
commit efb8f0103e
18 changed files with 166 additions and 64 deletions

View File

@ -92,8 +92,8 @@ cloudservers-uk.propertiesbuilder=org.jclouds.rackspace.cloudservers.CloudServer
cloudservers-us.contextbuilder=org.jclouds.cloudservers.CloudServersContextBuilder
cloudservers-us.propertiesbuilder=org.jclouds.rackspace.cloudservers.CloudServersUSPropertiesBuilder
bluelock-vcdirector.contextbuilder=org.jclouds.vcloud.bluelock.BlueLockVCloudDirectorContextBuilder
bluelock-vcdirector.propertiesbuilder=org.jclouds.vcloud.bluelock.BlueLockVCloudDirectorPropertiesBuilder
bluelock-vcdirector.contextbuilder=org.jclouds.vcloud.bluelock.BluelockVCloudDirectorContextBuilder
bluelock-vcdirector.propertiesbuilder=org.jclouds.vcloud.bluelock.BluelockVCloudDirectorPropertiesBuilder
gogrid.propertiesbuilder=org.jclouds.gogrid.GoGridPropertiesBuilder
gogrid.contextbuilder=org.jclouds.gogrid.GoGridContextBuilder

View File

@ -24,7 +24,7 @@ import java.util.Properties;
import org.jclouds.http.config.JavaUrlHttpCommandExecutorServiceModule;
import org.jclouds.logging.jdk.config.JDKLoggingModule;
import org.jclouds.vcloud.VCloudContextBuilder;
import org.jclouds.vcloud.bluelock.config.BlueLockVCloudDirectorRestClientModule;
import org.jclouds.vcloud.bluelock.config.BluelockVCloudDirectorRestClientModule;
import org.jclouds.vcloud.compute.config.VCloudComputeServiceContextModule;
import com.google.inject.Injector;
@ -41,11 +41,10 @@ import com.google.inject.Module;
* {@link JavaUrlHttpCommandExecutorServiceModule http transports} will be installed.
*
* @author Adrian Cole
* @see BlueLockVCloudComputeServiceContext
*/
public class BlueLockVCloudDirectorContextBuilder extends VCloudContextBuilder {
public class BluelockVCloudDirectorContextBuilder extends VCloudContextBuilder {
public BlueLockVCloudDirectorContextBuilder(Properties props) {
public BluelockVCloudDirectorContextBuilder(Properties props) {
super(props);
}
@ -56,7 +55,7 @@ public class BlueLockVCloudDirectorContextBuilder extends VCloudContextBuilder {
@Override
protected void addClientModule(List<Module> modules) {
modules.add(new BlueLockVCloudDirectorRestClientModule());
modules.add(new BluelockVCloudDirectorRestClientModule());
}
}

View File

@ -31,7 +31,7 @@ import org.jclouds.vcloud.VCloudPropertiesBuilder;
*
* @author Adrian Cole
*/
public class BlueLockVCloudDirectorPropertiesBuilder extends VCloudPropertiesBuilder {
public class BluelockVCloudDirectorPropertiesBuilder extends VCloudPropertiesBuilder {
@Override
protected Properties defaultProperties() {
Properties properties = super.defaultProperties();
@ -41,7 +41,7 @@ public class BlueLockVCloudDirectorPropertiesBuilder extends VCloudPropertiesBui
return properties;
}
public BlueLockVCloudDirectorPropertiesBuilder(Properties properties) {
public BluelockVCloudDirectorPropertiesBuilder(Properties properties) {
super(properties);
}
}

View File

@ -0,0 +1,116 @@
/**
*
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
*
* ====================================================================
* Licensed 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.vcloud.bluelock;
import com.google.common.collect.ImmutableSet;
import java.net.URI;
import java.util.Set;
import org.jclouds.providers.BaseProviderMetadata;
import org.jclouds.providers.ProviderMetadata;
/**
* Implementation of {@link org.jclouds.types.ProviderMetadata} for Bluelock vCloud Director.
*
* @author Adrian Cole
*/
public class BluelockVCloudDirectorProviderMetadata extends BaseProviderMetadata {
/**
* {@inheritDoc}
*/
@Override
public String getId() {
return "bluelock-vcdirector";
}
/**
* {@inheritDoc}
*/
@Override
public String getType() {
return ProviderMetadata.COMPUTE_TYPE;
}
/**
* {@inheritDoc}
*/
@Override
public String getName() {
return "Bluelock vCloud Director";
}
/**
* {@inheritDoc}
*/
@Override
public String getIdentityName() {
return "User at Organization (user@org)";
}
/**
* {@inheritDoc}
*/
@Override
public String getCredentialName() {
return "Password";
}
/**
* {@inheritDoc}
*/
@Override
public URI getHomepage() {
return URI.create("http://www.bluelock.com/bluelock-cloud-hosting");
}
/**
* {@inheritDoc}
*/
@Override
public URI getConsole() {
return URI.create("https://vcenterprise.bluelock.com/cloud/");
}
/**
* {@inheritDoc}
*/
@Override
public URI getApiDocumentation() {
return URI.create("http://www.vmware.com/support/pubs/vcd_pubs.html");
}
/**
* {@inheritDoc}
*/
@Override
public Set<String> getLinkedServices() {
return ImmutableSet.of("bluelock-vcdirector");
}
/**
* {@inheritDoc}
*/
@Override
public Set<String> getIso3166Codes() {
return ImmutableSet.of("US-IN");
}
}

View File

@ -29,6 +29,6 @@ import org.jclouds.vcloud.config.VCloudRestClientModule;
*/
@RequiresHttp
@ConfiguresRestClient
public class BlueLockVCloudDirectorRestClientModule extends VCloudRestClientModule {
public class BluelockVCloudDirectorRestClientModule extends VCloudRestClientModule {
}

View File

@ -0,0 +1 @@
org.jclouds.vcloud.bluelock.BluelockVCloudDirectorProviderMetadata

View File

@ -18,31 +18,18 @@
*/
package org.jclouds.vcloud.bluelock;
import org.jclouds.compute.util.ComputeServiceUtils;
import org.jclouds.rest.Providers;
import org.jclouds.providers.BaseProviderMetadataTest;
import org.jclouds.providers.ProviderMetadata;
import org.testng.annotations.Test;
import com.google.common.collect.Iterables;
/**
*
* @author Adrian Cole
*
*/
@Test(groups = "unit")
public class ProvidersInPropertiesTest {
@Test
public void testSupportedProviders() {
Iterable<String> providers = Providers.getSupportedProviders();
assert Iterables.contains(providers, "bluelock-vcdirector") : providers;
@Test(groups = "unit", testName = "BluelockVCloudDirectorProviderTest")
public class BluelockVCloudDirectorProviderTest extends BaseProviderMetadataTest {
public BluelockVCloudDirectorProviderTest() {
super(new BluelockVCloudDirectorProviderMetadata(), ProviderMetadata.COMPUTE_TYPE);
}
@Test
public void testSupportedComputeServiceProviders() {
Iterable<String> providers = ComputeServiceUtils.getSupportedProviders();
assert Iterables.contains(providers, "bluelock-vcdirector") : providers;
}
}
}

View File

@ -22,14 +22,13 @@ import org.jclouds.vcloud.DeprecatedVCloudClientLiveTest;
import org.testng.annotations.Test;
/**
* Tests behavior of {@code BlueLockVCloudClient}
*
* @author Adrian Cole
*/
@Deprecated
@Test(groups = "live", singleThreaded = true)
public class DeprecatedBlueLockVCloudDirectorClientLiveTest extends DeprecatedVCloudClientLiveTest {
public DeprecatedBlueLockVCloudDirectorClientLiveTest() {
@Test(groups = "live", singleThreaded = true, testName = "DeprecatedBluelockVCloudDirectorClientLiveTest")
public class DeprecatedBluelockVCloudDirectorClientLiveTest extends DeprecatedVCloudClientLiveTest {
public DeprecatedBluelockVCloudDirectorClientLiveTest() {
provider = "bluelock-vcdirector";
}

View File

@ -34,9 +34,9 @@ import org.testng.annotations.Test;
*
* @author Adrian Cole
*/
@Test(groups = "live", enabled = true, sequential = true)
public class BlueLockVCloudDirectorComputeServiceLiveTest extends VCloudComputeServiceLiveTest {
public BlueLockVCloudDirectorComputeServiceLiveTest() {
@Test(groups = "live", enabled = true, singleThreaded = true, testName = "BluelockVCloudDirectorComputeServiceLiveTest")
public class BluelockVCloudDirectorComputeServiceLiveTest extends VCloudComputeServiceLiveTest {
public BluelockVCloudDirectorComputeServiceLiveTest() {
provider = "bluelock-vcdirector";
// vcloud requires instantiate before deploy, which takes longer than 30 seconds
nonBlockDuration = 300;

View File

@ -37,10 +37,10 @@ import com.google.common.collect.ImmutableSet;
*
* @author Adrian Cole
*/
@Test(groups = "live")
public class BlueLockVCloudDirectorTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTest {
@Test(groups = "live", testName = "BluelockVCloudDirectorTemplateBuilderLiveTest")
public class BluelockVCloudDirectorTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTest {
public BlueLockVCloudDirectorTemplateBuilderLiveTest() {
public BluelockVCloudDirectorTemplateBuilderLiveTest() {
provider = "bluelock-vcdirector";
}

View File

@ -26,10 +26,10 @@ import org.testng.annotations.Test;
*
* @author Adrian Cole
*/
@Test(groups = "live", enabled = true, singleThreaded = true, testName = "BlueLockVCloudDirectorCatalogClientLiveTest")
public class BlueLockVCloudDirectorCatalogClientLiveTest extends CatalogClientLiveTest {
@Test(groups = "live", enabled = true, singleThreaded = true, testName = "BluelockVCloudDirectorCatalogClientLiveTest")
public class BluelockVCloudDirectorCatalogClientLiveTest extends CatalogClientLiveTest {
public BlueLockVCloudDirectorCatalogClientLiveTest() {
public BluelockVCloudDirectorCatalogClientLiveTest() {
provider = "bluelock-vcdirector";
}
}

View File

@ -26,10 +26,10 @@ import org.testng.annotations.Test;
*
* @author Adrian Cole
*/
@Test(groups = "live", enabled = true, singleThreaded = true, testName = "BlueLockVCloudDirectorNetworkClientLiveTest")
public class BlueLockVCloudDirectorNetworkClientLiveTest extends NetworkClientLiveTest {
@Test(groups = "live", enabled = true, singleThreaded = true, testName = "BluelockVCloudDirectorNetworkClientLiveTest")
public class BluelockVCloudDirectorNetworkClientLiveTest extends NetworkClientLiveTest {
public BlueLockVCloudDirectorNetworkClientLiveTest() {
public BluelockVCloudDirectorNetworkClientLiveTest() {
provider = "bluelock-vcdirector";
}
}

View File

@ -26,10 +26,10 @@ import org.testng.annotations.Test;
*
* @author Adrian Cole
*/
@Test(groups = "live", enabled = true, singleThreaded = true, testName = "BlueLockVCloudDirectorOrgClientLiveTest")
public class BlueLockVCloudDirectorOrgClientLiveTest extends OrgClientLiveTest {
@Test(groups = "live", enabled = true, singleThreaded = true, testName = "BluelockVCloudDirectorOrgClientLiveTest")
public class BluelockVCloudDirectorOrgClientLiveTest extends OrgClientLiveTest {
public BlueLockVCloudDirectorOrgClientLiveTest() {
public BluelockVCloudDirectorOrgClientLiveTest() {
provider = "bluelock-vcdirector";
}
}

View File

@ -26,10 +26,10 @@ import org.testng.annotations.Test;
*
* @author Adrian Cole
*/
@Test(groups = "live", enabled = true, singleThreaded = true, testName = "BlueLockVCloudDirectorTaskClientLiveTest")
public class BlueLockVCloudDirectorTaskClientLiveTest extends TaskClientLiveTest {
@Test(groups = "live", enabled = true, singleThreaded = true, testName = "BluelockVCloudDirectorTaskClientLiveTest")
public class BluelockVCloudDirectorTaskClientLiveTest extends TaskClientLiveTest {
public BlueLockVCloudDirectorTaskClientLiveTest() {
public BluelockVCloudDirectorTaskClientLiveTest() {
provider = "bluelock-vcdirector";
}
}

View File

@ -26,10 +26,10 @@ import org.testng.annotations.Test;
*
* @author Adrian Cole
*/
@Test(groups = "live", enabled = true, singleThreaded = true, testName = "BlueLockVCloudDirectorVAppClientLiveTest")
public class BlueLockVCloudDirectorVAppClientLiveTest extends VAppClientLiveTest {
@Test(groups = "live", enabled = true, singleThreaded = true, testName = "BluelockVCloudDirectorVAppClientLiveTest")
public class BluelockVCloudDirectorVAppClientLiveTest extends VAppClientLiveTest {
public BlueLockVCloudDirectorVAppClientLiveTest() {
public BluelockVCloudDirectorVAppClientLiveTest() {
provider = "bluelock-vcdirector";
}
}

View File

@ -26,10 +26,10 @@ import org.testng.annotations.Test;
*
* @author Adrian Cole
*/
@Test(groups = "live", enabled = true, singleThreaded = true, testName = "BlueLockVCloudDirectorVAppTemplateClientLiveTest")
public class BlueLockVCloudDirectorVAppTemplateClientLiveTest extends VAppTemplateClientLiveTest {
@Test(groups = "live", enabled = true, singleThreaded = true, testName = "BluelockVCloudDirectorVAppTemplateClientLiveTest")
public class BluelockVCloudDirectorVAppTemplateClientLiveTest extends VAppTemplateClientLiveTest {
public BlueLockVCloudDirectorVAppTemplateClientLiveTest() {
public BluelockVCloudDirectorVAppTemplateClientLiveTest() {
provider = "bluelock-vcdirector";
}
}

View File

@ -26,10 +26,10 @@ import org.testng.annotations.Test;
*
* @author Adrian Cole
*/
@Test(groups = "live", enabled = true, singleThreaded = true, testName = "BlueLockVCloudDirectorVDCClientLiveTest")
public class BlueLockVCloudDirectorVDCClientLiveTest extends VDCClientLiveTest {
@Test(groups = "live", enabled = true, singleThreaded = true, testName = "BluelockVCloudDirectorVDCClientLiveTest")
public class BluelockVCloudDirectorVDCClientLiveTest extends VDCClientLiveTest {
public BlueLockVCloudDirectorVDCClientLiveTest() {
public BluelockVCloudDirectorVDCClientLiveTest() {
provider = "bluelock-vcdirector";
}
}

View File

@ -26,10 +26,10 @@ import org.testng.annotations.Test;
*
* @author Adrian Cole
*/
@Test(groups = "live", enabled = true, singleThreaded = true, testName = "BlueLockVCloudDirectorVmClientLiveTest")
public class BlueLockVCloudDirectorVmClientLiveTest extends VmClientLiveTest {
@Test(groups = "live", enabled = true, singleThreaded = true, testName = "BluelockVCloudDirectorVmClientLiveTest")
public class BluelockVCloudDirectorVmClientLiveTest extends VmClientLiveTest {
public BlueLockVCloudDirectorVmClientLiveTest() {
public BluelockVCloudDirectorVmClientLiveTest() {
provider = "bluelock-vcdirector";
}