Examples of PingCommand


Examples of com.cloud.agent.api.PingCommand

                final Link link = task.getLink();
                reconnect(link);
                return;
            }

            final PingCommand ping = _resource.getCurrentStatus(getId());
            final Request request = new Request(_id, -1, ping, false);
            request.setSequence(getNextSequence());
            if (s_logger.isDebugEnabled()) {
                s_logger.debug("Sending ping: " + request.toString());
            }
View Full Code Here

Examples of com.cloud.agent.api.PingCommand

        return answer;
    }

    @Override
    public PingCommand getCurrentStatus(long id) {
        return new PingCommand(_type, id);
    }
View Full Code Here

Examples of com.cloud.agent.api.PingCommand

    public void disconnected() {
    }

    @Override
    public PingCommand getCurrentStatus(long id) {
        return new PingCommand(Type.ConsoleProxy, id);
    }
View Full Code Here

Examples of com.cloud.agent.api.PingCommand

        ControlClusterStatus ccs = mock(ControlClusterStatus.class);
        when(ccs.getStatus()).thenReturn(true);
        when(_bigswitchVnsApi.getControlClusterStatus()).thenReturn(ccs);

        PingCommand ping = _resource.getCurrentStatus(42);
        assertTrue(ping != null);
        assertTrue(ping.getHostId() == 42);
        assertTrue(ping.getHostType() == Host.Type.L2Networking);
    }
View Full Code Here

Examples of com.cloud.agent.api.PingCommand

        ControlClusterStatus ccs = mock(ControlClusterStatus.class);
        when(ccs.getStatus()).thenReturn(false);
        when(_bigswitchVnsApi.getControlClusterStatus()).thenReturn(ccs);

        PingCommand ping = _resource.getCurrentStatus(42);
        assertTrue(ping == null);
    }
View Full Code Here

Examples of com.cloud.agent.api.PingCommand

        ControlClusterStatus ccs = mock(ControlClusterStatus.class);
        when(ccs.getStatus()).thenReturn(false);
        when(_bigswitchVnsApi.getControlClusterStatus()).thenThrow(new BigSwitchVnsApiException());

        PingCommand ping = _resource.getCurrentStatus(42);
        assertTrue(ping == null);
    }
View Full Code Here

Examples of com.cloud.agent.api.PingCommand

        return null;
    }

    @Override
    public PingCommand getCurrentStatus(long id) {
        return new PingCommand(Host.Type.ExternalLoadBalancer, id);
    }
View Full Code Here

Examples of com.cloud.agent.api.PingCommand

            }
        } catch (NiciraNvpApiException e) {
          s_logger.error("getControlClusterStatus failed", e);
          return null;
        }
        return new PingCommand(Host.Type.L2Networking, id);
  }
View Full Code Here

Examples of com.cloud.agent.api.PingCommand

            }
        } catch (BigSwitchVnsApiException e) {
                s_logger.error("getControlClusterStatus failed", e);
                return null;
        }
        return new PingCommand(Host.Type.L2Networking, id);
        }
View Full Code Here

Examples of com.cloud.agent.api.PingCommand

    return _name;
  }
 
  @Override
    public PingCommand getCurrentStatus(final long id) {
    return new PingCommand(Host.Type.ExternalLoadBalancer, id);
    }
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.