# (填注释)def netconfig_config_syslog_host(device_ip, username, password, log_server):
rpc_content = '''
<edit-config>
<target>
<running/>
</target>
<config>
<syslog:syslog xmlns:syslog="urn:ietf:params:xml:ns:yang:ietf-syslog">
<syslog:log-actions>
<syslog:remote>
<syslog:destination>
<syslog:name>syslog_host</syslog:name>
<syslog:udp>
<syslog:address>{}</syslog:address>
<syslog:port>43</syslog:port>
</syslog:udp>
<syslog:destination-facility xmlns:ietf-syslog-types="urn:ietf:params:xml:ns:yang:ietf-syslog-types">ietf-syslog-types:local0</syslog:destination-facility>
</syslog:destination>
</syslog:remote>
</syslog:log-actions>
</syslog:syslog>
</config>
</edit-config>
'''.format(log_server)
print('Using NETCONF for configuration syslog host node...')
netconf_by_rpc(device_ip, username, password, rpc_content)