Skip to content

Commit

Permalink
T6949: switch to ipv4/6 literals
Browse files Browse the repository at this point in the history
  • Loading branch information
nvollmar committed Dec 26, 2024
1 parent 99313e6 commit 7b37ee6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions data/templates/prometheus/blackbox_exporter.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ modules:
dns:
query_name: "{{ module_name }}"
query_type: "{{ module_config.query_type }}"
preferred_ip_protocol: "{{ module_config.preferred_ip_protocol }}"
preferred_ip_protocol: "{{ module_config.preferred_ip_protocol | replace('v', '') }}"
ip_protocol_fallback: {{ 'true' if module_config.ip_protocol_fallback is vyos_defined else 'false' }}
{% endfor %}
{% endif %}
Expand All @@ -17,7 +17,7 @@ modules:
prober: icmp
timeout: {{ module_config.timeout }}s
icmp:
preferred_ip_protocol: "{{ module_config.preferred_ip_protocol }}"
preferred_ip_protocol: "{{ module_config.preferred_ip_protocol | replace('v', '') }}"
ip_protocol_fallback: {{ 'true' if module_config.ip_protocol_fallback is vyos_defined else 'false' }}
{% endfor %}
{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
<properties>
<help>Preferred IP protocol for this module</help>
<valueHelp>
<format>ip4</format>
<format>ipv4</format>
<description>Prefer IPv4</description>
</valueHelp>
<valueHelp>
<format>ip6</format>
<format>ipv6</format>
<description>Prefer IPv6</description>
</valueHelp>
<constraint>
<regex>(ip4|ip6)</regex>
<regex>(ipv4|ipv6)</regex>
</constraint>
</properties>
<defaultValue>ip6</defaultValue>
Expand Down
4 changes: 2 additions & 2 deletions smoketest/scripts/cli/test_service_monitoring_prometheus.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def test_04_blackbox_exporter_with_config(self):
'name',
'dns_ip4',
'preferred-ip-protocol',
'ip4',
'ipv4',
]
)
self.cli_set(
Expand All @@ -124,7 +124,7 @@ def test_04_blackbox_exporter_with_config(self):
'name',
'icmp_ip6',
'preferred-ip-protocol',
'ip6',
'ipv6',
]
)

Expand Down

0 comments on commit 7b37ee6

Please sign in to comment.