Example Skillet

In this example, we will create a skillet that allows the user to customize a single variable.

XML Fragment

First, we’ll extract the parts of the configuration that comprise this ‘unit’ of configuration changes (a skillet). For example, this portion of the configuration describes the log-settings we would like to modify:

     <entry name="dhcp-log-match">
        <filter>(eventid eq lease-start)</filter>
    <entry name="mgmt-interface">
            <entry name="mgmt-intf">
                <server>{{ MGMT_IP }}</server>

Notice here we have defined one variable: MGMT_IP. This will allow the user to insert their own management ip when deploying.

.meta-cnc file

name: example_log_setting
label: Log Setting Example
description: Example log setting to configure syslog
type: panos

  service_type: userid

  - name: MGMT_IP
    description: NGFW management IP address
    type_hint: ip_address

  - name: log_settings
    cmd: set
    xpath: /config/shared/log-settings
    file: log_settings.xml

In this file, we give some basic information about what this skillet will do, what configuration bits will be applied, and what variables the user can customize. Notice in the ‘variables’ section, we specify a variable entry with a ‘name’ that matches the variable defined in the XML fragment. The ‘snippets’ section will inform Panhandler where in the configuration this fragment should be inserted (xpath) and where to find the fragment (file).

Rendered Form

This .meta-cnc.yaml will produce the following web form in Panhandler: