我正在渲染此模板
{% for item in Neighbor %}
sensor-group SGroup-BGP-Neighbor-Periodic
{% for item in Neighbor -%}
sensor-path Cisco-IOS-XR-ipv4-bgp-oper:bgp/instances/instance/instance-active/default-vrf/neighbors/neighbor[neighbor-address='{{item
['ip']}}' | ]/connection-state
{% endfor %}
当我将yaml的IP消息传递给python时:
我知道了
sensor-path Cisco-IOS-XR-ipv4-bgp-oper:bgp/instances/instance/instance-active/default-vrf/neighbors/neighbor[neighbor-address='1.1.
1.1]/connection-state << go the next line
将IP 1.1.1.1拆分为两个并发送下一行。我想避免这种行为。 有人可以帮助我吗?