Beispiel #1
0
 def test_topology_ha_connect_with_custom_auth_prompt(self):
     md = MockDeviceTcpWrapper(device_os='ios',
                               port=0,
                               state='custom_login,exec_standby')
     md.start()
     template_testbed = """
     devices:
       Router:
         os: ios
         type: router
         tacacs:
           username: cisco
           login_prompt: 'Identifier:'
           password_prompt: 'Passe:'
         passwords:
           tacacs: cisco
           enable: cisco
         connections:
           defaults:
             class: unicon.Unicon
           a:
             protocol: telnet
             ip: 127.0.0.1
             port: {}
           b:
             protocol: telnet
             ip: 127.0.0.1
             port: {}
     """.format(md.ports[0], md.ports[1])
     t = loader.load(template_testbed)
     d = t.devices['Router']
     d.connect()
     d.disconnect()
     md.stop()
Beispiel #2
0
 def test_clear_line_enable_password(self):
     md = MockDeviceTcpWrapper(device_os='ios',
                               port=0,
                               state='console_test_enable',
                               vty=True)
     md.start()
     term_server = "127.0.0.1 " + str(md.ports[0])
     self.utils.clear_line(term_server, 35, 'admin', 'lab', 'enpasswd')
     md.stop()
Beispiel #3
0
 def test_clear_line_username_password(self):
     md = MockDeviceTcpWrapper(device_os='ios',
                               port=0,
                               state='ts_login',
                               vty=True)
     md.start()
     term_server = "127.0.0.1 " + str(md.ports[0])
     self.utils.clear_line(term_server, 35, 'admin', 'lab', 'cisco')
     md.stop()