Exemple #1
0
 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')
Exemple #2
0
 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')
Exemple #3
0
 def changePassword(self, username, password):
     return BASECISCO.addUser(
         self,
         username=username,
         password=password,
         addCommand=
         'user {username} password {password} role network-admin\n')
Exemple #4
0
 def changePassword(self, username, password):
     # Overriding methods
     return BASECISCO.addUser(
         self,
         username=username,
         password=password,
         addCommand='username {username} password {password}\n')
Exemple #5
0
 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')
Exemple #6
0
 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')
Exemple #7
0
 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')
Exemple #8
0
 def basicInfo(self):
     return BASECISCO.basicInfo(self, "show version")
Exemple #9
0
 def _commit(self):
     return BASECISCO._commit(
         self,
         saveCommand='copy running-config startup-config',
         exitCommand='end')
Exemple #10
0
 def changePassword(self, username, password):
     return BASECISCO.addUser(self,
                              username=username,
                              password=password,
                              addCommand='username {username} secret {password}\n')
Exemple #11
0
 def addUser(self, username, password):
     return BASECISCO.addUser(
         self,
         username=username,
         password=password,
         addCommand='username {username} password {password}\n')