Examples of Host


Examples of org.atomojo.auth.service.Configuration.Host

   public void run() {
      try {
        
         if (create) {
            Configuration.Interface iface = new Configuration.Interface("*",8080,false);
            iface.getHosts().put("*",new Host("*",null));
            conf.getInterfaces().add(iface);
            conf.setKeyStorePath(keystoreFile);
            conf.setKeyStorePassword("atomojo");
            conf.setKeyPassword("atomojo");
            Writer w = new OutputStreamWriter(new FileOutputStream(confFile),"UTF-8");
View Full Code Here

Examples of org.eclipse.jgit.transport.OpenSshConfig.Host

    fw.close();
  }

  @Test
  public void testNoConfig() {
    final Host h = osc.lookup("repo.or.cz");
    assertNotNull(h);
    assertEquals("repo.or.cz", h.getHostName());
    assertEquals("jex_junit", h.getUser());
    assertEquals(22, h.getPort());
    assertEquals(1, h.getConnectionAttempts());
    assertNull(h.getIdentityFile());
  }
View Full Code Here

Examples of org.jboss.as.console.client.domain.model.Host

                List<Property> hostModels = response.get("result").asPropertyList();

                List<Host> records = new LinkedList<Host>();
                for(Property hostModel : hostModels)
                {
                    Host record = factory.host().as();
                    record.setName(hostModel.getName());

                    // controller
                    ModelNode hostValues = hostModel.getValue();
                    boolean isController = hostValues.get("domain-controller").hasDefined("local");
                    record.setController(isController);
                    records.add(record);
                }

                callback.onSuccess(records);
            }
View Full Code Here

Examples of org.jclouds.cloudstack.domain.Host

      Set<Host> actual = requestSendsResponse(request, response).listHosts();

      Date lastPinged = makeDate(1970, Calendar.JANUARY, 16, 0, 54, 43, "GMT+02:00");
      Date created = makeDate(2011, Calendar.NOVEMBER, 26, 23, 28, 36, "GMT+02:00");
      Host host1 = Host.builder().id("1").name("cs2-xevsrv.alucloud.local").state(Host.State.UP).type(Host.Type.ROUTING).ipAddress("10.26.26.107").zoneId("1").zoneName("Dev Zone 1").podId("1").podName("Dev Pod 1").version("2.2.12.20110928142833").hypervisor("XenServer").cpuNumber(24).cpuSpeed(2266).cpuAllocated("2.76%").cpuUsed("0.1%").cpuWithOverProvisioning(54384.0F).networkKbsRead(4443).networkKbsWrite(15048).memoryTotal(100549733760L).memoryAllocated(3623878656L).memoryUsed(3623878656L).capabilities("xen-3.0-x86_64 , xen-3.0-x86_32p , hvm-3.0-x86_32 , hvm-3.0-x86_32p , hvm-3.0-x86_64").lastPinged(lastPinged).managementServerId("223098941760041").clusterId("1").clusterName("Xen Clust 1").clusterType(Host.ClusterType.CLOUD_MANAGED).localStorageActive(false).created(created).events("PrepareUnmanaged; HypervisorVersionChanged; ManagementServerDown; PingTimeout; AgentDisconnected; MaintenanceRequested; HostDown; AgentConnected; StartAgentRebalance; ShutdownRequested; Ping").hasEnoughCapacity(false).allocationState(AllocationState.ENABLED).build();

      Date disconnected = makeDate(2011, Calendar.NOVEMBER, 26, 23, 33, 38, "GMT+02:00");
      lastPinged = makeDate(1970, Calendar.JANUARY, 16, 0, 42, 30, "GMT+02:00");
      created = makeDate(2011, Calendar.NOVEMBER, 26, 23, 33, 38, "GMT+02:00");
      Host host2 = Host.builder().id("2").name("nfs://10.26.26.165/mnt/nfs/cs_sec").state(Host.State.ALERT).disconnected(disconnected).type(Host.Type.SECONDARY_STORAGE).ipAddress("nfs").zoneId("1").zoneName("Dev Zone 1").version("2.2.12.20110928142833").hypervisor("None").lastPinged(lastPinged).localStorageActive(false).created(created).events("ManagementServerDown; AgentDisconnected; Remove; MaintenanceRequested; AgentConnected; Ping").hasEnoughCapacity(false).allocationState(AllocationState.ENABLED).build();

      lastPinged = makeDate(1970, Calendar.JANUARY, 16, 0, 54, 43, "GMT+02:00");
      created = makeDate(2011, Calendar.NOVEMBER, 26, 23, 35, 51, "GMT+02:00");
      Host host3 = Host.builder().id("3").name("s-1-VM").state(Host.State.UP).type(Host.Type.SECONDARY_STORAGE_VM).ipAddress("10.26.26.81").zoneId("1").zoneName("Dev Zone 1").podId("1").podName("Dev Pod 1").version("2.2.12.20110928142833").lastPinged(lastPinged).managementServerId("223098941760041").localStorageActive(false).created(created).events("PrepareUnmanaged; HypervisorVersionChanged; ManagementServerDown; PingTimeout; AgentDisconnected; MaintenanceRequested; HostDown; AgentConnected; StartAgentRebalance; ShutdownRequested; Ping").hasEnoughCapacity(false).allocationState(AllocationState.ENABLED).build();

      lastPinged = makeDate(1970, Calendar.JANUARY, 16, 0, 54, 43, "GMT+02:00");
      created = makeDate(2011, Calendar.NOVEMBER, 26, 23, 36, 46, "GMT+02:00");
      Host host4 = Host.builder().id("4").name("v-2-VM").state(Host.State.UP).type(Host.Type.CONSOLE_PROXY).ipAddress("10.26.26.96").zoneId("1").zoneName("Dev Zone 1").podId("1").podName("Dev Pod 1").version("2.2.12.20110928142833").lastPinged(lastPinged).managementServerId("223098941760041").localStorageActive(false).created(created).events("PrepareUnmanaged; HypervisorVersionChanged; ManagementServerDown; PingTimeout; AgentDisconnected; MaintenanceRequested; HostDown; AgentConnected; StartAgentRebalance; ShutdownRequested; Ping").hasEnoughCapacity(false).allocationState(AllocationState.ENABLED).build();

      Set<Host> expected = ImmutableSet.of(host1, host2, host3, host4);

      assertEquals(actual, expected);
   }
