mplane_http_transport.js
function showCapabilities( options, callback){
    options.url  = 'https://'+options.host+':'+options.port+SUPERVISOR_PATH_SHOW_CAPABILITY;
    options.ca = ssl_files.readCaChain(options.caFile);
    options.key = ssl_files.readFileContent(options.keyFile);
    options.cert = ssl_files.readFileContent(options.certFile);

    request(options, function (error, response, body) {
        if (!error && (response.statusCode = 200)) {
            var caps = (JSON.parse(body));
            callback(null, caps);
        }else{
            console.log(error);
            callback(new Error("Error connecting to the supervisor"), null);
        }
    });
}
function showCapabilities( options, callback){
    options.url  = 'https://'+options.host+':'+options.port+SUPERVISOR_PATH_SHOW_CAPABILITY;
    options.ca = ssl_files.readCaChain(options.caFile);
    options.key = ssl_files.readFileContent(options.keyFile);
    options.cert = ssl_files.readFileContent(options.certFile);

    request(options, function (error, response, body) {
        if (!error && (response.statusCode = 200)) {
            var caps = (JSON.parse(body));
            callback(null, caps);
        }else{
            console.log(error);
            callback(new Error("Error connecting to the supervisor"), null);
        }
    });
}
function showCapabilities ( options , callback ) { options . url = 'https://' + options . host + ':' + options . port + SUPERVISOR_PATH_SHOW_CAPABILITY ; options . ca = ssl_files . readCaChain ( options . caFile ) ; options . key = ssl_files . readFileContent ( options . keyFile ) ; options . cert = ssl_files . readFileContent ( options . certFile ) ; request ( options , function ( error , response , body ) { if ( ! error && ( response . statusCode = 200 ) ) { var caps = ( JSON . parse ( body ) ) ; callback ( null , caps ) ; } else { console . log ( error ) ; callback ( new Error ( "Error connecting to the supervisor" ) , null ) ; } } ) ; }
Contact the supervisor for requesting all the registered capabilities
@param options
@param callback
Contact the supervisor for requesting all the registered capabilities