diff --git a/lib/cloudapi2.js b/lib/cloudapi2.js index 98fcacb..94c57eb 100644 --- a/lib/cloudapi2.js +++ b/lib/cloudapi2.js @@ -154,13 +154,6 @@ function CloudApi(options) { this.client = new SaferJsonClient(options); } -// -> -CloudApi.prototype.NETWORK_OBJECT_FIELDS = { - ipv4_uuid: 'string', - ipv4_ips: 'string' -}; - - CloudApi.prototype.close = function close(callback) { this.log.trace({host: this.client.url && this.client.url.host}, 'close cloudapi http client'); diff --git a/lib/common.js b/lib/common.js index 04aee41..613732e 100644 --- a/lib/common.js +++ b/lib/common.js @@ -25,7 +25,7 @@ var wordwrap = require('wordwrap'); var errors = require('./errors'), InternalError = errors.InternalError; var NETWORK_OBJECT_FIELDS = - require('./cloudapi2').CloudApi.prototype.NETWORK_OBJECT_FIELDS; + require('./constants').NETWORK_OBJECT_FIELDS; // ---- support stuff diff --git a/lib/constants.js b/lib/constants.js index 5389b0e..18fe901 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -46,11 +46,18 @@ if (process.env.TRITONTEST_CLI_CONFIG_DIR) { CLI_CONFIG_DIR = mod_path.resolve(process.env.HOME, '.triton'); } +// -> +var NETWORK_OBJECT_FIELDS = { + ipv4_uuid: 'string', + ipv4_ips: 'string' +}; + // ---- exports module.exports = { - CLI_CONFIG_DIR: CLI_CONFIG_DIR + CLI_CONFIG_DIR: CLI_CONFIG_DIR, + NETWORK_OBJECT_FIELDS: NETWORK_OBJECT_FIELDS }; diff --git a/lib/do_instance/do_create.js b/lib/do_instance/do_create.js index 12463a0..eb5ef38 100644 --- a/lib/do_instance/do_create.js +++ b/lib/do_instance/do_create.js @@ -20,7 +20,7 @@ var distractions = require('../distractions'); var errors = require('../errors'); var mat = require('../metadataandtags'); var NETWORK_OBJECT_FIELDS = - require('../cloudapi2').CloudApi.prototype.NETWORK_OBJECT_FIELDS; + require('../constants').NETWORK_OBJECT_FIELDS; function parseVolMount(volume) { var components;