mirror of https://github.com/apache/cloudstack.git
api_refactor: refactor template apis
- Fix refactored apis, fix mapping in commands*.in - Fix comments etc. Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
parent
e0b4430070
commit
3e0b2164be
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -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;
|
||||
|
||||
|
|
@ -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;
|
||||
|
||||
|
|
@ -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;
|
||||
|
|
@ -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;
|
||||
|
|
@ -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;
|
||||
|
|
@ -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;
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue