DaanHoogland commented on a change in pull request #5216:
URL: https://github.com/apache/cloudstack/pull/5216#discussion_r692766471



##########
File path: 
api/src/main/java/org/apache/cloudstack/api/command/user/vm/CloneVMCmd.java
##########
@@ -0,0 +1,193 @@
+package org.apache.cloudstack.api.command.user.vm;
+
+import com.cloud.event.EventTypes;
+import com.cloud.exception.ConcurrentOperationException;
+import com.cloud.exception.InsufficientCapacityException;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.exception.ResourceAllocationException;
+import com.cloud.exception.ResourceUnavailableException;
+import com.cloud.template.VirtualMachineTemplate;
+import com.cloud.user.Account;
+import com.cloud.uservm.UserVm;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.cloud.vm.VirtualMachine;
+import org.apache.cloudstack.acl.SecurityChecker.AccessType;
+import org.apache.cloudstack.api.ACL;
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiCommandJobType;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseAsyncCreateCustomIdCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ResponseObject;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.command.user.UserCmd;
+import org.apache.cloudstack.api.response.DomainResponse;
+import org.apache.cloudstack.api.response.UserVmResponse;
+//import org.apache.cloudstack.context.CallContext;
+import org.apache.cloudstack.context.CallContext;
+import org.apache.log4j.Logger;
+
+import java.util.Optional;
+
+@APICommand(name = "cloneVirtualMachine", responseObject = 
UserVmResponse.class, description = "clone a virtual VM in full clone mode",
+        responseView = ResponseObject.ResponseView.Restricted, 
requestHasSensitiveInfo = false, responseHasSensitiveInfo = true, entityType = 
{VirtualMachine.class})
+public class CloneVMCmd extends BaseAsyncCreateCustomIdCmd implements UserCmd {
+    public static final Logger s_logger = 
Logger.getLogger(CloneVMCmd.class.getName());
+    private static final String s_name = "clonevirtualmachineresponse";
+
+    /////////////////////////////////////////////////////
+    //////////////// API parameters /////////////////////
+    /////////////////////////////////////////////////////
+    @ACL(accessType = AccessType.OperateEntry)
+    @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = 
CommandType.UUID, entityType=UserVmResponse.class,
+            required = true, description = "The ID of the virtual machine")

Review comment:
       @atrocitytheme can you add a reason why you didn't appluy this sugestion?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to