这是下面stackoverflow问题的继续问题: 如何过滤嵌套的案例以过滤掉python How to compare the attributes start with $ in 2 functions and display match or mismatch
当我从if的第一个块中的nvp_add
删除其中一个$apsChanConfigNumber
时,上面链接中的compare python脚本无法检测到不匹配,在这种情况下有2个nvp_add
函数。如何解决问题帮助!!!你知道吗
输入文件ASCII纯文本包含以下文本:
if(exists($snmpTrapEnterprise))
{
if(match($OPTION_EnableDetails, "1") or
match($OPTION_EnableDetails_juniper, "1")) {
details($snmpTrapEnterprise,$apsChanStatusSwitchovers,$apsChanStatusCurrent,$apsChanConfigGroupName,$apsChanConfigNumber)
}
@ExtendedAttr = nvp_add(@ExtendedAttr, "snmpTrapEnterprise", $snmpTrapEnterprise, "apsChanStatusSwitchovers", $apsChanStatusSwitchovers, "apsChanStatusCurrent", $apsChanStatusCurrent,
"apsChanConfigGroupName", , "apsChanConfigNumber",)
}
else
{
if(match($OPTION_EnableDetails, "1") or
match($OPTION_EnableDetails_juniper, "1")) {
details($apsChanStatusSwitchovers,$apsChanStatusCurrent,$apsChanConfigGroupName,$apsChanConfigNumber)
}
@ExtendedAttr = nvp_add(@ExtendedAttr, "apsChanStatusSwitchovers",
$apsChanStatusSwitchovers, "apsChanStatusCurrent", $apsChanStatusCurrent,
"apsChanConfigGroupName", $apsChanConfigGroupName,
"apsChanConfigNumber", $apsChanConfigNumber)
}
从我开始,我将完成:p
相关问题 更多 >
编程相关推荐