Update junos module utils (#58730)

*  Add utils fucntion to build xml
   subtree
pull/58750/head
Ganesh Nalawade 5 years ago committed by GitHub
parent 1bd91279d0
commit ff4001f470
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -27,6 +27,14 @@ def build_child_xml_node(parent, tag, text=None, attrib=None):
return element
def build_subtree(parent, path):
element = parent
for field in path.split('/'):
sub_element = build_child_xml_node(element, field)
element = sub_element
return element
def _handle_field_replace(root, field, have, want, tag=None):
tag = field if not tag else tag
want_value = want.get(field) if want else None

Loading…
Cancel
Save