{% extends 'generic/object.html' %} {% load helpers %} {% load plugins %} {% block content %}
Option Data
{% if not object.csv_format %} {% endif %}
Distinctive Name {{ object.distinctive_name }}
Definition {{ object.definition.name }} (Code: {{ object.definition.code }}, Type: {{ object.definition.get_option_type_display }})
Vendor Option Space {% if object.vendor_option_space %} {{ object.vendor_option_space.name }} {% else %} {{ object.get_option_space_display }} (standard) {% endif %}
Delivery Type {{ object.get_delivery_type_display }}
Data {% if not object.csv_format %}(Hex){% endif %} {% if ip_sources %} Resolved from IP sources → {{ kea_data }} {% else %} {{ object.data }} {% endif %}
ASCII Data {{ object.ascii_data }}
Always Send {% if object.always_send %}Yes{% else %}No{% endif %}
CSV Format {% if object.csv_format %}Yes{% else %}No{% endif %}
Description {{ object.description|placeholder }}
{% if ip_sources %}
IP Sources

IPs resolved from linked objects at config generation time. These override the Data field.

{% for source in ip_sources %} {% endfor %}
#{{ source.ordinal }} {% if source.ip_source %} {{ source.ip_source }} → {{ source.resolved_ip }} {% else %} Source deleted {% endif %}
{% endif %} {% include 'inc/panels/tags.html' %} {% plugin_left_page object %}
KEA Configuration
{% if object.delivery_type == 'standard' %}

This option data generates the following KEA option-data entry:

{
    "space": "{{ object.option_space }}",
    "name": "{{ object.name }}",
    "code": {{ object.code }},
    "data": "{{ kea_data }}"{% if object.always_send %},
    "always-send": true{% endif %}{% if not object.csv_format %},
    "csv-format": false{% endif %}

}
{% elif object.delivery_type == 'option43' %}

This option is delivered via Option 43 (Vendor-Encapsulated-Options):

// Option 43 must encapsulate the vendor space:
// (defined in option-def)
{
    "name": "vendor-encapsulated-options",
    "code": 43,
    "type": "empty",
    "encapsulate": "{{ object.vendor_option_space.name }}"
}

// Option data in the vendor space:
{
    "space": "{{ object.vendor_option_space.name }}",
    "name": "{{ object.name }}",
    "code": {{ object.code }},
    "data": "{{ kea_data }}"{% if object.always_send %},
    "always-send": true{% endif %}{% if not object.csv_format %},
    "csv-format": false{% endif %}

}
{% else %}

This option is delivered via Option 125 (VIVSO):

// Enable VIVSO with the enterprise ID:
{
    "name": "vivso-suboptions",
    "data": "{{ object.vendor_option_space.enterprise_id }}"
}

// Option data in the vendor space:
{
    "space": "vendor-{{ object.vendor_option_space.enterprise_id }}",
    "name": "{{ object.name }}",
    "code": {{ object.code }},
    "data": "{{ kea_data }}"{% if object.always_send %},
    "always-send": true{% endif %}{% if not object.csv_format %},
    "csv-format": false{% endif %}

}
{% endif %}
{% include 'inc/panels/custom_fields.html' %} {% plugin_right_page object %}
{% endblock %}