'Lists all Firewall Rules
:rtype: ``list`` of :class:`CloudStackFirewallRule`'

def ex_list_firewall_rules(self):

    rules = []
    result = self._sync_request(command='listFirewallRules', method='GET')
    if (result != {}):
        public_ips = self.ex_list_public_ips()
        for rule in result['firewallrule']:
            addr = [a for a in public_ips if (a.address == rule['ipaddress'])]
            rules.append(CloudStackFirewallRule(rule['id'], addr[0], rule['cidrlist'], rule['protocol'], rule.get('icmpcode'), rule.get('icmptype'), rule.get('startport'), rule.get('endport')))
    return rules
