xe-reset-networking: Allow the user to perform a network reset without renaming the management interface#6852
Conversation
c9dfa97 to
693cee0
Compare
fee2270 to
4d92f24
Compare
python3/bin/xe-reset-networking
Outdated
| if not options.reset_interface_name_rules: | ||
| configuration.append("Rename interface rules: Yes") | ||
| else: | ||
| configuration.append("Rename interface rules: No") |
There was a problem hiding this comment.
| configuration.append("Rename interface rules: No") | |
| if options.reset_interface_name_rules: | |
| configuration.append("Reset interface name rules: Yes") | |
| else: | |
| configuration.append("Reset interface name rules: No") |
I prefer Reset interface name rules against Rename interface rules. I don't quite understand the current one.
At last, please squash the commits into one.
There was a problem hiding this comment.
Oops, I missed the logic in the confirmation message. I will fix it. Also, I will update your suggestion in the confirmation message. Although, it won't align correctly with the previous/next parameters printouts.
On a more fundamental note, I realized that by making --reset-interface-name-rules to default to True, essentially there is no way to let the user to avoid this behavior. So, either we will fall back to a parameter that defaults to False or we can have a parameter that has an additional argument passed to denote if the reset will take place or not.
There was a problem hiding this comment.
--reset-interface-name-rules default with True is same with your initial --keep-interface-name default with False. I don't think it's different with your initial version.
Sorry, I’m getting a little tired of this review... I think I have already clarified the case.
There was a problem hiding this comment.
--reset-interface-name-rulesdefault with True is same with your initial--keep-interface-namedefault with False. I don't think it's different with your initial version.
No, it is not the same. With --reset-interface-name-rules both the default behavior and when the user passes --reset-interface-name-rules, results in the reset operation. There is no way for the user to request NOT to reset (e.g. --reset-interface-name-rules=false does not work). With --keep-interface-name this is not the case.
Sorry, I’m getting a little tired of this review... I think I have already clarified the case.
No worries, just let me know how (or if) you want to proceed.
There was a problem hiding this comment.
OK, my bad. const=True will ignore =false. Go ahead use keep-interface-name-rules or sth that supports accepting false value. I'm fine.
There was a problem hiding this comment.
Done, pushed 2nd time to update the variable name as well.
4d92f24 to
d7d54e6
Compare
renaming the interface There are some use cases according to which the user would like to perform a network reset by keeping the interface's name intact (prevent reseting the interface name rules). This commit allows the user to run the xe-reset-networking script by requesting the aforementioned behavior. Signed-off-by: Stefanos Gerangelos <stefanos.gerangelos@vates.tech>
d7d54e6 to
af03630
Compare
There are some use cases according to which the user would like to perform a network reconfiguration of the management interface by keeping the interface's name intact. This commit allows the user to run the xe-reset-networking script by requesting the aforementioned behavior.