diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackGlobalAsyncClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackGlobalAsyncClient.java index f41bd5776a..fe7af3cff1 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackGlobalAsyncClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackGlobalAsyncClient.java @@ -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(); + } diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackGlobalClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackGlobalClient.java index 53e3f5dd99..fa05591ad6 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackGlobalClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackGlobalClient.java @@ -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(); + } diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/config/CloudStackRestClientModule.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/config/CloudStackRestClientModule.java index 537561f7e3..92a2f1fe60 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/config/CloudStackRestClientModule.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/config/CloudStackRestClientModule.java @@ -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 + * + * @see GlobalStoragePoolClient + * @see + * @author Richard Downer + */ +@RequestFilters(QuerySigner.class) +@QueryParams(keys = "response", values = "json") +public interface GlobalStoragePoolAsyncClient { +} diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalStoragePoolClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalStoragePoolClient.java new file mode 100644 index 0000000000..51257cd492 --- /dev/null +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalStoragePoolClient.java @@ -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. + *

+ * + * @see GlobalStoragePoolClient + * @see + * @author Richard Downer + */ +@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) +public interface GlobalStoragePoolClient { +} diff --git a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/GlobalStoragePoolAsyncClientTest.java b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/GlobalStoragePoolAsyncClientTest.java new file mode 100644 index 0000000000..efb77076ae --- /dev/null +++ b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/GlobalStoragePoolAsyncClientTest.java @@ -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 { + + @Override + protected TypeLiteral> createTypeLiteral() { + return new TypeLiteral>() { + }; + } +} diff --git a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/GlobalStoragePoolClientLiveTest.java b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/GlobalStoragePoolClientLiveTest.java new file mode 100644 index 0000000000..37a60edf93 --- /dev/null +++ b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/GlobalStoragePoolClientLiveTest.java @@ -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 { + +}