Issue 550: added gogrid to provider metadata

This commit is contained in:
Adrian Cole 2011-05-30 10:42:32 -07:00
parent b6f3c29e11
commit be422a2c0e
3 changed files with 151 additions and 0 deletions

View File

@ -0,0 +1,115 @@
/**
*
* 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.gogrid;
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 GoGrid.
*
* @author Adrian Cole
*/
public class GoGridProviderMetadata extends BaseProviderMetadata {
/**
* {@inheritDoc}
*/
@Override
public String getId() {
return "gogrid";
}
/**
* {@inheritDoc}
*/
@Override
public String getType() {
return ProviderMetadata.COMPUTE_TYPE;
}
/**
* {@inheritDoc}
*/
@Override
public String getName() {
return "GoGrid";
}
/**
* {@inheritDoc}
*/
@Override
public String getIdentityName() {
return "API Key";
}
/**
* {@inheritDoc}
*/
@Override
public String getCredentialName() {
return "Shared Secret";
}
/**
* {@inheritDoc}
*/
@Override
public URI getHomepage() {
return URI.create("http://www.gogrid.com");
}
/**
* {@inheritDoc}
*/
@Override
public URI getConsole() {
return URI.create("https://my.gogrid.com/gogrid");
}
/**
* {@inheritDoc}
*/
@Override
public URI getApiDocumentation() {
return URI.create("https://wiki.gogrid.com/wiki/index.php/API");
}
/**
* {@inheritDoc}
*/
@Override
public Set<String> getLinkedServices() {
return ImmutableSet.of("gogrid");
}
/**
* {@inheritDoc}
*/
@Override
public Set<String> getIso3166Codes() {
return ImmutableSet.of("US-CA","US-VA");
}
}

View File

@ -0,0 +1 @@
org.jclouds.gogrid.GoGridProviderMetadata

View File

@ -0,0 +1,35 @@
/**
*
* 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.gogrid;
import org.jclouds.providers.BaseProviderMetadataTest;
import org.jclouds.providers.ProviderMetadata;
import org.testng.annotations.Test;
/**
*
* @author Adrian Cole
*/
@Test(groups = "unit", testName = "GoGridProviderTest")
public class GoGridProviderTest extends BaseProviderMetadataTest {
public GoGridProviderTest() {
super(new GoGridProviderMetadata(), ProviderMetadata.COMPUTE_TYPE);
}
}