Skip to content

Commit bd69166

Browse files
committed
Add newly separated admin cmd class in ManagementServerImpl.getCommands.
1 parent 7a7d9cf commit bd69166

3 files changed

Lines changed: 108 additions & 2 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package org.apache.cloudstack.api.command.admin.iso;
2+
3+
import org.apache.cloudstack.api.APICommand;
4+
import org.apache.cloudstack.api.ResponseObject.ResponseView;
5+
import org.apache.cloudstack.api.command.user.iso.CopyIsoCmd;
6+
import org.apache.cloudstack.api.response.TemplateResponse;
7+
8+
@APICommand(name = "copyIso", description = "Copies an iso from one zone to another.", responseObject = TemplateResponse.class, responseView = ResponseView.Full,
9+
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
10+
public class CopyIsoCmdByAdmin extends CopyIsoCmd {
11+
12+
}

‎api/src/org/apache/cloudstack/api/command/user/iso/CopyIsoCmd.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@
1919
import org.apache.log4j.Logger;
2020

2121
import org.apache.cloudstack.api.APICommand;
22+
import org.apache.cloudstack.api.ResponseObject.ResponseView;
2223
import org.apache.cloudstack.api.command.user.template.CopyTemplateCmd;
2324
import org.apache.cloudstack.api.response.TemplateResponse;
2425

25-
@APICommand(name = "copyIso", description = "Copies an iso from one zone to another.", responseObject = TemplateResponse.class,
26+
@APICommand(name = "copyIso", description = "Copies an iso from one zone to another.", responseObject = TemplateResponse.class, responseView = ResponseView.Restricted,
2627
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
2728
public class CopyIsoCmd extends CopyTemplateCmd {
2829
public static final Logger s_logger = Logger.getLogger(CopyIsoCmd.class.getName());

‎server/src/com/cloud/server/ManagementServerImpl.java‎

Lines changed: 94 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,12 @@
5151
import org.apache.cloudstack.api.command.admin.account.DeleteAccountCmd;
5252
import org.apache.cloudstack.api.command.admin.account.DisableAccountCmd;
5353
import org.apache.cloudstack.api.command.admin.account.EnableAccountCmd;
54+
import org.apache.cloudstack.api.command.admin.account.ListAccountsCmdByAdmin;
5455
import org.apache.cloudstack.api.command.admin.account.LockAccountCmd;
5556
import org.apache.cloudstack.api.command.admin.account.UpdateAccountCmd;
57+
import org.apache.cloudstack.api.command.admin.address.AssociateIPAddrCmdByAdmin;
58+
import org.apache.cloudstack.api.command.admin.address.ListPublicIpAddressesCmdByAdmin;
59+
import org.apache.cloudstack.api.command.admin.affinitygroup.UpdateVMAffinityGroupCmdByAdmin;
5660
import org.apache.cloudstack.api.command.admin.alert.GenerateAlertCmd;
5761
import org.apache.cloudstack.api.command.admin.autoscale.CreateCounterCmd;
5862
import org.apache.cloudstack.api.command.admin.autoscale.DeleteCounterCmd;
@@ -94,8 +98,16 @@
9498
import org.apache.cloudstack.api.command.admin.internallb.ListInternalLoadBalancerElementsCmd;
9599
import org.apache.cloudstack.api.command.admin.internallb.StartInternalLBVMCmd;
96100
import org.apache.cloudstack.api.command.admin.internallb.StopInternalLBVMCmd;
101+
import org.apache.cloudstack.api.command.admin.iso.AttachIsoCmdByAdmin;
102+
import org.apache.cloudstack.api.command.admin.iso.CopyIsoCmdByAdmin;
103+
import org.apache.cloudstack.api.command.admin.iso.DetachIsoCmdByAdmin;
104+
import org.apache.cloudstack.api.command.admin.iso.ListIsoPermissionsCmdByAdmin;
105+
import org.apache.cloudstack.api.command.admin.iso.ListIsosCmdByAdmin;
106+
import org.apache.cloudstack.api.command.admin.iso.RegisterIsoCmdByAdmin;
107+
import org.apache.cloudstack.api.command.admin.loadbalancer.ListLoadBalancerRuleInstancesCmdByAdmin;
97108
import org.apache.cloudstack.api.command.admin.network.AddNetworkDeviceCmd;
98109
import org.apache.cloudstack.api.command.admin.network.AddNetworkServiceProviderCmd;
110+
import org.apache.cloudstack.api.command.admin.network.CreateNetworkCmdByAdmin;
99111
import org.apache.cloudstack.api.command.admin.network.CreateNetworkOfferingCmd;
100112
import org.apache.cloudstack.api.command.admin.network.CreatePhysicalNetworkCmd;
101113
import org.apache.cloudstack.api.command.admin.network.CreateStorageNetworkIpRangeCmd;
@@ -109,10 +121,12 @@
109121
import org.apache.cloudstack.api.command.admin.network.ListNetworkDeviceCmd;
110122
import org.apache.cloudstack.api.command.admin.network.ListNetworkIsolationMethodsCmd;
111123
import org.apache.cloudstack.api.command.admin.network.ListNetworkServiceProvidersCmd;
124+
import org.apache.cloudstack.api.command.admin.network.ListNetworksCmdByAdmin;
112125
import org.apache.cloudstack.api.command.admin.network.ListPhysicalNetworksCmd;
113126
import org.apache.cloudstack.api.command.admin.network.ListStorageNetworkIpRangeCmd;
114127
import org.apache.cloudstack.api.command.admin.network.ListSupportedNetworkServicesCmd;
115128
import org.apache.cloudstack.api.command.admin.network.ReleaseDedicatedGuestVlanRangeCmd;
129+
import org.apache.cloudstack.api.command.admin.network.UpdateNetworkCmdByAdmin;
116130
import org.apache.cloudstack.api.command.admin.network.UpdateNetworkOfferingCmd;
117131
import org.apache.cloudstack.api.command.admin.network.UpdateNetworkServiceProviderCmd;
118132
import org.apache.cloudstack.api.command.admin.network.UpdatePhysicalNetworkCmd;
@@ -178,7 +192,12 @@
178192
import org.apache.cloudstack.api.command.admin.systemvm.StartSystemVMCmd;
179193
import org.apache.cloudstack.api.command.admin.systemvm.StopSystemVmCmd;
180194
import org.apache.cloudstack.api.command.admin.systemvm.UpgradeSystemVMCmd;
195+
import org.apache.cloudstack.api.command.admin.template.CopyTemplateCmdByAdmin;
196+
import org.apache.cloudstack.api.command.admin.template.CreateTemplateCmdByAdmin;
197+
import org.apache.cloudstack.api.command.admin.template.ListTemplatePermissionsCmdByAdmin;
198+
import org.apache.cloudstack.api.command.admin.template.ListTemplatesCmdByAdmin;
181199
import org.apache.cloudstack.api.command.admin.template.PrepareTemplateCmd;
200+
import org.apache.cloudstack.api.command.admin.template.RegisterTemplateCmdByAdmin;
182201
import org.apache.cloudstack.api.command.admin.usage.AddTrafficMonitorCmd;
183202
import org.apache.cloudstack.api.command.admin.usage.AddTrafficTypeCmd;
184203
import org.apache.cloudstack.api.command.admin.usage.DeleteTrafficMonitorCmd;
@@ -204,20 +223,47 @@
204223
import org.apache.cloudstack.api.command.admin.vlan.DeleteVlanIpRangeCmd;
205224
import org.apache.cloudstack.api.command.admin.vlan.ListVlanIpRangesCmd;
206225
import org.apache.cloudstack.api.command.admin.vlan.ReleasePublicIpRangeCmd;
226+
import org.apache.cloudstack.api.command.admin.vm.AddNicToVMCmdByAdmin;
207227
import org.apache.cloudstack.api.command.admin.vm.AssignVMCmd;
228+
import org.apache.cloudstack.api.command.admin.vm.DeployVMCmdByAdmin;
229+
import org.apache.cloudstack.api.command.admin.vm.DestroyVMCmdByAdmin;
208230
import org.apache.cloudstack.api.command.admin.vm.ExpungeVMCmd;
209231
import org.apache.cloudstack.api.command.admin.vm.GetVMUserDataCmd;
210232
import org.apache.cloudstack.api.command.admin.vm.ListVMsCmdByAdmin;
211233
import org.apache.cloudstack.api.command.admin.vm.MigrateVMCmd;
212234
import org.apache.cloudstack.api.command.admin.vm.MigrateVirtualMachineWithVolumeCmd;
235+
import org.apache.cloudstack.api.command.admin.vm.RebootVMCmdByAdmin;
213236
import org.apache.cloudstack.api.command.admin.vm.RecoverVMCmd;
237+
import org.apache.cloudstack.api.command.admin.vm.RemoveNicFromVMCmdByAdmin;
238+
import org.apache.cloudstack.api.command.admin.vm.ResetVMPasswordCmdByAdmin;
239+
import org.apache.cloudstack.api.command.admin.vm.ResetVMSSHKeyCmdByAdmin;
240+
import org.apache.cloudstack.api.command.admin.vm.RestoreVMCmdByAdmin;
241+
import org.apache.cloudstack.api.command.admin.vm.ScaleVMCmdByAdmin;
242+
import org.apache.cloudstack.api.command.admin.vm.StartVMCmdByAdmin;
243+
import org.apache.cloudstack.api.command.admin.vm.StopVMCmdByAdmin;
244+
import org.apache.cloudstack.api.command.admin.vm.UpdateDefaultNicForVMCmdByAdmin;
245+
import org.apache.cloudstack.api.command.admin.vm.UpdateVMCmdByAdmin;
246+
import org.apache.cloudstack.api.command.admin.vm.UpgradeVMCmdByAdmin;
247+
import org.apache.cloudstack.api.command.admin.vmsnapshot.RevertToVMSnapshotCmdByAdmin;
248+
import org.apache.cloudstack.api.command.admin.volume.AttachVolumeCmdByAdmin;
249+
import org.apache.cloudstack.api.command.admin.volume.CreateVolumeCmdByAdmin;
250+
import org.apache.cloudstack.api.command.admin.volume.DetachVolumeCmdByAdmin;
251+
import org.apache.cloudstack.api.command.admin.volume.ListVolumesCmdByAdmin;
252+
import org.apache.cloudstack.api.command.admin.volume.MigrateVolumeCmdByAdmin;
253+
import org.apache.cloudstack.api.command.admin.volume.ResizeVolumeCmdByAdmin;
254+
import org.apache.cloudstack.api.command.admin.volume.UpdateVolumeCmdByAdmin;
255+
import org.apache.cloudstack.api.command.admin.volume.UploadVolumeCmdByAdmin;
214256
import org.apache.cloudstack.api.command.admin.vpc.CreatePrivateGatewayCmd;
257+
import org.apache.cloudstack.api.command.admin.vpc.CreateVPCCmdByAdmin;
215258
import org.apache.cloudstack.api.command.admin.vpc.CreateVPCOfferingCmd;
216259
import org.apache.cloudstack.api.command.admin.vpc.DeletePrivateGatewayCmd;
217260
import org.apache.cloudstack.api.command.admin.vpc.DeleteVPCOfferingCmd;
261+
import org.apache.cloudstack.api.command.admin.vpc.ListVPCsCmdByAdmin;
262+
import org.apache.cloudstack.api.command.admin.vpc.UpdateVPCCmdByAdmin;
218263
import org.apache.cloudstack.api.command.admin.vpc.UpdateVPCOfferingCmd;
219264
import org.apache.cloudstack.api.command.admin.zone.CreateZoneCmd;
220265
import org.apache.cloudstack.api.command.admin.zone.DeleteZoneCmd;
266+
import org.apache.cloudstack.api.command.admin.zone.ListZonesCmdByAdmin;
221267
import org.apache.cloudstack.api.command.admin.zone.MarkDefaultZoneForAccountCmd;
222268
import org.apache.cloudstack.api.command.admin.zone.UpdateZoneCmd;
223269
import org.apache.cloudstack.api.command.user.account.AddAccountToProjectCmd;
@@ -2770,7 +2816,6 @@ public List<Class<?>> getCommands() {
27702816
cmdList.add(ExpungeVMCmd.class);
27712817
cmdList.add(GetVMPasswordCmd.class);
27722818
cmdList.add(ListVMsCmd.class);
2773-
cmdList.add(ListVMsCmdByAdmin.class);
27742819
cmdList.add(ScaleVMCmd.class);
27752820
cmdList.add(RebootVMCmd.class);
27762821
cmdList.add(RemoveNicFromVMCmd.class);
@@ -2898,6 +2943,54 @@ public List<Class<?>> getCommands() {
28982943
cmdList.add(UpdateRemoteAccessVpnCmd.class);
28992944
cmdList.add(UpdateVpnConnectionCmd.class);
29002945
cmdList.add(UpdateVpnGatewayCmd.class);
2946+
// separated admin commands
2947+
cmdList.add(ListAccountsCmdByAdmin.class);
2948+
cmdList.add(ListZonesCmdByAdmin.class);
2949+
cmdList.add(ListTemplatesCmdByAdmin.class);
2950+
cmdList.add(CreateTemplateCmdByAdmin.class);
2951+
cmdList.add(CopyTemplateCmdByAdmin.class);
2952+
cmdList.add(RegisterTemplateCmdByAdmin.class);
2953+
cmdList.add(ListTemplatePermissionsCmdByAdmin.class);
2954+
cmdList.add(RegisterIsoCmdByAdmin.class);
2955+
cmdList.add(CopyIsoCmdByAdmin.class);
2956+
cmdList.add(ListIsosCmdByAdmin.class);
2957+
cmdList.add(AttachIsoCmdByAdmin.class);
2958+
cmdList.add(DetachIsoCmdByAdmin.class);
2959+
cmdList.add(ListIsoPermissionsCmdByAdmin.class);
2960+
cmdList.add(UpdateVMAffinityGroupCmdByAdmin.class);
2961+
cmdList.add(AddNicToVMCmdByAdmin.class);
2962+
cmdList.add(RemoveNicFromVMCmdByAdmin.class);
2963+
cmdList.add(UpdateDefaultNicForVMCmdByAdmin.class);
2964+
cmdList.add(ListLoadBalancerRuleInstancesCmdByAdmin.class);
2965+
cmdList.add(DeployVMCmdByAdmin.class);
2966+
cmdList.add(DestroyVMCmdByAdmin.class);
2967+
cmdList.add(RebootVMCmdByAdmin.class);
2968+
cmdList.add(ResetVMPasswordCmdByAdmin.class);
2969+
cmdList.add(ResetVMSSHKeyCmdByAdmin.class);
2970+
cmdList.add(RestoreVMCmdByAdmin.class);
2971+
cmdList.add(ScaleVMCmdByAdmin.class);
2972+
cmdList.add(StartVMCmdByAdmin.class);
2973+
cmdList.add(StopVMCmdByAdmin.class);
2974+
cmdList.add(UpdateVMCmdByAdmin.class);
2975+
cmdList.add(UpgradeVMCmdByAdmin.class);
2976+
cmdList.add(RevertToVMSnapshotCmdByAdmin.class);
2977+
cmdList.add(ListVMsCmdByAdmin.class);
2978+
cmdList.add(AttachVolumeCmdByAdmin.class);
2979+
cmdList.add(CreateVolumeCmdByAdmin.class);
2980+
cmdList.add(DetachVolumeCmdByAdmin.class);
2981+
cmdList.add(MigrateVolumeCmdByAdmin.class);
2982+
cmdList.add(ResizeVolumeCmdByAdmin.class);
2983+
cmdList.add(UpdateVolumeCmdByAdmin.class);
2984+
cmdList.add(UploadVolumeCmdByAdmin.class);
2985+
cmdList.add(ListVolumesCmdByAdmin.class);
2986+
cmdList.add(AssociateIPAddrCmdByAdmin.class);
2987+
cmdList.add(ListPublicIpAddressesCmdByAdmin.class);
2988+
cmdList.add(CreateNetworkCmdByAdmin.class);
2989+
cmdList.add(UpdateNetworkCmdByAdmin.class);
2990+
cmdList.add(ListNetworksCmdByAdmin.class);
2991+
cmdList.add(CreateVPCCmdByAdmin.class);
2992+
cmdList.add(ListVPCsCmdByAdmin.class);
2993+
cmdList.add(UpdateVPCCmdByAdmin.class);
29012994
return cmdList;
29022995
}
29032996

0 commit comments

Comments
 (0)