|
50 | 50 | import java.util.concurrent.ExecutorService; |
51 | 51 | import java.util.concurrent.Executors; |
52 | 52 | import java.util.concurrent.Future; |
53 | | -import java.util.regex.Matcher; |
54 | | -import java.util.regex.Pattern; |
55 | 53 |
|
56 | 54 | import javax.ejb.Local; |
57 | 55 | import javax.naming.ConfigurationException; |
58 | 56 |
|
59 | | -import org.apache.cloudstack.storage.command.StorageSubSystemCommand; |
60 | | -import org.apache.cloudstack.storage.to.PrimaryDataStoreTO; |
61 | | -import org.apache.cloudstack.storage.to.VolumeObjectTO; |
62 | | -import org.apache.cloudstack.utils.qemu.QemuImg; |
63 | | -import org.apache.cloudstack.utils.qemu.QemuImg.PhysicalDiskFormat; |
64 | | -import org.apache.cloudstack.utils.qemu.QemuImgException; |
65 | | -import org.apache.cloudstack.utils.qemu.QemuImgFile; |
66 | | -import org.apache.log4j.Logger; |
67 | 57 | import org.apache.commons.io.FileUtils; |
| 58 | +import org.apache.log4j.Logger; |
68 | 59 | import org.libvirt.Connect; |
69 | 60 | import org.libvirt.Domain; |
70 | 61 | import org.libvirt.DomainBlockStats; |
|
74 | 65 | import org.libvirt.LibvirtException; |
75 | 66 | import org.libvirt.NodeInfo; |
76 | 67 |
|
| 68 | +import org.apache.cloudstack.storage.command.StorageSubSystemCommand; |
| 69 | +import org.apache.cloudstack.storage.to.PrimaryDataStoreTO; |
| 70 | +import org.apache.cloudstack.storage.to.VolumeObjectTO; |
| 71 | +import org.apache.cloudstack.utils.qemu.QemuImg; |
| 72 | +import org.apache.cloudstack.utils.qemu.QemuImg.PhysicalDiskFormat; |
| 73 | +import org.apache.cloudstack.utils.qemu.QemuImgException; |
| 74 | +import org.apache.cloudstack.utils.qemu.QemuImgFile; |
| 75 | + |
77 | 76 | import com.cloud.agent.api.Answer; |
78 | 77 | import com.cloud.agent.api.AttachIsoCommand; |
79 | 78 | import com.cloud.agent.api.AttachVolumeAnswer; |
|
202 | 201 | import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.GuestResourceDef; |
203 | 202 | import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.InputDef; |
204 | 203 | import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.InterfaceDef; |
205 | | -import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.InterfaceDef.hostNicType; |
206 | 204 | import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.SerialDef; |
207 | 205 | import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.TermPolicy; |
208 | 206 | import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.VirtioSerialDef; |
|
240 | 238 | import com.cloud.vm.DiskProfile; |
241 | 239 | import com.cloud.vm.VirtualMachine; |
242 | 240 | import com.cloud.vm.VirtualMachine.State; |
243 | | -import com.cloud.vm.VirtualMachineName; |
244 | 241 |
|
245 | 242 | /** |
246 | 243 | * LibvirtComputingResource execute requests on the computing/routing host using |
@@ -843,7 +840,7 @@ public boolean configure(String name, Map<String, Object> params) |
843 | 840 |
|
844 | 841 | configureVifDrivers(params); |
845 | 842 |
|
846 | | - KVMStorageProcessor storageProcessor = new KVMStorageProcessor(this._storagePoolMgr, this); |
| 843 | + KVMStorageProcessor storageProcessor = new KVMStorageProcessor(_storagePoolMgr, this); |
847 | 844 | storageProcessor.configure(name, params); |
848 | 845 | storageHandler = new StorageSubsystemCommandHandlerBase(storageProcessor); |
849 | 846 |
|
@@ -1254,7 +1251,7 @@ public Answer executeRequest(Command cmd) { |
1254 | 1251 | } else if (cmd instanceof NetworkRulesVmSecondaryIpCommand) { |
1255 | 1252 | return execute((NetworkRulesVmSecondaryIpCommand) cmd); |
1256 | 1253 | } else if (cmd instanceof StorageSubSystemCommand) { |
1257 | | - return this.storageHandler.handleStorageCommands((StorageSubSystemCommand)cmd); |
| 1254 | + return storageHandler.handleStorageCommands((StorageSubSystemCommand)cmd); |
1258 | 1255 | } else if (cmd instanceof PvlanSetupCommand) { |
1259 | 1256 | return execute((PvlanSetupCommand) cmd); |
1260 | 1257 | } else { |
@@ -3179,8 +3176,8 @@ protected LibvirtVMDef createVMFromSpec(VirtualMachineTO vmTO) { |
3179 | 3176 |
|
3180 | 3177 | if (vmTO.getMinRam() != vmTO.getMaxRam()){ |
3181 | 3178 | grd.setMemBalloning(true); |
3182 | | - grd.setCurrentMem((long)vmTO.getMinRam()/1024); |
3183 | | - grd.setMemorySize((long)vmTO.getMaxRam()/1024); |
| 3179 | + grd.setCurrentMem(vmTO.getMinRam()/1024); |
| 3180 | + grd.setMemorySize(vmTO.getMaxRam()/1024); |
3184 | 3181 | } |
3185 | 3182 | else{ |
3186 | 3183 | grd.setMemorySize(vmTO.getMaxRam() / 1024); |
|
0 commit comments