我正在尝试编写一个控件,该控件应该检查包含 IP 的列表,并且我从中提取的配置值应该是列表中的。我不知道在哪里创建控件应该引用的列表。
control "Approved Management IPs" do
impact 1.0
title "Telnet Disabled"
desc "Config should have one of the following IPs on the management plane."
options = {
assignment_regex: /^\s*(<permitted-ips>)(\w+)<\/permitted-ips>/,
multiple_values: true
}
describe parse_config_file('pandevice_vm_config.txt', options) do
its('<permitted-ips>') { should be_in LIST }
end
end