use of org.ovirt.engine.core.common.businessentities.pm.FenceAgent in project ovirt-engine by oVirt.
the class ConcurrentAgentsFenceActionExecutorTest method setup.
@Before
public void setup() {
agent1 = new FenceAgent();
agent1.setId(Guid.newGuid());
agent2 = new FenceAgent();
agent2.setId(Guid.newGuid());
List<FenceAgent> fenceAgents = new ArrayList<>();
fenceAgents.add(agent1);
fenceAgents.add(agent2);
executor = spy(new ConcurrentAgentsFenceActionExecutor(fencedHost, fenceAgents, new FencingPolicy()));
doReturn(singleExecutor1).when(executor).createFenceActionExecutor(eq(agent1));
doReturn(singleExecutor2).when(executor).createFenceActionExecutor(eq(agent2));
}
use of org.ovirt.engine.core.common.businessentities.pm.FenceAgent in project ovirt-engine by oVirt.
the class FenceAgentExecutorTest method createAgent.
private FenceAgent createAgent() {
FenceAgent agent = new FenceAgent();
agent.setId(FENCE_AGENT_ID);
return agent;
}
use of org.ovirt.engine.core.common.businessentities.pm.FenceAgent in project ovirt-engine by oVirt.
the class FenceProxyLocatorTest method createFenceAgent.
private FenceAgent createFenceAgent(Guid hostId, String type) {
FenceAgent agent = new FenceAgent();
agent.setId(Guid.newGuid());
agent.setHostId(hostId);
agent.setType(type);
return agent;
}
use of org.ovirt.engine.core.common.businessentities.pm.FenceAgent in project ovirt-engine by oVirt.
the class StartVdsCommandTest method createHost.
private VDS createHost() {
VDS vds = new VDS();
vds.setId(FENCECD_HOST_ID);
vds.setClusterId(FENCECD_HOST_CLUSTER_ID);
vds.setVdsName(HOST_NAME);
vds.setStatus(VDSStatus.Up);
List<FenceAgent> agents = new LinkedList<>();
agents.add(agent1);
agents.add(agent2);
vds.setFenceAgents(agents);
return vds;
}
use of org.ovirt.engine.core.common.businessentities.pm.FenceAgent in project ovirt-engine by oVirt.
the class BackendFenceAgentResource method remove.
@Override
public Response remove() {
get();
FenceAgentCommandParameterBase params = new FenceAgentCommandParameterBase();
FenceAgent agent = new FenceAgent();
agent.setHostId(hostId);
agent.setId(guid);
params.setAgent(agent);
return performAction(ActionType.RemoveFenceAgent, params);
}
Aggregations