Skip to content

Commit 26d2f43

Browse files
committed
CLOUDSTACK-6199: Revert the AsyncVm and AsyncVolume Cmd. There is a better way to check the display property of first class entities.
1 parent 3419c81 commit 26d2f43

15 files changed

Lines changed: 26 additions & 99 deletions

‎api/src/org/apache/cloudstack/api/BaseAsyncVMCmd.java‎

Lines changed: 0 additions & 30 deletions
This file was deleted.

‎api/src/org/apache/cloudstack/api/BaseAsyncVolumeCmd.java‎

Lines changed: 0 additions & 30 deletions
This file was deleted.

‎api/src/org/apache/cloudstack/api/command/user/vm/DestroyVMCmd.java‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import org.apache.cloudstack.api.ApiCommandJobType;
2727
import org.apache.cloudstack.api.ApiConstants;
2828
import org.apache.cloudstack.api.ApiErrorCode;
29-
import org.apache.cloudstack.api.BaseAsyncVMCmd;
29+
import org.apache.cloudstack.api.BaseAsyncCmd;
3030
import org.apache.cloudstack.api.Parameter;
3131
import org.apache.cloudstack.api.ResponseObject.ResponseView;
3232
import org.apache.cloudstack.api.ServerApiException;
@@ -43,7 +43,7 @@
4343
@APICommand(name = "destroyVirtualMachine", description = "Destroys a virtual machine. Once destroyed, only the administrator can recover it.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = {VirtualMachine.class},
4444
requestHasSensitiveInfo = false,
4545
responseHasSensitiveInfo = true)
46-
public class DestroyVMCmd extends BaseAsyncVMCmd {
46+
public class DestroyVMCmd extends BaseAsyncCmd {
4747
public static final Logger s_logger = Logger.getLogger(DestroyVMCmd.class.getName());
4848

4949
private static final String s_name = "destroyvirtualmachineresponse";
@@ -67,7 +67,6 @@ public class DestroyVMCmd extends BaseAsyncVMCmd {
6767
/////////////////// Accessors ///////////////////////
6868
/////////////////////////////////////////////////////
6969

70-
@Override
7170
public Long getId() {
7271
return id;
7372
}

‎api/src/org/apache/cloudstack/api/command/user/vm/RebootVMCmd.java‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import org.apache.cloudstack.api.ApiCommandJobType;
2525
import org.apache.cloudstack.api.ApiConstants;
2626
import org.apache.cloudstack.api.ApiErrorCode;
27-
import org.apache.cloudstack.api.BaseAsyncVMCmd;
27+
import org.apache.cloudstack.api.BaseAsyncCmd;
2828
import org.apache.cloudstack.api.Parameter;
2929
import org.apache.cloudstack.api.ResponseObject.ResponseView;
3030
import org.apache.cloudstack.api.ServerApiException;
@@ -40,7 +40,7 @@
4040

4141
@APICommand(name = "rebootVirtualMachine", description = "Reboots a virtual machine.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = {VirtualMachine.class},
4242
requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
43-
public class RebootVMCmd extends BaseAsyncVMCmd {
43+
public class RebootVMCmd extends BaseAsyncCmd {
4444
public static final Logger s_logger = Logger.getLogger(RebootVMCmd.class.getName());
4545
private static final String s_name = "rebootvirtualmachineresponse";
4646

@@ -56,7 +56,6 @@ public class RebootVMCmd extends BaseAsyncVMCmd {
5656
/////////////////// Accessors ///////////////////////
5757
/////////////////////////////////////////////////////
5858

59-
@Override
6059
public Long getId() {
6160
return id;
6261
}

‎api/src/org/apache/cloudstack/api/command/user/vm/ResetVMPasswordCmd.java‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import org.apache.cloudstack.api.ApiCommandJobType;
2525
import org.apache.cloudstack.api.ApiConstants;
2626
import org.apache.cloudstack.api.ApiErrorCode;
27-
import org.apache.cloudstack.api.BaseAsyncVMCmd;
27+
import org.apache.cloudstack.api.BaseAsyncCmd;
2828
import org.apache.cloudstack.api.Parameter;
2929
import org.apache.cloudstack.api.ResponseObject.ResponseView;
3030
import org.apache.cloudstack.api.ServerApiException;
@@ -42,7 +42,7 @@
4242
"The virtual machine must be in a \"Stopped\" state and the template must already " +
4343
"support this feature for this command to take effect. [async]", responseView = ResponseView.Restricted, entityType = {VirtualMachine.class},
4444
requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
45-
public class ResetVMPasswordCmd extends BaseAsyncVMCmd {
45+
public class ResetVMPasswordCmd extends BaseAsyncCmd {
4646
public static final Logger s_logger = Logger.getLogger(ResetVMPasswordCmd.class.getName());
4747

4848
private static final String s_name = "resetpasswordforvirtualmachineresponse";
@@ -64,7 +64,6 @@ public class ResetVMPasswordCmd extends BaseAsyncVMCmd {
6464
/////////////////// Accessors ///////////////////////
6565
/////////////////////////////////////////////////////
6666

67-
@Override
6867
public Long getId() {
6968
return id;
7069
}

‎api/src/org/apache/cloudstack/api/command/user/vm/ResetVMSSHKeyCmd.java‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import org.apache.cloudstack.api.ApiCommandJobType;
2626
import org.apache.cloudstack.api.ApiConstants;
2727
import org.apache.cloudstack.api.ApiErrorCode;
28-
import org.apache.cloudstack.api.BaseAsyncVMCmd;
28+
import org.apache.cloudstack.api.BaseAsyncCmd;
2929
import org.apache.cloudstack.api.Parameter;
3030
import org.apache.cloudstack.api.ResponseObject.ResponseView;
3131
import org.apache.cloudstack.api.ServerApiException;
@@ -44,7 +44,7 @@
4444
@APICommand(name = "resetSSHKeyForVirtualMachine", responseObject = UserVmResponse.class, description = "Resets the SSH Key for virtual machine. " +
4545
"The virtual machine must be in a \"Stopped\" state. [async]", responseView = ResponseView.Restricted, entityType = {VirtualMachine.class},
4646
requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
47-
public class ResetVMSSHKeyCmd extends BaseAsyncVMCmd {
47+
public class ResetVMSSHKeyCmd extends BaseAsyncCmd {
4848

4949
public static final Logger s_logger = Logger.getLogger(ResetVMSSHKeyCmd.class.getName());
5050

@@ -81,7 +81,6 @@ public String getName() {
8181
return name;
8282
}
8383

84-
@Override
8584
public Long getId() {
8685
return id;
8786
}

‎api/src/org/apache/cloudstack/api/command/user/vm/RestoreVMCmd.java‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import org.apache.cloudstack.api.APICommand;
2424
import org.apache.cloudstack.api.ApiConstants;
2525
import org.apache.cloudstack.api.ApiErrorCode;
26-
import org.apache.cloudstack.api.BaseAsyncVMCmd;
26+
import org.apache.cloudstack.api.BaseAsyncCmd;
2727
import org.apache.cloudstack.api.Parameter;
2828
import org.apache.cloudstack.api.ResponseObject.ResponseView;
2929
import org.apache.cloudstack.api.ServerApiException;
@@ -43,7 +43,7 @@
4343
@APICommand(name = "restoreVirtualMachine", description = "Restore a VM to original template/ISO or new template/ISO", responseObject = UserVmResponse.class, since = "3.0.0", responseView = ResponseView.Restricted, entityType = {VirtualMachine.class},
4444
requestHasSensitiveInfo = false,
4545
responseHasSensitiveInfo = true)
46-
public class RestoreVMCmd extends BaseAsyncVMCmd {
46+
public class RestoreVMCmd extends BaseAsyncCmd {
4747
public static final Logger s_logger = Logger.getLogger(RestoreVMCmd.class);
4848
private static final String s_name = "restorevmresponse";
4949

@@ -106,7 +106,6 @@ public Long getTemplateId() {
106106
}
107107

108108
// TODO - Remove vmid param and make it "id" in 5.0 so that we dont have two getters
109-
@Override
110109
public Long getId() {
111110
return getVmId();
112111
}

‎api/src/org/apache/cloudstack/api/command/user/vm/ScaleVMCmd.java‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import org.apache.cloudstack.api.APICommand;
3030
import org.apache.cloudstack.api.ApiConstants;
3131
import org.apache.cloudstack.api.ApiErrorCode;
32-
import org.apache.cloudstack.api.BaseAsyncVMCmd;
32+
import org.apache.cloudstack.api.BaseAsyncCmd;
3333
import org.apache.cloudstack.api.BaseCmd;
3434
import org.apache.cloudstack.api.Parameter;
3535
import org.apache.cloudstack.api.ResponseObject.ResponseView;
@@ -50,7 +50,7 @@
5050

5151
@APICommand(name = "scaleVirtualMachine", description = "Scales the virtual machine to a new service offering.", responseObject = SuccessResponse.class, responseView = ResponseView.Restricted, entityType = {VirtualMachine.class},
5252
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
53-
public class ScaleVMCmd extends BaseAsyncVMCmd {
53+
public class ScaleVMCmd extends BaseAsyncCmd {
5454
public static final Logger s_logger = Logger.getLogger(ScaleVMCmd.class.getName());
5555
private static final String s_name = "scalevirtualmachineresponse";
5656

@@ -73,7 +73,6 @@ public class ScaleVMCmd extends BaseAsyncVMCmd {
7373
/////////////////// Accessors ///////////////////////
7474
/////////////////////////////////////////////////////
7575

76-
@Override
7776
public Long getId() {
7877
return id;
7978
}

‎api/src/org/apache/cloudstack/api/command/user/vm/StartVMCmd.java‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import org.apache.cloudstack.api.ApiCommandJobType;
2626
import org.apache.cloudstack.api.ApiConstants;
2727
import org.apache.cloudstack.api.ApiErrorCode;
28-
import org.apache.cloudstack.api.BaseAsyncVMCmd;
28+
import org.apache.cloudstack.api.BaseAsyncCmd;
2929
import org.apache.cloudstack.api.Parameter;
3030
import org.apache.cloudstack.api.ResponseObject.ResponseView;
3131
import org.apache.cloudstack.api.ServerApiException;
@@ -47,7 +47,7 @@
4747

4848
@APICommand(name = "startVirtualMachine", responseObject = UserVmResponse.class, description = "Starts a virtual machine.", responseView = ResponseView.Restricted, entityType = {VirtualMachine.class},
4949
requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
50-
public class StartVMCmd extends BaseAsyncVMCmd {
50+
public class StartVMCmd extends BaseAsyncCmd {
5151
public static final Logger s_logger = Logger.getLogger(StartVMCmd.class.getName());
5252

5353
private static final String s_name = "startvirtualmachineresponse";
@@ -74,7 +74,6 @@ public class StartVMCmd extends BaseAsyncVMCmd {
7474
// ///////////////// Accessors ///////////////////////
7575
// ///////////////////////////////////////////////////
7676

77-
@Override
7877
public Long getId() {
7978
return id;
8079
}

‎api/src/org/apache/cloudstack/api/command/user/vm/StopVMCmd.java‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import org.apache.cloudstack.api.ApiCommandJobType;
2525
import org.apache.cloudstack.api.ApiConstants;
2626
import org.apache.cloudstack.api.ApiErrorCode;
27-
import org.apache.cloudstack.api.BaseAsyncVMCmd;
27+
import org.apache.cloudstack.api.BaseAsyncCmd;
2828
import org.apache.cloudstack.api.Parameter;
2929
import org.apache.cloudstack.api.ResponseObject.ResponseView;
3030
import org.apache.cloudstack.api.ServerApiException;
@@ -39,7 +39,7 @@
3939

4040
@APICommand(name = "stopVirtualMachine", responseObject = UserVmResponse.class, description = "Stops a virtual machine.", responseView = ResponseView.Restricted, entityType = {VirtualMachine.class},
4141
requestHasSensitiveInfo = false, responseHasSensitiveInfo = true)
42-
public class StopVMCmd extends BaseAsyncVMCmd {
42+
public class StopVMCmd extends BaseAsyncCmd {
4343
public static final Logger s_logger = Logger.getLogger(StopVMCmd.class.getName());
4444

4545
private static final String s_name = "stopvirtualmachineresponse";
@@ -61,7 +61,6 @@ public class StopVMCmd extends BaseAsyncVMCmd {
6161
// ///////////////// Accessors ///////////////////////
6262
// ///////////////////////////////////////////////////
6363

64-
@Override
6564
public Long getId() {
6665
return id;
6766
}

0 commit comments

Comments
 (0)