code: def convert_fwdb_event_msg(self, rule, tenant_id, rule_id, policy_id):
          
          rule.update({'tenant_id': tenant_id, 'id': rule_id,
                       'firewall_policy_id': policy_id})
          fw_rule_data = {'firewall_rule': rule}
          return fw_rule_data
docs: Convert the Firewall DB to a event message format.
  
          From inputs from DB, this will create a FW rule dictionary that
          resembles the actual data from Openstack when a rule is created.
          This is usually called after restart, in order to populate local
          cache.