Examples of Hosts


Examples of com.s3auth.hosts.Hosts

            .fetch(
                Mockito.any(URI.class),
                Mockito.any(Range.class),
                Mockito.any(Version.class)
            );
        final Hosts hosts = Mockito.mock(Hosts.class);
        Mockito.doReturn(host).when(hosts).find(Mockito.anyString());
        final int port = PortMocker.reserve();
        final HttpFacade facade =
            new HttpFacade(hosts, port, PortMocker.reserve());
        try {
View Full Code Here

Examples of com.s3auth.hosts.Hosts

        Mockito.doReturn(answer).when(host).fetch(
            Mockito.any(URI.class),
            Mockito.any(Range.class),
            Mockito.any(Version.class)
        );
        final Hosts hosts = Mockito.mock(Hosts.class);
        Mockito.doReturn(host).when(hosts).find(Mockito.anyString());
        final int port = PortMocker.reserve();
        final HttpFacade facade =
            new HttpFacade(hosts, PortMocker.reserve(), port);
        try {
View Full Code Here

Examples of com.s3auth.hosts.Hosts

        Mockito.doReturn(resource).when(host).fetch(
            Mockito.any(URI.class),
            Mockito.any(Range.class),
            Mockito.any(Version.class)
        );
        final Hosts hosts = Mockito.mock(Hosts.class);
        Mockito.doReturn(host).when(hosts).find(Mockito.anyString());
        final int port = PortMocker.reserve();
        final HttpFacade facade =
            new HttpFacade(hosts, port, PortMocker.reserve());
        try {
View Full Code Here

Examples of com.twitter.hbc.core.Hosts

                terms,
                followings);
    }

    private void connect(String consumerKey, String consumerSecret, String token, String tokenSecret, String terms, String followings) {
        Hosts hosebirdHosts = new HttpHosts(Constants.STREAM_HOST);

        StatusesFilterEndpoint endpoint = new StatusesFilterEndpoint();

        List<String> termsList = getTermsListFromString(terms);
        if (termsList != null && termsList.size() > 0) {
View Full Code Here

Examples of io.fathom.cloud.compute.api.os.model.Hosts

    @GET
    @Produces({ JSON })
    public Hosts listHosts() throws CloudException {
        checkDomainAdmin();

        Hosts response = new Hosts();
        response.hosts = Lists.newArrayList();

        for (SchedulerHost host : scheduler.getAllHosts()) {
            response.hosts.add(toModel(host));
        }
View Full Code Here

Examples of lcmc.host.domain.Hosts

    @Override
    protected JComponent getInputPane() {
        /* Hosts */
        final ScrollableFlowPanel p1 = new ScrollableFlowPanel(new FlowLayout(FlowLayout.LEADING, 1, 1));
        final Hosts hosts = allHosts;

        final ItemListener chListener = new ItemListener() {
                @Override
                public void itemStateChanged(final ItemEvent e) {
                    checkCheckBoxes();
                }
            };
        Host lastHost1 = null;
        Host lastHost2 = null;
        if (getCluster().getHosts().isEmpty()) {
            /* mark last two available hosts */
            for (final Host host : hosts.getHostsArray()) {
                if (!getCluster().getHosts().contains(host)
                    && !host.isInCluster()) {
                    if (lastHost2 != null
                        && lastHost2.getIpAddress() != null
                        && lastHost2.getIpAddress().equals(host.getIpAddress())) {
                        lastHost2 = host;
                    } else {
                        lastHost1 = lastHost2;
                        lastHost2 = host;
                    }
                }
            }
        }
        final JScrollPane sp = new JScrollPane(p1,
                                               JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
                                               JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
        for (final Host host : hosts.getHostsArray()) {
            final JCheckBox button = new JCheckBox(host.getName(), HOST_UNCHECKED_ICON);
            button.setBackground(Tools.getDefaultColor("ConfigDialog.Background.Light"));
            button.setSelectedIcon(HOST_CHECKED_ICON);
            if (getCluster().getBrowser() != null && getCluster() == host.getCluster()) {
                /* once we have browser the cluster members cannot be removed.
View Full Code Here

Examples of org.apache.aurora.gen.Hosts

    assertOkResponse(thrift.setQuota(ROLE, resourceAggregate, SESSION));
  }

  @Test
  public void testMachineMaintainerAccess() throws Exception {
    Hosts hosts = new Hosts()
        .setHostNames(ImmutableSet.of("host1"));
    Set<HostStatus> statuses = ImmutableSet.of();

    expectAuth(ROOT, false);
    expectAuth(MACHINE_MAINTAINER, true);
    expect(maintenance.startMaintenance(hosts.getHostNames())).andReturn(statuses);

    expectAuth(ROOT, false);
    expectAuth(MACHINE_MAINTAINER, true);
    expect(maintenance.drain(hosts.getHostNames())).andReturn(statuses);

    expectAuth(ROOT, false);
    expectAuth(MACHINE_MAINTAINER, true);
    expect(maintenance.getStatus(hosts.getHostNames())).andReturn(statuses);

    expectAuth(ROOT, false);
    expectAuth(MACHINE_MAINTAINER, true);
    expect(maintenance.endMaintenance(hosts.getHostNames())).andReturn(statuses);

    control.replay();

    assertOkResponse(thrift.startMaintenance(hosts, SESSION));
    assertOkResponse(thrift.drainHosts(hosts, SESSION));
View Full Code Here

Examples of org.apache.aurora.gen.Hosts

    assertOkResponse(thrift.endMaintenance(hosts, SESSION));
  }

  @Test
  public void testMachineMaintenanceAccessDenied() throws Exception {
    Hosts hosts = new Hosts().setHostNames(ImmutableSet.of("host1"));

    expectAuth(ROOT, false).times(4);
    expectAuth(MACHINE_MAINTAINER, false).times(4);

    control.replay();
View Full Code Here

Examples of org.apache.aurora.gen.Hosts

    expect(maintenance.getStatus(hostnames)).andReturn(drained);
    expect(maintenance.endMaintenance(hostnames)).andReturn(none);

    control.replay();

    Hosts hosts = new Hosts(hostnames);

    assertEquals(
        none,
        thrift.maintenanceStatus(hosts, SESSION).getResult().getMaintenanceStatusResult()
            .getStatuses());
View Full Code Here

Examples of org.apache.aurora.gen.Hosts

    assertOkResponse(thrift.setQuota(ROLE, resourceAggregate, SESSION));
  }

  @Test
  public void testMachineMaintainerAccess() throws Exception {
    Hosts hosts = new Hosts()
        .setHostNames(ImmutableSet.of("host1"));
    Set<HostStatus> statuses = ImmutableSet.of();

    expectAuth(ROOT, false);
    expectAuth(MACHINE_MAINTAINER, true);
    expect(maintenance.startMaintenance(hosts.getHostNames())).andReturn(statuses);

    expectAuth(ROOT, false);
    expectAuth(MACHINE_MAINTAINER, true);
    expect(maintenance.drain(hosts.getHostNames())).andReturn(statuses);

    expectAuth(ROOT, false);
    expectAuth(MACHINE_MAINTAINER, true);
    expect(maintenance.getStatus(hosts.getHostNames())).andReturn(statuses);

    expectAuth(ROOT, false);
    expectAuth(MACHINE_MAINTAINER, true);
    expect(maintenance.endMaintenance(hosts.getHostNames())).andReturn(statuses);

    control.replay();

    assertOkResponse(thrift.startMaintenance(hosts, SESSION));
    assertOkResponse(thrift.drainHosts(hosts, SESSION));
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.