def addUser(self, username='', password='', admin=False): # default is not admin if admin: return BASESSHV2.addUser( self, username=username, password=password, addCommand= 'user {username} password {password} role network-admin\n') else: return BASESSHV2.addUser( self, username=username, password=password, addCommand='user {username} password {password} role priv-1\n')
def changePassword(self, username='', password=''): return BASESSHV2.addUser( self, username=username, password=password, addCommand= 'user {username} password {password} role network-admin\n')
def _configMode(self): return BASESSHV2._configMode(self,"""sys\naaa""")
def changePassword(self, username='', password=''): return BASESSHV2.addUser( self, username=username, password=password, addCommand='username {username} secret {password}\n')
def _commit(self): return BASESSHV2._commit( self, saveCommand='copy running-config startup-config', exitCommand='end')
def addUser(self,username = '',password = ''): return BASESSHV2.addUser(self,username = username,password = password,addCommand = 'username {username} password {password}\n')