ginger icon indicating copy to clipboard operation
ginger copied to clipboard

Ginger not able to parse SuSE network files

Open ramonmedeiros opened this issue 8 years ago • 0 comments

at model/nw_cfginterfaces_utils.py:

 362     def read_ifcfg_file(self, interface_name):
 363         cfgmap = {}
 364         wok_log.info('Reading ifcfg file for interface ' + interface_name)
 365         filename = ifcfg_filename_format % interface_name
 366         # TODO file pattern to be changed to parse the device name inside
 367         # files rather than filename
 368         ifcfg_file_pattern = network_configpath + filename + '/*'
 369         fileexist = os.path.isfile(os.sep + network_configpath + filename)
 370         if (not fileexist):
 371             wok_log.info('ifcfg file not exist for'
 372                          ' interface :' + interface_name)
 373             return cfgmap
 374         # load everytime to reflect the current configuration in folder
 375         try:
 376             gingerNetworkLock.acquire()
 377             parser.load()
 378             listout = parser.match(decode_value(ifcfg_file_pattern))
 379             if not listout:
 380                 wok_log.info('No attributes present in ifcfg file for '
 381                              'interface :' + interface_name)
 382                 return cfgmap
 383             for single in listout:
 384                 single = decode_value(single)
 385                 labelVal = parser.get(single)
 386                 labelVal = self.trim_quotes(labelVal)
 387                 cfgmap[parser.label(single)] = labelVal

Line 378 is null due ifcfg_file_pattern not matching

ramonmedeiros avatar Jan 04 '17 15:01 ramonmedeiros