mirror of https://github.com/apache/cloudstack.git
api_refactor: refactor volume apis
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
parent
25b5aadb4e
commit
8773fc2a55
|
|
@ -32,7 +32,7 @@ import org.apache.cloudstack.api.user.offering.command.ListServiceOfferingsCmd;
|
|||
import org.apache.cloudstack.api.user.ssh.command.CreateSSHKeyPairCmd;
|
||||
import org.apache.cloudstack.api.user.ssh.command.DeleteSSHKeyPairCmd;
|
||||
import com.cloud.api.commands.DestroySystemVmCmd;
|
||||
import com.cloud.api.commands.ExtractVolumeCmd;
|
||||
import org.apache.cloudstack.api.user.volume.command.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;
|
||||
|
|
|
|||
|
|
@ -21,11 +21,11 @@ import java.util.List;
|
|||
|
||||
import com.cloud.api.commands.CancelPrimaryStorageMaintenanceCmd;
|
||||
import com.cloud.api.commands.CreateStoragePoolCmd;
|
||||
import com.cloud.api.commands.CreateVolumeCmd;
|
||||
import org.apache.cloudstack.api.user.volume.command.CreateVolumeCmd;
|
||||
import com.cloud.api.commands.DeletePoolCmd;
|
||||
import com.cloud.api.commands.ListVolumesCmd;
|
||||
import org.apache.cloudstack.api.user.volume.command.ListVolumesCmd;
|
||||
import com.cloud.api.commands.UpdateStoragePoolCmd;
|
||||
import com.cloud.api.commands.UploadVolumeCmd;
|
||||
import org.apache.cloudstack.api.user.volume.command.UploadVolumeCmd;
|
||||
import com.cloud.exception.ConcurrentOperationException;
|
||||
import com.cloud.exception.InsufficientCapacityException;
|
||||
import com.cloud.exception.PermissionDeniedException;
|
||||
|
|
|
|||
|
|
@ -22,13 +22,13 @@ import java.util.Map;
|
|||
import javax.naming.InsufficientResourcesException;
|
||||
|
||||
import org.apache.cloudstack.api.admin.vm.command.AssignVMCmd;
|
||||
import com.cloud.api.commands.AttachVolumeCmd;
|
||||
import org.apache.cloudstack.api.user.volume.command.AttachVolumeCmd;
|
||||
import org.apache.cloudstack.api.user.template.command.CreateTemplateCmd;
|
||||
import org.apache.cloudstack.api.user.vmgroup.command.CreateVMGroupCmd;
|
||||
import org.apache.cloudstack.api.user.vmgroup.command.DeleteVMGroupCmd;
|
||||
import org.apache.cloudstack.api.user.vm.command.DeployVMCmd;
|
||||
import org.apache.cloudstack.api.user.vm.command.DestroyVMCmd;
|
||||
import com.cloud.api.commands.DetachVolumeCmd;
|
||||
import org.apache.cloudstack.api.user.volume.command.DetachVolumeCmd;
|
||||
import org.apache.cloudstack.api.user.vm.command.ListVMsCmd;
|
||||
import org.apache.cloudstack.api.user.vm.command.RebootVMCmd;
|
||||
import org.apache.cloudstack.api.admin.vm.command.RecoverVMCmd;
|
||||
|
|
|
|||
|
|
@ -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.volume.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.volume.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.volume.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.volume.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.volume.command;
|
||||
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
|
|
@ -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.volume.command;
|
||||
|
||||
import java.util.ArrayList;
|
||||
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.volume.command;
|
||||
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
import org.apache.cloudstack.api.BaseAsyncCmd;
|
||||
|
|
@ -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.volume.command;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
|
@ -242,14 +242,14 @@ addSecondaryStorage=com.cloud.api.commands.AddSecondaryStorageCmd;1
|
|||
updateHostPassword=com.cloud.api.commands.UpdateHostPasswordCmd;1
|
||||
|
||||
#### volume commands
|
||||
attachVolume=com.cloud.api.commands.AttachVolumeCmd;15
|
||||
uploadVolume=com.cloud.api.commands.UploadVolumeCmd;15
|
||||
detachVolume=com.cloud.api.commands.DetachVolumeCmd;15
|
||||
createVolume=com.cloud.api.commands.CreateVolumeCmd;15
|
||||
deleteVolume=com.cloud.api.commands.DeleteVolumeCmd;15
|
||||
listVolumes=com.cloud.api.commands.ListVolumesCmd;15
|
||||
extractVolume=com.cloud.api.commands.ExtractVolumeCmd;15
|
||||
migrateVolume=com.cloud.api.commands.MigrateVolumeCmd;15
|
||||
attachVolume=org.apache.cloudstack.api.user.volume.command.AttachVolumeCmd;15
|
||||
uploadVolume=org.apache.cloudstack.api.user.volume.command.UploadVolumeCmd;15
|
||||
detachVolume=org.apache.cloudstack.api.user.volume.command.DetachVolumeCmd;15
|
||||
createVolume=org.apache.cloudstack.api.user.volume.command.CreateVolumeCmd;15
|
||||
deleteVolume=org.apache.cloudstack.api.user.volume.command.DeleteVolumeCmd;15
|
||||
listVolumes=org.apache.cloudstack.api.user.volume.command.ListVolumesCmd;15
|
||||
extractVolume=org.apache.cloudstack.api.user.volume.command.ExtractVolumeCmd;15
|
||||
migrateVolume=org.apache.cloudstack.api.user.volume.command.MigrateVolumeCmd;15
|
||||
|
||||
#### registration command: FIXME -- this really should be something in management server that
|
||||
#### generates a new key for the user and they just have to
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ import javax.ejb.Local;
|
|||
import javax.naming.ConfigurationException;
|
||||
|
||||
import org.apache.cloudstack.api.user.template.command.CreateTemplateCmd;
|
||||
import org.apache.cloudstack.api.user.volume.command.AttachVolumeCmd;
|
||||
import org.apache.cloudstack.api.user.volume.command.DetachVolumeCmd;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.agent.api.Answer;
|
||||
|
|
@ -33,9 +35,7 @@ import com.cloud.agent.api.StopAnswer;
|
|||
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 org.apache.cloudstack.api.user.vm.command.DeployVMCmd;
|
||||
import com.cloud.api.commands.DetachVolumeCmd;
|
||||
import org.apache.cloudstack.api.user.vm.command.StartVMCmd;
|
||||
import org.apache.cloudstack.api.user.vm.command.UpgradeVMCmd;
|
||||
import com.cloud.baremetal.PxeServerManager.PxeServerType;
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ import org.apache.cloudstack.api.ApiConstants;
|
|||
import com.cloud.api.ApiDBUtils;
|
||||
import org.apache.cloudstack.api.user.ssh.command.CreateSSHKeyPairCmd;
|
||||
import com.cloud.api.commands.DestroySystemVmCmd;
|
||||
import com.cloud.api.commands.ExtractVolumeCmd;
|
||||
import org.apache.cloudstack.api.user.volume.command.ExtractVolumeCmd;
|
||||
import org.apache.cloudstack.api.user.vm.command.GetVMPasswordCmd;
|
||||
import com.cloud.api.commands.ListAlertsCmd;
|
||||
import com.cloud.api.commands.ListCapacityCmd;
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ import java.util.concurrent.TimeUnit;
|
|||
import javax.ejb.Local;
|
||||
import javax.naming.ConfigurationException;
|
||||
|
||||
import org.apache.cloudstack.api.user.volume.command.CreateVolumeCmd;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.agent.AgentManager;
|
||||
|
|
@ -73,11 +74,10 @@ import com.cloud.alert.AlertManager;
|
|||
import com.cloud.api.ApiDBUtils;
|
||||
import com.cloud.api.commands.CancelPrimaryStorageMaintenanceCmd;
|
||||
import com.cloud.api.commands.CreateStoragePoolCmd;
|
||||
import com.cloud.api.commands.CreateVolumeCmd;
|
||||
import com.cloud.api.commands.DeletePoolCmd;
|
||||
import com.cloud.api.commands.ListVolumesCmd;
|
||||
import org.apache.cloudstack.api.user.volume.command.ListVolumesCmd;
|
||||
import com.cloud.api.commands.UpdateStoragePoolCmd;
|
||||
import com.cloud.api.commands.UploadVolumeCmd;
|
||||
import org.apache.cloudstack.api.user.volume.command.UploadVolumeCmd;
|
||||
import com.cloud.async.AsyncJobManager;
|
||||
import com.cloud.capacity.Capacity;
|
||||
import com.cloud.capacity.CapacityManager;
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ import java.util.Timer;
|
|||
import java.util.TimerTask;
|
||||
|
||||
import org.apache.cloudstack.api.user.iso.command.ExtractIsoCmd;
|
||||
import org.apache.cloudstack.api.user.volume.command.ExtractVolumeCmd;
|
||||
import org.apache.log4j.Level;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
|
@ -40,7 +41,6 @@ import com.cloud.agent.api.storage.UploadCommand;
|
|||
import com.cloud.agent.api.storage.UploadProgressCommand;
|
||||
import com.cloud.agent.api.storage.UploadProgressCommand.RequestType;
|
||||
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;
|
||||
import com.cloud.async.AsyncJobResult;
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@ import javax.naming.ConfigurationException;
|
|||
|
||||
import org.apache.cloudstack.api.user.template.command.CreateTemplateCmd;
|
||||
import org.apache.cloudstack.api.user.vmgroup.command.DeleteVMGroupCmd;
|
||||
import org.apache.cloudstack.api.user.volume.command.AttachVolumeCmd;
|
||||
import org.apache.cloudstack.api.user.volume.command.DetachVolumeCmd;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
|
@ -61,11 +63,9 @@ import com.cloud.alert.AlertManager;
|
|||
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 org.apache.cloudstack.api.user.vmgroup.command.CreateVMGroupCmd;
|
||||
import org.apache.cloudstack.api.user.vm.command.DeployVMCmd;
|
||||
import org.apache.cloudstack.api.user.vm.command.DestroyVMCmd;
|
||||
import com.cloud.api.commands.DetachVolumeCmd;
|
||||
import org.apache.cloudstack.api.user.vm.command.ListVMsCmd;
|
||||
import org.apache.cloudstack.api.user.vm.command.RebootVMCmd;
|
||||
import org.apache.cloudstack.api.admin.vm.command.RecoverVMCmd;
|
||||
|
|
|
|||
|
|
@ -29,13 +29,13 @@ import com.cloud.agent.api.to.NicTO;
|
|||
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 org.apache.cloudstack.api.user.volume.command.AttachVolumeCmd;
|
||||
import org.apache.cloudstack.api.user.template.command.CreateTemplateCmd;
|
||||
import org.apache.cloudstack.api.user.vmgroup.command.CreateVMGroupCmd;
|
||||
import org.apache.cloudstack.api.user.vmgroup.command.DeleteVMGroupCmd;
|
||||
import org.apache.cloudstack.api.user.vm.command.DeployVMCmd;
|
||||
import org.apache.cloudstack.api.user.vm.command.DestroyVMCmd;
|
||||
import com.cloud.api.commands.DetachVolumeCmd;
|
||||
import org.apache.cloudstack.api.user.volume.command.DetachVolumeCmd;
|
||||
import org.apache.cloudstack.api.user.vm.command.ListVMsCmd;
|
||||
import org.apache.cloudstack.api.user.vm.command.RebootVMCmd;
|
||||
import org.apache.cloudstack.api.admin.vm.command.RecoverVMCmd;
|
||||
|
|
|
|||
Loading…
Reference in New Issue