Skip to content

Commit 693cee0

Browse files
committed
Replace the parameter name and consequently revert the logic (details below)
xe-reset-networking: allow the user to perform a network reset without renaming the management interface There are some use cases according to which the user would like to perform a network reconfiguration of the management interface by preventing the reset of the management interface's name. This commit allows the user to run the xe-reset-networking script by requesting the aforementioned behavior. Signed-off-by: Stefanos Gerangelos <[email protected]>
1 parent 61cab92 commit 693cee0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

python3/bin/xe-reset-networking

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ if __name__ == "__main__":
9191
parser.add_option("--gateway", help="Gateway for new management interface", dest="gateway", default='')
9292
parser.add_option("--gateway-v6", help="IPv6 Gateway for new management interface", dest="gateway_v6", default='')
9393
parser.add_option("--dns", help="DNS server for new management interface", dest="dns", default='')
94-
parser.add_option("--keep-interface-name", help="do not rename the interface name", dest="keep_interface_name", action="store_const", const=True, default=False)
94+
parser.add_option("--reset-interface-name-rules", help="Reset the management interface name", dest="reset_interface_name_rules", action="store_const", const=True, default=True)
9595
(options, args) = parser.parse_args()
9696

9797
# Determine pool role
@@ -175,7 +175,7 @@ if __name__ == "__main__":
175175
if not os.access('/tmp/fist_network_reset_no_warning', os.F_OK):
176176
configuration = []
177177
configuration.append("Management interface: " + device)
178-
if not options.keep_interface_name:
178+
if not options.reset_interface_name_rules:
179179
configuration.append("Rename interface: Yes")
180180
else:
181181
configuration.append("Rename interface: No")
@@ -294,7 +294,7 @@ Type 'no' to cancel.
294294
# Reset the domain 0 network interface naming configuration
295295
# back to a fresh-install state for the currently-installed
296296
# hardware (unless prevented by the user).
297-
if not options.keep_interface_name:
297+
if not options.reset_interface_name_rules:
298298
os.system(f"{RENAME_SCRIPT} --reset-to-install")
299299

300300
# Reboot

0 commit comments

Comments
 (0)