Ejemplo n.º 1
0
        public void @Start_Traffic([Alias("Block")][ParameterDefaultValue("False")]  Bool @Block, [Alias("ExecuteCommand_output")] out string @ExecuteCommand_output)
        {
            lock (m_Start_TrafficFunctionInterpreterLock)
            {
                if (m_Start_TrafficFunctionInterpreter == null)
                {
                    m_Start_TrafficFunctionInterpreter = CreateFunctionInterpreter("IXN\\ixNetwork\\Traffic\\Start Traffic.tsdrv");
                }
            }
            Guid callId = Guid.Empty;

            if (CancellationContext.Current != null)
            {
                callId = CancellationContext.Current.CallId;
            }
            Dictionary <string, object> inputNamesValues = new Dictionary <string, object>();

            inputNamesValues["Block"] = @Block;
            Dictionary <string, Type> outputNamesTypes = new Dictionary <string, Type>();

            outputNamesTypes["ExecuteCommand.output"] = typeof(string);
            Dictionary <string, object> outputNamesValues = m_Start_TrafficFunctionInterpreter.Run(callId, inputNamesValues, outputNamesTypes);

            @ExecuteCommand_output = (string)outputNamesValues["ExecuteCommand.output"];
        }
Ejemplo n.º 2
0
        public void @set([Alias("CloudShell Server")]  string @server, [Alias("Sandbox ID")]  string @sandboxID, [Alias("Username")]  string @APIUsername, [Alias("Password")]  string @APIPassword, [Alias("Domain")]  string @APIDomain1)
        {
            lock (m_setFunctionInterpreterLock)
            {
                if (m_setFunctionInterpreter == null)
                {
                    m_setFunctionInterpreter = CreateFunctionInterpreter("IXN\\Session\\set.tsdrv");
                }
            }
            Guid callId = Guid.Empty;

            if (CancellationContext.Current != null)
            {
                callId = CancellationContext.Current.CallId;
            }
            Dictionary <string, object> inputNamesValues = new Dictionary <string, object>();

            inputNamesValues["server"]      = @server;
            inputNamesValues["sandboxID"]   = @sandboxID;
            inputNamesValues["APIUsername"] = @APIUsername;
            inputNamesValues["APIPassword"] = @APIPassword;
            inputNamesValues["APIDomain"]   = @APIDomain1;
            Dictionary <string, Type>   outputNamesTypes  = new Dictionary <string, Type>();
            Dictionary <string, object> outputNamesValues = m_setFunctionInterpreter.Run(callId, inputNamesValues, outputNamesTypes);
        }
Ejemplo n.º 3
0
        public void @Get_Statistics([Alias("View Name")][ParameterDefaultValue("summary")]  string @View_Name, [Alias("Output Type")][ParameterDefaultValue("csv")]  OutputType @Output_Type, [Alias("CommandOutput")] out string @CommandOutput)
        {
            lock (m_Get_StatisticsFunctionInterpreterLock)
            {
                if (m_Get_StatisticsFunctionInterpreter == null)
                {
                    m_Get_StatisticsFunctionInterpreter = CreateFunctionInterpreter("IXN\\ixNetwork\\Statistics\\Get Statistics.tsdrv");
                }
            }
            Guid callId = Guid.Empty;

            if (CancellationContext.Current != null)
            {
                callId = CancellationContext.Current.CallId;
            }
            Dictionary <string, object> inputNamesValues = new Dictionary <string, object>();

            inputNamesValues["ViewName"]   = @View_Name;
            inputNamesValues["OutputType"] = @Output_Type;
            Dictionary <string, Type> outputNamesTypes = new Dictionary <string, Type>();

            outputNamesTypes["ExecuteCommand.output"] = typeof(string);
            Dictionary <string, object> outputNamesValues = m_Get_StatisticsFunctionInterpreter.Run(callId, inputNamesValues, outputNamesTypes);

            @CommandOutput = (string)outputNamesValues["ExecuteCommand.output"];
        }
Ejemplo n.º 4
0
        public void @Load_Configuration([Alias("Breaking Point config file")][Mandatory]  string @Breaking_Point_config_file, [Alias("ExecuteCommand_output")] out string @ExecuteCommand_output)
        {
            lock (m_Load_ConfigurationFunctionInterpreterLock)
            {
                if (m_Load_ConfigurationFunctionInterpreter == null)
                {
                    m_Load_ConfigurationFunctionInterpreter = CreateFunctionInterpreter("IXN\\ixNetwork\\Config\\Load Configuration.tsdrv");
                }
            }
            Guid callId = Guid.Empty;

            if (CancellationContext.Current != null)
            {
                callId = CancellationContext.Current.CallId;
            }
            Dictionary <string, object> inputNamesValues = new Dictionary <string, object>();

            inputNamesValues["ConfigFile"] = @Breaking_Point_config_file;
            Dictionary <string, Type> outputNamesTypes = new Dictionary <string, Type>();

            outputNamesTypes["ExecuteCommand.output"] = typeof(string);
            Dictionary <string, object> outputNamesValues = m_Load_ConfigurationFunctionInterpreter.Run(callId, inputNamesValues, outputNamesTypes);

            @ExecuteCommand_output = (string)outputNamesValues["ExecuteCommand.output"];
        }
