Beispiel #1
0
 def __init__(self, name, attrs, logger=None, logpath=None):  # '10.245.34.201'
     TclInter.__init__(self, name, attrs, logger, logpath)
     self.msg = []
     if attrs.get('IP'):
         self.iphost = attrs['IP']
     if attrs.get("version"):
         self.version = attrs["version"]
     self.streamOut =''
Beispiel #2
0
 def __init__(self,
              name,
              attrs,
              logger=None,
              logpath=None):  # '10.245.34.201'
     TclInter.__init__(self, name, attrs, logger, logpath)
     self.msg = []
     if attrs.get('IP'):
         self.iphost = attrs['IP']
     if attrs.get("version"):
         self.version = attrs["version"]
     self.streamOut = ''
Beispiel #3
0
tcltk()
from dut import dut

from winTelnet import winTelnet

a = dut("base", {}, logpath=logpath)
try:
    wt = winTelnet("a", {"CMD": "telnet 127.0.0.1"}, logpath=logpath)
except Exception as e:
    print(traceback.format_exc())

from TclInter import TclInter

try:
    ti = TclInter("a", {}, logpath=logpath)
    ti.closeSession()
except Exception as e:
    print(traceback.format_exc())

from IxNetwork import IxNetwork

try:
    ix = IxNetwork("a", {}, logpath=logpath)
    ix.closeSession()
except Exception as e:
    print(traceback.format_exc())

try:
    import ssh
Beispiel #4
0
    def __init__(self):
        Tk.__init__(self, None, None, 'Tk', 0)
tcltk()
from dut import dut

from winTelnet import winTelnet

a =dut('base', {}, logpath=logpath)
try:
    wt = winTelnet('a',{'CMD':'telnet 127.0.0.1'}, logpath=logpath)
except Exception as e:
    print(traceback.format_exc())

from TclInter import TclInter
try:
    ti = TclInter('a',{}, logpath=logpath)
    ti.closeSession()
except Exception as e:
    print(traceback.format_exc())

from IxNetwork import IxNetwork
try:
    ix = IxNetwork('a',{}, logpath=logpath)
    ix.closeSession()
except Exception as e:
    print(traceback.format_exc())

try:
    import  ssh
    client = ssh.SSHClient()
    client.set_missing_host_key_policy(ssh.WarningPolicy())
Beispiel #5
0
 def __init__(self, name,attrs,logger=None, logpath=None):#'10.245.34.201'
     TclInter.__init__(self, name, attrs, logger, logpath)
     if attrs.get('IP'):
         self.iphost = attrs['IP']