Add empty feature classes for Storage Pool API

This commit is contained in:
Richard Downer 2011-12-14 15:42:27 +00:00
parent 2ab45a495d
commit c8bc318fba
7 changed files with 157 additions and 0 deletions

View File

@ -23,6 +23,7 @@ import org.jclouds.cloudstack.features.GlobalAlertAsyncClient;
import org.jclouds.cloudstack.features.GlobalCapacityAsyncClient;
import org.jclouds.cloudstack.features.GlobalHostAsyncClient;
import org.jclouds.cloudstack.features.GlobalOfferingAsyncClient;
import org.jclouds.cloudstack.features.GlobalStoragePoolAsyncClient;
import org.jclouds.cloudstack.features.GlobalUserAsyncClient;
import org.jclouds.rest.annotations.Delegate;
@ -77,4 +78,10 @@ public interface CloudStackGlobalAsyncClient extends CloudStackDomainAsyncClient
@Delegate
GlobalHostAsyncClient getHostClient();
/**
* Provides synchronous access to Storage Pools
*/
@Delegate
GlobalStoragePoolAsyncClient getStoragePoolClient();
}

View File

@ -25,6 +25,7 @@ import org.jclouds.cloudstack.features.GlobalAlertClient;
import org.jclouds.cloudstack.features.GlobalCapacityClient;
import org.jclouds.cloudstack.features.GlobalHostClient;
import org.jclouds.cloudstack.features.GlobalOfferingClient;
import org.jclouds.cloudstack.features.GlobalStoragePoolClient;
import org.jclouds.cloudstack.features.GlobalUserClient;
import org.jclouds.concurrent.Timeout;
import org.jclouds.rest.annotations.Delegate;
@ -81,4 +82,10 @@ public interface CloudStackGlobalClient extends CloudStackDomainClient {
@Delegate
GlobalHostClient getHostClient();
/**
* Provides synchronous access to Storage Pools
*/
@Delegate
GlobalStoragePoolClient getStoragePoolClient();
}

View File

@ -58,6 +58,8 @@ import org.jclouds.cloudstack.features.GlobalHostAsyncClient;
import org.jclouds.cloudstack.features.GlobalHostClient;
import org.jclouds.cloudstack.features.GlobalOfferingAsyncClient;
import org.jclouds.cloudstack.features.GlobalOfferingClient;
import org.jclouds.cloudstack.features.GlobalStoragePoolAsyncClient;
import org.jclouds.cloudstack.features.GlobalStoragePoolClient;
import org.jclouds.cloudstack.features.GlobalUserAsyncClient;
import org.jclouds.cloudstack.features.GlobalUserClient;
import org.jclouds.cloudstack.features.GuestOSAsyncClient;
@ -152,6 +154,7 @@ public class CloudStackRestClientModule extends RestClientModule<CloudStackClien
.put(GlobalCapacityClient.class, GlobalCapacityAsyncClient.class)//
.put(GlobalOfferingClient.class, GlobalOfferingAsyncClient.class)//
.put(GlobalHostClient.class, GlobalHostAsyncClient.class)//
.put(GlobalStoragePoolClient.class, GlobalStoragePoolAsyncClient.class)//
.build();
@Override

View File

@ -0,0 +1,36 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds 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.cloudstack.features;
import org.jclouds.cloudstack.filters.QuerySigner;
import org.jclouds.rest.annotations.QueryParams;
import org.jclouds.rest.annotations.RequestFilters;
/**
* Provides asynchronous access to CloudStack storage pool features.
* <p/>
*
* @see GlobalStoragePoolClient
* @see <a href="http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Global_Admin.html" />
* @author Richard Downer
*/
@RequestFilters(QuerySigner.class)
@QueryParams(keys = "response", values = "json")
public interface GlobalStoragePoolAsyncClient {
}

View File

@ -0,0 +1,35 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds 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.cloudstack.features;
import org.jclouds.concurrent.Timeout;
import java.util.concurrent.TimeUnit;
/**
* Provides synchronous access to CloudStack storage pool features.
* <p/>
*
* @see GlobalStoragePoolClient
* @see <a href="http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Global_Admin.html" />
* @author Richard Downer
*/
@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS)
public interface GlobalStoragePoolClient {
}

View File

@ -0,0 +1,38 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds 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.cloudstack.features;
import com.google.inject.TypeLiteral;
import org.jclouds.rest.internal.RestAnnotationProcessor;
import org.testng.annotations.Test;
/**
* Tests behavior of {@code GlobalStoragePoolAsyncClient}
*
* @author Richard Downer
*/
@Test(groups = "unit", testName = "GlobalStoragePoolAsyncClientTest")
public class GlobalStoragePoolAsyncClientTest extends BaseCloudStackAsyncClientTest<GlobalStoragePoolAsyncClient> {
@Override
protected TypeLiteral<RestAnnotationProcessor<GlobalStoragePoolAsyncClient>> createTypeLiteral() {
return new TypeLiteral<RestAnnotationProcessor<GlobalStoragePoolAsyncClient>>() {
};
}
}

View File

@ -0,0 +1,31 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds 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.cloudstack.features;
import org.testng.annotations.Test;
/**
* Tests behavior of {@code GlobalStoragePoolClient}
*
* @author Richard Downer
*/
@Test(groups = "live", singleThreaded = true, testName = "GlobalStoragePoolClientLiveTest")
public class GlobalStoragePoolClientLiveTest extends BaseCloudStackClientLiveTest {
}