How to use the apigeetool.listDeployments function in apigeetool

To help you get started, we’ve selected a few apigeetool examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github apigee-internal / microgateway / cli / lib / deploy-auth.js View on Github external
//writeConsoleLog('log',{component: CONSOLE_LOG_TAG_COMP},'checking for previously deployed proxies')
    const opts = {
        organization: options.org,
        api: 'edgemicro-internal',
        baseuri: this.managementUri,
        debug: options.debug
    };

    if (options.token) {
        opts.token = options.token;
    } else {
        opts.username = options.username;
        opts.password = options.password;
    }
   // const that = this;
    apigeetool.listDeployments(opts, function(err /*, proxies */) {
        if (err) {
            if (err.message.includes("404")) {
                return cb(null, options);
            } else {
                return cb(err, options);    
            }            
        }
        else {
            options.internaldeployed = true;
            cb(null, options);
        }
    });
}
github apigee-127 / a127 / lib / commands / account / providers / apigee.js View on Github external
function listDeployments(account, options, cb) {
  var opts = buildApigeetoolOpts(account);
  if (options.long) { opts.long = true; }
  apigeetool.listDeployments(opts, cb);
}
github apigee-internal / microgateway / cli / lib / deploy-auth.js View on Github external
//writeConsoleLog('log',{component: CONSOLE_LOG_TAG_COMP},'checking for previously deployed proxies')
    const opts = {
        organization: options.org,
        api: 'edgemicro-auth',
        baseuri: this.managementUri,
        debug: options.debug
    };

    if (options.token) {
        opts.token = options.token;
    } else {
        opts.username = options.username;
        opts.password = options.password;
    }
    //const that = this;
    apigeetool.listDeployments(opts, function(err /*, proxies */) {
        if (err) {
            if (err.message.includes("404")) {
                return cb(null, options);
            } else {
                return cb(err, options);    
            }            
        }
        else {
            options.deployed = true;
            cb(null, options);
        }
    });
}