fdutils/xml.py
def create_and_upload_xml_file(device, local_file_name, remote_file_name, xml_element_root):
    """  From an lxml object creates an xml file and upload to a server

    """
    log.info('Creating new XML file ' + local_file_name)
    new_file = open(local_file_name, 'w')
    new_file.write(ET.tostring(xml_element_root, pretty_print=True, encoding='utf-8'))
    new_file.close()

    log.debug('Sending a copy of the file to the RDU and overwriting the old pmg-profile.xml file')
    device.upload([local_file_name], [remote_file_name])
  From an lxml object creates an xml file and upload to a server

    
From an lxml object creates an xml file and upload to a server
From an lxml object creates an xml file and upload to a server
def create_and_upload_xml_file(device, local_file_name, remote_file_name, xml_element_root):
    log.info('Creating new XML file ' + local_file_name)
    new_file = open(local_file_name, 'w')
    new_file.write(ET.tostring(xml_element_root, pretty_print=True, encoding='utf-8'))
    new_file.close()
    log.debug('Sending a copy of the file to the RDU and overwriting the old pmg-profile.xml file')
    device.upload([local_file_name], [remote_file_name])
def create_and_upload_xml_file ( device , local_file_name , remote_file_name , xml_element_root ) : log . info ( 'Creating new XML file ' + local_file_name ) new_file = open ( local_file_name , 'w' ) new_file . write ( ET . tostring ( xml_element_root , pretty_print = True , encoding = 'utf-8' ) ) new_file . close ( ) log . debug ( 'Sending a copy of the file to the RDU and overwriting the old pmg-profile.xml file' ) device . upload ( [ local_file_name ] , [ remote_file_name ] )
From an lxml object creates an xml file and upload to a server
From an lxml object creates an xml file and upload to a server
"""  From an lxml object creates an xml file and upload to a server

    """
device
local_file_name
remote_file_name
xml_element_root