|
16 | 16 | // under the License. |
17 | 17 | package com.cloud.agent.manager; |
18 | 18 |
|
19 | | -import java.util.HashMap; |
20 | | -import java.util.Map; |
21 | | - |
22 | 19 | import com.cloud.agent.api.Answer; |
23 | 20 | import com.cloud.agent.api.BumpUpPriorityCommand; |
24 | 21 | import com.cloud.agent.api.CheckRouterAnswer; |
25 | 22 | import com.cloud.agent.api.CheckRouterCommand; |
26 | 23 | import com.cloud.agent.api.CheckVirtualMachineCommand; |
27 | 24 | import com.cloud.agent.api.CleanupNetworkRulesCmd; |
| 25 | +import com.cloud.agent.api.CreateVMSnapshotCommand; |
| 26 | +import com.cloud.agent.api.DeleteVMSnapshotCommand; |
28 | 27 | import com.cloud.agent.api.GetDomRVersionAnswer; |
29 | 28 | import com.cloud.agent.api.GetDomRVersionCmd; |
30 | 29 | import com.cloud.agent.api.GetVmStatsCommand; |
31 | 30 | import com.cloud.agent.api.GetVncPortCommand; |
32 | 31 | import com.cloud.agent.api.MigrateAnswer; |
33 | 32 | import com.cloud.agent.api.MigrateCommand; |
34 | | -import com.cloud.agent.api.NetworkUsageCommand; |
| 33 | +import com.cloud.agent.api.NetworkRulesVmSecondaryIpCommand; |
35 | 34 | import com.cloud.agent.api.PrepareForMigrationAnswer; |
36 | 35 | import com.cloud.agent.api.PrepareForMigrationCommand; |
| 36 | +import com.cloud.agent.api.RebootAnswer; |
37 | 37 | import com.cloud.agent.api.RebootCommand; |
| 38 | +import com.cloud.agent.api.RevertToVMSnapshotCommand; |
| 39 | +import com.cloud.agent.api.ScaleVmCommand; |
38 | 40 | import com.cloud.agent.api.SecurityGroupRuleAnswer; |
39 | 41 | import com.cloud.agent.api.SecurityGroupRulesCmd; |
| 42 | +import com.cloud.agent.api.StartAnswer; |
40 | 43 | import com.cloud.agent.api.StartCommand; |
| 44 | +import com.cloud.agent.api.StopAnswer; |
41 | 45 | import com.cloud.agent.api.StopCommand; |
42 | 46 | import com.cloud.agent.api.check.CheckSshAnswer; |
43 | 47 | import com.cloud.agent.api.check.CheckSshCommand; |
44 | 48 | import com.cloud.agent.api.proxy.CheckConsoleProxyLoadCommand; |
45 | 49 | import com.cloud.agent.api.proxy.WatchConsoleProxyLoadCommand; |
46 | | -import com.cloud.agent.api.routing.DhcpEntryCommand; |
47 | | -import com.cloud.agent.api.routing.IpAssocCommand; |
48 | | -import com.cloud.agent.api.routing.LoadBalancerConfigCommand; |
49 | 50 | import com.cloud.agent.api.routing.SavePasswordCommand; |
50 | | -import com.cloud.agent.api.routing.SetFirewallRulesCommand; |
51 | | -import com.cloud.agent.api.routing.SetPortForwardingRulesCommand; |
52 | | -import com.cloud.agent.api.routing.SetStaticNatRulesCommand; |
53 | 51 | import com.cloud.agent.api.routing.VmDataCommand; |
54 | 52 | import com.cloud.simulator.MockVMVO; |
55 | 53 | import com.cloud.utils.Pair; |
56 | 54 | import com.cloud.utils.component.Manager; |
57 | 55 | import com.cloud.vm.VirtualMachine.State; |
58 | 56 |
|
| 57 | +import java.util.HashMap; |
| 58 | +import java.util.Map; |
| 59 | + |
59 | 60 | public interface MockVmManager extends Manager { |
60 | | - public Answer stopVM(StopCommand cmd); |
61 | | - public Answer rebootVM(RebootCommand cmd); |
62 | 61 |
|
63 | | - public Answer checkVmState(CheckVirtualMachineCommand cmd); |
64 | | - public Map<String, State> getVmStates(String hostGuid); |
65 | | - public Answer getVncPort(GetVncPortCommand cmd); |
| 62 | + Map<String, State> getVmStates(String hostGuid); |
66 | 63 |
|
67 | | - Answer startVM(StartCommand cmd, SimulatorInfo info); |
| 64 | + Map<String, MockVMVO> getVms(String hostGuid); |
68 | 65 |
|
69 | | - Answer getVmStats(GetVmStatsCommand cmd); |
70 | | - public CheckSshAnswer checkSshCommand(CheckSshCommand cmd); |
| 66 | + HashMap<String, Pair<Long, Long>> syncNetworkGroups(SimulatorInfo info); |
71 | 67 |
|
72 | | - Answer SetStaticNatRules(SetStaticNatRulesCommand cmd); |
| 68 | + StartAnswer startVM(StartCommand cmd, SimulatorInfo info); |
73 | 69 |
|
74 | | - Answer SetPortForwardingRules(SetPortForwardingRulesCommand cmd); |
| 70 | + StopAnswer stopVM(StopCommand cmd); |
75 | 71 |
|
76 | | - Answer SetFirewallRules(SetFirewallRulesCommand cmd); |
| 72 | + RebootAnswer rebootVM(RebootCommand cmd); |
77 | 73 |
|
78 | | - Answer getNetworkUsage(NetworkUsageCommand cmd); |
| 74 | + Answer checkVmState(CheckVirtualMachineCommand cmd); |
79 | 75 |
|
80 | | - Answer IpAssoc(IpAssocCommand cmd); |
| 76 | + Answer getVncPort(GetVncPortCommand cmd); |
81 | 77 |
|
82 | | - Answer LoadBalancerConfig(LoadBalancerConfigCommand cmd); |
| 78 | + Answer getVmStats(GetVmStatsCommand cmd); |
83 | 79 |
|
84 | | - Answer AddDhcpEntry(DhcpEntryCommand cmd); |
| 80 | + CheckSshAnswer checkSshCommand(CheckSshCommand cmd); |
85 | 81 |
|
86 | 82 | Answer setVmData(VmDataCommand cmd); |
87 | | - Answer CleanupNetworkRules(CleanupNetworkRulesCmd cmd, SimulatorInfo info); |
88 | 83 |
|
89 | 84 | Answer CheckConsoleProxyLoad(CheckConsoleProxyLoadCommand cmd); |
| 85 | + |
90 | 86 | Answer WatchConsoleProxyLoad(WatchConsoleProxyLoadCommand cmd); |
91 | 87 |
|
92 | 88 | Answer SavePassword(SavePasswordCommand cmd); |
93 | | - HashMap<String, Pair<Long, Long>> syncNetworkGroups(SimulatorInfo info); |
94 | | - SecurityGroupRuleAnswer AddSecurityGroupRules(SecurityGroupRulesCmd cmd, SimulatorInfo info); |
95 | | - MigrateAnswer Migrate(MigrateCommand cmd, SimulatorInfo info); |
| 89 | + |
| 90 | + MigrateAnswer Migrate(MigrateCommand cmd, SimulatorInfo info); |
| 91 | + |
96 | 92 | PrepareForMigrationAnswer prepareForMigrate(PrepareForMigrationCommand cmd); |
97 | | - GetDomRVersionAnswer getDomRVersion(GetDomRVersionCmd cmd); |
98 | | - Map<String, MockVMVO> getVms(String hostGuid); |
| 93 | + |
| 94 | + SecurityGroupRuleAnswer AddSecurityGroupRules(SecurityGroupRulesCmd cmd, SimulatorInfo info); |
| 95 | + |
| 96 | + GetDomRVersionAnswer getDomRVersion(GetDomRVersionCmd cmd); |
99 | 97 |
|
100 | 98 | CheckRouterAnswer checkRouter(CheckRouterCommand cmd); |
101 | 99 |
|
102 | 100 | Answer bumpPriority(BumpUpPriorityCommand cmd); |
| 101 | + |
| 102 | + Answer CleanupNetworkRules(CleanupNetworkRulesCmd cmd, SimulatorInfo info); |
| 103 | + |
| 104 | + Answer scaleVm(ScaleVmCommand cmd); |
| 105 | + |
| 106 | + Answer plugSecondaryIp(NetworkRulesVmSecondaryIpCommand cmd); |
| 107 | + |
| 108 | + Answer createVmSnapshot(CreateVMSnapshotCommand cmd); |
| 109 | + |
| 110 | + Answer deleteVmSnapshot(DeleteVMSnapshotCommand cmd); |
| 111 | + |
| 112 | + Answer revertVmSnapshot(RevertToVMSnapshotCommand cmd); |
103 | 113 | } |
0 commit comments