'Get current dldp existed configuration'

def get_dldp_exist_config(self):

    dldp_conf = dict()
    xml_str = CE_NC_GET_GLOBAL_DLDP_CONFIG
    con_obj = get_nc_config(self.module, xml_str)
    if ('<data/>' in con_obj):
        return dldp_conf
    xml_str = con_obj.replace('\r', '').replace('\n', '').replace('xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"', '').replace('xmlns="http://www.huawei.com/netconf/vrp"', '')
    root = ElementTree.fromstring(xml_str)
    topo = root.find('data/dldp/dldpSys')
    if (not topo):
        self.module.fail_json(msg='Error:    Get    current    DLDP    configration    failed.')
    for eles in topo:
        if (eles.tag in ['dldpEnable', 'dldpInterval', 'dldpWorkMode', 'dldpAuthMode']):
            if (eles.tag == 'dldpEnable'):
                if (eles.text == 'true'):
                    value = 'enable'
                else:
                    value = 'disable'
            else:
                value = eles.text
            dldp_conf[eles.tag] = value
    return dldp_conf
