-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
Use ifcfg script name in case DEVICE parameter is not specified on redhat network_config provider #90
Conversation
In terms of the proposed feature, this is consistent with how
At first glance, I don't think the fixture I suspect the other test failures will be resolved by rebasing on the current master. |
I agree, the fixture is not testing anything at all ... I don't remember why I wrote it this way. I will rewrite the test to actually do something. |
Another issue occurred to me, which is how should flushing behave if the interface file doesn't already have |
For now the device is always flushed but maybe we can leave this decision to the user. I don't have a strong opinion but maybe we can have something like this as default behaviour: if the DEVICE is not there, don't insert it; if the DEVICE is there, leave it. In case of new configuration I really don't know what would be the best behaviour. Probably, to be consistent with the previous two cases it would be better not to add it? In addition we could have a new parameter "force_device" that will force the device to be always inserted. |
…dhat network_config provider In network_config redhat provider, if DEVICE is not present in a ifcfg script file, filemapper will fail to parse that file. With this change, if the parameter is not present, the name of the ifcfg file itself is used. Fixes #89
Is there any use case where the DEVICE declaration must be omitted? |
For what I can see these files without DEVICE are generated by anaconda. In case an ifcfg file is missing for a certain device anaconda dumps the corresponding connection from networkmanager after renaming it using the device name. I don't really know how this works exactly but I think that for connections regarding disconnected devices the DEVICE field is not configured.
I don't think there is a use case where it's mandatory to omit DEVICE. Setting it and reloading the configuration seems not to change anything. |
Use ifcfg script name in case DEVICE parameter is not specified on redhat network_config provider
In network_config redhat provider, if DEVICE is not present in a ifcfg script file, filemapper
will fail to parse that file. With this change, if the parameter is not present, the name of
the ifcfg file itself is used.