'Create a firewall policy.
:param name: Policy name.
:type name: ``str``
:param rules: List of firewall policy rules to associate with this
policy. (optional)
:type rules: ``list`` of ``dict``
:return: Created firewall policy object.
:rtype: :class:`.CloudSigmaFirewallPolicy`'

def ex_create_firewall_policy(self, name, rules=None):

    data = {}
    obj = {}
    obj['name'] = name
    if rules:
        obj['rules'] = rules
    data['objects'] = [obj]
    action = '/fwpolicies/'
    response = self.connection.request(action=action, method='POST', data=data).object
    policy = self._to_firewall_policy(data=response['objects'][0])
    return policy
