Package com.cloudbees.api

Examples of com.cloudbees.api.ServerPoolInfo


    @Override
    protected boolean execute() throws Exception {
        BeesClient client = getBeesClient(BeesClient.class);

        ServerPoolInfo poolInfo = client.serverPoolInfo(getParameterID(), withApplications());
        if (isTextOutput()) {
            printPoolInfo(poolInfo, allServers());

        } else  printOutput(poolInfo, ServerInfo.class, ServerPoolInfo.class);
View Full Code Here


        }
        if (getName() != null) {
            settings.put("name", getName());
        }

        ServerPoolInfo poolInfo = client.serverPoolUpdate(getParameterID(), settings);
        if (isTextOutput()) {
            printPoolInfo(poolInfo, false);
        } else  printOutput(poolInfo, ServerInfo.class, ServerPoolInfo.class);

        return true;
View Full Code Here

        BeesClient client = getBeesClient(BeesClient.class);

        String poolId = getParameterName();
        if (poolId != null) {
            poolId = getParameterID();
            ServerPoolInfo poolInfo = client.serverPoolInfo(poolId, false);
            printPoolStats(poolInfo, printDetails());
        } else {
            ServerPoolListResponse res = client.serverPoolList(getAccount());
            for (ServerPoolInfo poolInfo : res.getPools()) {
                if (poolInfo.getState() != null && poolInfo.getState().equalsIgnoreCase("active")) {
                    printPoolStats(poolInfo, printDetails());
                }
            }
        }
        return true;
View Full Code Here

        }
        if (getServerSize() != null) {
            poolSettings.put("server_size", getServerSize());
        }

        ServerPoolInfo poolInfo = client.serverPoolCreate(getAccount(), getParameterName(), poolSettings);
        if (isTextOutput()) {
            System.out.println("Pool ID  : " + poolInfo.getId());
            System.out.println("name     : " + poolInfo.getName());
            Map<String, String> settings = poolInfo.getSettings();
            if(settings != null && settings.size() > 0) {
                System.out.println("settings:");
                for (Map.Entry<String, String> entry : settings.entrySet()) {
                    System.out.println("  " + entry.getKey() + "=" + entry.getValue());
                }
            }
            List<ServerInfo> servers = poolInfo.getServers();
            if(servers != null && servers.size() > 0) {
                System.out.println("servers:");
                for (ServerInfo server : servers) {
                    if (server.getSize() != null)
                        System.out.println("  " + server.getId() + " : " + server.getSize() + " : " + server.getState());
View Full Code Here

        Map<String, String> params = new HashMap<String, String>();
        params.put("pool_id", poolId);
        params.put("parameters", createParameter(parameters));
        String url = getRequestURL("server.pool.update", params);
        String response = executeRequest(url);
        ServerPoolInfo apiResponse = (ServerPoolInfo)readResponse(response);
        return apiResponse;
    }
View Full Code Here

TOP

Related Classes of com.cloudbees.api.ServerPoolInfo

Copyright © 2018 www.massapicom. 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.