Ejemplo n.º 5
0
        public void @kill()
        {
            lock (m_killFunctionInterpreterLock)
            {
                if (m_killFunctionInterpreter == null)
                {
                    m_killFunctionInterpreter = CreateFunctionInterpreter("IXN\\Session\\kill.tsdrv");
                }
            }
            Guid callId = Guid.Empty;

            if (CancellationContext.Current != null)
            {
                callId = CancellationContext.Current.CallId;
            }
            Dictionary <string, object> inputNamesValues  = new Dictionary <string, object>();
            Dictionary <string, Type>   outputNamesTypes  = new Dictionary <string, Type>();
            Dictionary <string, object> outputNamesValues = m_killFunctionInterpreter.Run(callId, inputNamesValues, outputNamesTypes);
        }
Ejemplo n.º 6
0
        public void @Stop_Traffic()
        {
            lock (m_Stop_TrafficFunctionInterpreterLock)
            {
                if (m_Stop_TrafficFunctionInterpreter == null)
                {
                    m_Stop_TrafficFunctionInterpreter = CreateFunctionInterpreter("IXN\\ixNetwork\\Traffic\\Stop Traffic.tsdrv");
                }
            }
            Guid callId = Guid.Empty;

            if (CancellationContext.Current != null)
            {
                callId = CancellationContext.Current.CallId;
            }
            Dictionary <string, object> inputNamesValues  = new Dictionary <string, object>();
            Dictionary <string, Type>   outputNamesTypes  = new Dictionary <string, Type>();
            Dictionary <string, object> outputNamesValues = m_Stop_TrafficFunctionInterpreter.Run(callId, inputNamesValues, outputNamesTypes);
        }
Ejemplo n.º 7
0
        public IXN()
        {
            m_DriverIdentifier = Guid.NewGuid();

            Type runtimeType        = DriverRuntimeAssembly.GetType(DriverRuntimeTypeName);
            bool IsSupportedVersion = (bool)runtimeType.GetMethod("IsSupportedRuntimeVersion").Invoke(null, new object[] { "8.2.0" });

            if (!IsSupportedVersion)
            {
                throw TestShellRuntimeLocator.NoMatchingRuntimeException("8.2.0");
            }

            runtimeType.GetMethod("InitializeRuntime").Invoke(null, new object[] { Assembly.GetExecutingAssembly().CodeBase, "IXN", m_DriverIdentifier.ToString() });

            m_Load_ConfigurationFunctionInterpreter = CreateFunctionInterpreter("IXN\\ixNetwork\\Config\\Load Configuration.tsdrv");
            m_Send_ARPFunctionInterpreter           = CreateFunctionInterpreter("IXN\\ixNetwork\\Protocols\\Send ARP.tsdrv");
            m_Start_ProtocolsFunctionInterpreter    = CreateFunctionInterpreter("IXN\\ixNetwork\\Protocols\\Start Protocols.tsdrv");
            m_Get_StatisticsFunctionInterpreter     = CreateFunctionInterpreter("IXN\\ixNetwork\\Statistics\\Get Statistics.tsdrv");
            m_Start_TrafficFunctionInterpreter      = CreateFunctionInterpreter("IXN\\ixNetwork\\Traffic\\Start Traffic.tsdrv");
            m_Stop_TrafficFunctionInterpreter       = CreateFunctionInterpreter("IXN\\ixNetwork\\Traffic\\Stop Traffic.tsdrv");
            m_killFunctionInterpreter = CreateFunctionInterpreter("IXN\\Session\\kill.tsdrv");
            m_setFunctionInterpreter  = CreateFunctionInterpreter("IXN\\Session\\set.tsdrv");
        }
Ejemplo n.º 8
0
        public void @Start_Protocols([Alias("CommandOutput")] out string @CommandOutput)
        {
            lock (m_Start_ProtocolsFunctionInterpreterLock)
            {
                if (m_Start_ProtocolsFunctionInterpreter == null)
                {
                    m_Start_ProtocolsFunctionInterpreter = CreateFunctionInterpreter("IXN\\ixNetwork\\Protocols\\Start Protocols.tsdrv");
                }
            }
            Guid callId = Guid.Empty;

            if (CancellationContext.Current != null)
            {
                callId = CancellationContext.Current.CallId;
            }
            Dictionary <string, object> inputNamesValues = new Dictionary <string, object>();
            Dictionary <string, Type>   outputNamesTypes = new Dictionary <string, Type>();

            outputNamesTypes["genericNoInputCmd1.CommandOutput"] = typeof(string);
            Dictionary <string, object> outputNamesValues = m_Start_ProtocolsFunctionInterpreter.Run(callId, inputNamesValues, outputNamesTypes);

            @CommandOutput = (string)outputNamesValues["genericNoInputCmd1.CommandOutput"];
        }