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

View File

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