cloudapi and tritonapi exports should match
This commit is contained in:
parent
464851843a
commit
e7109071de
@ -27,7 +27,7 @@ var vasync = require('vasync');
|
||||
var common = require('./common');
|
||||
var mod_config = require('./config');
|
||||
var errors = require('./errors');
|
||||
var TritonApi = require('./tritonapi');
|
||||
var tritonapi = require('./tritonapi');
|
||||
|
||||
|
||||
|
||||
@ -223,7 +223,7 @@ CLI.prototype.init = function (opts, args, callback) {
|
||||
self._applyProfileOverrides(profile);
|
||||
self.log.trace({profile: profile}, 'loaded profile');
|
||||
|
||||
self._tritonapi = new TritonApi({
|
||||
self._tritonapi = tritonapi.createClient({
|
||||
log: self.log,
|
||||
profile: profile,
|
||||
config: config
|
||||
|
@ -651,8 +651,6 @@ CloudApi.prototype.machineAudit = function machineAudit(id, cb) {
|
||||
|
||||
// --- Exports
|
||||
|
||||
module.exports = {
|
||||
createClient: function (options) {
|
||||
return new CloudApi(options);
|
||||
}
|
||||
module.exports.createClient = function (options) {
|
||||
return new CloudApi(options);
|
||||
};
|
||||
|
@ -527,4 +527,6 @@ TritonApi.prototype.getInstance = function getInstance(name, cb) {
|
||||
|
||||
//---- exports
|
||||
|
||||
module.exports = TritonApi;
|
||||
module.exports.createClient = function (options) {
|
||||
return new TritonApi(options);
|
||||
};
|
||||
|
Reference in New Issue
Block a user