You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
set_reboot_linecard_parser=setsubparsers.add_parser('reboot-linecard', help='Reboot linecard from Supervisor')
2198
2203
set_reboot_linecard_parser.add_argument('slot', type=int, help='Linecard slot number starts from 1 to 8')
2199
2204
set_reboot_linecard_parser.add_argument('force', nargs='?', type=str, help='Continue without prompt for confirmation')
2205
+
2206
+
# set restart_lc_system_service
2207
+
set_restart_lc_system_service_parser=setsubparsers.add_parser('restart-lc-system-service', help='Restart linecard system service from Supervisor')
2208
+
set_restart_lc_system_service_parser.add_argument('slot', type=int, help='Linecard slot number starts from 1 to 8')
2209
+
set_restart_lc_system_service_parser.add_argument('service', type=str, help='Service filename. Current support: interfaces-config.service')
2200
2210
2201
2211
set_ndk_monitor_action_parser=setsubparsers.add_parser('ndk-monitor-action', help='Change the NDK monitor_action value (warn or reboot) in starup_debug.json file')
2202
2212
set_ndk_monitor_action_parser.add_argument('action', nargs='?', help='Choices: warn, reboot or default')
@@ -2394,10 +2404,26 @@ def main():
2394
2404
ifans.strip().upper() !="Y":
2395
2405
print("Operation abort!")
2396
2406
return
2397
-
2398
-
set_reboot_linecard(slot)
2407
+
2408
+
set_reboot_linecard(slot)
2409
+
elifargs.setcmd=='restart-lc-system-service':
2410
+
supported_list= ["interfaces-config.service"]
2411
+
ifnotnokia_common.is_cpm():
2412
+
print('Command is only supported on Supervisor card')
2413
+
return
2414
+
slot=d['slot']
2415
+
ifslot<1orslot>8:
2416
+
print("Error: Invalid slot number. Linecard slot number starts from 1 to 8")
2417
+
return
2418
+
service_name=d['service']
2419
+
ifservice_namenotinsupported_list:
2420
+
print("Error: Service name \"{}\" is not in supported list".format(service_name))
0 commit comments