View Full Code Here

Examples of org.jclouds.openstack.nova.v2_0.domain.Host

                       .addHeader("Accept", "application/json")
                       .addHeader("X-Auth-Token", authToken)
                  .endpoint(endpoint).build(),
            HttpResponse.builder().statusCode(200).payload(payloadFromResource("/hosts_list.json")).build()).getHostAdministrationExtensionForZone("az-1.region-a.geo-1").get();
     
      Host expected = Host.builder().name("ubuntu").service("compute").build();

      Set<? extends Host> result = api.list().toSet();
      Host host = Iterables.getOnlyElement(result);
      assertEquals(host.getName(), "ubuntu");
      assertEquals(host.getService(), "compute");

      assertEquals(host, expected);
   }
View Full Code Here

Examples of org.opennebula.client.host.Host

    public void setUp() throws Exception
    {
        res = Host.allocate(client, name, "dummy", "dummy", "dummy");

        int hid = !res.isError() ? Integer.parseInt(res.getMessage()) : -1;
        host    = new Host(hid, client);
    }
View Full Code Here

Examples of org.quickserver.net.client.Host

 
 
  public static void monitor() {
    HostMonitoringService hms = null;
    List fullList = null;
    Host host = null;
    char newStatus = 'U';
    try {
      List list = new ArrayList(listToMonitor);
      Iterator iterator = list.iterator();             
     
      while(iterator.hasNext()) {
        hms = (HostMonitoringService) iterator.next();
       
        Date now = new Date();     
        if(hms.getNextCheckOn()!=null && hms.getNextCheckOn().after(now)) {
          continue;
        }
       
        fullList = hms.getHostList().getFullList();
        List activeList = new ArrayList();
       
        Iterator hostIterator = fullList.iterator();
       
        hms.setLastCheckedOn(now);
        long nextTime = hms.getLastCheckedOn().getTime() +
            (hms.getIntervalInSec()/2)*1000;
        hms.setNextCheckOn(new Date(nextTime));
             
        while(hostIterator.hasNext()) {
          host = (Host) hostIterator.next();         
         
          if(host.getNextCheckOn()==null || host.getNextCheckOn().before(now)) {
            char oldStatus = host.getStatus();
            if(host.getStatus()!=Host.MAINTENANCE) {
              try {
                newStatus = hms.getHostMonitor().monitor(host);
              } catch (Exception er) {
                logger.log(Level.WARNING, "Error in HostMonitor1: "+er, er);
                er.printStackTrace();
                newStatus = Host.ERROR;
              }             
            } else {
              newStatus = host.getStatus();
            }
            host.setStatus(newStatus);
           
            if(newStatus==Host.ACTIVE) {
              activeList.add(host);
            } else if(host.getStatus()!=Host.MAINTENANCE) {
              //try again..
              try {
                newStatus = hms.getHostMonitor().monitor(host);
              } catch (Exception er) {
                logger.log(Level.WARNING, "Error in HostMonitor2: "+er, er);
                er.printStackTrace();
                newStatus = Host.ERROR;
              }
              if(newStatus==Host.ACTIVE) {
                activeList.add(host);
              }
              host.setStatus(newStatus);
            }
           
            if(newStatus != oldStatus) {
              List myListnersList = hms.getListnersList();
              if(myListnersList!=null) {
                Iterator listnersIterator = myListnersList.iterator();
                HostStateListener listener = null;
                while(listnersIterator.hasNext()) {
                  listener = (HostStateListener) listnersIterator.next();
                  if(listener!=null) {
                    listener.stateChanged(host, oldStatus, newStatus);
                  } else {
                    logger.warning("listener was null!");
                  }
                }
              } else {
                logger.warning("No listners set "+host+
                    "; old status: "+oldStatus+
                    ";new status:"+newStatus);
              }
            }
            if(host.getLastCheckedOn()!=null) {
              long newTime = host.getLastCheckedOn().getTime() +
                  hms.getIntervalInSec()*1000;
              host.setNextCheckOn(new Date(newTime));
            } else {
              logger.warning("host.getLastCheckedOn() was null "+host);
            }
           
          } else {
            //last monitored status is good for use
            if(host.getStatus()==Host.ACTIVE) {
              activeList.add(host);
            }
          }
          hms.getHostList().setActiveList(activeList);//update back
         
View Full Code Here

Examples of org.rzo.yajsw.srvmgr.client.Host

        int port = Integer.parseInt(x[1]);
        String name = InetAddress.getByName(x[0]).getHostName();
        synchronized(hostsList)
        {
          System.out.println("new host "+name+":"+port);
          Host newHost = new Host(name, port);
          Host oldHost = hostsList.get(newHost.getName());
          if (oldHost != null)
          {
            newHost.setIncluded(oldHost.isIncluded());
          }
        hostsList.put(newHost.getName(), newHost);

          saveData();
        }
View Full Code Here

Examples of org.rzo.yajsw.srvmgr.client.Host

  protected static void doNewHost(String host, int port)
  {
    synchronized(hostsList)
    {
      Host newHost = new Host(host, port);
      Host oldHost = hostsList.get(newHost.getName());
      if (oldHost != null)
      {
        newHost.setIncluded(oldHost.isIncluded());
      }
      newHost.setState("CONNECTED");
      hostsList.put(newHost.getName(), newHost);

    saveData();
View Full Code Here

Examples of org.rzo.yajsw.srvmgr.client.Host

      return;
    ObjectInputStream in = new ObjectInputStream(new FileInputStream(f));
    Map data = (Map) in.readObject();
    for (Iterator it = ((Collection)data.get("hosts")).iterator(); it.hasNext(); )
    {
      Host host = (Host) it.next();
      hostsList.put(host.getName(), host);
    }
    for (Iterator it = ((Collection)data.get("hidden")).iterator(); it.hasNext(); )
      hiddenList.add((String)it.next());
    configurations = (Set<String>) data.get("configurations");
    in.close();
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.