lib/config.js
function set(appName, keyValues, keyLimits, callback) {
    var config = {};

    if (!isObject(keyValues)) {
      return callback(new Error('To set a variable pass an object'));
    }

    config.values = keyValues;

    if (isObject(keyLimits)) {
      if (keyLimits.hasOwnProperty('memory')) {
        config.memory = keyLimits.memory;
      }
      if (keyLimits.hasOwnProperty('cpu')) {
        config.cpu = keyLimits.cpu;
      }
    } else {
      callback = keyLimits;
    }

    var uri = format('/%s/apps/%s/config/', deis.version, appName);
    commons.post(uri, config, function onSetResponse(err, result) {
      callback(err, result ? result.values : null);
    });
  }
function set(appName, keyValues, keyLimits, callback) {
    var config = {};

    if (!isObject(keyValues)) {
      return callback(new Error('To set a variable pass an object'));
    }

    config.values = keyValues;

    if (isObject(keyLimits)) {
      if (keyLimits.hasOwnProperty('memory')) {
        config.memory = keyLimits.memory;
      }
      if (keyLimits.hasOwnProperty('cpu')) {
        config.cpu = keyLimits.cpu;
      }
    } else {
      callback = keyLimits;
    }

    var uri = format('/%s/apps/%s/config/', deis.version, appName);
    commons.post(uri, config, function onSetResponse(err, result) {
      callback(err, result ? result.values : null);
    });
  }
function set ( appName , keyValues , keyLimits , callback ) { var config = { } ; if ( ! isObject ( keyValues ) ) { return callback ( new Error ( 'To set a variable pass an object' ) ) ; } config . values = keyValues ; if ( isObject ( keyLimits ) ) { if ( keyLimits . hasOwnProperty ( 'memory' ) ) { config . memory = keyLimits . memory ; } if ( keyLimits . hasOwnProperty ( 'cpu' ) ) { config . cpu = keyLimits . cpu ; } } else { callback = keyLimits ; } var uri = format ( '/%s/apps/%s/config/' , deis . version , appName ) ; commons . post ( uri , config , function onSetResponse ( err , result ) { callback ( err , result ? result . values : null ) ; } ) ; }
Set environment variables for an application
Set environment variables for an application