tera-rand-cli 0.2.2

A CLI tool for generating a feed of random data from a Tera template
{
  "protocol": "{{ random_from_file(path="tera-rand-cli/resources/test/protocol.txt") }}",
  {% set count = random_uint32(start=1, end=10) -%}
  "count": {{ count }},
  "timestamp": {{ now() }},
  "flow_id": "{{ random_uuid() }}",
  "src_hostname": "{{ random_string(length=10) }}",
  "src_addr": "{{ random_ipv4() }}",
  "src_ports": [
    {% for i in range(end=count) -%}
      {{ random_uint32(start=49152, end=65535) }}{% if not loop.last %}, {% endif %}
    {%- endfor %}
  ],
  "src_app": "{{ random_string() }}",

  "dst_hostname": "{{ random_string(length=10) }}",
  "dst_addr":  "{{ random_ipv4() }}",
  "dst_port": {{ random_uint32(end=49151) }},
  "dst_app": "{{ random_string() }}"
}