|
19 | 19 | import java.sql.Connection; |
20 | 20 | import java.sql.SQLException; |
21 | 21 | import java.util.HashMap; |
22 | | -import java.util.List; |
23 | 22 | import java.util.Map; |
24 | 23 |
|
25 | 24 | import javax.ejb.Local; |
|
33 | 32 | import com.cloud.agent.api.BackupSnapshotCommand; |
34 | 33 | import com.cloud.agent.api.CheckHealthCommand; |
35 | 34 | import com.cloud.agent.api.CheckNetworkCommand; |
| 35 | +import com.cloud.agent.api.CheckVirtualMachineCommand; |
36 | 36 | import com.cloud.agent.api.CleanupNetworkRulesCmd; |
37 | 37 | import com.cloud.agent.api.ClusterSyncCommand; |
38 | 38 | import com.cloud.agent.api.Command; |
|
54 | 54 | import com.cloud.agent.api.ModifyStoragePoolCommand; |
55 | 55 | import com.cloud.agent.api.NetworkUsageCommand; |
56 | 56 | import com.cloud.agent.api.PingTestCommand; |
| 57 | +import com.cloud.agent.api.PrepareForMigrationCommand; |
57 | 58 | import com.cloud.agent.api.RebootCommand; |
58 | 59 | import com.cloud.agent.api.SecStorageSetupCommand; |
59 | 60 | import com.cloud.agent.api.SecStorageVMSetupCommand; |
|
80 | 81 | import com.cloud.agent.api.storage.DownloadProgressCommand; |
81 | 82 | import com.cloud.agent.api.storage.ListTemplateCommand; |
82 | 83 | import com.cloud.agent.api.storage.PrimaryStorageDownloadCommand; |
83 | | -import com.cloud.agent.mockvm.MockVm; |
84 | 84 | import com.cloud.simulator.MockConfigurationVO; |
85 | 85 | import com.cloud.simulator.MockHost; |
86 | 86 | import com.cloud.simulator.MockVMVO; |
@@ -197,12 +197,16 @@ public Answer simulate(Command cmd, String hostGuid) { |
197 | 197 | return _mockAgentMgr.checkHealth((CheckHealthCommand)cmd); |
198 | 198 | } else if (cmd instanceof PingTestCommand) { |
199 | 199 | return _mockAgentMgr.pingTest((PingTestCommand)cmd); |
| 200 | + } else if (cmd instanceof PrepareForMigrationCommand) { |
| 201 | + return _mockAgentMgr.prepareForMigrate((PrepareForMigrationCommand)cmd); |
200 | 202 | } else if (cmd instanceof MigrateCommand) { |
201 | 203 | return _mockVmMgr.Migrate((MigrateCommand)cmd, info); |
202 | 204 | } else if (cmd instanceof StartCommand) { |
203 | 205 | return _mockVmMgr.startVM((StartCommand)cmd, info); |
204 | 206 | } else if (cmd instanceof CheckSshCommand) { |
205 | 207 | return _mockVmMgr.checkSshCommand((CheckSshCommand)cmd); |
| 208 | + } else if (cmd instanceof CheckVirtualMachineCommand) { |
| 209 | + return _mockVmMgr.checkVmState((CheckVirtualMachineCommand)cmd); |
206 | 210 | } else if (cmd instanceof SetStaticNatRulesCommand) { |
207 | 211 | return _mockVmMgr.SetStaticNatRules((SetStaticNatRulesCommand)cmd); |
208 | 212 | } else if (cmd instanceof SetFirewallRulesCommand) { |
@@ -282,7 +286,7 @@ public Answer simulate(Command cmd, String hostGuid) { |
282 | 286 | } else if (cmd instanceof CreatePrivateTemplateFromVolumeCommand) { |
283 | 287 | return _mockStorageMgr.CreatePrivateTemplateFromVolume((CreatePrivateTemplateFromVolumeCommand)cmd); |
284 | 288 | } else if (cmd instanceof MaintainCommand) { |
285 | | - return _mockAgentMgr.MaintainCommand((MaintainCommand)cmd); |
| 289 | + return _mockAgentMgr.maintain((MaintainCommand)cmd); |
286 | 290 | } else if (cmd instanceof GetVmStatsCommand) { |
287 | 291 | return _mockVmMgr.getVmStats((GetVmStatsCommand)cmd); |
288 | 292 | } else if (cmd instanceof GetDomRVersionCmd) { |
|
0 commit comments