From 3e0b2164be83a176304eb40d8000c15c0b63c310 Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Mon, 3 Dec 2012 23:05:44 -0800 Subject: [PATCH] api_refactor: refactor template apis - Fix refactored apis, fix mapping in commands*.in - Fix comments etc. Signed-off-by: Rohit Yadav --- api/src/com/cloud/server/ManagementService.java | 4 ++-- api/src/com/cloud/template/TemplateService.java | 4 ++-- api/src/com/cloud/vm/UserVmService.java | 2 +- .../user/template/command}/CreateTemplateCmd.java | 2 +- .../user/template/command}/DeleteTemplateCmd.java | 2 +- .../user/template/command}/ExtractTemplateCmd.java | 2 +- .../command}/ListTemplatePermissionsCmd.java | 3 ++- .../user/template/command}/ListTemplatesCmd.java | 2 +- .../user/template/command}/UpdateTemplateCmd.java | 3 ++- .../command}/UpdateTemplatePermissionsCmd.java | 3 ++- client/tomcatconf/commands.properties.in | 14 +++++++------- .../cloud/baremetal/BareMetalVmManagerImpl.java | 2 +- .../src/com/cloud/server/ManagementServerImpl.java | 4 ++-- .../src/com/cloud/storage/swift/SwiftManager.java | 2 +- .../com/cloud/storage/swift/SwiftManagerImpl.java | 2 +- .../com/cloud/storage/upload/UploadListener.java | 2 +- .../cloud/template/HyervisorTemplateAdapter.java | 2 +- server/src/com/cloud/template/TemplateAdapter.java | 2 +- .../com/cloud/template/TemplateAdapterBase.java | 2 +- .../com/cloud/template/TemplateManagerImpl.java | 8 ++++---- server/src/com/cloud/vm/UserVmManagerImpl.java | 2 +- .../test/com/cloud/vm/MockUserVmManagerImpl.java | 2 +- 22 files changed, 37 insertions(+), 34 deletions(-) rename api/src/{com/cloud/api/commands => org/apache/cloudstack/api/user/template/command}/CreateTemplateCmd.java (99%) rename api/src/{com/cloud/api/commands => org/apache/cloudstack/api/user/template/command}/DeleteTemplateCmd.java (98%) rename api/src/{com/cloud/api/commands => org/apache/cloudstack/api/user/template/command}/ExtractTemplateCmd.java (98%) rename api/src/{com/cloud/api/commands => org/apache/cloudstack/api/user/template/command}/ListTemplatePermissionsCmd.java (92%) rename api/src/{com/cloud/api/commands => org/apache/cloudstack/api/user/template/command}/ListTemplatesCmd.java (99%) rename api/src/{com/cloud/api/commands => org/apache/cloudstack/api/user/template/command}/UpdateTemplateCmd.java (96%) rename api/src/{com/cloud/api/commands => org/apache/cloudstack/api/user/template/command}/UpdateTemplatePermissionsCmd.java (95%) diff --git a/api/src/com/cloud/server/ManagementService.java b/api/src/com/cloud/server/ManagementService.java index 72769a01b4a..2b06d75e5c8 100755 --- a/api/src/com/cloud/server/ManagementService.java +++ b/api/src/com/cloud/server/ManagementService.java @@ -28,6 +28,8 @@ import com.cloud.api.commands.CreateSSHKeyPairCmd; import com.cloud.api.commands.DeleteSSHKeyPairCmd; import com.cloud.api.commands.DestroySystemVmCmd; import com.cloud.api.commands.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 com.cloud.api.commands.ListAsyncJobsCmd; @@ -48,7 +50,6 @@ import com.cloud.api.commands.ListSSHKeyPairsCmd; import com.cloud.api.commands.ListServiceOfferingsCmd; import com.cloud.api.commands.ListStoragePoolsCmd; import com.cloud.api.commands.ListSystemVMsCmd; -import com.cloud.api.commands.ListTemplatesCmd; import com.cloud.api.commands.ListVMGroupsCmd; import com.cloud.api.commands.ListVlanIpRangesCmd; import com.cloud.api.commands.ListZonesByCmd; @@ -58,7 +59,6 @@ import com.cloud.api.commands.StopSystemVmCmd; import com.cloud.api.commands.UpdateDomainCmd; import com.cloud.api.commands.UpdateHostPasswordCmd; import org.apache.cloudstack.api.user.iso.command.UpdateIsoCmd; -import com.cloud.api.commands.UpdateTemplateCmd; import com.cloud.api.commands.UpdateVMGroupCmd; import com.cloud.api.commands.UpgradeSystemVMCmd; import com.cloud.api.commands.UploadCustomCertificateCmd; diff --git a/api/src/com/cloud/template/TemplateService.java b/api/src/com/cloud/template/TemplateService.java index c7f5f3d363c..9d63b259c85 100755 --- a/api/src/com/cloud/template/TemplateService.java +++ b/api/src/com/cloud/template/TemplateService.java @@ -21,9 +21,9 @@ import java.util.List; import org.apache.cloudstack.api.user.template.command.CopyTemplateCmd; import org.apache.cloudstack.api.user.iso.command.DeleteIsoCmd; -import com.cloud.api.commands.DeleteTemplateCmd; +import org.apache.cloudstack.api.user.template.command.DeleteTemplateCmd; import org.apache.cloudstack.api.user.iso.command.ExtractIsoCmd; -import com.cloud.api.commands.ExtractTemplateCmd; +import org.apache.cloudstack.api.user.template.command.ExtractTemplateCmd; import com.cloud.api.commands.ListTemplateOrIsoPermissionsCmd; import com.cloud.api.commands.RegisterIsoCmd; import com.cloud.api.commands.RegisterTemplateCmd; diff --git a/api/src/com/cloud/vm/UserVmService.java b/api/src/com/cloud/vm/UserVmService.java index 5a1ff5de60c..6c9afd21075 100755 --- a/api/src/com/cloud/vm/UserVmService.java +++ b/api/src/com/cloud/vm/UserVmService.java @@ -23,7 +23,7 @@ import javax.naming.InsufficientResourcesException; import org.apache.cloudstack.api.admin.vm.command.AssignVMCmd; import com.cloud.api.commands.AttachVolumeCmd; -import com.cloud.api.commands.CreateTemplateCmd; +import org.apache.cloudstack.api.user.template.command.CreateTemplateCmd; import com.cloud.api.commands.CreateVMGroupCmd; import com.cloud.api.commands.DeleteVMGroupCmd; import org.apache.cloudstack.api.user.vm.command.DeployVMCmd; diff --git a/api/src/com/cloud/api/commands/CreateTemplateCmd.java b/api/src/org/apache/cloudstack/api/user/template/command/CreateTemplateCmd.java similarity index 99% rename from api/src/com/cloud/api/commands/CreateTemplateCmd.java rename to api/src/org/apache/cloudstack/api/user/template/command/CreateTemplateCmd.java index a9b28e2d751..0a2b970680c 100755 --- a/api/src/com/cloud/api/commands/CreateTemplateCmd.java +++ b/api/src/org/apache/cloudstack/api/user/template/command/CreateTemplateCmd.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.user.template.command; import java.util.Collection; import java.util.List; diff --git a/api/src/com/cloud/api/commands/DeleteTemplateCmd.java b/api/src/org/apache/cloudstack/api/user/template/command/DeleteTemplateCmd.java similarity index 98% rename from api/src/com/cloud/api/commands/DeleteTemplateCmd.java rename to api/src/org/apache/cloudstack/api/user/template/command/DeleteTemplateCmd.java index e3c995fa1cd..c0e58122728 100755 --- a/api/src/com/cloud/api/commands/DeleteTemplateCmd.java +++ b/api/src/org/apache/cloudstack/api/user/template/command/DeleteTemplateCmd.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.user.template.command; import org.apache.log4j.Logger; diff --git a/api/src/com/cloud/api/commands/ExtractTemplateCmd.java b/api/src/org/apache/cloudstack/api/user/template/command/ExtractTemplateCmd.java similarity index 98% rename from api/src/com/cloud/api/commands/ExtractTemplateCmd.java rename to api/src/org/apache/cloudstack/api/user/template/command/ExtractTemplateCmd.java index eacd0f625a6..6de5118e9d4 100755 --- a/api/src/com/cloud/api/commands/ExtractTemplateCmd.java +++ b/api/src/org/apache/cloudstack/api/user/template/command/ExtractTemplateCmd.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.user.template.command; import org.apache.log4j.Logger; diff --git a/api/src/com/cloud/api/commands/ListTemplatePermissionsCmd.java b/api/src/org/apache/cloudstack/api/user/template/command/ListTemplatePermissionsCmd.java similarity index 92% rename from api/src/com/cloud/api/commands/ListTemplatePermissionsCmd.java rename to api/src/org/apache/cloudstack/api/user/template/command/ListTemplatePermissionsCmd.java index 6e118d90667..8188032639c 100644 --- a/api/src/com/cloud/api/commands/ListTemplatePermissionsCmd.java +++ b/api/src/org/apache/cloudstack/api/user/template/command/ListTemplatePermissionsCmd.java @@ -14,8 +14,9 @@ // 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.user.template.command; +import com.cloud.api.commands.ListTemplateOrIsoPermissionsCmd; import org.apache.log4j.Logger; import com.cloud.storage.Storage.ImageFormat; diff --git a/api/src/com/cloud/api/commands/ListTemplatesCmd.java b/api/src/org/apache/cloudstack/api/user/template/command/ListTemplatesCmd.java similarity index 99% rename from api/src/com/cloud/api/commands/ListTemplatesCmd.java rename to api/src/org/apache/cloudstack/api/user/template/command/ListTemplatesCmd.java index ca5dd734cb1..7d2cc01da78 100755 --- a/api/src/com/cloud/api/commands/ListTemplatesCmd.java +++ b/api/src/org/apache/cloudstack/api/user/template/command/ListTemplatesCmd.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.user.template.command; import java.util.ArrayList; import java.util.List; diff --git a/api/src/com/cloud/api/commands/UpdateTemplateCmd.java b/api/src/org/apache/cloudstack/api/user/template/command/UpdateTemplateCmd.java similarity index 96% rename from api/src/com/cloud/api/commands/UpdateTemplateCmd.java rename to api/src/org/apache/cloudstack/api/user/template/command/UpdateTemplateCmd.java index 2cffdac43b5..bfde98eb11a 100755 --- a/api/src/com/cloud/api/commands/UpdateTemplateCmd.java +++ b/api/src/org/apache/cloudstack/api/user/template/command/UpdateTemplateCmd.java @@ -14,8 +14,9 @@ // 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.user.template.command; +import com.cloud.api.commands.UpdateTemplateOrIsoCmd; import org.apache.log4j.Logger; import org.apache.cloudstack.api.BaseCmd; diff --git a/api/src/com/cloud/api/commands/UpdateTemplatePermissionsCmd.java b/api/src/org/apache/cloudstack/api/user/template/command/UpdateTemplatePermissionsCmd.java similarity index 95% rename from api/src/com/cloud/api/commands/UpdateTemplatePermissionsCmd.java rename to api/src/org/apache/cloudstack/api/user/template/command/UpdateTemplatePermissionsCmd.java index fac827bf6e6..3fd09da28b5 100644 --- a/api/src/com/cloud/api/commands/UpdateTemplatePermissionsCmd.java +++ b/api/src/org/apache/cloudstack/api/user/template/command/UpdateTemplatePermissionsCmd.java @@ -14,8 +14,9 @@ // 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.user.template.command; +import com.cloud.api.commands.UpdateTemplateOrIsoPermissionsCmd; import org.apache.log4j.Logger; import org.apache.cloudstack.api.Implementation; diff --git a/client/tomcatconf/commands.properties.in b/client/tomcatconf/commands.properties.in index 57ddd9a9f50..c6f540924cd 100755 --- a/client/tomcatconf/commands.properties.in +++ b/client/tomcatconf/commands.properties.in @@ -79,15 +79,15 @@ listSnapshotPolicies=com.cloud.api.commands.ListSnapshotPoliciesCmd;15 #### template commands -createTemplate=com.cloud.api.commands.CreateTemplateCmd;15 +createTemplate=org.apache.cloudstack.api.user.template.command.CreateTemplateCmd;15 registerTemplate=com.cloud.api.commands.RegisterTemplateCmd;15 -updateTemplate=com.cloud.api.commands.UpdateTemplateCmd;15 +updateTemplate=org.apache.cloudstack.api.user.template.command.UpdateTemplateCmd;15 copyTemplate=org.apache.cloudstack.api.user.template.command.CopyTemplateCmd;15 -deleteTemplate=com.cloud.api.commands.DeleteTemplateCmd;15 -listTemplates=com.cloud.api.commands.ListTemplatesCmd;15 -updateTemplatePermissions=com.cloud.api.commands.UpdateTemplatePermissionsCmd;15 -listTemplatePermissions=com.cloud.api.commands.ListTemplatePermissionsCmd;15 -extractTemplate=com.cloud.api.commands.ExtractTemplateCmd;15 +deleteTemplate=org.apache.cloudstack.api.user.template.command.DeleteTemplateCmd;15 +listTemplates=org.apache.cloudstack.api.user.template.command.ListTemplatesCmd;15 +updateTemplatePermissions=org.apache.cloudstack.api.user.template.command.UpdateTemplatePermissionsCmd;15 +listTemplatePermissions=org.apache.cloudstack.api.user.template.command.ListTemplatePermissionsCmd;15 +extractTemplate=org.apache.cloudstack.api.user.template.command.ExtractTemplateCmd;15 prepareTemplate=com.cloud.api.commands.PrepareTemplateCmd;1 #### iso commands diff --git a/server/src/com/cloud/baremetal/BareMetalVmManagerImpl.java b/server/src/com/cloud/baremetal/BareMetalVmManagerImpl.java index fc0ecb578aa..e0ce531d7b5 100755 --- a/server/src/com/cloud/baremetal/BareMetalVmManagerImpl.java +++ b/server/src/com/cloud/baremetal/BareMetalVmManagerImpl.java @@ -25,6 +25,7 @@ import java.util.concurrent.Executors; import javax.ejb.Local; import javax.naming.ConfigurationException; +import org.apache.cloudstack.api.user.template.command.CreateTemplateCmd; import org.apache.log4j.Logger; import com.cloud.agent.api.Answer; @@ -33,7 +34,6 @@ import com.cloud.agent.api.baremetal.IpmISetBootDevCommand; import com.cloud.agent.api.baremetal.IpmiBootorResetCommand; import com.cloud.agent.manager.Commands; import com.cloud.api.commands.AttachVolumeCmd; -import com.cloud.api.commands.CreateTemplateCmd; import org.apache.cloudstack.api.user.vm.command.DeployVMCmd; import com.cloud.api.commands.DetachVolumeCmd; import org.apache.cloudstack.api.user.vm.command.StartVMCmd; diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java index 2f33c258feb..c43dbd350d9 100755 --- a/server/src/com/cloud/server/ManagementServerImpl.java +++ b/server/src/com/cloud/server/ManagementServerImpl.java @@ -43,6 +43,8 @@ import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; import org.apache.cloudstack.api.user.iso.command.ListIsosCmd; +import org.apache.cloudstack.api.user.template.command.ListTemplatesCmd; +import org.apache.cloudstack.api.user.template.command.UpdateTemplateCmd; import org.apache.commons.codec.binary.Base64; import org.apache.log4j.Logger; @@ -82,7 +84,6 @@ import com.cloud.api.commands.ListSSHKeyPairsCmd; import com.cloud.api.commands.ListServiceOfferingsCmd; import com.cloud.api.commands.ListStoragePoolsCmd; import com.cloud.api.commands.ListSystemVMsCmd; -import com.cloud.api.commands.ListTemplatesCmd; import com.cloud.api.commands.ListVMGroupsCmd; import com.cloud.api.commands.ListVlanIpRangesCmd; import com.cloud.api.commands.ListZonesByCmd; @@ -92,7 +93,6 @@ import com.cloud.api.commands.StopSystemVmCmd; import com.cloud.api.commands.UpdateDomainCmd; import com.cloud.api.commands.UpdateHostPasswordCmd; import org.apache.cloudstack.api.user.iso.command.UpdateIsoCmd; -import com.cloud.api.commands.UpdateTemplateCmd; import com.cloud.api.commands.UpdateTemplateOrIsoCmd; import com.cloud.api.commands.UpdateVMGroupCmd; import com.cloud.api.commands.UpgradeSystemVMCmd; diff --git a/server/src/com/cloud/storage/swift/SwiftManager.java b/server/src/com/cloud/storage/swift/SwiftManager.java index 8fd3eb02a8b..a1bd42df611 100644 --- a/server/src/com/cloud/storage/swift/SwiftManager.java +++ b/server/src/com/cloud/storage/swift/SwiftManager.java @@ -21,7 +21,7 @@ import java.util.List; import com.cloud.agent.api.to.SwiftTO; import com.cloud.api.commands.AddSwiftCmd; import org.apache.cloudstack.api.user.iso.command.DeleteIsoCmd; -import com.cloud.api.commands.DeleteTemplateCmd; +import org.apache.cloudstack.api.user.template.command.DeleteTemplateCmd; import com.cloud.api.commands.ListSwiftsCmd; import com.cloud.exception.DiscoveryException; import com.cloud.storage.Swift; diff --git a/server/src/com/cloud/storage/swift/SwiftManagerImpl.java b/server/src/com/cloud/storage/swift/SwiftManagerImpl.java index 207d9eb82a8..1708193bd0b 100644 --- a/server/src/com/cloud/storage/swift/SwiftManagerImpl.java +++ b/server/src/com/cloud/storage/swift/SwiftManagerImpl.java @@ -26,6 +26,7 @@ import javax.ejb.Local; import javax.naming.ConfigurationException; import org.apache.cloudstack.api.user.iso.command.DeleteIsoCmd; +import org.apache.cloudstack.api.user.template.command.DeleteTemplateCmd; import org.apache.log4j.Logger; import com.cloud.agent.AgentManager; @@ -33,7 +34,6 @@ import com.cloud.agent.api.Answer; import com.cloud.agent.api.DeleteObjectFromSwiftCommand; import com.cloud.agent.api.to.SwiftTO; import com.cloud.api.commands.AddSwiftCmd; -import com.cloud.api.commands.DeleteTemplateCmd; import com.cloud.api.commands.ListSwiftsCmd; import com.cloud.configuration.Config; import com.cloud.configuration.dao.ConfigurationDao; diff --git a/server/src/com/cloud/storage/upload/UploadListener.java b/server/src/com/cloud/storage/upload/UploadListener.java index 21e15de0088..aab798b49e9 100755 --- a/server/src/com/cloud/storage/upload/UploadListener.java +++ b/server/src/com/cloud/storage/upload/UploadListener.java @@ -39,7 +39,7 @@ import com.cloud.agent.api.storage.UploadAnswer; import com.cloud.agent.api.storage.UploadCommand; import com.cloud.agent.api.storage.UploadProgressCommand; import com.cloud.agent.api.storage.UploadProgressCommand.RequestType; -import com.cloud.api.commands.ExtractTemplateCmd; +import org.apache.cloudstack.api.user.template.command.ExtractTemplateCmd; import com.cloud.api.commands.ExtractVolumeCmd; import com.cloud.api.response.ExtractResponse; import com.cloud.async.AsyncJobManager; diff --git a/server/src/com/cloud/template/HyervisorTemplateAdapter.java b/server/src/com/cloud/template/HyervisorTemplateAdapter.java index e6ef53883a6..f4348fd77f4 100755 --- a/server/src/com/cloud/template/HyervisorTemplateAdapter.java +++ b/server/src/com/cloud/template/HyervisorTemplateAdapter.java @@ -31,7 +31,7 @@ import org.apache.log4j.Logger; import com.cloud.agent.AgentManager; import com.cloud.agent.api.Answer; import com.cloud.agent.api.storage.DeleteTemplateCommand; -import com.cloud.api.commands.DeleteTemplateCmd; +import org.apache.cloudstack.api.user.template.command.DeleteTemplateCmd; import com.cloud.api.commands.RegisterIsoCmd; import com.cloud.api.commands.RegisterTemplateCmd; import com.cloud.configuration.Resource.ResourceType; diff --git a/server/src/com/cloud/template/TemplateAdapter.java b/server/src/com/cloud/template/TemplateAdapter.java index e2844a3d4ca..0c6f32982a5 100755 --- a/server/src/com/cloud/template/TemplateAdapter.java +++ b/server/src/com/cloud/template/TemplateAdapter.java @@ -19,7 +19,7 @@ package com.cloud.template; import java.util.Map; import org.apache.cloudstack.api.user.iso.command.DeleteIsoCmd; -import com.cloud.api.commands.DeleteTemplateCmd; +import org.apache.cloudstack.api.user.template.command.DeleteTemplateCmd; import com.cloud.api.commands.RegisterIsoCmd; import com.cloud.api.commands.RegisterTemplateCmd; import com.cloud.exception.ResourceAllocationException; diff --git a/server/src/com/cloud/template/TemplateAdapterBase.java b/server/src/com/cloud/template/TemplateAdapterBase.java index 546b10a668b..916540fe9b1 100755 --- a/server/src/com/cloud/template/TemplateAdapterBase.java +++ b/server/src/com/cloud/template/TemplateAdapterBase.java @@ -26,7 +26,7 @@ import org.apache.log4j.Logger; import org.apache.cloudstack.api.ApiConstants; import com.cloud.api.ApiDBUtils; import org.apache.cloudstack.api.user.iso.command.DeleteIsoCmd; -import com.cloud.api.commands.DeleteTemplateCmd; +import org.apache.cloudstack.api.user.template.command.DeleteTemplateCmd; import com.cloud.api.commands.RegisterIsoCmd; import com.cloud.api.commands.RegisterTemplateCmd; import com.cloud.configuration.Resource.ResourceType; diff --git a/server/src/com/cloud/template/TemplateManagerImpl.java b/server/src/com/cloud/template/TemplateManagerImpl.java index df8cf8424d5..ffe7d172dc4 100755 --- a/server/src/com/cloud/template/TemplateManagerImpl.java +++ b/server/src/com/cloud/template/TemplateManagerImpl.java @@ -36,6 +36,9 @@ import javax.naming.ConfigurationException; import org.apache.cloudstack.api.user.iso.command.*; import org.apache.cloudstack.api.user.template.command.CopyTemplateCmd; +import org.apache.cloudstack.api.user.template.command.ExtractTemplateCmd; +import org.apache.cloudstack.api.user.template.command.ListTemplatePermissionsCmd; +import org.apache.cloudstack.api.user.template.command.UpdateTemplatePermissionsCmd; import org.apache.log4j.Logger; import com.cloud.acl.SecurityChecker.AccessType; @@ -47,14 +50,11 @@ import com.cloud.agent.api.storage.DestroyCommand; import com.cloud.agent.api.storage.PrimaryStorageDownloadAnswer; import com.cloud.agent.api.storage.PrimaryStorageDownloadCommand; import com.cloud.agent.api.to.SwiftTO; -import com.cloud.api.commands.DeleteTemplateCmd; -import com.cloud.api.commands.ExtractTemplateCmd; +import org.apache.cloudstack.api.user.template.command.DeleteTemplateCmd; import com.cloud.api.commands.ListTemplateOrIsoPermissionsCmd; -import com.cloud.api.commands.ListTemplatePermissionsCmd; import com.cloud.api.commands.RegisterIsoCmd; import com.cloud.api.commands.RegisterTemplateCmd; import com.cloud.api.commands.UpdateTemplateOrIsoPermissionsCmd; -import com.cloud.api.commands.UpdateTemplatePermissionsCmd; import com.cloud.async.AsyncJobManager; import com.cloud.async.AsyncJobVO; import com.cloud.configuration.Config; diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java index 8d9bd5acdb0..2c7c7fbb493 100755 --- a/server/src/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/com/cloud/vm/UserVmManagerImpl.java @@ -31,6 +31,7 @@ import java.util.concurrent.TimeUnit; import javax.ejb.Local; import javax.naming.ConfigurationException; +import org.apache.cloudstack.api.user.template.command.CreateTemplateCmd; import org.apache.commons.codec.binary.Base64; import org.apache.log4j.Logger; @@ -60,7 +61,6 @@ import com.cloud.api.ApiDBUtils; import org.apache.cloudstack.api.BaseCmd; import org.apache.cloudstack.api.admin.vm.command.AssignVMCmd; import com.cloud.api.commands.AttachVolumeCmd; -import com.cloud.api.commands.CreateTemplateCmd; import com.cloud.api.commands.CreateVMGroupCmd; import com.cloud.api.commands.DeleteVMGroupCmd; import org.apache.cloudstack.api.user.vm.command.DeployVMCmd; diff --git a/server/test/com/cloud/vm/MockUserVmManagerImpl.java b/server/test/com/cloud/vm/MockUserVmManagerImpl.java index 16f01948113..39900a6d179 100644 --- a/server/test/com/cloud/vm/MockUserVmManagerImpl.java +++ b/server/test/com/cloud/vm/MockUserVmManagerImpl.java @@ -30,7 +30,7 @@ import com.cloud.agent.api.to.VirtualMachineTO; import com.cloud.agent.manager.Commands; import org.apache.cloudstack.api.admin.vm.command.AssignVMCmd; import com.cloud.api.commands.AttachVolumeCmd; -import com.cloud.api.commands.CreateTemplateCmd; +import org.apache.cloudstack.api.user.template.command.CreateTemplateCmd; import com.cloud.api.commands.CreateVMGroupCmd; import com.cloud.api.commands.DeleteVMGroupCmd; import org.apache.cloudstack.api.user.vm.command.DeployVMCmd;