use of org.ovirt.engine.core.common.vdscommands.FenceVdsVDSCommandParameters in project ovirt-engine by oVirt.
the class FenceVdsVDSCommandTest method setupCommandParams.
private FenceVdsVDSCommandParameters setupCommandParams(FenceActionType fenceAction) {
FenceAgent agent = new FenceAgent();
agent.setIp("1.2.3.4");
agent.setPort(1234);
agent.setType("ipmilan");
agent.setUser("admin");
agent.setPassword("admin");
agent.setOptions("");
return new FenceVdsVDSCommandParameters(PROXY_HOST_ID, TARGET_HOST_ID, agent, fenceAction, null);
}
use of org.ovirt.engine.core.common.vdscommands.FenceVdsVDSCommandParameters in project ovirt-engine by oVirt.
the class FenceAgentExecutor method executeFenceAction.
protected FenceOperationResult executeFenceAction(FenceActionType action, FenceAgent agent, VDS proxyHost) {
FenceAgent realAgent = createRealAgent(agent, proxyHost);
auditFenceActionExecution(action, realAgent, proxyHost);
VDSReturnValue retVal = resourceManager.runVdsCommand(VDSCommandType.FenceVds, new FenceVdsVDSCommandParameters(proxyHost.getId(), fencedHost.getId(), realAgent, action, convertFencingPolicy(proxyHost)));
FenceOperationResult result = (FenceOperationResult) retVal.getReturnValue();
log.debug("Result of '{}' fence action: {}", result);
if (result == null) {
log.error("FenceVdsVDSCommand finished with null return value: succeeded={}, exceptionString='{}'", retVal.getSucceeded(), retVal.getExceptionString());
log.debug("Exception", retVal.getExceptionObject());
result = new FenceOperationResult(Status.ERROR, PowerStatus.UNKNOWN, retVal.getExceptionString());
}
if (result.getStatus() == Status.ERROR) {
auditFenceActionFailure(action, realAgent, proxyHost);
}
return result;
}
Aggregations