'Get interface information'

def get_interface_info(self):

    xml_str = (CE_NC_GET_INT_STATISTICS % self.interface.upper())
    con_obj = get_nc_config(self.module, xml_str)
    if ('<data/>' in con_obj):
        self.module.fail_json(msg=('Error:    %s    interface    does    not    exist.' % self.interface.upper()))
        return
    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)
    intf_info = root.find('data/ifm/interfaces/interface')
    if intf_info:
        for eles in intf_info:
            if (eles.tag in ['ifDynamicInfo', 'ifStatistics', 'ifClearedStat']):
                if (eles.tag == 'ifDynamicInfo'):
                    self.get_intf_dynamic_info(eles, self.interface)
                elif (eles.tag == 'ifStatistics'):
                    self.get_intf_statistics_info(eles, self.interface)
                elif (eles.tag == 'ifClearedStat'):
                    self.get_intf_cleared_stat(eles, self.interface)
