1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Remove file extension from policy names (#3805)

Fixes #3804.

Prevents `__file__` from contributing ".", which is an illegal character in ELB policy names.
This commit is contained in:
Lyle Mantooth 2016-08-01 11:08:04 -04:00 committed by Matt Clay
parent 7ba3ba2da9
commit f57ece661f

View file

@ -980,7 +980,7 @@ class ElbManager(object):
self.elb_conn.modify_lb_attribute(self.name, 'ConnectingSettings', attributes.connecting_settings)
def _policy_name(self, policy_type):
return __file__.split('/')[-1].replace('_', '-') + '-' + policy_type
return __file__.split('/')[-1].split('.')[0].replace('_', '-') + '-' + policy_type
def _create_policy(self, policy_param, policy_meth, policy):
getattr(self.elb_conn, policy_meth )(policy_param, self.elb.name, policy)