From 089db9c6314a050cf0d09d4ad04f395f81caf609 Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Thu, 6 Dec 2012 11:25:56 -0800 Subject: [PATCH] api_refactor: capacity, hypvsr, alert and cert apis Signed-off-by: Rohit Yadav --- api/src/com/cloud/server/ManagementService.java | 6 +++--- .../api/admin/resource/command}/ListAlertsCmd.java | 2 +- .../api/admin/resource/command}/ListCapacityCmd.java | 2 +- .../resource/command}/UploadCustomCertificateCmd.java | 2 +- .../command/ListHypervisorsCmd.java | 2 +- client/tomcatconf/commands.properties.in | 8 ++++---- server/src/com/cloud/server/ManagementServerImpl.java | 6 +++--- 7 files changed, 14 insertions(+), 14 deletions(-) rename api/src/{com/cloud/api/commands => org/apache/cloudstack/api/admin/resource/command}/ListAlertsCmd.java (98%) rename api/src/{com/cloud/api/commands => org/apache/cloudstack/api/admin/resource/command}/ListCapacityCmd.java (99%) rename api/src/{com/cloud/api/commands => org/apache/cloudstack/api/admin/resource/command}/UploadCustomCertificateCmd.java (98%) rename api/src/org/apache/cloudstack/api/user/{hypervisor => resource}/command/ListHypervisorsCmd.java (98%) diff --git a/api/src/com/cloud/server/ManagementService.java b/api/src/com/cloud/server/ManagementService.java index db5f8bac138..5ee90543a70 100755 --- a/api/src/com/cloud/server/ManagementService.java +++ b/api/src/com/cloud/server/ManagementService.java @@ -28,6 +28,8 @@ import org.apache.cloudstack.api.admin.cluster.command.ListClustersCmd; import org.apache.cloudstack.api.admin.host.command.ListHostsCmd; import org.apache.cloudstack.api.admin.host.command.UpdateHostPasswordCmd; import org.apache.cloudstack.api.admin.pod.command.ListPodsByCmd; +import org.apache.cloudstack.api.admin.resource.command.ListAlertsCmd; +import org.apache.cloudstack.api.admin.resource.command.ListCapacityCmd; import org.apache.cloudstack.api.admin.router.command.ListRoutersCmd; import org.apache.cloudstack.api.user.address.command.ListPublicIpAddressesCmd; import org.apache.cloudstack.api.user.config.command.ListCapabilitiesCmd; @@ -41,9 +43,7 @@ import org.apache.cloudstack.api.user.volume.command.ExtractVolumeCmd; import org.apache.cloudstack.api.user.template.command.ListTemplatesCmd; import org.apache.cloudstack.api.user.template.command.UpdateTemplateCmd; import org.apache.cloudstack.api.user.vm.command.GetVMPasswordCmd; -import com.cloud.api.commands.ListAlertsCmd; import org.apache.cloudstack.api.user.job.command.ListAsyncJobsCmd; -import com.cloud.api.commands.ListCapacityCmd; import org.apache.cloudstack.api.admin.config.command.ListCfgsByCmd; import org.apache.cloudstack.api.user.event.command.ListEventsCmd; import org.apache.cloudstack.api.user.guest.command.ListGuestOsCategoriesCmd; @@ -61,7 +61,7 @@ import org.apache.cloudstack.api.admin.domain.command.UpdateDomainCmd; import org.apache.cloudstack.api.user.iso.command.UpdateIsoCmd; import org.apache.cloudstack.api.user.vmgroup.command.UpdateVMGroupCmd; import org.apache.cloudstack.api.admin.systemvm.command.UpgradeSystemVMCmd; -import com.cloud.api.commands.UploadCustomCertificateCmd; +import org.apache.cloudstack.api.admin.resource.command.UploadCustomCertificateCmd; import com.cloud.api.view.vo.DomainRouterJoinVO; import com.cloud.async.AsyncJob; import com.cloud.capacity.Capacity; diff --git a/api/src/com/cloud/api/commands/ListAlertsCmd.java b/api/src/org/apache/cloudstack/api/admin/resource/command/ListAlertsCmd.java similarity index 98% rename from api/src/com/cloud/api/commands/ListAlertsCmd.java rename to api/src/org/apache/cloudstack/api/admin/resource/command/ListAlertsCmd.java index 00ee59f3826..d82e4569638 100644 --- a/api/src/com/cloud/api/commands/ListAlertsCmd.java +++ b/api/src/org/apache/cloudstack/api/admin/resource/command/ListAlertsCmd.java @@ -14,7 +14,7 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. -package com.cloud.api.commands; +package org.apache.cloudstack.api.admin.resource.command; import java.util.ArrayList; import java.util.List; diff --git a/api/src/com/cloud/api/commands/ListCapacityCmd.java b/api/src/org/apache/cloudstack/api/admin/resource/command/ListCapacityCmd.java similarity index 99% rename from api/src/com/cloud/api/commands/ListCapacityCmd.java rename to api/src/org/apache/cloudstack/api/admin/resource/command/ListCapacityCmd.java index ecb590aa678..39cbddfbc7e 100755 --- a/api/src/com/cloud/api/commands/ListCapacityCmd.java +++ b/api/src/org/apache/cloudstack/api/admin/resource/command/ListCapacityCmd.java @@ -14,7 +14,7 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. -package com.cloud.api.commands; +package org.apache.cloudstack.api.admin.resource.command; import java.text.DecimalFormat; import java.util.List; diff --git a/api/src/com/cloud/api/commands/UploadCustomCertificateCmd.java b/api/src/org/apache/cloudstack/api/admin/resource/command/UploadCustomCertificateCmd.java similarity index 98% rename from api/src/com/cloud/api/commands/UploadCustomCertificateCmd.java rename to api/src/org/apache/cloudstack/api/admin/resource/command/UploadCustomCertificateCmd.java index d297dfa2a2f..76be280c8ff 100644 --- a/api/src/com/cloud/api/commands/UploadCustomCertificateCmd.java +++ b/api/src/org/apache/cloudstack/api/admin/resource/command/UploadCustomCertificateCmd.java @@ -14,7 +14,7 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. -package com.cloud.api.commands; +package org.apache.cloudstack.api.admin.resource.command; import org.apache.log4j.Logger; diff --git a/api/src/org/apache/cloudstack/api/user/hypervisor/command/ListHypervisorsCmd.java b/api/src/org/apache/cloudstack/api/user/resource/command/ListHypervisorsCmd.java similarity index 98% rename from api/src/org/apache/cloudstack/api/user/hypervisor/command/ListHypervisorsCmd.java rename to api/src/org/apache/cloudstack/api/user/resource/command/ListHypervisorsCmd.java index 2055f9979f3..2f78aa8afd2 100644 --- a/api/src/org/apache/cloudstack/api/user/hypervisor/command/ListHypervisorsCmd.java +++ b/api/src/org/apache/cloudstack/api/user/resource/command/ListHypervisorsCmd.java @@ -14,7 +14,7 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. -package org.apache.cloudstack.api.user.hypervisor.command; +package org.apache.cloudstack.api.user.resource.command; import java.util.ArrayList; import java.util.List; diff --git a/client/tomcatconf/commands.properties.in b/client/tomcatconf/commands.properties.in index d825505bd78..db5a13438d6 100755 --- a/client/tomcatconf/commands.properties.in +++ b/client/tomcatconf/commands.properties.in @@ -219,10 +219,10 @@ listEvents=org.apache.cloudstack.api.user.event.command.ListEventsCmd;15 listEventTypes=org.apache.cloudstack.api.user.event.command.ListEventTypesCmd;15 #### alerts commands -listAlerts=com.cloud.api.commands.ListAlertsCmd;3 +listAlerts=org.apache.cloudstack.api.admin.resource.command.ListAlertsCmd;3 #### system capacity commands -listCapacity=com.cloud.api.commands.ListCapacityCmd;3 +listCapacity=org.apache.cloudstack.api.admin.resource.command.ListCapacityCmd;3 #### swift commands^M addSwift=org.apache.cloudstack.api.admin.swift.command.AddSwiftCmd;1 @@ -288,10 +288,10 @@ updateInstanceGroup=org.apache.cloudstack.api.user.vmgroup.command.UpdateVMGroup listInstanceGroups=org.apache.cloudstack.api.user.vmgroup.command.ListVMGroupsCmd;15 ### Certificate commands -uploadCustomCertificate=com.cloud.api.commands.UploadCustomCertificateCmd;1 +uploadCustomCertificate=org.apache.cloudstack.api.admin.resource.command.UploadCustomCertificateCmd;1 ### other commands -listHypervisors=org.apache.cloudstack.api.user.hypervisor.command.ListHypervisorsCmd;15 +listHypervisors=org.apache.cloudstack.api.user.resource.command.ListHypervisorsCmd;15 ### VPN createRemoteAccessVpn=org.apache.cloudstack.api.user.vpn.command.CreateRemoteAccessVpnCmd;15 diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java index 1d7c486656a..fba6ac9828c 100755 --- a/server/src/com/cloud/server/ManagementServerImpl.java +++ b/server/src/com/cloud/server/ManagementServerImpl.java @@ -44,6 +44,7 @@ import javax.crypto.spec.SecretKeySpec; import org.apache.cloudstack.api.admin.cluster.command.ListClustersCmd; import org.apache.cloudstack.api.admin.config.command.ListCfgsByCmd; +import org.apache.cloudstack.api.admin.resource.command.ListAlertsCmd; import org.apache.cloudstack.api.admin.router.command.ListRoutersCmd; import org.apache.cloudstack.api.user.config.command.ListCapabilitiesCmd; import org.apache.cloudstack.api.user.guest.command.ListGuestOsCategoriesCmd; @@ -78,8 +79,7 @@ import org.apache.cloudstack.api.user.ssh.command.CreateSSHKeyPairCmd; import org.apache.cloudstack.api.admin.systemvm.command.DestroySystemVmCmd; import org.apache.cloudstack.api.user.volume.command.ExtractVolumeCmd; import org.apache.cloudstack.api.user.vm.command.GetVMPasswordCmd; -import com.cloud.api.commands.ListAlertsCmd; -import com.cloud.api.commands.ListCapacityCmd; +import org.apache.cloudstack.api.admin.resource.command.ListCapacityCmd; import org.apache.cloudstack.api.user.event.command.ListEventsCmd; import org.apache.cloudstack.api.admin.host.command.ListHostsCmd; import org.apache.cloudstack.api.admin.pod.command.ListPodsByCmd; @@ -96,7 +96,7 @@ import org.apache.cloudstack.api.user.iso.command.UpdateIsoCmd; import com.cloud.api.commands.UpdateTemplateOrIsoCmd; import org.apache.cloudstack.api.user.vmgroup.command.UpdateVMGroupCmd; import org.apache.cloudstack.api.admin.systemvm.command.UpgradeSystemVMCmd; -import com.cloud.api.commands.UploadCustomCertificateCmd; +import org.apache.cloudstack.api.admin.resource.command.UploadCustomCertificateCmd; import com.cloud.api.response.ExtractResponse; import com.cloud.api.view.vo.DomainRouterJoinVO; import com.cloud.async.AsyncJob;