Esempio n. 1
0
 private void addFenceAgents() {
   if (getParameters().getFenceAgents() != null) { // if == null, means no update. Empty list means
     for (FenceAgent agent : getParameters().getFenceAgents()) {
       agent.setHostId(getVdsId());
       fenceAgentDao.save(agent);
     }
   }
 }
 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);
 }