Skip to content

Commit d933770

Browse files
committed
Add base class implementation for local users' passwords reset
1 parent 655a5ff commit d933770

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
'''
2+
local_users_passwords_reset_base.py
3+
4+
Abstract base class for implementing platform-specific
5+
local users' passwords reset base functionality for SONiC
6+
'''
7+
8+
9+
class LocalUsersConfigurationResetBase(object):
10+
"""
11+
Abstract base class for resetting local users' passwords on the switch
12+
"""
13+
def should_trigger(self):
14+
'''
15+
define the condition to trigger
16+
'''
17+
# the condition to trigger start() method, the default implementation will be by checking if a long reboot press was detected.
18+
raise NotImplementedError
19+
20+
def start(self):
21+
'''
22+
define the functionality
23+
'''
24+
# the implementation of deleting non-default users and restoring original passwords for default users and expiring them
25+
raise NotImplementedError

0 commit comments

Comments
 (0)