Remove file extension from policy names (#3805)

Fixes #3804.

Prevents `__file__` from contributing ".", which is an illegal character in ELB policy names.
reviewable/pr18780/r1
Lyle Mantooth 8 years ago committed by jctanner
parent d38c24d0ed
commit 50abfd5e27

@ -976,7 +976,7 @@ class ElbManager(object):
self.elb_conn.modify_lb_attribute(self.name, 'ConnectingSettings', attributes.connecting_settings) self.elb_conn.modify_lb_attribute(self.name, 'ConnectingSettings', attributes.connecting_settings)
def _policy_name(self, policy_type): 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): def _create_policy(self, policy_param, policy_meth, policy):
getattr(self.elb_conn, policy_meth )(policy_param, self.elb.name, policy) getattr(self.elb_conn, policy_meth )(policy_param, self.elb.name, policy)

Loading…
Cancel
Save