forked from apigee/apigeetool-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented Issue apigee#162 - Target Server Get and List
- Loading branch information
1 parent
a010f42
commit d11585f
Showing
9 changed files
with
233 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* jshint node: true */ | ||
'use strict'; | ||
|
||
var util = require('util'); | ||
var _ = require('underscore'); | ||
|
||
var defaults = require('../defaults'); | ||
var options = require('../options'); | ||
var command_utils = require('./command-utils') | ||
|
||
var descriptor = defaults.defaultDescriptor({ | ||
environment: { | ||
name: 'Environment', | ||
shortOption: 'e', | ||
required: true, | ||
prompt: true | ||
}, | ||
targetServerName: { | ||
name: 'Target Server Name', | ||
required: true, | ||
prompt: true | ||
} | ||
}); | ||
|
||
module.exports.descriptor = descriptor; | ||
|
||
module.exports.run = function(opts, cb) { | ||
if (opts.debug) { | ||
console.log('getTargetServer: %j', opts); | ||
} | ||
var uri = util.format('%s/v1/o/%s/e/%s/targetservers/%s', opts.baseuri, opts.organization, opts.environment,opts.targetServerName); | ||
var requestOptions = { | ||
uri: uri, | ||
method:'GET', | ||
json:true | ||
} | ||
command_utils.run('getTargetServer', opts,requestOptions,cb) | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* jshint node: true */ | ||
'use strict'; | ||
|
||
var util = require('util'); | ||
var _ = require('underscore'); | ||
|
||
var defaults = require('../defaults'); | ||
var options = require('../options'); | ||
var command_utils = require('./command-utils') | ||
|
||
var descriptor = defaults.defaultDescriptor({ | ||
environment: { | ||
name: 'Environment', | ||
shortOption: 'e', | ||
required: true, | ||
prompt: true | ||
} | ||
}); | ||
|
||
module.exports.descriptor = descriptor; | ||
|
||
module.exports.run = function(opts, cb) { | ||
if (opts.debug) { | ||
console.log('listTargetServers: %j', opts); | ||
} | ||
var uri = util.format('%s/v1/o/%s/e/%s/targetservers', opts.baseuri, opts.organization, opts.environment); | ||
var requestOptions = { | ||
uri: uri, | ||
method:'GET', | ||
json:true | ||
} | ||
command_utils.run('listTargetServers', opts,requestOptions,cb) | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters