You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by ab...@apache.org on 2013/07/01 21:15:11 UTC
[24/24] git commit: JCLOUDS-151 - CloudStack refactored to remove
async, *Client renamed to *Api.
JCLOUDS-151 - CloudStack refactored to remove async, *Client renamed to *Api.
Project: http://git-wip-us.apache.org/repos/asf/incubator-jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-jclouds/commit/c6986efd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-jclouds/tree/c6986efd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-jclouds/diff/c6986efd
Branch: refs/heads/master
Commit: c6986efda62de0730106d42e23da25972feece33
Parents: 5f3b8d3
Author: Andrew Bayer <an...@gmail.com>
Authored: Mon Jul 1 12:13:48 2013 -0700
Committer: Andrew Bayer <an...@gmail.com>
Committed: Mon Jul 1 12:13:48 2013 -0700
----------------------------------------------------------------------
.../org/jclouds/cloudstack/CloudStackApi.java | 190 +++++++++
.../cloudstack/CloudStackApiMetadata.java | 22 +-
.../cloudstack/CloudStackAsyncClient.java | 195 ---------
.../jclouds/cloudstack/CloudStackClient.java | 191 ---------
.../jclouds/cloudstack/CloudStackContext.java | 20 +-
.../jclouds/cloudstack/CloudStackDomainApi.java | 61 +++
.../cloudstack/CloudStackDomainAsyncClient.java | 66 ---
.../cloudstack/CloudStackDomainClient.java | 62 ---
.../jclouds/cloudstack/CloudStackGlobalApi.java | 128 ++++++
.../cloudstack/CloudStackGlobalAsyncClient.java | 132 ------
.../cloudstack/CloudStackGlobalClient.java | 129 ------
.../compute/CloudStackComputeService.java | 14 +-
.../CloudStackComputeServiceContextModule.java | 16 +-
.../extensions/CloudStackImageExtension.java | 18 +-
.../compute/loaders/CreateUniqueKeyPair.java | 8 +-
.../loaders/FindSecurityGroupOrCreate.java | 8 +-
.../CloudStackComputeServiceAdapter.java | 54 +--
.../config/CloudStackHttpApiModule.java | 158 ++++++++
.../config/CloudStackRestClientModule.java | 287 -------------
.../jclouds/cloudstack/domain/GuestIPType.java | 2 +-
.../jclouds/cloudstack/domain/NetworkType.java | 2 +-
.../jclouds/cloudstack/domain/StorageType.java | 2 +-
.../cloudstack/domain/TemplateFilter.java | 2 +-
.../jclouds/cloudstack/domain/TrafficType.java | 2 +-
.../jclouds/cloudstack/features/AccountApi.java | 79 ++++
.../cloudstack/features/AccountAsyncClient.java | 74 ----
.../cloudstack/features/AccountClient.java | 48 ---
.../jclouds/cloudstack/features/AddressApi.java | 113 ++++++
.../cloudstack/features/AddressAsyncClient.java | 99 -----
.../cloudstack/features/AddressClient.java | 70 ----
.../cloudstack/features/AsyncJobApi.java | 79 ++++
.../features/AsyncJobAsyncClient.java | 74 ----
.../cloudstack/features/AsyncJobClient.java | 49 ---
.../cloudstack/features/ConfigurationApi.java | 54 +++
.../features/ConfigurationAsyncClient.java | 54 ---
.../features/ConfigurationClient.java | 38 --
.../cloudstack/features/DomainAccountApi.java | 84 ++++
.../features/DomainAccountAsyncClient.java | 74 ----
.../features/DomainAccountClient.java | 55 ---
.../cloudstack/features/DomainDomainApi.java | 100 +++++
.../features/DomainDomainAsyncClient.java | 87 ----
.../cloudstack/features/DomainDomainClient.java | 64 ---
.../cloudstack/features/DomainLimitApi.java | 57 +++
.../features/DomainLimitAsyncClient.java | 57 ---
.../cloudstack/features/DomainLimitClient.java | 39 --
.../cloudstack/features/DomainUserApi.java | 92 +++++
.../features/DomainUserAsyncClient.java | 87 ----
.../cloudstack/features/DomainUserClient.java | 57 ---
.../jclouds/cloudstack/features/EventApi.java | 73 ++++
.../cloudstack/features/EventAsyncClient.java | 72 ----
.../cloudstack/features/EventClient.java | 47 ---
.../cloudstack/features/FirewallApi.java | 157 ++++++++
.../features/FirewallAsyncClient.java | 160 --------
.../cloudstack/features/FirewallClient.java | 131 ------
.../cloudstack/features/GlobalAccountApi.java | 104 +++++
.../features/GlobalAccountAsyncClient.java | 85 ----
.../features/GlobalAccountClient.java | 71 ----
.../cloudstack/features/GlobalAlertApi.java | 61 +++
.../features/GlobalAlertAsyncClient.java | 61 ---
.../cloudstack/features/GlobalAlertClient.java | 41 --
.../cloudstack/features/GlobalCapacityApi.java | 61 +++
.../features/GlobalCapacityAsyncClient.java | 61 ---
.../features/GlobalCapacityClient.java | 41 --
.../features/GlobalConfigurationApi.java | 84 ++++
.../GlobalConfigurationAsyncClient.java | 74 ----
.../features/GlobalConfigurationClient.java | 55 ---
.../cloudstack/features/GlobalDomainApi.java | 109 +++++
.../features/GlobalDomainAsyncClient.java | 91 -----
.../cloudstack/features/GlobalDomainClient.java | 73 ----
.../cloudstack/features/GlobalHostApi.java | 248 ++++++++++++
.../features/GlobalHostAsyncClient.java | 246 ------------
.../cloudstack/features/GlobalHostClient.java | 168 --------
.../cloudstack/features/GlobalOfferingApi.java | 179 +++++++++
.../features/GlobalOfferingAsyncClient.java | 131 ------
.../features/GlobalOfferingClient.java | 124 ------
.../cloudstack/features/GlobalPodApi.java | 149 +++++++
.../features/GlobalPodAsyncClient.java | 143 -------
.../cloudstack/features/GlobalPodClient.java | 95 -----
.../features/GlobalStoragePoolApi.java | 51 +++
.../features/GlobalStoragePoolAsyncClient.java | 54 ---
.../features/GlobalStoragePoolClient.java | 35 --
.../cloudstack/features/GlobalUsageApi.java | 64 +++
.../features/GlobalUsageAsyncClient.java | 67 ----
.../cloudstack/features/GlobalUsageClient.java | 40 --
.../cloudstack/features/GlobalUserApi.java | 115 ++++++
.../features/GlobalUserAsyncClient.java | 95 -----
.../cloudstack/features/GlobalUserClient.java | 79 ----
.../cloudstack/features/GlobalVlanApi.java | 106 +++++
.../features/GlobalVlanAsyncClient.java | 109 -----
.../cloudstack/features/GlobalVlanClient.java | 64 ---
.../cloudstack/features/GlobalZoneApi.java | 104 +++++
.../features/GlobalZoneAsyncClient.java | 84 ----
.../cloudstack/features/GlobalZoneClient.java | 73 ----
.../jclouds/cloudstack/features/GuestOSApi.java | 111 +++++
.../cloudstack/features/GuestOSAsyncClient.java | 99 -----
.../cloudstack/features/GuestOSClient.java | 67 ----
.../cloudstack/features/HypervisorApi.java | 63 +++
.../features/HypervisorAsyncClient.java | 66 ---
.../cloudstack/features/HypervisorClient.java | 45 ---
.../org/jclouds/cloudstack/features/ISOApi.java | 220 ++++++++++
.../cloudstack/features/ISOAsyncClient.java | 223 ----------
.../jclouds/cloudstack/features/ISOClient.java | 144 -------
.../jclouds/cloudstack/features/LimitApi.java | 59 +++
.../cloudstack/features/LimitAsyncClient.java | 59 ---
.../cloudstack/features/LimitClient.java | 39 --
.../cloudstack/features/LoadBalancerApi.java | 248 ++++++++++++
.../features/LoadBalancerAsyncClient.java | 176 --------
.../cloudstack/features/LoadBalancerClient.java | 161 --------
.../org/jclouds/cloudstack/features/NATApi.java | 170 ++++++++
.../cloudstack/features/NATAsyncClient.java | 143 -------
.../jclouds/cloudstack/features/NATClient.java | 106 -----
.../jclouds/cloudstack/features/NetworkApi.java | 120 ++++++
.../cloudstack/features/NetworkAsyncClient.java | 98 -----
.../cloudstack/features/NetworkClient.java | 78 ----
.../cloudstack/features/OfferingApi.java | 149 +++++++
.../features/OfferingAsyncClient.java | 125 ------
.../cloudstack/features/OfferingClient.java | 92 -----
.../cloudstack/features/SSHKeyPairApi.java | 119 ++++++
.../features/SSHKeyPairAsyncClient.java | 104 -----
.../cloudstack/features/SSHKeyPairClient.java | 75 ----
.../cloudstack/features/SecurityGroupApi.java | 245 +++++++++++
.../features/SecurityGroupAsyncClient.java | 177 --------
.../features/SecurityGroupClient.java | 159 --------
.../jclouds/cloudstack/features/SessionApi.java | 79 ++++
.../cloudstack/features/SessionAsyncClient.java | 66 ---
.../cloudstack/features/SessionClient.java | 57 ---
.../cloudstack/features/SnapshotApi.java | 172 ++++++++
.../features/SnapshotAsyncClient.java | 175 --------
.../cloudstack/features/SnapshotClient.java | 107 -----
.../cloudstack/features/TemplateApi.java | 295 ++++++++++++++
.../features/TemplateAsyncClient.java | 189 ---------
.../cloudstack/features/TemplateClient.java | 210 ----------
.../jclouds/cloudstack/features/VMGroupApi.java | 115 ++++++
.../cloudstack/features/VMGroupAsyncClient.java | 118 ------
.../cloudstack/features/VMGroupClient.java | 73 ----
.../cloudstack/features/VirtualMachineApi.java | 259 ++++++++++++
.../features/VirtualMachineAsyncClient.java | 193 ---------
.../features/VirtualMachineClient.java | 173 --------
.../jclouds/cloudstack/features/VolumeApi.java | 171 ++++++++
.../cloudstack/features/VolumeAsyncClient.java | 144 -------
.../cloudstack/features/VolumeClient.java | 104 -----
.../jclouds/cloudstack/features/ZoneApi.java | 80 ++++
.../cloudstack/features/ZoneAsyncClient.java | 75 ----
.../jclouds/cloudstack/features/ZoneClient.java | 49 ---
.../functions/CreateFirewallRulesForIP.java | 8 +-
.../CreatePortForwardingRulesForIP.java | 8 +-
.../functions/CreateSecurityGroupIfNeeded.java | 14 +-
.../GetFirewallRulesByVirtualMachine.java | 10 +-
.../GetIPForwardingRulesByVirtualMachine.java | 8 +-
.../ReuseOrAssociateNewPublicIPAddress.java | 16 +-
.../StaticNATVirtualMachineInNetwork.java | 10 +-
.../cloudstack/functions/ZoneIdToZone.java | 10 +-
...ateSessionAndRetryOn401AndLogoutOnClose.java | 6 +-
.../internal/CloudStackContextImpl.java | 36 +-
.../loaders/LoginWithPasswordCredentials.java | 6 +-
.../cloudstack/options/AddClusterOptions.java | 2 +-
.../cloudstack/options/AddHostOptions.java | 2 +-
.../options/AddSecondaryStorageOptions.java | 2 +-
.../cloudstack/options/CreatePodOptions.java | 2 +-
.../options/CreateSnapshotOptions.java | 4 +-
.../cloudstack/options/DeleteHostOptions.java | 2 +-
.../cloudstack/options/DeleteISOOptions.java | 4 +-
.../cloudstack/options/ExtractISOOptions.java | 4 +-
.../options/GenerateUsageRecordsOptions.java | 2 +-
.../cloudstack/options/ListISOsOptions.java | 4 +-
.../cloudstack/options/ListPodsOptions.java | 2 +-
.../options/ListSnapshotPoliciesOptions.java | 4 +-
.../options/ListSnapshotsOptions.java | 4 +-
.../options/ListUsageRecordsOptions.java | 2 +-
.../cloudstack/options/RegisterISOOptions.java | 4 +-
.../options/UpdateClusterOptions.java | 2 +-
.../cloudstack/options/UpdateHostOptions.java | 2 +-
.../cloudstack/options/UpdateISOOptions.java | 4 +-
.../options/UpdateISOPermissionsOptions.java | 4 +-
.../cloudstack/options/UpdatePodOptions.java | 2 +-
.../predicates/CorrectHypervisorForZone.java | 16 +-
.../cloudstack/predicates/JobComplete.java | 8 +-
.../predicates/LoadBalancerRuleActive.java | 8 +-
.../cloudstack/predicates/OSCategoryIn.java | 8 +-
.../predicates/VirtualMachineDestroyed.java | 8 +-
.../predicates/VirtualMachineExpunged.java | 8 +-
.../predicates/VirtualMachineRunning.java | 8 +-
.../BlockUntilJobCompletesAndReturnResult.java | 8 +-
.../cloudstack/suppliers/GetCurrentUser.java | 8 +-
.../suppliers/NetworksForCurrentUser.java | 10 +-
.../jclouds/cloudstack/util/ApiKeyPairs.java | 6 +-
.../cloudstack/CloudStackAsyncClientTest.java | 120 ------
.../PasswordAuthenticationExpectTest.java | 10 +-
...CloudStackComputeServiceAdapterLiveTest.java | 18 +-
.../compute/CloudStackExperimentLiveTest.java | 14 +-
.../loaders/CreateUniqueKeyPairTest.java | 12 +-
.../loaders/FindSecurityGroupOrCreateTest.java | 56 +--
.../features/AccountApiExpectTest.java | 108 +++++
.../cloudstack/features/AccountApiLiveTest.java | 82 ++++
.../cloudstack/features/AccountApiTest.java | 98 +++++
.../features/AccountAsyncClientTest.java | 98 -----
.../features/AccountClientExpectTest.java | 108 -----
.../features/AccountClientLiveTest.java | 82 ----
.../cloudstack/features/AddressApiLiveTest.java | 96 +++++
.../cloudstack/features/AddressApiTest.java | 137 +++++++
.../features/AddressAsyncClientTest.java | 137 -------
.../features/AddressClientLiveTest.java | 96 -----
.../features/AsyncJobApiLiveTest.java | 74 ++++
.../cloudstack/features/AsyncJobApiTest.java | 96 +++++
.../features/AsyncJobAsyncClientTest.java | 96 -----
.../features/AsyncJobClientLiveTest.java | 74 ----
.../features/ConfigurationApiLiveTest.java | 37 ++
.../features/ConfigurationApiTest.java | 57 +++
.../features/ConfigurationAsyncClientTest.java | 57 ---
.../features/ConfigurationClientLiveTest.java | 37 --
.../features/DomainAccountApiLiveTest.java | 66 +++
.../features/DomainAccountApiTest.java | 69 ++++
.../features/DomainAccountAsyncClientTest.java | 69 ----
.../features/DomainAccountClientLiveTest.java | 66 ---
.../features/DomainDomainApiExpectTest.java | 158 ++++++++
.../features/DomainDomainApiLiveTest.java | 99 +++++
.../features/DomainDomainClientExpectTest.java | 158 --------
.../features/DomainDomainClientLiveTest.java | 99 -----
.../features/DomainLimitApiLiveTest.java | 30 ++
.../cloudstack/features/DomainLimitApiTest.java | 59 +++
.../features/DomainLimitAsyncClientTest.java | 59 ---
.../features/DomainLimitClientLiveTest.java | 30 --
.../features/DomainUserApiLiveTest.java | 91 +++++
.../features/DomainUserClientLiveTest.java | 91 -----
.../cloudstack/features/EventApiLiveTest.java | 69 ++++
.../cloudstack/features/EventApiTest.java | 92 +++++
.../features/EventAsyncClientTest.java | 92 -----
.../features/EventClientLiveTest.java | 69 ----
.../features/FirewallApiExpectTest.java | 289 +++++++++++++
.../features/FirewallApiLiveTest.java | 194 +++++++++
.../cloudstack/features/FirewallApiTest.java | 118 ++++++
.../features/FirewallAsyncClientTest.java | 118 ------
.../features/FirewallClientExpectTest.java | 289 -------------
.../features/FirewallClientLiveTest.java | 194 ---------
.../features/GlobalAccountApiLiveTest.java | 69 ++++
.../features/GlobalAccountApiTest.java | 111 +++++
.../features/GlobalAccountAsyncClientTest.java | 111 -----
.../features/GlobalAccountClientLiveTest.java | 69 ----
.../features/GlobalAlertApiLiveTest.java | 56 +++
.../cloudstack/features/GlobalAlertApiTest.java | 75 ++++
.../features/GlobalAlertAsyncClientTest.java | 75 ----
.../features/GlobalAlertClientLiveTest.java | 56 ---
.../features/GlobalCapacityApiLiveTest.java | 56 +++
.../features/GlobalCapacityApiTest.java | 74 ++++
.../features/GlobalCapacityAsyncClientTest.java | 74 ----
.../features/GlobalCapacityClientLiveTest.java | 56 ---
.../GlobalConfigurationApiExpectTest.java | 127 ++++++
.../GlobalConfigurationApiLiveTest.java | 101 +++++
.../GlobalConfigurationClientExpectTest.java | 127 ------
.../GlobalConfigurationClientLiveTest.java | 101 -----
.../features/GlobalDomainApiExpectTest.java | 146 +++++++
.../features/GlobalDomainApiLiveTest.java | 79 ++++
.../features/GlobalDomainClientExpectTest.java | 146 -------
.../features/GlobalDomainClientLiveTest.java | 79 ----
.../features/GlobalHostApiExpectTest.java | 377 +++++++++++++++++
.../features/GlobalHostApiLiveTest.java | 94 +++++
.../cloudstack/features/GlobalHostApiTest.java | 53 +++
.../features/GlobalHostAsyncClientTest.java | 53 ---
.../features/GlobalHostClientExpectTest.java | 377 -----------------
.../features/GlobalHostClientLiveTest.java | 94 -----
.../features/GlobalOfferingApiLiveTest.java | 154 +++++++
.../features/GlobalOfferingApiTest.java | 169 ++++++++
.../features/GlobalOfferingAsyncClientTest.java | 169 --------
.../features/GlobalOfferingClientLiveTest.java | 154 -------
.../features/GlobalPodApiExpectTest.java | 208 ++++++++++
.../features/GlobalPodApiLiveTest.java | 131 ++++++
.../features/GlobalPodClientExpectTest.java | 208 ----------
.../features/GlobalPodClientLiveTest.java | 131 ------
.../features/GlobalStoragePoolApiLiveTest.java | 65 +++
.../features/GlobalStoragePoolApiTest.java | 69 ++++
.../GlobalStoragePoolAsyncClientTest.java | 69 ----
.../GlobalStoragePoolClientLiveTest.java | 65 ---
.../features/GlobalUsageApiLiveTest.java | 60 +++
.../cloudstack/features/GlobalUsageApiTest.java | 141 +++++++
.../features/GlobalUsageAsyncClientTest.java | 141 -------
.../features/GlobalUsageClientLiveTest.java | 60 ---
.../features/GlobalUserApiLiveTest.java | 105 +++++
.../cloudstack/features/GlobalUserApiTest.java | 98 +++++
.../features/GlobalUserAsyncClientTest.java | 98 -----
.../features/GlobalUserClientLiveTest.java | 105 -----
.../features/GlobalVlanApiExpectTest.java | 171 ++++++++
.../features/GlobalVlanApiLiveTest.java | 136 +++++++
.../features/GlobalVlanClientExpectTest.java | 171 --------
.../features/GlobalVlanClientLiveTest.java | 136 -------
.../features/GlobalZoneApiExpectTest.java | 135 +++++++
.../features/GlobalZoneApiLiveTest.java | 67 ++++
.../features/GlobalZoneClientExpectTest.java | 135 -------
.../features/GlobalZoneClientLiveTest.java | 67 ----
.../cloudstack/features/GuestOSApiLiveTest.java | 75 ++++
.../cloudstack/features/GuestOSApiTest.java | 132 ++++++
.../features/GuestOSAsyncClientTest.java | 132 ------
.../features/GuestOSClientLiveTest.java | 75 ----
.../features/HypervisorApiLiveTest.java | 45 +++
.../cloudstack/features/HypervisorApiTest.java | 74 ++++
.../features/HypervisorAsyncClientTest.java | 74 ----
.../features/HypervisorClientLiveTest.java | 45 ---
.../cloudstack/features/ISOApiExpectTest.java | 224 +++++++++++
.../cloudstack/features/ISOApiLiveTest.java | 110 +++++
.../jclouds/cloudstack/features/ISOApiTest.java | 280 +++++++++++++
.../cloudstack/features/ISOAsyncClientTest.java | 280 -------------
.../features/ISOClientExpectTest.java | 224 -----------
.../cloudstack/features/ISOClientLiveTest.java | 110 -----
.../cloudstack/features/LimitApiLiveTest.java | 46 +++
.../cloudstack/features/LimitApiTest.java | 73 ++++
.../features/LimitAsyncClientTest.java | 73 ----
.../features/LimitClientLiveTest.java | 46 ---
.../features/LoadBalancerApiLiveTest.java | 228 +++++++++++
.../features/LoadBalancerApiTest.java | 161 ++++++++
.../features/LoadBalancerAsyncClientTest.java | 161 --------
.../features/LoadBalancerClientLiveTest.java | 228 -----------
.../cloudstack/features/NATApiLiveTest.java | 65 +++
.../jclouds/cloudstack/features/NATApiTest.java | 202 ++++++++++
.../cloudstack/features/NATAsyncClientTest.java | 202 ----------
.../cloudstack/features/NATClientLiveTest.java | 65 ---
.../cloudstack/features/NetworkApiLiveTest.java | 188 +++++++++
.../cloudstack/features/NetworkApiTest.java | 173 ++++++++
.../features/NetworkAsyncClientTest.java | 173 --------
.../features/NetworkClientLiveTest.java | 188 ---------
.../features/OfferingApiLiveTest.java | 112 ++++++
.../cloudstack/features/OfferingApiTest.java | 206 ++++++++++
.../features/OfferingAsyncClientTest.java | 206 ----------
.../features/OfferingClientLiveTest.java | 112 ------
.../features/SSHKeyPairApiExpectTest.java | 185 +++++++++
.../features/SSHKeyPairApiLiveTest.java | 94 +++++
.../cloudstack/features/SSHKeyPairApiTest.java | 137 +++++++
.../features/SSHKeyPairAsyncClientTest.java | 137 -------
.../features/SSHKeyPairClientExpectTest.java | 185 ---------
.../features/SSHKeyPairClientLiveTest.java | 94 -----
.../features/SecurityGroupApiLiveTest.java | 236 +++++++++++
.../features/SecurityGroupApiTest.java | 299 ++++++++++++++
.../features/SecurityGroupAsyncClientTest.java | 299 --------------
.../features/SecurityGroupClientLiveTest.java | 236 -----------
.../features/SessionApiExpectTest.java | 98 +++++
.../cloudstack/features/SessionApiLiveTest.java | 93 +++++
.../features/SessionClientExpectTest.java | 98 -----
.../features/SessionClientLiveTest.java | 93 -----
.../features/SnapshotApiLiveTest.java | 143 +++++++
.../cloudstack/features/SnapshotApiTest.java | 241 +++++++++++
.../features/SnapshotAsyncClientTest.java | 241 -----------
.../features/SnapshotClientLiveTest.java | 143 -------
.../features/TemplateApiLiveTest.java | 219 ++++++++++
.../cloudstack/features/TemplateApiTest.java | 402 +++++++++++++++++++
.../features/TemplateAsyncClientTest.java | 402 -------------------
.../features/TemplateClientLiveTest.java | 219 ----------
.../cloudstack/features/VMGroupApiLiveTest.java | 71 ++++
.../cloudstack/features/VMGroupApiTest.java | 171 ++++++++
.../features/VMGroupAsyncClientTest.java | 171 --------
.../features/VMGroupClientLiveTest.java | 71 ----
.../features/VirtualMachineApiExpectTest.java | 123 ++++++
.../features/VirtualMachineApiLiveTest.java | 399 ++++++++++++++++++
.../features/VirtualMachineApiTest.java | 261 ++++++++++++
.../features/VirtualMachineAsyncClientTest.java | 261 ------------
.../VirtualMachineClientExpectTest.java | 123 ------
.../features/VirtualMachineClientLiveTest.java | 399 ------------------
.../features/VolumeApiExpectTest.java | 63 +++
.../cloudstack/features/VolumeApiLiveTest.java | 266 ++++++++++++
.../cloudstack/features/VolumeApiTest.java | 164 ++++++++
.../features/VolumeAsyncClientTest.java | 164 --------
.../features/VolumeClientExpectTest.java | 63 ---
.../features/VolumeClientLiveTest.java | 266 ------------
.../cloudstack/features/ZoneApiExpectTest.java | 93 +++++
.../cloudstack/features/ZoneApiLiveTest.java | 74 ++++
.../cloudstack/features/ZoneApiTest.java | 107 +++++
.../features/ZoneAsyncClientTest.java | 107 -----
.../features/ZoneClientExpectTest.java | 93 -----
.../cloudstack/features/ZoneClientLiveTest.java | 74 ----
.../cloudstack/filters/QuerySignerTest.java | 3 +-
...ockUntilJobCompletesAndReturnResultTest.java | 22 +-
.../CreateSecurityGroupIfNeededTest.java | 52 +--
.../ReuseOrAssociateNewPublicIPAddressTest.java | 16 +-
...taticNATVirtualMachineInNetworkLiveTest.java | 18 +-
...essionAndRetryOn401AndLogoutOnCloseTest.java | 4 +-
.../internal/BaseCloudStackApiLiveTest.java | 278 +++++++++++++
.../internal/BaseCloudStackApiTest.java | 59 +++
.../internal/BaseCloudStackAsyncClientTest.java | 59 ---
.../internal/BaseCloudStackClientLiveTest.java | 278 -------------
.../LoginWithPasswordCredentialsTest.java | 8 +-
.../options/ListUsageRecordsOptionsTest.java | 2 +-
.../cloudstack/predicates/JobCompleteTest.java | 14 +-
.../cloudstack/predicates/OSCategoryInTest.java | 14 +-
.../predicates/VirtualMachineDestroyedTest.java | 14 +-
.../predicates/VirtualMachineExpungedTest.java | 14 +-
.../predicates/VirtualMachineRunningTest.java | 14 +-
...ueryasyncjobresultresponse-createvolume.json | 2 +-
384 files changed, 17815 insertions(+), 21162 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackApi.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackApi.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackApi.java
new file mode 100644
index 0000000..2006347
--- /dev/null
+++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackApi.java
@@ -0,0 +1,190 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF 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;
+
+import org.jclouds.cloudstack.features.AccountApi;
+import org.jclouds.cloudstack.features.AddressApi;
+import org.jclouds.cloudstack.features.AsyncJobApi;
+import org.jclouds.cloudstack.features.ConfigurationApi;
+import org.jclouds.cloudstack.features.EventApi;
+import org.jclouds.cloudstack.features.FirewallApi;
+import org.jclouds.cloudstack.features.GuestOSApi;
+import org.jclouds.cloudstack.features.HypervisorApi;
+import org.jclouds.cloudstack.features.ISOApi;
+import org.jclouds.cloudstack.features.LimitApi;
+import org.jclouds.cloudstack.features.LoadBalancerApi;
+import org.jclouds.cloudstack.features.NATApi;
+import org.jclouds.cloudstack.features.NetworkApi;
+import org.jclouds.cloudstack.features.OfferingApi;
+import org.jclouds.cloudstack.features.SSHKeyPairApi;
+import org.jclouds.cloudstack.features.SecurityGroupApi;
+import org.jclouds.cloudstack.features.SessionApi;
+import org.jclouds.cloudstack.features.SnapshotApi;
+import org.jclouds.cloudstack.features.TemplateApi;
+import org.jclouds.cloudstack.features.VMGroupApi;
+import org.jclouds.cloudstack.features.VirtualMachineApi;
+import org.jclouds.cloudstack.features.VolumeApi;
+import org.jclouds.cloudstack.features.ZoneApi;
+import org.jclouds.rest.annotations.Delegate;
+
+/**
+ * Provides synchronous access to CloudStack.
+ * <p/>
+ *
+ * @author Adrian Cole
+ * @see <a href="http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_User.html" />
+ */
+public interface CloudStackApi {
+ /**
+ * Provides synchronous access to Zone features.
+ */
+ @Delegate
+ ZoneApi getZoneApi();
+
+ /**
+ * Provides synchronous access to Template features.
+ */
+ @Delegate
+ TemplateApi getTemplateApi();
+
+ /**
+ * Provides synchronous access to Service, Disk, and Network Offering
+ * features.
+ */
+ @Delegate
+ OfferingApi getOfferingApi();
+
+ /**
+ * Provides synchronous access to Network features.
+ */
+ @Delegate
+ NetworkApi getNetworkApi();
+
+ /**
+ * Provides synchronous access to VirtualMachine features.
+ */
+ @Delegate
+ VirtualMachineApi getVirtualMachineApi();
+
+ /**
+ * Provides synchronous access to SecurityGroup features.
+ */
+ @Delegate
+ SecurityGroupApi getSecurityGroupApi();
+
+ /**
+ * Provides synchronous access to AsyncJob features.
+ */
+ @Delegate
+ AsyncJobApi getAsyncJobApi();
+
+ /**
+ * Provides synchronous access to Address features.
+ */
+ @Delegate
+ AddressApi getAddressApi();
+
+ /**
+ * Provides synchronous access to NAT features.
+ */
+ @Delegate
+ NATApi getNATApi();
+
+ /**
+ * Provides synchronous access to Firewall features.
+ */
+ @Delegate
+ FirewallApi getFirewallApi();
+
+ /**
+ * Provides synchronous access to LoadBalancer features.
+ */
+ @Delegate
+ LoadBalancerApi getLoadBalancerApi();
+
+ /**
+ * Provides synchronous access to GuestOS features.
+ */
+ @Delegate
+ GuestOSApi getGuestOSApi();
+
+ /**
+ * Provides synchronous access to Hypervisor features.
+ */
+ @Delegate
+ HypervisorApi getHypervisorApi();
+
+ /**
+ * Provides synchronous access to Configuration features.
+ */
+ @Delegate
+ ConfigurationApi getConfigurationApi();
+
+ /**
+ * Provides synchronous access to Account features.
+ */
+ @Delegate
+ AccountApi getAccountApi();
+
+ /**
+ * Provides synchronous access to SSH Keypairs
+ */
+ @Delegate
+ SSHKeyPairApi getSSHKeyPairApi();
+
+ /**
+ * Provides synchronous access to VM groups
+ */
+ @Delegate
+ VMGroupApi getVMGroupApi();
+
+ /**
+ * Provides synchronous access to Events
+ */
+ @Delegate
+ EventApi getEventApi();
+
+ /**
+ * Provides synchronous access to Resource Limits
+ */
+ @Delegate
+ LimitApi getLimitApi();
+
+ /**
+ * Provides synchronous access to ISOs
+ */
+ @Delegate
+ ISOApi getISOApi();
+
+ /**
+ * Provides synchronous access to Volumes
+ */
+ @Delegate
+ VolumeApi getVolumeApi();
+
+ /**
+ * Provides synchronous access to Snapshots
+ */
+ @Delegate
+ SnapshotApi getSnapshotApi();
+
+ /**
+ * Provides synchronous access to Sessions
+ */
+ @Delegate
+ SessionApi getSessionApi();
+}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackApiMetadata.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackApiMetadata.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackApiMetadata.java
index 53b9ed2..65346f3 100644
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackApiMetadata.java
+++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackApiMetadata.java
@@ -24,8 +24,8 @@ import java.util.Properties;
import org.jclouds.apis.ApiMetadata;
import org.jclouds.cloudstack.compute.config.CloudStackComputeServiceContextModule;
import org.jclouds.cloudstack.config.CloudStackParserModule;
-import org.jclouds.cloudstack.config.CloudStackRestClientModule;
-import org.jclouds.rest.internal.BaseRestApiMetadata;
+import org.jclouds.cloudstack.config.CloudStackHttpApiModule;
+import org.jclouds.rest.internal.BaseHttpApiMetadata;
import com.google.common.collect.ImmutableSet;
import com.google.common.reflect.TypeToken;
@@ -35,16 +35,7 @@ import com.google.inject.Module;
*
* @author Adrian Cole
*/
-public class CloudStackApiMetadata extends BaseRestApiMetadata {
-
- /**
- * @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(CloudStackClient.class)} as
- * {@link CloudStackAsyncClient} interface will be removed in jclouds 1.7.
- */
- @Deprecated
- public static final TypeToken<org.jclouds.rest.RestContext<CloudStackClient, CloudStackAsyncClient>> CONTEXT_TOKEN = new TypeToken<org.jclouds.rest.RestContext<CloudStackClient, CloudStackAsyncClient>>() {
- private static final long serialVersionUID = 1L;
- };
+public class CloudStackApiMetadata extends BaseHttpApiMetadata<CloudStackApi> {
@Override
public Builder toBuilder() {
@@ -60,18 +51,17 @@ public class CloudStackApiMetadata extends BaseRestApiMetadata {
}
public static Properties defaultProperties() {
- Properties properties = BaseRestApiMetadata.defaultProperties();
+ Properties properties = BaseHttpApiMetadata.defaultProperties();
properties.setProperty("jclouds.ssh.max-retries", "7");
properties.setProperty("jclouds.ssh.retry-auth", "true");
properties.setProperty(AUTO_GENERATE_KEYPAIRS, "false");
return properties;
}
- public static class Builder extends BaseRestApiMetadata.Builder<Builder> {
+ public static class Builder extends BaseHttpApiMetadata.Builder<CloudStackApi, Builder> {
@SuppressWarnings("deprecation")
protected Builder() {
- super(CloudStackClient.class, CloudStackAsyncClient.class);
id("cloudstack")
.name("Citrix CloudStack API")
.identityName("API Key")
@@ -83,7 +73,7 @@ public class CloudStackApiMetadata extends BaseRestApiMetadata {
.defaultProperties(CloudStackApiMetadata.defaultProperties())
.defaultModules(ImmutableSet.<Class<? extends Module>> builder()
.add(CloudStackParserModule.class)
- .add(CloudStackRestClientModule.class)
+ .add(CloudStackHttpApiModule.class)
.add(CloudStackComputeServiceContextModule.class).build());
}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackAsyncClient.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackAsyncClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackAsyncClient.java
deleted file mode 100644
index 45a0521..0000000
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackAsyncClient.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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;
-
-import org.jclouds.cloudstack.features.AccountAsyncClient;
-import org.jclouds.cloudstack.features.AddressAsyncClient;
-import org.jclouds.cloudstack.features.AsyncJobAsyncClient;
-import org.jclouds.cloudstack.features.ConfigurationAsyncClient;
-import org.jclouds.cloudstack.features.EventAsyncClient;
-import org.jclouds.cloudstack.features.FirewallAsyncClient;
-import org.jclouds.cloudstack.features.GuestOSAsyncClient;
-import org.jclouds.cloudstack.features.HypervisorAsyncClient;
-import org.jclouds.cloudstack.features.ISOAsyncClient;
-import org.jclouds.cloudstack.features.LimitAsyncClient;
-import org.jclouds.cloudstack.features.LoadBalancerAsyncClient;
-import org.jclouds.cloudstack.features.NATAsyncClient;
-import org.jclouds.cloudstack.features.NetworkAsyncClient;
-import org.jclouds.cloudstack.features.OfferingAsyncClient;
-import org.jclouds.cloudstack.features.SSHKeyPairAsyncClient;
-import org.jclouds.cloudstack.features.SecurityGroupAsyncClient;
-import org.jclouds.cloudstack.features.SessionAsyncClient;
-import org.jclouds.cloudstack.features.SnapshotAsyncClient;
-import org.jclouds.cloudstack.features.TemplateAsyncClient;
-import org.jclouds.cloudstack.features.VMGroupAsyncClient;
-import org.jclouds.cloudstack.features.VirtualMachineAsyncClient;
-import org.jclouds.cloudstack.features.VolumeAsyncClient;
-import org.jclouds.cloudstack.features.ZoneAsyncClient;
-import org.jclouds.rest.annotations.Delegate;
-
-/**
- * Provides asynchronous access to CloudStack via their REST API.
- * <p/>
- *
- * @author Adrian Cole
- * @see CloudStackClient
- * @see <a href="http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_User.html" />
- * @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(CloudStackClient.class)} as
- * {@link CloudStackAsyncClient} interface will be removed in jclouds 1.7.
- */
-@Deprecated
-public interface CloudStackAsyncClient {
-
- /**
- * Provides asynchronous access to Zone features.
- */
- @Delegate
- ZoneAsyncClient getZoneClient();
-
- /**
- * Provides asynchronous access to Template features.
- */
- @Delegate
- TemplateAsyncClient getTemplateClient();
-
- /**
- * Provides asynchronous access to Service, Disk, and Network Offering
- * features.
- */
- @Delegate
- OfferingAsyncClient getOfferingClient();
-
- /**
- * Provides asynchronous access to Network features.
- */
- @Delegate
- NetworkAsyncClient getNetworkClient();
-
- /**
- * Provides asynchronous access to VirtualMachine features.
- */
- @Delegate
- VirtualMachineAsyncClient getVirtualMachineClient();
-
- /**
- * Provides asynchronous access to SecurityGroup features.
- */
- @Delegate
- SecurityGroupAsyncClient getSecurityGroupClient();
-
- /**
- * Provides asynchronous access to AsyncJob features.
- */
- @Delegate
- AsyncJobAsyncClient getAsyncJobClient();
-
- /**
- * Provides asynchronous access to Address features.
- */
- @Delegate
- AddressAsyncClient getAddressClient();
-
- /**
- * Provides asynchronous access to NAT features.
- */
- @Delegate
- NATAsyncClient getNATClient();
-
- /**
- * Provides asynchronous access to Firewall features.
- */
- @Delegate
- FirewallAsyncClient getFirewallClient();
-
- /**
- * Provides asynchronous access to LoadBalancer features.
- */
- @Delegate
- LoadBalancerAsyncClient getLoadBalancerClient();
-
- /**
- * Provides asynchronous access to GuestOS features.
- */
- @Delegate
- GuestOSAsyncClient getGuestOSClient();
-
- /**
- * Provides asynchronous access to Hypervisor features.
- */
- @Delegate
- HypervisorAsyncClient getHypervisorClient();
-
- /**
- * Provides asynchronous access to Configuration features.
- */
- @Delegate
- ConfigurationAsyncClient getConfigurationClient();
-
- /**
- * Provides asynchronous access to Account features.
- */
- @Delegate
- AccountAsyncClient getAccountClient();
-
- /**
- * Provides asynchronous access to SSH Keypairs
- */
- @Delegate
- SSHKeyPairAsyncClient getSSHKeyPairClient();
-
- /**
- * Provides asynchronous access to VM groups
- */
- @Delegate
- VMGroupAsyncClient getVMGroupClient();
-
- /**
- * Provides synchronous access to Events
- */
- @Delegate
- EventAsyncClient getEventClient();
-
- /**
- * Provides synchronous access to Resource Limits
- */
- @Delegate
- LimitAsyncClient getLimitClient();
-
- /**
- * Provides asynchronous access to ISOs
- */
- @Delegate
- ISOAsyncClient getISOClient();
-
- /**
- * Provides asynchronous access to Volumes
- */
- @Delegate
- VolumeAsyncClient getVolumeClient();
-
- /**
- * Provides asynchronous access to Snapshots
- */
- @Delegate
- SnapshotAsyncClient getSnapshotClient();
-
- /**
- * Provides asynchronous access to Sessions
- */
- @Delegate
- SessionAsyncClient getSessionClient();
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackClient.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackClient.java
deleted file mode 100644
index ead296b..0000000
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackClient.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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;
-
-import org.jclouds.cloudstack.features.AccountClient;
-import org.jclouds.cloudstack.features.AddressClient;
-import org.jclouds.cloudstack.features.AsyncJobClient;
-import org.jclouds.cloudstack.features.ConfigurationClient;
-import org.jclouds.cloudstack.features.EventClient;
-import org.jclouds.cloudstack.features.FirewallClient;
-import org.jclouds.cloudstack.features.GuestOSClient;
-import org.jclouds.cloudstack.features.HypervisorClient;
-import org.jclouds.cloudstack.features.ISOClient;
-import org.jclouds.cloudstack.features.LimitClient;
-import org.jclouds.cloudstack.features.LoadBalancerClient;
-import org.jclouds.cloudstack.features.NATClient;
-import org.jclouds.cloudstack.features.NetworkClient;
-import org.jclouds.cloudstack.features.OfferingClient;
-import org.jclouds.cloudstack.features.SSHKeyPairClient;
-import org.jclouds.cloudstack.features.SecurityGroupClient;
-import org.jclouds.cloudstack.features.SessionClient;
-import org.jclouds.cloudstack.features.SnapshotClient;
-import org.jclouds.cloudstack.features.TemplateClient;
-import org.jclouds.cloudstack.features.VMGroupClient;
-import org.jclouds.cloudstack.features.VirtualMachineClient;
-import org.jclouds.cloudstack.features.VolumeClient;
-import org.jclouds.cloudstack.features.ZoneClient;
-import org.jclouds.rest.annotations.Delegate;
-
-/**
- * Provides synchronous access to CloudStack.
- * <p/>
- *
- * @author Adrian Cole
- * @see CloudStackAsyncClient
- * @see <a href="http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_User.html" />
- */
-public interface CloudStackClient {
- /**
- * Provides synchronous access to Zone features.
- */
- @Delegate
- ZoneClient getZoneClient();
-
- /**
- * Provides synchronous access to Template features.
- */
- @Delegate
- TemplateClient getTemplateClient();
-
- /**
- * Provides synchronous access to Service, Disk, and Network Offering
- * features.
- */
- @Delegate
- OfferingClient getOfferingClient();
-
- /**
- * Provides synchronous access to Network features.
- */
- @Delegate
- NetworkClient getNetworkClient();
-
- /**
- * Provides synchronous access to VirtualMachine features.
- */
- @Delegate
- VirtualMachineClient getVirtualMachineClient();
-
- /**
- * Provides synchronous access to SecurityGroup features.
- */
- @Delegate
- SecurityGroupClient getSecurityGroupClient();
-
- /**
- * Provides synchronous access to AsyncJob features.
- */
- @Delegate
- AsyncJobClient getAsyncJobClient();
-
- /**
- * Provides synchronous access to Address features.
- */
- @Delegate
- AddressClient getAddressClient();
-
- /**
- * Provides synchronous access to NAT features.
- */
- @Delegate
- NATClient getNATClient();
-
- /**
- * Provides synchronous access to Firewall features.
- */
- @Delegate
- FirewallClient getFirewallClient();
-
- /**
- * Provides synchronous access to LoadBalancer features.
- */
- @Delegate
- LoadBalancerClient getLoadBalancerClient();
-
- /**
- * Provides synchronous access to GuestOS features.
- */
- @Delegate
- GuestOSClient getGuestOSClient();
-
- /**
- * Provides synchronous access to Hypervisor features.
- */
- @Delegate
- HypervisorClient getHypervisorClient();
-
- /**
- * Provides synchronous access to Configuration features.
- */
- @Delegate
- ConfigurationClient getConfigurationClient();
-
- /**
- * Provides synchronous access to Account features.
- */
- @Delegate
- AccountClient getAccountClient();
-
- /**
- * Provides synchronous access to SSH Keypairs
- */
- @Delegate
- SSHKeyPairClient getSSHKeyPairClient();
-
- /**
- * Provides synchronous access to VM groups
- */
- @Delegate
- VMGroupClient getVMGroupClient();
-
- /**
- * Provides synchronous access to Events
- */
- @Delegate
- EventClient getEventClient();
-
- /**
- * Provides synchronous access to Resource Limits
- */
- @Delegate
- LimitClient getLimitClient();
-
- /**
- * Provides synchronous access to ISOs
- */
- @Delegate
- ISOClient getISOClient();
-
- /**
- * Provides synchronous access to Volumes
- */
- @Delegate
- VolumeClient getVolumeClient();
-
- /**
- * Provides synchronous access to Snapshots
- */
- @Delegate
- SnapshotClient getSnapshotClient();
-
- /**
- * Provides synchronous access to Sessions
- */
- @Delegate
- SessionClient getSessionClient();
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackContext.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackContext.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackContext.java
index e846438..4f71894 100644
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackContext.java
+++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackContext.java
@@ -30,24 +30,10 @@ import com.google.inject.ImplementedBy;
@ImplementedBy(CloudStackContextImpl.class)
public interface CloudStackContext extends ComputeServiceContext {
- CloudStackClient getApi();
+ CloudStackApi getApi();
- /**
- * @deprecated please use {@link #getDomainApi()} as
- * async interface will be removed in jclouds 1.7.
- */
- @Deprecated
- org.jclouds.rest.RestContext<CloudStackDomainClient, CloudStackDomainAsyncClient> getDomainContext();
+ CloudStackDomainApi getDomainApi();
- CloudStackDomainClient getDomainApi();
-
- /**
- * @deprecated please use {@link #getGlobalApi()} as
- * async interface will be removed in jclouds 1.7.
- */
- @Deprecated
- org.jclouds.rest.RestContext<CloudStackGlobalClient, CloudStackGlobalAsyncClient> getGlobalContext();
-
- CloudStackGlobalClient getGlobalApi();
+ CloudStackGlobalApi getGlobalApi();
}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackDomainApi.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackDomainApi.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackDomainApi.java
new file mode 100644
index 0000000..8b7bb5c
--- /dev/null
+++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackDomainApi.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF 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;
+
+import org.jclouds.cloudstack.features.DomainAccountApi;
+import org.jclouds.cloudstack.features.DomainDomainApi;
+import org.jclouds.cloudstack.features.DomainLimitApi;
+import org.jclouds.cloudstack.features.DomainUserApi;
+import org.jclouds.rest.annotations.Delegate;
+
+/**
+ * Provides synchronous access to CloudStack.
+ * <p/>
+ *
+ * @author Adrian Cole
+ * @see <a href=
+ * "http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Domain_Admin.html"
+ * />
+ */
+public interface CloudStackDomainApi extends CloudStackApi {
+
+ /**
+ * Provides synchronous access to Resource Limits
+ */
+ @Delegate
+ @Override
+ DomainLimitApi getLimitApi();
+
+ /**
+ * Provides synchronous access to Accounts
+ */
+ @Delegate
+ @Override
+ DomainAccountApi getAccountApi();
+
+ /**
+ * Provides synchronous access to Users
+ */
+ @Delegate
+ DomainUserApi getUserClient();
+
+ /**
+ * Provides synchronous access to Domains
+ */
+ @Delegate
+ DomainDomainApi getDomainClient();
+}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackDomainAsyncClient.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackDomainAsyncClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackDomainAsyncClient.java
deleted file mode 100644
index f3040ef..0000000
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackDomainAsyncClient.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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;
-
-import org.jclouds.cloudstack.features.DomainAccountAsyncClient;
-import org.jclouds.cloudstack.features.DomainDomainAsyncClient;
-import org.jclouds.cloudstack.features.DomainLimitAsyncClient;
-import org.jclouds.cloudstack.features.DomainUserAsyncClient;
-import org.jclouds.rest.annotations.Delegate;
-
-/**
- * Provides asynchronous access to CloudStack via their REST API.
- * <p/>
- *
- * @author Adrian Cole
- * @see CloudStackDomainClient
- * @see <a href=
- * "http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Domain_Admin.html"
- * />
- * @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(CloudStackDomainClient.class)} as
- * {@link CloudStackDomainAsyncClient} interface will be removed in jclouds 1.7.
- */
-@Deprecated
-public interface CloudStackDomainAsyncClient extends CloudStackAsyncClient {
-
- /**
- * Provides synchronous access to Resource Limits
- */
- @Delegate
- @Override
- DomainLimitAsyncClient getLimitClient();
-
- /**
- * Provides synchronous access to Accounts
- */
- @Delegate
- @Override
- DomainAccountAsyncClient getAccountClient();
-
- /**
- * Provides asynchronous access to Users
- */
- @Delegate
- DomainUserAsyncClient getUserClient();
-
- /**
- * Provides asynchronous access to Domains
- */
- @Delegate
- DomainDomainAsyncClient getDomainClient();
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackDomainClient.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackDomainClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackDomainClient.java
deleted file mode 100644
index e66cbf2..0000000
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackDomainClient.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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;
-
-import org.jclouds.cloudstack.features.DomainAccountClient;
-import org.jclouds.cloudstack.features.DomainDomainClient;
-import org.jclouds.cloudstack.features.DomainLimitClient;
-import org.jclouds.cloudstack.features.DomainUserClient;
-import org.jclouds.rest.annotations.Delegate;
-
-/**
- * Provides synchronous access to CloudStack.
- * <p/>
- *
- * @author Adrian Cole
- * @see CloudStackDomainAsyncClient
- * @see <a href=
- * "http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Domain_Admin.html"
- * />
- */
-public interface CloudStackDomainClient extends CloudStackClient {
-
- /**
- * Provides synchronous access to Resource Limits
- */
- @Delegate
- @Override
- DomainLimitClient getLimitClient();
-
- /**
- * Provides synchronous access to Accounts
- */
- @Delegate
- @Override
- DomainAccountClient getAccountClient();
-
- /**
- * Provides synchronous access to Users
- */
- @Delegate
- DomainUserClient getUserClient();
-
- /**
- * Provides synchronous access to Domains
- */
- @Delegate
- DomainDomainClient getDomainClient();
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackGlobalApi.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackGlobalApi.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackGlobalApi.java
new file mode 100644
index 0000000..55afddd
--- /dev/null
+++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackGlobalApi.java
@@ -0,0 +1,128 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF 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;
+
+import org.jclouds.cloudstack.features.GlobalAccountApi;
+import org.jclouds.cloudstack.features.GlobalAlertApi;
+import org.jclouds.cloudstack.features.GlobalCapacityApi;
+import org.jclouds.cloudstack.features.GlobalConfigurationApi;
+import org.jclouds.cloudstack.features.GlobalDomainApi;
+import org.jclouds.cloudstack.features.GlobalHostApi;
+import org.jclouds.cloudstack.features.GlobalOfferingApi;
+import org.jclouds.cloudstack.features.GlobalPodApi;
+import org.jclouds.cloudstack.features.GlobalStoragePoolApi;
+import org.jclouds.cloudstack.features.GlobalUsageApi;
+import org.jclouds.cloudstack.features.GlobalUserApi;
+import org.jclouds.cloudstack.features.GlobalVlanApi;
+import org.jclouds.cloudstack.features.GlobalZoneApi;
+import org.jclouds.rest.annotations.Delegate;
+
+/**
+ * Provides synchronous access to CloudStack.
+ * <p/>
+ *
+ * @author Adrian Cole
+ * @see <a href=
+ * "http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Global_Admin.html"
+ * />
+ */
+public interface CloudStackGlobalApi extends CloudStackDomainApi {
+
+ /**
+ * Provides synchronous access to Accounts
+ */
+ @Delegate
+ @Override
+ GlobalAccountApi getAccountApi();
+
+ /**
+ * Provides synchronous access to Users
+ */
+ @Delegate
+ @Override
+ GlobalUserApi getUserClient();
+
+ /**
+ * Provides synchronous access to Alerts
+ */
+ @Delegate
+ GlobalAlertApi getAlertClient();
+
+ /**
+ * Provides synchronous access to Capacities
+ */
+ @Delegate
+ GlobalCapacityApi getCapacityClient();
+
+ /**
+ * Provides synchronous access to Offerings
+ */
+ @Delegate
+ @Override
+ GlobalOfferingApi getOfferingApi();
+
+ /**
+ * Provides synchronous access to Hosts
+ */
+ @Delegate
+ GlobalHostApi getHostClient();
+
+ /**
+ * Provides synchronous access to Storage Pools
+ */
+ @Delegate
+ GlobalStoragePoolApi getStoragePoolClient();
+
+ /**
+ * Provides synchronous access to Usage
+ */
+ @Delegate
+ GlobalUsageApi getUsageClient();
+
+ /**
+ * Provides synchronous access to Configuration
+ */
+ @Delegate
+ @Override
+ GlobalConfigurationApi getConfigurationApi();
+
+ /**
+ * Provides synchronous access to Domain
+ */
+ @Delegate
+ @Override
+ GlobalDomainApi getDomainClient();
+
+ /**
+ * Provides synchronous access to Zone
+ */
+ @Delegate
+ @Override
+ GlobalZoneApi getZoneApi();
+
+ /**
+ * Provides synchronous access to Pod
+ */
+ @Delegate
+ GlobalPodApi getPodClient();
+
+ /**
+ * Provides synchronous access to Vlan
+ */
+ @Delegate
+ GlobalVlanApi getVlanClient();
+}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackGlobalAsyncClient.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackGlobalAsyncClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackGlobalAsyncClient.java
deleted file mode 100644
index c29806c..0000000
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackGlobalAsyncClient.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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;
-
-import org.jclouds.cloudstack.features.GlobalAccountAsyncClient;
-import org.jclouds.cloudstack.features.GlobalAlertAsyncClient;
-import org.jclouds.cloudstack.features.GlobalCapacityAsyncClient;
-import org.jclouds.cloudstack.features.GlobalConfigurationAsyncClient;
-import org.jclouds.cloudstack.features.GlobalDomainAsyncClient;
-import org.jclouds.cloudstack.features.GlobalHostAsyncClient;
-import org.jclouds.cloudstack.features.GlobalOfferingAsyncClient;
-import org.jclouds.cloudstack.features.GlobalPodAsyncClient;
-import org.jclouds.cloudstack.features.GlobalStoragePoolAsyncClient;
-import org.jclouds.cloudstack.features.GlobalUsageAsyncClient;
-import org.jclouds.cloudstack.features.GlobalUserAsyncClient;
-import org.jclouds.cloudstack.features.GlobalVlanAsyncClient;
-import org.jclouds.cloudstack.features.GlobalZoneAsyncClient;
-import org.jclouds.rest.annotations.Delegate;
-
-/**
- * Provides asynchronous access to CloudStack via their REST API.
- * <p/>
- *
- * @author Adrian Cole
- * @see CloudStackGlobalClient
- * @see <a href=
- * "http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Global_Admin.html"
- * />
- * @deprecated please use {@code org.jclouds.ContextBuilder#buildApi(CloudStackGlobalClient.class)} as
- * {@link CloudStackGlobalAsyncClient} interface will be removed in jclouds 1.7.
- */
-@Deprecated
-public interface CloudStackGlobalAsyncClient extends CloudStackDomainAsyncClient {
-
- /**
- * Provides asynchronous access to Accounts
- */
- @Delegate
- @Override
- GlobalAccountAsyncClient getAccountClient();
-
- /**
- * Provides asynchronous access to Users
- */
- @Delegate
- @Override
- GlobalUserAsyncClient getUserClient();
-
- /**
- * Provides asynchronous access to Alerts
- */
- @Delegate
- GlobalAlertAsyncClient getAlertClient();
-
- /**
- * Provides asynchronous access to Capacities
- */
- @Delegate
- GlobalCapacityAsyncClient getCapacityClient();
-
- /**
- * Provides asynchronous access to Offerings
- */
- @Delegate
- @Override
- GlobalOfferingAsyncClient getOfferingClient();
-
- /**
- * Provides asynchronous access to Hosts
- */
- @Delegate
- GlobalHostAsyncClient getHostClient();
-
- /**
- * Provides synchronous access to Storage Pools
- */
- @Delegate
- GlobalStoragePoolAsyncClient getStoragePoolClient();
-
- /**
- * Provides asynchronous access to Usage
- */
- @Delegate
- GlobalUsageAsyncClient getUsageClient();
-
- /**
- * Provides asynchronous access to Configuration
- */
- @Delegate
- @Override
- GlobalConfigurationAsyncClient getConfigurationClient();
-
- /**
- * Provides asynchronous access to Domain
- */
- @Delegate
- @Override
- GlobalDomainAsyncClient getDomainClient();
-
- /**
- * Provides asynchronous access to Zone
- */
- @Delegate
- @Override
- GlobalZoneAsyncClient getZoneClient();
-
- /**
- * Provides asynchronous access to Pod
- */
- @Delegate
- GlobalPodAsyncClient getPodClient();
-
- /**
- * Provides asynchronous access to Vlan
- */
- @Delegate
- GlobalVlanAsyncClient getVlanClient();
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackGlobalClient.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackGlobalClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackGlobalClient.java
deleted file mode 100644
index a4da747..0000000
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackGlobalClient.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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;
-
-import org.jclouds.cloudstack.features.GlobalAccountClient;
-import org.jclouds.cloudstack.features.GlobalAlertClient;
-import org.jclouds.cloudstack.features.GlobalCapacityClient;
-import org.jclouds.cloudstack.features.GlobalConfigurationClient;
-import org.jclouds.cloudstack.features.GlobalDomainClient;
-import org.jclouds.cloudstack.features.GlobalHostClient;
-import org.jclouds.cloudstack.features.GlobalOfferingClient;
-import org.jclouds.cloudstack.features.GlobalPodClient;
-import org.jclouds.cloudstack.features.GlobalStoragePoolClient;
-import org.jclouds.cloudstack.features.GlobalUsageClient;
-import org.jclouds.cloudstack.features.GlobalUserClient;
-import org.jclouds.cloudstack.features.GlobalVlanClient;
-import org.jclouds.cloudstack.features.GlobalZoneClient;
-import org.jclouds.rest.annotations.Delegate;
-
-/**
- * Provides synchronous access to CloudStack.
- * <p/>
- *
- * @author Adrian Cole
- * @see CloudStackDomainAsyncClient
- * @see <a href=
- * "http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Global_Admin.html"
- * />
- */
-public interface CloudStackGlobalClient extends CloudStackDomainClient {
-
- /**
- * Provides synchronous access to Accounts
- */
- @Delegate
- @Override
- GlobalAccountClient getAccountClient();
-
- /**
- * Provides synchronous access to Users
- */
- @Delegate
- @Override
- GlobalUserClient getUserClient();
-
- /**
- * Provides synchronous access to Alerts
- */
- @Delegate
- GlobalAlertClient getAlertClient();
-
- /**
- * Provides synchronous access to Capacities
- */
- @Delegate
- GlobalCapacityClient getCapacityClient();
-
- /**
- * Provides synchronous access to Offerings
- */
- @Delegate
- @Override
- GlobalOfferingClient getOfferingClient();
-
- /**
- * Provides synchronous access to Hosts
- */
- @Delegate
- GlobalHostClient getHostClient();
-
- /**
- * Provides synchronous access to Storage Pools
- */
- @Delegate
- GlobalStoragePoolClient getStoragePoolClient();
-
- /**
- * Provides synchronous access to Usage
- */
- @Delegate
- GlobalUsageClient getUsageClient();
-
- /**
- * Provides synchronous access to Configuration
- */
- @Delegate
- @Override
- GlobalConfigurationClient getConfigurationClient();
-
- /**
- * Provides synchronous access to Domain
- */
- @Delegate
- @Override
- GlobalDomainClient getDomainClient();
-
- /**
- * Provides synchronous access to Zone
- */
- @Delegate
- @Override
- GlobalZoneClient getZoneClient();
-
- /**
- * Provides synchronous access to Pod
- */
- @Delegate
- GlobalPodClient getPodClient();
-
- /**
- * Provides synchronous access to Vlan
- */
- @Delegate
- GlobalVlanClient getVlanClient();
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/CloudStackComputeService.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/CloudStackComputeService.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/CloudStackComputeService.java
index fe25a68..9eb69d6 100644
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/CloudStackComputeService.java
+++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/CloudStackComputeService.java
@@ -60,7 +60,7 @@ import org.jclouds.compute.strategy.ResumeNodeStrategy;
import org.jclouds.compute.strategy.SuspendNodeStrategy;
import org.jclouds.domain.Credentials;
import org.jclouds.domain.Location;
-import org.jclouds.cloudstack.CloudStackClient;
+import org.jclouds.cloudstack.CloudStackApi;
import org.jclouds.cloudstack.compute.options.CloudStackTemplateOptions;
import org.jclouds.cloudstack.domain.SecurityGroup;
import org.jclouds.cloudstack.domain.SshKeyPair;
@@ -86,7 +86,7 @@ import com.google.common.util.concurrent.ListeningExecutorService;
*/
@Singleton
public class CloudStackComputeService extends BaseComputeService {
- protected final CloudStackClient client;
+ protected final CloudStackApi client;
protected final LoadingCache<ZoneAndName, SecurityGroup> securityGroupMap;
protected final LoadingCache<String, SshKeyPair> keyPairCache;
protected final Function<Set<? extends NodeMetadata>, Multimap<String, String>> orphanedGroupsByZoneId;
@@ -108,7 +108,7 @@ public class CloudStackComputeService extends BaseComputeService {
InitializeRunScriptOnNodeOrPlaceInBadMap.Factory initScriptRunnerFactory,
RunScriptOnNode.Factory runScriptOnNodeFactory, InitAdminAccess initAdminAccess,
PersistNodeCredentials persistNodeCredentials, Timeouts timeouts,
- @Named(Constants.PROPERTY_USER_THREADS) ListeningExecutorService userExecutor, CloudStackClient client,
+ @Named(Constants.PROPERTY_USER_THREADS) ListeningExecutorService userExecutor, CloudStackApi client,
LoadingCache<ZoneAndName, SecurityGroup> securityGroupMap,
LoadingCache<String, SshKeyPair> keyPairCache,
Function<Set<? extends NodeMetadata>, Multimap<String, String>> orphanedGroupsByZoneId,
@@ -147,11 +147,11 @@ public class CloudStackComputeService extends BaseComputeService {
if (supportsSecurityGroups().apply(zone)) {
for (String group : groups) {
- for (SecurityGroup securityGroup : Iterables.filter(client.getSecurityGroupClient().listSecurityGroups(),
+ for (SecurityGroup securityGroup : Iterables.filter(client.getSecurityGroupApi().listSecurityGroups(),
SecurityGroupPredicates.nameMatches(namingConvention.create().containsGroup(group)))) {
ZoneAndName zoneAndName = ZoneAndName.fromZoneAndName(zoneId, securityGroup.getName());
logger.debug(">> deleting securityGroup(%s)", zoneAndName);
- client.getSecurityGroupClient().deleteSecurityGroup(securityGroup.getId());
+ client.getSecurityGroupApi().deleteSecurityGroup(securityGroup.getId());
// TODO: test this clear happens
securityGroupMap.invalidate(zoneAndName);
logger.debug("<< deleted securityGroup(%s)", zoneAndName);
@@ -162,10 +162,10 @@ public class CloudStackComputeService extends BaseComputeService {
private void cleanupOrphanedKeyPairsInZone(Set<String> groups, String zoneId) {
for (String group : groups) {
- for (SshKeyPair pair : Iterables.filter(client.getSSHKeyPairClient().listSSHKeyPairs(),
+ for (SshKeyPair pair : Iterables.filter(client.getSSHKeyPairApi().listSSHKeyPairs(),
nameMatches(namingConvention.create().containsGroup(group)))) {
logger.debug(">> deleting keypair(%s)", pair.getName());
- client.getSSHKeyPairClient().deleteSSHKeyPair(pair.getName());
+ client.getSSHKeyPairApi().deleteSSHKeyPair(pair.getName());
// TODO: test this clear happens
keyPairCache.invalidate(pair.getName());
logger.debug("<< deleted keypair(%s)", pair.getName());
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/config/CloudStackComputeServiceContextModule.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/config/CloudStackComputeServiceContextModule.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/config/CloudStackComputeServiceContextModule.java
index fa4c214..891f5bc 100644
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/config/CloudStackComputeServiceContextModule.java
+++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/config/CloudStackComputeServiceContextModule.java
@@ -29,7 +29,7 @@ import java.util.concurrent.atomic.AtomicReference;
import javax.inject.Named;
import javax.inject.Singleton;
-import org.jclouds.cloudstack.CloudStackClient;
+import org.jclouds.cloudstack.CloudStackApi;
import org.jclouds.cloudstack.compute.CloudStackComputeService;
import org.jclouds.cloudstack.compute.extensions.CloudStackImageExtension;
import org.jclouds.cloudstack.compute.functions.CloudStackSecurityGroupToSecurityGroup;
@@ -62,7 +62,7 @@ import org.jclouds.cloudstack.domain.VirtualMachine;
import org.jclouds.cloudstack.domain.Zone;
import org.jclouds.cloudstack.domain.ZoneAndName;
import org.jclouds.cloudstack.domain.ZoneSecurityGroupNamePortsCidrs;
-import org.jclouds.cloudstack.features.GuestOSClient;
+import org.jclouds.cloudstack.features.GuestOSApi;
import org.jclouds.cloudstack.functions.CreateSecurityGroupIfNeeded;
import org.jclouds.cloudstack.functions.GetFirewallRulesByVirtualMachine;
import org.jclouds.cloudstack.functions.GetIPForwardingRulesByVirtualMachine;
@@ -166,17 +166,17 @@ public class CloudStackComputeServiceContextModule extends
@Singleton
@Memoized
public Supplier<Map<String, String>> listOSCategories(AtomicReference<AuthorizationException> authException, @Named(PROPERTY_SESSION_INTERVAL) long seconds,
- final CloudStackClient client) {
+ final CloudStackApi client) {
return MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.create(authException,
new Supplier<Map<String, String>>() {
@Override
public Map<String, String> get() {
- GuestOSClient guestOSClient = client.getGuestOSClient();
+ GuestOSApi guestOSClient = client.getGuestOSApi();
return guestOSClient.listOSCategories();
}
@Override
public String toString() {
- return Objects.toStringHelper(client.getGuestOSClient()).add("method", "listOSCategories").toString();
+ return Objects.toStringHelper(client.getGuestOSApi()).add("method", "listOSCategories").toString();
}
}, seconds, TimeUnit.SECONDS);
}
@@ -185,12 +185,12 @@ public class CloudStackComputeServiceContextModule extends
@Singleton
@Memoized
public Supplier<Map<String, OSType>> listOSTypes(AtomicReference<AuthorizationException> authException, @Named(PROPERTY_SESSION_INTERVAL) long seconds,
- final CloudStackClient client) {
+ final CloudStackApi client) {
return MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.create(authException,
new Supplier<Map<String, OSType>>() {
@Override
public Map<String, OSType> get() {
- GuestOSClient guestOSClient = client.getGuestOSClient();
+ GuestOSApi guestOSClient = client.getGuestOSApi();
return Maps.uniqueIndex(guestOSClient.listOSTypes(), new Function<OSType, String>() {
@Override
@@ -201,7 +201,7 @@ public class CloudStackComputeServiceContextModule extends
}
@Override
public String toString() {
- return Objects.toStringHelper(client.getGuestOSClient()).add("method", "listOSTypes").toString();
+ return Objects.toStringHelper(client.getGuestOSApi()).add("method", "listOSTypes").toString();
}
}, seconds, TimeUnit.SECONDS);
}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/extensions/CloudStackImageExtension.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/extensions/CloudStackImageExtension.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/extensions/CloudStackImageExtension.java
index c2d27eb..529ebd1 100644
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/extensions/CloudStackImageExtension.java
+++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/extensions/CloudStackImageExtension.java
@@ -33,7 +33,7 @@ import javax.inject.Named;
import javax.inject.Singleton;
import org.jclouds.Constants;
-import org.jclouds.cloudstack.CloudStackClient;
+import org.jclouds.cloudstack.CloudStackApi;
import org.jclouds.cloudstack.domain.AsyncCreateResponse;
import org.jclouds.cloudstack.domain.Template;
import org.jclouds.cloudstack.domain.TemplateMetadata;
@@ -75,7 +75,7 @@ public class CloudStackImageExtension implements ImageExtension {
@Named(ComputeServiceConstants.COMPUTE_LOGGER)
protected Logger logger = Logger.NULL;
- private final CloudStackClient client;
+ private final CloudStackApi client;
private final ListeningExecutorService userExecutor;
private final Supplier<Set<? extends Location>> locations;
private final Predicate<AtomicReference<Image>> imageAvailablePredicate;
@@ -83,7 +83,7 @@ public class CloudStackImageExtension implements ImageExtension {
private final Predicate<String> jobComplete;
@Inject
- public CloudStackImageExtension(CloudStackClient client,
+ public CloudStackImageExtension(CloudStackApi client,
@Named(Constants.PROPERTY_USER_THREADS) ListeningExecutorService userExecutor,
@Memoized Supplier<Set<? extends Location>> locations,
@Named(TIMEOUT_IMAGE_AVAILABLE) Predicate<AtomicReference<Image>> imageAvailablePredicate,
@@ -100,7 +100,7 @@ public class CloudStackImageExtension implements ImageExtension {
@Override
public ImageTemplate buildImageTemplateFromNode(String name, String id) {
- VirtualMachine vm = client.getVirtualMachineClient().getVirtualMachine(id);
+ VirtualMachine vm = client.getVirtualMachineApi().getVirtualMachine(id);
if (vm == null)
throw new NoSuchElementException("Cannot find vm with id: " + id);
CloneImageTemplate template = new ImageTemplateBuilder.CloneImageTemplateBuilder().nodeId(id).name(name).build();
@@ -113,15 +113,15 @@ public class CloudStackImageExtension implements ImageExtension {
" cloudstack only currently supports creating images through cloning.");
CloneImageTemplate cloneTemplate = (CloneImageTemplate) template;
- VirtualMachine vm = client.getVirtualMachineClient().getVirtualMachine(cloneTemplate.getSourceNodeId());
- String stopJob = client.getVirtualMachineClient().stopVirtualMachine(vm.getId());
+ VirtualMachine vm = client.getVirtualMachineApi().getVirtualMachine(cloneTemplate.getSourceNodeId());
+ String stopJob = client.getVirtualMachineApi().stopVirtualMachine(vm.getId());
jobComplete.apply(stopJob);
- Set<Volume> volumes = client.getVolumeClient().listVolumes(ListVolumesOptions.Builder.virtualMachineId(vm.getId()));
+ Set<Volume> volumes = client.getVolumeApi().listVolumes(ListVolumesOptions.Builder.virtualMachineId(vm.getId()));
Volume volume = Iterables.getOnlyElement(volumes);
CreateTemplateOptions options = CreateTemplateOptions.Builder.volumeId(volume.getId());
- AsyncCreateResponse templateJob = client.getTemplateClient().createTemplate(TemplateMetadata.builder()
+ AsyncCreateResponse templateJob = client.getTemplateApi().createTemplate(TemplateMetadata.builder()
.name(cloneTemplate.getName())
.osTypeId(vm.getGuestOSId())
.displayText(cloneTemplate.getName())
@@ -152,7 +152,7 @@ public class CloudStackImageExtension implements ImageExtension {
@Override
public boolean deleteImage(String id) {
try {
- AsyncCreateResponse deleteJob = client.getTemplateClient().deleteTemplate(id);
+ AsyncCreateResponse deleteJob = client.getTemplateApi().deleteTemplate(id);
jobComplete.apply(deleteJob.getJobId());
return true;
} catch (Exception e) {
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/loaders/CreateUniqueKeyPair.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/loaders/CreateUniqueKeyPair.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/loaders/CreateUniqueKeyPair.java
index f225d04..46cf4d7 100644
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/loaders/CreateUniqueKeyPair.java
+++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/loaders/CreateUniqueKeyPair.java
@@ -25,7 +25,7 @@ import javax.inject.Singleton;
import org.jclouds.compute.reference.ComputeServiceConstants;
import org.jclouds.logging.Logger;
-import org.jclouds.cloudstack.CloudStackClient;
+import org.jclouds.cloudstack.CloudStackApi;
import org.jclouds.cloudstack.domain.AsyncCreateResponse;
import org.jclouds.cloudstack.domain.SshKeyPair;
import org.jclouds.cloudstack.strategy.BlockUntilJobCompletesAndReturnResult;
@@ -44,10 +44,10 @@ public class CreateUniqueKeyPair extends CacheLoader<String, SshKeyPair> {
@Resource
@Named(ComputeServiceConstants.COMPUTE_LOGGER)
protected Logger logger = Logger.NULL;
- protected final CloudStackClient client;
+ protected final CloudStackApi client;
@Inject
- public CreateUniqueKeyPair(CloudStackClient client) {
+ public CreateUniqueKeyPair(CloudStackApi client) {
this.client = checkNotNull(client, "client");
}
@@ -56,7 +56,7 @@ public class CreateUniqueKeyPair extends CacheLoader<String, SshKeyPair> {
SshKeyPair keyPair = null;
while (keyPair == null) {
try {
- keyPair = client.getSSHKeyPairClient().createSSHKeyPair(input);
+ keyPair = client.getSSHKeyPairApi().createSSHKeyPair(input);
logger.debug(">> creating SSH key pair with name %s", input);
} catch (IllegalStateException e) {
logger.error(e, "<< error creating SSH key pair with name %s: ",
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/loaders/FindSecurityGroupOrCreate.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/loaders/FindSecurityGroupOrCreate.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/loaders/FindSecurityGroupOrCreate.java
index 6689371..f98e494 100644
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/loaders/FindSecurityGroupOrCreate.java
+++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/loaders/FindSecurityGroupOrCreate.java
@@ -26,7 +26,7 @@ import javax.inject.Named;
import org.jclouds.compute.reference.ComputeServiceConstants;
import org.jclouds.logging.Logger;
-import org.jclouds.cloudstack.CloudStackClient;
+import org.jclouds.cloudstack.CloudStackApi;
import org.jclouds.cloudstack.domain.SecurityGroup;
import org.jclouds.cloudstack.domain.Zone;
import org.jclouds.cloudstack.domain.ZoneAndName;
@@ -46,11 +46,11 @@ public class FindSecurityGroupOrCreate extends CacheLoader<ZoneAndName, Security
@Resource
@Named(ComputeServiceConstants.COMPUTE_LOGGER)
protected Logger logger = Logger.NULL;
- protected final CloudStackClient client;
+ protected final CloudStackApi client;
protected final Function<ZoneSecurityGroupNamePortsCidrs, SecurityGroup> groupCreator;
@Inject
- public FindSecurityGroupOrCreate(CloudStackClient client,
+ public FindSecurityGroupOrCreate(CloudStackApi client,
Function<ZoneSecurityGroupNamePortsCidrs, SecurityGroup> groupCreator) {
this.client = checkNotNull(client, "client");
this.groupCreator = checkNotNull(groupCreator, "groupCreator");
@@ -58,7 +58,7 @@ public class FindSecurityGroupOrCreate extends CacheLoader<ZoneAndName, Security
@Override
public SecurityGroup load(ZoneAndName in) {
- SecurityGroup group = client.getSecurityGroupClient().getSecurityGroupByName(in.getName());
+ SecurityGroup group = client.getSecurityGroupApi().getSecurityGroupByName(in.getName());
if (group != null) {
return group;
} else {