From ea9af2cbb183c54f0af3b8ef978ac07f8c7c67b9 Mon Sep 17 00:00:00 2001 From: Jacob Hickey Date: Thu, 17 Jul 2014 11:03:38 -0400 Subject: [PATCH] Add missing params to get_target_from_rule get_target_from_rule was extracted from main() without enough parameters for all the local variables it took with it from the extraction site. --- library/cloud/ec2_group | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/cloud/ec2_group b/library/cloud/ec2_group index bed8978e82..ff8892b065 100644 --- a/library/cloud/ec2_group +++ b/library/cloud/ec2_group @@ -106,7 +106,7 @@ def addRulesToLookup(rules, prefix, dict): grant.group_id, grant.cidr_ip)] = rule -def get_target_from_rule(module, rule, name, group, groups): +def get_target_from_rule(module, ec2, rule, name, group, groups, vpc_id): """ Returns tuple of (group_id, ip) after validating rule params. @@ -249,7 +249,7 @@ def main(): # Now, go through all provided rules and ensure they are there. if rules: for rule in rules: - group_id, ip, target_group_created = get_target_from_rule(module, rule, name, group, groups) + group_id, ip, target_group_created = get_target_from_rule(module, ec2, rule, name, group, groups, vpc_id) if target_group_created: changed = True @@ -289,7 +289,7 @@ def main(): # Now, go through all provided rules and ensure they are there. if rules_egress: for rule in rules_egress: - group_id, ip, target_group_created = get_target_from_rule(module, rule, name, group, groups) + group_id, ip, target_group_created = get_target_from_rule(module, ec2, rule, name, group, groups, vpc_id) if target_group_created: changed = True