Netconf bytes fixes (#41607)

* Solve some bytes issues on iosxr

* Solve some bytes issues in junos

* Do the correct thing with tostring based on lxml or not
This commit is contained in:
Nathaniel Case 2018-06-22 11:50:44 -04:00 committed by GitHub
parent c144adc9de
commit 9aa8c652ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 54 additions and 113 deletions

View file

@ -81,16 +81,16 @@ ansible_facts:
"""
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.network.common.netconf import exec_rpc
from ansible.module_utils.network.junos.junos import junos_argument_spec, get_param
from ansible.module_utils.network.junos.junos import junos_argument_spec, get_param, tostring
from ansible.module_utils.network.junos.junos import get_configuration, get_connection
from ansible.module_utils._text import to_native
from ansible.module_utils.six import iteritems
try:
from lxml.etree import Element, SubElement, tostring
from lxml.etree import Element, SubElement
except ImportError:
from xml.etree.ElementTree import Element, SubElement, tostring
from xml.etree.ElementTree import Element, SubElement
try:
from jnpr.junos import Device