Make cache_parameter_group the name of this new param to match with similar params (leave old name as an alias)

reviewable/pr18780/r1
Toshio Kuratomi 9 years ago
parent e16c5c54fd
commit 0de2627efc

@ -63,6 +63,7 @@ options:
required: false required: false
default: None default: None
version_added: "2.0" version_added: "2.0"
aliases: [ 'parameter_group' ]
cache_subnet_group: cache_subnet_group:
description: description:
- The subnet group name to associate with. Only use if inside a vpc. Required if inside a vpc - The subnet group name to associate with. Only use if inside a vpc. Required if inside a vpc
@ -150,7 +151,7 @@ class ElastiCacheManager(object):
EXIST_STATUSES = ['available', 'creating', 'rebooting', 'modifying'] EXIST_STATUSES = ['available', 'creating', 'rebooting', 'modifying']
def __init__(self, module, name, engine, cache_engine_version, node_type, def __init__(self, module, name, engine, cache_engine_version, node_type,
num_nodes, cache_port, parameter_group, cache_subnet_group, num_nodes, cache_port, cache_parameter_group, cache_subnet_group,
cache_security_groups, security_group_ids, zone, wait, cache_security_groups, security_group_ids, zone, wait,
hard_modify, region, **aws_connect_kwargs): hard_modify, region, **aws_connect_kwargs):
self.module = module self.module = module
@ -160,7 +161,7 @@ class ElastiCacheManager(object):
self.node_type = node_type self.node_type = node_type
self.num_nodes = num_nodes self.num_nodes = num_nodes
self.cache_port = cache_port self.cache_port = cache_port
self.parameter_group = parameter_group self.cache_parameter_group = cache_parameter_group
self.cache_subnet_group = cache_subnet_group self.cache_subnet_group = cache_subnet_group
self.cache_security_groups = cache_security_groups self.cache_security_groups = cache_security_groups
self.security_group_ids = security_group_ids self.security_group_ids = security_group_ids
@ -219,7 +220,7 @@ class ElastiCacheManager(object):
engine_version=self.cache_engine_version, engine_version=self.cache_engine_version,
cache_security_group_names=self.cache_security_groups, cache_security_group_names=self.cache_security_groups,
security_group_ids=self.security_group_ids, security_group_ids=self.security_group_ids,
cache_parameter_group_name=self.parameter_group, cache_parameter_group_name=self.cache_parameter_group,
cache_subnet_group_name=self.cache_subnet_group, cache_subnet_group_name=self.cache_subnet_group,
preferred_availability_zone=self.zone, preferred_availability_zone=self.zone,
port=self.cache_port) port=self.cache_port)
@ -295,7 +296,7 @@ class ElastiCacheManager(object):
num_cache_nodes=self.num_nodes, num_cache_nodes=self.num_nodes,
cache_node_ids_to_remove=nodes_to_remove, cache_node_ids_to_remove=nodes_to_remove,
cache_security_group_names=self.cache_security_groups, cache_security_group_names=self.cache_security_groups,
cache_parameter_group_name=self.parameter_group, cache_parameter_group_name=self.cache_parameter_group,
security_group_ids=self.security_group_ids, security_group_ids=self.security_group_ids,
apply_immediately=True, apply_immediately=True,
engine_version=self.cache_engine_version) engine_version=self.cache_engine_version)
@ -486,7 +487,8 @@ def main():
cache_engine_version={'required': False}, cache_engine_version={'required': False},
node_type={'required': False, 'default': 'cache.m1.small'}, node_type={'required': False, 'default': 'cache.m1.small'},
num_nodes={'required': False, 'default': None, 'type': 'int'}, num_nodes={'required': False, 'default': None, 'type': 'int'},
parameter_group={'required': False, 'default': None}, # alias for compat with the original PR 1950
cache_parameter_group={'required': False, 'default': None, 'aliases': ['parameter_group']},
cache_port={'required': False, 'type': 'int'}, cache_port={'required': False, 'type': 'int'},
cache_subnet_group={'required': False, 'default': None}, cache_subnet_group={'required': False, 'default': None},
cache_security_groups={'required': False, 'default': [default], cache_security_groups={'required': False, 'default': [default],
@ -521,7 +523,7 @@ def main():
zone = module.params['zone'] zone = module.params['zone']
wait = module.params['wait'] wait = module.params['wait']
hard_modify = module.params['hard_modify'] hard_modify = module.params['hard_modify']
parameter_group = module.params['parameter_group'] cache_parameter_group = module.params['cache_parameter_group']
if cache_subnet_group and cache_security_groups == [default]: if cache_subnet_group and cache_security_groups == [default]:
cache_security_groups = [] cache_security_groups = []
@ -540,7 +542,7 @@ def main():
elasticache_manager = ElastiCacheManager(module, name, engine, elasticache_manager = ElastiCacheManager(module, name, engine,
cache_engine_version, node_type, cache_engine_version, node_type,
num_nodes, cache_port, num_nodes, cache_port,
parameter_group, cache_parameter_group,
cache_subnet_group, cache_subnet_group,
cache_security_groups, cache_security_groups,
security_group_ids, zone, wait, security_group_ids, zone, wait,

Loading…
Cancel
Save