Skip to content

Commit

Permalink
Add base class implementation for local users' passwords reset
Browse files Browse the repository at this point in the history
  • Loading branch information
azmyali98 committed May 7, 2024
1 parent 655a5ff commit d933770
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions sonic_platform_base/local_users_passwords_reset_base.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
'''
local_users_passwords_reset_base.py
Abstract base class for implementing platform-specific
local users' passwords reset base functionality for SONiC
'''


class LocalUsersConfigurationResetBase(object):
"""
Abstract base class for resetting local users' passwords on the switch
"""
def should_trigger(self):
'''
define the condition to trigger
'''
# the condition to trigger start() method, the default implementation will be by checking if a long reboot press was detected.
raise NotImplementedError

def start(self):
'''
define the functionality
'''
# the implementation of deleting non-default users and restoring original passwords for default users and expiring them
raise NotImplementedError

0 comments on commit d933770

Please sign in to comment.