Package com.cloudbees.api

Examples of com.cloudbees.api.ServerInfo


            settings.put("public_ip", elasticIP);
            // TODO remove server_key
            settings.put("server_key", elasticIP.replace('.','_'));
        }
        settings.put("plan", getPlan());
        ServerInfo serverInfo = client.serverCreate(getParameterID(), getSettings());
        if (isTextOutput()) {
            System.out.println("Server ID  : " + serverInfo.getId());
            System.out.println("size       : " + serverInfo.getSize());
            System.out.println("state      : " + serverInfo.getState());
            System.out.println("pool ID    : " + serverInfo.getPoolId());
            Map<String, String> params = serverInfo.getParameters();
            if (params != null) {
                for (Map.Entry<String, String> entry : params.entrySet()) {
                    System.out.println(Helper.getPaddedString(entry.getKey(), 11) + ": " + entry.getValue());
                }
            }
View Full Code Here


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

        ServerInfo serverInfo = client.serverInfo(getParameterID());
        if (isTextOutput()) {
            System.out.println("Server ID  : " + serverInfo.getId());
            System.out.println("size       : " + serverInfo.getSize());
            System.out.println("state      : " + serverInfo.getState());
            System.out.println("pool ID    : " + serverInfo.getPoolId());
            Map<String, String> params = serverInfo.getParameters();
            if (params != null) {
                for (Map.Entry<String, String> entry : params.entrySet()) {
                    System.out.println(Helper.getPaddedString(entry.getKey(), 11) + ": " + entry.getValue());
                }
            }
            if (serverInfo.getApplicationIDs() != null) {
                System.out.println("applications:");
                for (String appId : serverInfo.getApplicationIDs()) {
                    System.out.println("  " + appId);
                }
            }

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

        super();
    }

    protected void printServerStats(String serverId, boolean details) throws Exception {
        BeesClient client = getBeesClient(BeesClient.class);
        ServerInfo serverInfo = client.serverInfo(serverId);
        printServerStats(serverInfo, details, null);
    }
View Full Code Here

TOP

Related Classes of com.cloudbees.api.ServerInfo

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.