fix(deploy): unauth health poll, validate-before-gate, fullmatch names, reload-only-on-ok
This commit is contained in:
@@ -4899,13 +4899,15 @@ def h_profile_restore(ctx):
|
||||
name = (body.get('name') or '').strip()
|
||||
if not name:
|
||||
return 400, {'error': 'profile name is required'}
|
||||
mk8_gate.enter('restore_profile')
|
||||
try:
|
||||
result = mk8_profiles.restore(name)
|
||||
mk8_profiles._path(name)
|
||||
except ValueError as exc:
|
||||
return 400, {'error': str(exc)}
|
||||
device_run(['wifi', 'reload'], timeout=45)
|
||||
mk8_gate.enter('restore_profile')
|
||||
result = mk8_profiles.restore(name)
|
||||
ok = bool(result.get('ok'))
|
||||
if ok:
|
||||
device_run(['wifi', 'reload'], timeout=45)
|
||||
try:
|
||||
mk8_events.log_event('profile_restore',
|
||||
sev='info' if ok else 'warn',
|
||||
|
||||
Reference in New Issue
Block a user