def ex_create_balancer_policy(self, name, policy_name, policy_type,
                                  policy_attributes=None):
        params = {
            'Action': 'CreateLoadBalancerPolicy',
            'LoadBalancerName': name,
            'PolicyName': policy_name,
            'PolicyTypeName': policy_type
        }

        if policy_attributes is not None:
            for index, (name, value) in enumerate(
                    policy_attributes.iteritems(), 1):
                params['PolicyAttributes.member.%d. \
                        AttributeName' % (index)] = name
                params['PolicyAttributes.member.%d. \
                        AttributeValue' % (index)] = value

        response = self.connection.request(ROOT, params=params)
        return response.status == httplib.OK
Create a new load balancer policy
dataset/ETHPy150Open apache/libcloud/libcloud/loadbalancer/drivers/elb.py/ElasticLBDriver.ex_create_balancer_policy