rougail-output-doc/tests/docs/base/04_5validators_ipnetmask.md
2024-08-05 14:38:59 +02:00

5.4 KiB

Table of Contents

dictionaries/rougail/00-base.yml

---
version: '1.1'
network_address_eth0:
  description: Network address
  type: network
netmask_address_eth0:
  description: Netmask address
  type: netmask
  validators:
    - type: jinja
      jinja: |
        {% if not _.netmask_address_eth0 | valid_in_network(_.network_address_eth0) %}
        {{ _.netmask_address_eth0 }} is not a netmask for network {{ _.network_address_eth0 }}
        {% endif %}        
      description: this mask is possible for the network

Variables for "rougail"

Variable                                                                                                 Description                                                                                             
rougail.network_address_eth0
network basic mandatory
Network address.
rougail.netmask_address_eth0
netmask basic mandatory
Netmask address.
Validator: this mask is possible for the network.

Example with mandatory variables not filled in

---
rougail:
  network_address_eth0: 1.1.1.0
  netmask_address_eth0: 255.255.255.0

Example with all variables modifiable

---
rougail:
  network_address_eth0: 1.1.1.0
  netmask_address_eth0: 255.255.255.0