aws-autoscaling-container
Advanced tools
Comparing version 0.1.5 to 0.1.6
@@ -74,11 +74,6 @@ /* | ||
var getParamFromAncestors = function (container, paramName, cb) { | ||
var getParamFromAncestorsSpecific = function (container, paramName, cb) { | ||
var parent = _.find(system.topology.containers, function (cont) { | ||
return cont.id === container.containedBy; | ||
}); | ||
if (parent[paramName]) { | ||
return cb(null, parent[paramName]); | ||
} | ||
if (parent.id === container.id) { | ||
@@ -88,3 +83,8 @@ return cb(new Error('Cannot find param ' + paramName + ' in ancestors containers')); | ||
return getParamFromAncestors(parent, paramName, cb); | ||
var specific = parent.specific; | ||
if (specific && specific[paramName]) { | ||
return cb(null, specific[paramName]); | ||
} | ||
return getParamFromAncestorsSpecific(parent, paramName, cb); | ||
}; | ||
@@ -99,3 +99,3 @@ | ||
var keyName = container.specific.KeyName || config.defaultKeyName; | ||
getParamFromAncestors(c, 'groupId', function (err, groupId) { | ||
getParamFromAncestorsSpecific(c, 'GroupId', function (err, groupId) { | ||
if (err) { | ||
@@ -118,2 +118,7 @@ return cb(err); | ||
if (parent.id === container.id) { | ||
// the current container is root, so let's return null | ||
return null; | ||
} | ||
return fetchELBId(parent); | ||
@@ -120,0 +125,0 @@ }; |
{ | ||
"name": "aws-autoscaling-container", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "AWS Autoscaling Group support for nscale", | ||
@@ -5,0 +5,0 @@ "main": "lib/container.js", |
46143
1006