mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-09 01:44:03 -07:00
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:
parent
c144adc9de
commit
9aa8c652ba
23 changed files with 54 additions and 113 deletions
|
@ -140,15 +140,15 @@ from copy import deepcopy
|
|||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.network.common.utils import remove_default_spec
|
||||
from ansible.module_utils.network.junos.junos import junos_argument_spec, get_connection
|
||||
from ansible.module_utils.network.junos.junos import junos_argument_spec, get_connection, tostring
|
||||
from ansible.module_utils.network.junos.junos import commit_configuration, discard_changes
|
||||
from ansible.module_utils.network.junos.junos import load_config, locked_config
|
||||
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
|
||||
|
||||
ROLES = ['operator', 'read-only', 'super-user', 'unauthorized']
|
||||
USE_PERSISTENT_CONNECTION = True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue