Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ginger not able to parse SuSE network files #524

Open
ramonmedeiros opened this issue Jan 4, 2017 · 0 comments
Open

Ginger not able to parse SuSE network files #524

ramonmedeiros opened this issue Jan 4, 2017 · 0 comments

Comments

@ramonmedeiros
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant