#NEWLINE# def ex_create_balancer_policy( self , name , policy_name , policy_type , policy_attributes = None ) : #NEWLINE# #INDENT# "\n        Create a new load balancer policy\n\n        :param name: Balancer name to create the policy for\n        :type  name: ``str``\n\n        :param policy_name: policy to be created\n        :type  policy_name: ``str``\n\n        :param policy_type: policy type being used to create policy.\n        :type  policy_type: ``str``\n\n        :param policy_attributes: Each list contain values, ['AttributeName',\n                                                             'value']\n        :type  policy_attributes: ``PolicyAttribute list``\n        " #NEWLINE# params = { #NEWLINE# #INDENT# 'Action' : 'CreateLoadBalancerPolicy' , #NEWLINE# 'LoadBalancerName' : name , #NEWLINE# 'PolicyName' : policy_name , #NEWLINE# 'PolicyTypeName' : policy_type , #NEWLINE# #UNINDENT# } #NEWLINE# if ( policy_attributes is not None ) : #NEWLINE# #INDENT# for ( index , ( name , value ) ) in enumerate ( policy_attributes . iteritems ( ) , 1 ) : #NEWLINE# #INDENT# params [ ( 'PolicyAttributes.member.%d.                         AttributeName' % index ) ] = name #NEWLINE# params [ ( 'PolicyAttributes.member.%d.                         AttributeValue' % index ) ] = index #NEWLINE# #UNINDENT# #UNINDENT# response = self . connection . request ( ROOT , params = params ) #NEWLINE# return ( response . status == httplib . OK )