Skip to content

Data Structure

Glenn edited this page Apr 13, 2020 · 41 revisions

Data Structure for Parsers and Generators

This is the structure that should be used when developing modules. Not all of these values will be valid for all firewall types, in that instance those values that are not valid should be left blank.

{  
  "system": {  
    "domain": "",  
    "hostname": ""  
  },  
  "interfaces": {  
    "name": {  
      "enabled": "",  
      "description": "",  
      "ipv4_config": [  
        {  
          "ip_address": "",  
          "mask": "",  
        }  
      ],  
      "ipv6_config": [  
        {  
          "ip_address": "",  
          "mask": "",  
        }  
      ],  
      "mtu": "",  
      "physical_interfaces": [],  
      "type": "",  
      "vlan_id": "",  
      "vlan_name": ""  
    }  
  },  
  "zones": {  
    "name": {  
      "enabled": "",  
      "description": "",  
      "allow_intrazone": "",  
      "members": []  
    }  
  },  
  "routes": {  
    "1": {  
      "description": "",  
      "distance": "",  
      "gateway": "",  
      "interface": "",  
      "mask": "",  
      "network": "",  
      "source": "",  
      "type": ""  
    }  
  },  
  "routes6": {  
    "1": {  
      "description": "",  
      "distance": "",  
      "gateway": "",  
      "interface": "",  
      "mask": "",  
      "network": "",  
      "source": "",  
      "type": ""  
    }  
  },  
  "network_objects": {  
    "name": {  
      "description": "",  
      "mask": "",  
      "network": "",  
      "type": ""  
    }  
  },  
  "network6_objects": {  
    "name": {  
      "description": "",  
      "mask": "",  
      "network": "",  
      "type": ""  
    }  
  },  
  "network_groups": {  
    "name": {  
      "description": "",  
      "members": [],  
      "type": ""  
    }  
  },  
  "network6_groups": {  
    "name": {  
      "description": "",  
      "members": [],  
      "type": ""  
    }  
  },  
  "service_objects": {  
    "name": {  
      "description": "",  
      "destination_port": "",  
      "protocol": "",  
      "source_port": "",  
      "type": ""  
    }  
  },  
  "service_groups": {  
    "name": {  
      "description": "",  
      "members": [],  
      "type": ""  
    }  
  },  
  "mapping_objects": {  
    "name": {  
      "addresses": [  
        {  
          "name": "",  
          "type": ""  
        }  
      ],  
      "interfaces": [  
        {  
          "name": "",  
          "type": ""  
        }  
      ],  
      "services": [  
        {  
          "name": "",  
          "type": ""  
        }  
      ],  
    }  
  },  
  "policies": {  
    "1": {  
      "action": "",  
      "description": "",  
      "dst_addresses": [  
        {  
          "name": "",  
          "type": ""  
        }  
      ],  
      "dst_interfaces": [  
        {  
          "name": "",  
          "type": ""  
        }  
      ],  
      "dst_services": [  
        {  
          "name": "",  
          "type": ""  
        }  
      ],  
      "enabled": "",  
      "logging": "",  
      "name": "",  
      "nat": "",  
      "policy_set": "",  
      "protocol": "",  
      "schedule": "",  
      "src_addresses": [  
        {  
          "name": "",  
          "type": ""  
        }  
      ],  
      "src_interfaces": [  
        {  
          "name": "",  
          "type": ""  
        }  
      ],  
      "src_services": [  
        {  
          "name": "",  
          "type": ""  
        }  
      ],  
      "type": "",  
      "users": []  
    }  
  },  
  "nat": {  
    "1": {  
      "description": "",  
      "dst_addresses_original": [  
        {  
          "name": "",  
          "type": ""  
        }  
      ],  
      "dst_addresses_translated": [  
        {  
          "name": "",  
          "type": ""  
        }  
      ],  
      "dst_interfaces": [  
        {  
          "name": "",  
          "type": ""  
        }  
      ],  
      "dst_services_original": [  
        {  
          "name": "",  
          "type": ""  
        }  
      ],  
      "dst_services_translated": [  
        {  
          "name": "",  
          "type": ""  
        }  
      ],  
      "enabled": "",  
      "name": "",  
      "src_addresses_original": [  
        {  
          "name": "",  
          "type": ""  
        }  
      ],  
      "src_addresses_translated": [  
        {  
          "name": "",  
          "type": ""  
        }  
      ],  
      "src_interfaces": [  
        {  
          "name": "",  
          "type": ""  
        }  
      ],  
      "src_services_original": [  
        {  
          "name": "",  
          "type": ""  
        }  
      ],  
      "src_services_translated": [  
        {  
          "name": "",  
          "type": ""  
        }  
      ],  
      "type": ""  
    }  
  }  
}  
Clone this wiki locally