filter for name and version if supplied

This commit is contained in:
Dave Eddy 2015-09-21 18:57:53 -04:00
parent 46927aeed7
commit ee9f897f22
1 changed files with 3 additions and 1 deletions

View File

@ -273,8 +273,10 @@ TritonApi.prototype.getImage = function getImage(name, cb) {
var version = s[1];
var opts = {};
if (version)
if (version) {
opts.name = name;
opts.version = version;
}
this.cloudapi.listImages(opts, function (err, imgs) {
if (err) {
return cb(err);