Search in sources :

Example 1 with FenceAgentCommandParameterBase

use of org.ovirt.engine.core.common.action.FenceAgentCommandParameterBase in project ovirt-engine by oVirt.

the class BackendFenceAgentsResource method getAddParameters.

private FenceAgentCommandParameterBase getAddParameters(Agent agent) {
    Host host = new Host();
    host.setId(hostId.toString());
    agent.setHost(host);
    FenceAgentCommandParameterBase params = new FenceAgentCommandParameterBase();
    params.setAgent(map(agent, null));
    return params;
}
Also used : FenceAgentCommandParameterBase(org.ovirt.engine.core.common.action.FenceAgentCommandParameterBase) Host(org.ovirt.engine.api.model.Host)

Example 2 with FenceAgentCommandParameterBase

use of org.ovirt.engine.core.common.action.FenceAgentCommandParameterBase 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);
}
Also used : FenceAgentCommandParameterBase(org.ovirt.engine.core.common.action.FenceAgentCommandParameterBase) FenceAgent(org.ovirt.engine.core.common.businessentities.pm.FenceAgent)

Aggregations

FenceAgentCommandParameterBase (org.ovirt.engine.core.common.action.FenceAgentCommandParameterBase)2 Host (org.ovirt.engine.api.model.Host)1 FenceAgent (org.ovirt.engine.core.common.businessentities.pm.FenceAgent)1