Package com.cloudbees.api

Examples of com.cloudbees.api.BeesClient


        deployArgs.add(".bg.deploy." + getName() + "=" + blueGreenParam);
        return cs.getCommand("config:set").run(deployArgs);
    }

    protected void checkApplication(String appId, Boolean force) throws IOException {
        BeesClient client = getBeesClient(BeesClient.class);
        try {
            client.applicationInfo(appId);
        } catch (Exception e) {
            if (force != null && force.booleanValue())
                System.err.println("WARNING: cannot find application: " + appId);
            else
                throw new IllegalArgumentException("Cannot find application: " + appId);
View Full Code Here


    }

    protected String initAppId(String appid, AppConfig appConfig) throws IOException {
        try {
            String appId = null;
            BeesClient client = getBeesClient(BeesClient.class);
            BlueGreenSettings blueGreenSettings = BlueGreenSettings.getInstance(client, getAccount(), getName());

            // Get the app1 alias
            ApplicationInfo applicationInfo = client.applicationInfo(blueGreenSettings.getApplication1());
            String aliases = applicationInfo.getSettings().get("aliases");
            ApplicationAlias application1 = new ApplicationAlias(getAccount(), blueGreenSettings.getApplication1(), aliases);

            // If the app1 has the alias already, deploy to the other app
            if (application1.containAliases(blueGreenSettings.getActiveAliases())) {
View Full Code Here

    public ApplicationBlueGreenInfo() {
    }

    @Override
    public int main() throws Exception {
        BeesClient client = getBeesClient(BeesClient.class);

        List<String> applicationIds = getApplicationIds(client, getName());
        System.out.println();
        System.out.println("PRIMARY APPLICATION");
        System.out.println("===================");
View Full Code Here

     * Creates a new {@link BeesClient} that uses the access token encapsulated in this {@link OauthToken}
     */
    public BeesClient createClient() {
        BeesClientConfiguration config = new BeesClientConfiguration();
        config.setOAuthToken(accessToken);
        return new BeesClient(config);
    }
View Full Code Here

     */
    public BeesClient createClient(BeesClientConfiguration current) {
        // TODO: there should be a copy constructor
        BeesClientConfiguration config = new BeesClientConfiguration(current.getServerApiUrl());
        config.setOAuthToken(accessToken);
        return new BeesClient(config);
    }
View Full Code Here

            }
        }
        logger.debug("Expecting scopes: "+Arrays.toString(scopes.toArray()));

        // Create OAuth client
        OauthClient oauthClient = new BeesClient(oauthConfig.getClientId(), oauthConfig.getClientSecret()).getOauthClient();

        //parse Bearer token from Authorization header
        String token = oauthClient.parseAuthorizationHeader(request.getHeaderValue("Authorization"));

        // If not found get it from the access_token parameter
View Full Code Here

TOP

Related Classes of com.cloudbees.api.BeesClient

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.