예제 #1
0
 protected override void OpenConnectionProvider(IList<IConnectionProvider> connectionContext, TargetInfo target)
 {
     if (!target.ContainsKey(TargetParameters.PortNum.ToString()))
         target.Add("PortNum", "23");
     this.TargetInfo = target;
     base.ConnectionProvider = this.ConnectionManager.Connect<CiscoIOSConnectionProvider>(connectionContext, target);
 }
        private TargetInfo CreateTargetInfo()
        {
            TargetInfo target = new TargetInfo();

            target.Add("HostName", "mss-rj-215");
            return(target);
        }
예제 #3
0
 protected override void OpenConnectionProvider(IList <IConnectionProvider> connectionContext, TargetInfo target)
 {
     if (!target.ContainsKey(TargetParameters.PortNum.ToString()))
     {
         target.Add("PortNum", "23");
     }
     this.TargetInfo         = target;
     base.ConnectionProvider = this.ConnectionManager.Connect <CiscoIOSConnectionProvider>(connectionContext, target);
 }
 public SystemInformation GetSystemInformationFrom(TargetInfo target)
 {
     if (target.ContainsKey("PortNum"))
     {
         target["PortNum"] = "23";
     }
     else
     {
         target.Add("PortNum", "23");
         
     } 
     
     CiscoIOSConnectionProvider connectionProvider = new CiscoIOSConnectionProvider();
     connectionProvider.Connect(target);
     CiscoIOSVersion myVersion = CiscoIOSHelper.CiscoGetVersion(connectionProvider.TelnetConnection);
     IList<NetworkInterface> myInterfaces = CiscoIOSHelper.CiscoGetInterfaces(connectionProvider.TelnetConnection);
     return this.CreateSystemInformationInstance(myVersion, myInterfaces);
 }
예제 #5
0
        public SystemInformation GetSystemInformationFrom(TargetInfo target)
        {
            if (target.ContainsKey("PortNum"))
            {
                target["PortNum"] = "23";
            }
            else
            {
                target.Add("PortNum", "23");
            }

            CiscoIOSConnectionProvider connectionProvider = new CiscoIOSConnectionProvider();

            connectionProvider.Connect(target);
            CiscoIOSVersion          myVersion    = CiscoIOSHelper.CiscoGetVersion(connectionProvider.TelnetConnection);
            IList <NetworkInterface> myInterfaces = CiscoIOSHelper.CiscoGetInterfaces(connectionProvider.TelnetConnection);

            return(this.CreateSystemInformationInstance(myVersion, myInterfaces));
        }