update info-center (#57269)

pull/57492/head
xuxiaowei0512 5 years ago committed by Nathaniel Case
parent 767e02f9fe
commit 4dc6faea59

@ -292,7 +292,7 @@ class InfoCenterDebug(object):
replace('xmlns="http://www.huawei.com/netconf/vrp"', "")
root = ElementTree.fromstring(xml_str)
global_cfg = root.findall("data/syslog/globalParam")
global_cfg = root.findall("syslog/globalParam")
if global_cfg:
for tmp in global_cfg:
tmp_dict = dict()
@ -370,7 +370,7 @@ class InfoCenterDebug(object):
replace('xmlns="http://www.huawei.com/netconf/vrp"', "")
root = ElementTree.fromstring(xml_str)
source_cfg = root.findall("data/syslog/icSources/icSource")
source_cfg = root.findall("syslog/icSources/icSource")
if source_cfg:
for tmp in source_cfg:
tmp_dict = dict()

@ -625,7 +625,7 @@ class InfoCenterGlobal(object):
replace('xmlns="http://www.huawei.com/netconf/vrp"', "")
root = ElementTree.fromstring(xml_str)
channel_info["channelInfos"] = list()
channels = root.findall("data/syslog/icChannels/icChannel")
channels = root.findall("syslog/icChannels/icChannel")
if channels:
for channel in channels:
channel_dict = dict()
@ -716,7 +716,7 @@ class InfoCenterGlobal(object):
replace('xmlns="http://www.huawei.com/netconf/vrp"', "")
root = ElementTree.fromstring(xml_str)
channel_direct_info["channelDirectInfos"] = list()
dir_channels = root.findall("data/syslog/icDirChannels/icDirChannel")
dir_channels = root.findall("syslog/icDirChannels/icDirChannel")
if dir_channels:
for ic_dir_channel in dir_channels:
channel_direct_dict = dict()
@ -806,7 +806,7 @@ class InfoCenterGlobal(object):
replace('xmlns="http://www.huawei.com/netconf/vrp"', "")
root = ElementTree.fromstring(xml_str)
filter_info["filterInfos"] = list()
ic_filters = root.findall("data/syslog/icFilters/icFilter")
ic_filters = root.findall("syslog/icFilters/icFilter")
if ic_filters:
for ic_filter in ic_filters:
filter_dict = dict()
@ -894,7 +894,7 @@ class InfoCenterGlobal(object):
replace('xmlns="http://www.huawei.com/netconf/vrp"', "")
root = ElementTree.fromstring(xml_str)
server_ip_info["serverIpInfos"] = list()
syslog_servers = root.findall("data/syslog/syslogServers/syslogServer")
syslog_servers = root.findall("syslog/syslogServers/syslogServer")
if syslog_servers:
for syslog_server in syslog_servers:
server_dict = dict()
@ -1065,7 +1065,7 @@ class InfoCenterGlobal(object):
replace('xmlns="http://www.huawei.com/netconf/vrp"', "")
root = ElementTree.fromstring(xml_str)
server_domain_info["serverAddressInfos"] = list()
syslog_dnss = root.findall("data/syslog/syslogDNSs/syslogDNS")
syslog_dnss = root.findall("syslog/syslogDNSs/syslogDNS")
if syslog_dnss:
for syslog_dns in syslog_dnss:
dns_dict = dict()
@ -1172,7 +1172,7 @@ class InfoCenterGlobal(object):
root = ElementTree.fromstring(xml_str)
global_info = root.findall(
"data/syslog/globalParam")
"syslog/globalParam")
if global_info:
for tmp in global_info:
@ -1253,7 +1253,7 @@ class InfoCenterGlobal(object):
root = ElementTree.fromstring(xml_str)
logfile_info = root.findall(
"data/syslog/icLogFileInfos/icLogFileInfo")
"syslog/icLogFileInfos/icLogFileInfo")
if logfile_info:
for tmp in logfile_info:
for site in tmp:

@ -274,7 +274,7 @@ class InfoCenterLog(object):
root = ElementTree.fromstring(xml_str)
# get global param info
glb = root.find("data/syslog/globalParam")
glb = root.find("syslog/globalParam")
if glb:
for attr in glb:
if attr.tag in ["bufferSize", "logTimeStamp", "icLogBuffEn"]:
@ -282,7 +282,7 @@ class InfoCenterLog(object):
# get info-center source info
log_dict["source"] = dict()
src = root.find("data/syslog/icSources/icSource")
src = root.find("syslog/icSources/icSource")
if src:
for attr in src:
if attr.tag in ["moduleName", "icChannelId", "icChannelName", "logEnFlg", "logEnLevel"]:

@ -334,7 +334,7 @@ class InfoCenterTrap(object):
replace('xmlns="http://www.huawei.com/netconf/vrp"', "")
root = ElementTree.fromstring(xml_str)
global_cfg = root.findall("data/syslog/globalParam")
global_cfg = root.findall("syslog/globalParam")
if global_cfg:
for tmp in global_cfg:
tmp_dict = dict()
@ -417,7 +417,7 @@ class InfoCenterTrap(object):
replace('xmlns="http://www.huawei.com/netconf/vrp"', "")
root = ElementTree.fromstring(xml_str)
source_cfg = root.findall("data/syslog/icSources/icSource")
source_cfg = root.findall("syslog/icSources/icSource")
if source_cfg:
for tmp in source_cfg:
tmp_dict = dict()

Loading…
Cancel
Save