function createMemberValidate(dataObj, callback) {
    logutils.logger.debug('createMemberValidate');
    if (!('loadbalancer-member' in dataObj)) {
        error = new appErrors.RESTServerError(
                'Load Balancer Pool Member object missing ');
        callback(error, postData);
        return;
    }
    var appData = dataObj['appData'];
    var postData = {};
    postData['loadbalancer-member'] = dataObj['loadbalancer-member'];

    var mCreateURL = '/loadbalancer-members';

    var mPostData = {};
    mPostData['loadbalancer-member'] = postData['loadbalancer-member'];
    if ((!('loadbalancer-member' in mPostData))
            || (!('fq_name' in mPostData['loadbalancer-member']))) {
        error = new appErrors.RESTServerError('Enter Pool Name ');
        callback(error, null);
        return;
    }
    if ((!('loadbalancer-member' in mPostData))
            || (!('parent_type' in mPostData['loadbalancer-member']))) {
        error = new appErrors.RESTServerError('Parent Type is required ');
        callback(error, null);
        return;
    }
    if (mPostData['loadbalancer-member']['fq_name'].length > 2) {
        var uuid = UUID.create();
        mPostData['loadbalancer-member']['uuid'] = uuid['hex'];
        mPostData['loadbalancer-member']['name'] = uuid['hex'];
        mPostData['loadbalancer-member']['fq_name'][3] = uuid['hex'];
    }
    if ((!('loadbalancer-member' in mPostData))
            || (!('loadbalancer_member_properties' in mPostData['loadbalancer-member']))) {
        error = new appErrors.RESTServerError('Member Properties are missing ');
        callback(error, null);
        return;
    }
    mPostData['loadbalancer-member']['display_name'] = mPostData['loadbalancer-member']['uuid'];
    delete mPostData['loadbalancer-member']['loadbalancer_member_properties']['vip_subnet_id'];

    configApiServer.apiPost(mCreateURL, mPostData, appData, function(error,
            mData) {
        if (error) {
            callback(error, null);
            return;
        }
        var mId = mData['loadbalancer-member']['uuid'];
        readMemberwithUUID(mId, appData, function(err, results) {
            if (err) {
                callback(err, null);
                return;
            }
            callback(null, results);
        });
    });
}
/**
 * @createMemberValidate private function 1. Basic validation before creating
 *                       the Load Balancer - Pool
 */
@createMemberValidate private function 1. Basic validation before creating
the Load Balancer - Pool
@createMemberValidate private function 1 . Basic validation before creating the Load Balancer - Pool
function createMemberValidate(dataObj, callback) {
    logutils.logger.debug('createMemberValidate');
    if (!('loadbalancer-member' in dataObj)) {
        error = new appErrors.RESTServerError(
                'Load Balancer Pool Member object missing ');
        callback(error, postData);
        return;
    }
    var appData = dataObj['appData'];
    var postData = {};
    postData['loadbalancer-member'] = dataObj['loadbalancer-member'];
    var mCreateURL = '/loadbalancer-members';
    var mPostData = {};
    mPostData['loadbalancer-member'] = postData['loadbalancer-member'];
    if ((!('loadbalancer-member' in mPostData))
            || (!('fq_name' in mPostData['loadbalancer-member']))) {
        error = new appErrors.RESTServerError('Enter Pool Name ');
        callback(error, null);
        return;
    }
    if ((!('loadbalancer-member' in mPostData))
            || (!('parent_type' in mPostData['loadbalancer-member']))) {
        error = new appErrors.RESTServerError('Parent Type is required ');
        callback(error, null);
        return;
    }
    if (mPostData['loadbalancer-member']['fq_name'].length > 2) {
        var uuid = UUID.create();
        mPostData['loadbalancer-member']['uuid'] = uuid['hex'];
        mPostData['loadbalancer-member']['name'] = uuid['hex'];
        mPostData['loadbalancer-member']['fq_name'][3] = uuid['hex'];
    }
    if ((!('loadbalancer-member' in mPostData))
            || (!('loadbalancer_member_properties' in mPostData['loadbalancer-member']))) {
        error = new appErrors.RESTServerError('Member Properties are missing ');
        callback(error, null);
        return;
    }
    mPostData['loadbalancer-member']['display_name'] = mPostData['loadbalancer-member']['uuid'];
    delete mPostData['loadbalancer-member']['loadbalancer_member_properties']['vip_subnet_id'];
    configApiServer.apiPost(mCreateURL, mPostData, appData, function(error,
            mData) {
        if (error) {
            callback(error, null);
            return;
        }
        var mId = mData['loadbalancer-member']['uuid'];
        readMemberwithUUID(mId, appData, function(err, results) {
            if (err) {
                callback(err, null);
                return;
            }
            callback(null, results);
        });
    });
}
function createMemberValidate ( dataObj , callback ) { logutils . logger . debug ( 'createMemberValidate' ) ; if ( ! ( 'loadbalancer-member' in dataObj ) ) { error = new appErrors . RESTServerError ( 'Load Balancer Pool Member object missing ' ) ; callback ( error , postData ) ; return ; } var appData = dataObj [ 'appData' ] ; var postData = { } ; postData [ 'loadbalancer-member' ] = dataObj [ 'loadbalancer-member' ] ; var mCreateURL = '/loadbalancer-members' ; var mPostData = { } ; mPostData [ 'loadbalancer-member' ] = postData [ 'loadbalancer-member' ] ; if ( ( ! ( 'loadbalancer-member' in mPostData ) ) || ( ! ( 'fq_name' in mPostData [ 'loadbalancer-member' ] ) ) ) { error = new appErrors . RESTServerError ( 'Enter Pool Name ' ) ; callback ( error , null ) ; return ; } if ( ( ! ( 'loadbalancer-member' in mPostData ) ) || ( ! ( 'parent_type' in mPostData [ 'loadbalancer-member' ] ) ) ) { error = new appErrors . RESTServerError ( 'Parent Type is required ' ) ; callback ( error , null ) ; return ; } if ( mPostData [ 'loadbalancer-member' ] [ 'fq_name' ] . length > 2 ) { var uuid = UUID . create ( ) ; mPostData [ 'loadbalancer-member' ] [ 'uuid' ] = uuid [ 'hex' ] ; mPostData [ 'loadbalancer-member' ] [ 'name' ] = uuid [ 'hex' ] ; mPostData [ 'loadbalancer-member' ] [ 'fq_name' ] [ 3 ] = uuid [ 'hex' ] ; } if ( ( ! ( 'loadbalancer-member' in mPostData ) ) || ( ! ( 'loadbalancer_member_properties' in mPostData [ 'loadbalancer-member' ] ) ) ) { error = new appErrors . RESTServerError ( 'Member Properties are missing ' ) ; callback ( error , null ) ; return ; } mPostData [ 'loadbalancer-member' ] [ 'display_name' ] = mPostData [ 'loadbalancer-member' ] [ 'uuid' ] ; delete mPostData [ 'loadbalancer-member' ] [ 'loadbalancer_member_properties' ] [ 'vip_subnet_id' ] ; configApiServer . apiPost ( mCreateURL , mPostData , appData , function ( error , mData ) { if ( error ) { callback ( error , null ) ; return ; } var mId = mData [ 'loadbalancer-member' ] [ 'uuid' ] ; readMemberwithUUID ( mId , appData , function ( err , results ) { if ( err ) { callback ( err , null ) ; return ; } callback ( null , results ) ; } ) ; } ) ; }
@createMemberValidate private function 1.
@createMemberValidate private function 1 .