Examples of PingRoutingCommand


Examples of com.cloud.agent.api.PingRoutingCommand

    @Override
    public PingCommand getCurrentStatus(long id) {
        final HashMap<String, State> newStates = sync();

        if (!_can_bridge_firewall) {
            return new PingRoutingCommand(com.cloud.host.Host.Type.Routing, id,
                    newStates);
        } else {
            HashMap<String, Pair<Long, Long>> nwGrpStates = syncNetworkGroups(id);
            return new PingRoutingWithNwGroupsCommand(getType(), id, newStates,
                    nwGrpStates);
View Full Code Here

Examples of com.cloud.agent.api.PingRoutingCommand

                invalidateServiceContext();
                return null;
            }
        }

        return new PingRoutingCommand(getType(), id, newStates);
    }
View Full Code Here

Examples of com.cloud.agent.api.PingRoutingCommand

            final long hostId = attache.getId();

            if (s_logger.isDebugEnabled()) {
                if (cmd instanceof PingRoutingCommand) {
                    final PingRoutingCommand ping = (PingRoutingCommand) cmd;
                    if (ping.getNewStates().size() > 0) {
                        s_logger.debug("SeqA " + hostId + "-" + request.getSequence() + ": Processing " + request);
                    } else {
                        logD = false;
                        s_logger.debug("Ping from " + hostId);
                        s_logger.trace("SeqA " + hostId + "-" + request.getSequence() + ": Processing " + request);
View Full Code Here

Examples of com.cloud.agent.api.PingRoutingCommand

    @Override
    public boolean processCommands(long agentId, long seq, Command[] cmds) {
        boolean processed = false;
        for (Command cmd : cmds) {
            if (cmd instanceof PingRoutingCommand) {
                PingRoutingCommand ping = (PingRoutingCommand) cmd;
                if (ping.getNewStates() != null && ping.getNewStates().size() > 0) {
                    Commands commands = deltaHostSync(agentId, ping.getNewStates());
                    if (commands.size() > 0) {
                        try {
                            _agentMgr.send(agentId, commands, this);
                        } catch (final AgentUnavailableException e) {
                            s_logger.warn("Agent is now unavailable", e);
View Full Code Here

Examples of com.cloud.agent.api.PingRoutingCommand

                  invalidateServiceContext();
                  return null;
              }
          }
 
          return new PingRoutingCommand(getType(), id, newStates);
       
      } finally {
        recycleServiceContext();
      }
    }
View Full Code Here

Examples of com.cloud.agent.api.PingRoutingCommand

    com.trilead.ssh2.Connection sshConnection = SSHCmdHelper.acquireAuthorizedConnection(_ip, _username, _password);
    if (sshConnection == null) {
      return null;
    } else {
      SSHCmdHelper.releaseSshConnection(sshConnection);
      return new PingRoutingCommand(getType(), id, new HashMap<String, State>());
    }
  }
View Full Code Here

Examples of com.cloud.agent.api.PingRoutingCommand

  }

  @Override
  public PingCommand getCurrentStatus(long id) {
    //TODO: check server
    return new PingRoutingCommand(getType(), id, new HashMap<String, State>());
  }
View Full Code Here

Examples of com.cloud.agent.api.PingRoutingCommand

        com.trilead.ssh2.Connection sshConnection = SSHCmdHelper.acquireAuthorizedConnection(_ip, _username, _password);
        if (sshConnection == null) {
            return null;
        } else {
            SSHCmdHelper.releaseSshConnection(sshConnection);
            return new PingRoutingCommand(getType(), id, new HashMap<String, State>());
        }
    }
View Full Code Here

Examples of com.cloud.agent.api.PingRoutingCommand

    @Override
    public PingCommand getCurrentStatus(long id) {
        final HashMap<String, State> newStates = sync();

        if (!_can_bridge_firewall) {
            return new PingRoutingCommand(com.cloud.host.Host.Type.Routing, id,
                    newStates);
        } else {
            HashMap<String, Pair<Long, Long>> nwGrpStates = syncNetworkGroups(id);
            return new PingRoutingWithNwGroupsCommand(getType(), id, newStates,
                    nwGrpStates);
View Full Code Here

Examples of com.cloud.agent.api.PingRoutingCommand

    com.trilead.ssh2.Connection sshConnection = SSHCmdHelper.acquireAuthorizedConnection(_ip, _username, _password);
    if (sshConnection == null) {
      return null;
    } else {
      SSHCmdHelper.releaseSshConnection(sshConnection);
      return new PingRoutingCommand(getType(), id, new HashMap<String, State>());
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.