def addUser(self, username, password, admin=False): # default is not admin if admin: return BASECISCO.addUser(self, username=username, password=password, addCommand='user {username} password {password} role network-admin\n') else: return BASECISCO.addUser(self, username=username, password=password, addCommand='user {username} password {password} role priv-1\n')
def addUser(self, username, password, admin=False): """Because the device of this model is different from the other Cisco devices in creating user parameters, it is rewritten. """ # default not is Admin if admin: return BASECISCO.addUser(self, username=username, password=password, addCommand='user {username} password {password} role network-admin\n') else: return BASECISCO.addUser(self, username=username, password=password, addCommand='user {username} password {password} role priv-1\n')
def changePassword(self, username, password): return BASECISCO.addUser( self, username=username, password=password, addCommand= 'user {username} password {password} role network-admin\n')
def changePassword(self, username, password): # Overriding methods return BASECISCO.addUser( self, username=username, password=password, addCommand='username {username} password {password}\n')
def _commit(self): """Because the device of this model is different from the other Cisco devices in commit parameters, it is rewritten. """ return BASECISCO._commit(self, saveCommand='copy running-config startup-config', exitCommand='end')
def changePassword(self, username, password): """Because the device of this model is different from the other Cisco devices in deleting user parameters, it is rewritten. """ return BASECISCO.addUser(self, username=username, password=password, addCommand='username {username} secret {password}\n')
def changePassword(self, username, password): """Because the device of this model is different from the other Cisco devices in change user's password parameters, it is rewritten. """ return BASECISCO.addUser(self, username=username, password=password, addCommand='user {username} password {password} role network-admin\n')
def basicInfo(self): return BASECISCO.basicInfo(self, "show version")
def _commit(self): return BASECISCO._commit( self, saveCommand='copy running-config startup-config', exitCommand='end')
def changePassword(self, username, password): return BASECISCO.addUser(self, username=username, password=password, addCommand='username {username} secret {password}\n')
def addUser(self, username, password): return BASECISCO.addUser( self, username=username, password=password, addCommand='username {username} password {password}\n')