lib/pkgcloud/rackspace/loadbalancer/client/loadbalancers.js
function(details, callback) {
    var self = this,
        createOptions = {
          path: _urlPrefix,
          method: 'POST',
          body: {
            name: details.name,
            nodes: details.nodes || [],
            protocol: details.protocol ? details.protocol.name : '',
            port: details.protocol ? details.protocol.port : '',
            virtualIps: details.virtualIps
          }
        };

    createOptions.body = _.extend(createOptions.body,
      _.pick(details, ['accessList', 'algorithm', 'connectionLogging',
        'connectionThrottle', 'healthMonitor', 'metadata', 'timeout',
        'sessionPersistence']));

    var validationErrors = validateLbInputs(createOptions.body);

    if (validationErrors) {
      return callback(new Error('Errors validating inputs for createLoadBalancer', validationErrors));
    }

    self._request(createOptions, function(err, body) {
      return err
        ? callback(err)
        : callback(err, new lb.LoadBalancer(self, body.loadBalancer));
    });
  }
function(details, callback) {
    var self = this,
        createOptions = {
          path: _urlPrefix,
          method: 'POST',
          body: {
            name: details.name,
            nodes: details.nodes || [],
            protocol: details.protocol ? details.protocol.name : '',
            port: details.protocol ? details.protocol.port : '',
            virtualIps: details.virtualIps
          }
        };

    createOptions.body = _.extend(createOptions.body,
      _.pick(details, ['accessList', 'algorithm', 'connectionLogging',
        'connectionThrottle', 'healthMonitor', 'metadata', 'timeout',
        'sessionPersistence']));

    var validationErrors = validateLbInputs(createOptions.body);

    if (validationErrors) {
      return callback(new Error('Errors validating inputs for createLoadBalancer', validationErrors));
    }

    self._request(createOptions, function(err, body) {
      return err
        ? callback(err)
        : callback(err, new lb.LoadBalancer(self, body.loadBalancer));
    });
  }
function ( details , callback ) { var self = this , createOptions = { path : _urlPrefix , method : 'POST' , body : { name : details . name , nodes : details . nodes || [ ] , protocol : details . protocol ? details . protocol . name : '' , port : details . protocol ? details . protocol . port : '' , virtualIps : details . virtualIps } } ; createOptions . body = _ . extend ( createOptions . body , _ . pick ( details , [ 'accessList' , 'algorithm' , 'connectionLogging' , 'connectionThrottle' , 'healthMonitor' , 'metadata' , 'timeout' , 'sessionPersistence' ] ) ) ; var validationErrors = validateLbInputs ( createOptions . body ) ; if ( validationErrors ) { return callback ( new Error ( 'Errors validating inputs for createLoadBalancer' , validationErrors ) ) ; } self . _request ( createOptions , function ( err , body ) { return err ? callback ( err ) : callback ( err , new lb . LoadBalancer ( self , body . loadBalancer ) ) ; } ) ; }
client.createLoadBalancer

@description Create a new cloud LoadBalancer. There are a number of options for
cloud load balancers; please reference the Rackspace API documentation for more
insight into the specific parameter values:

http://docs.rackspace.com/loadbalancers/api/v1.0/clb-devguide/content/Create_Load_Balancer-d1e1635.html

@param {object}          details   details object for the new load balancer
@param {String}          details.name    the name of your load balancer
@param {Object}          details.protocol
@param {String}          details.protocol.name     protocol name
@param {Number}          details.protocol.port     port number
@param {Array}           details.virtualIps        array of virtualIps for new LB
@param {Array}           [details.nodes]           array of nodes to add

For extended option support please see the API documentation

@param {function}        callback
@returns {*}
client . createLoadBalancer