diff --git a/maxctrl/lib/common.js b/maxctrl/lib/common.js index 83362b341..e84169464 100644 --- a/maxctrl/lib/common.js +++ b/maxctrl/lib/common.js @@ -94,7 +94,7 @@ module.exports = function() { // Get a resource as raw collection; a matrix of strings this.getRawCollection = function (host, resource, fields) { - return getResource(host, resource) + return getJson(host, resource) .then((res) => filterResource(res, fields)) } @@ -268,7 +268,7 @@ module.exports = function() { return doAsyncRequest(host, resource, cb, obj) } - this.getResource = function(host, resource) { + this.getJson = function(host, resource) { return doAsyncRequest(host, resource, (res) => { return res }) diff --git a/maxctrl/lib/list.js b/maxctrl/lib/list.js index 792a338c1..d94719c10 100644 --- a/maxctrl/lib/list.js +++ b/maxctrl/lib/list.js @@ -33,7 +33,7 @@ exports.builder = function(yargs) { ] // First, get the list of all servers - return getResource(host, 'servers') + return getJson(host, 'servers') .then((res) => { promises = [] @@ -49,7 +49,7 @@ exports.builder = function(yargs) { // This servers is monitored by a monitor, get the monitor resource promises.push( - getResource(host, 'monitors/' + owner) + getJson(host, 'monitors/' + owner) .then((res) => { // Check if the monitor defines a server_info object