aboutsummaryrefslogtreecommitdiffstats
path: root/docs/reference/cmdreference/interface/hardware.rst
AgeCommit message (Collapse)AuthorFilesLines
2018-10-26docs: add useful debug CLI Review UpdatesScott Keeler1-14/+17
Change-Id: I4ebd977672090f2a7fc08bb139832df39614564a Signed-off-by: Scott Keeler <skeeler@cisco.com>
2018-10-24docs: add useful debug CLIScott Keeler1-14/+69
Change-Id: I5ef9ecd741f1623ae1b7a23fa0a4fa6db7e243a3 Signed-off-by: Scott Keeler <skeeler@cisco.com>
2018-07-26Initial commit of Sphinx docsJohn DeNisco1-0/+109
Change-Id: I9fca8fb98502dffc2555f9de7f507b6f006e0e77 Signed-off-by: John DeNisco <jdenisco@cisco.com>
Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#!/router/bin/python
from .trex_general_test import CTRexGeneral_Test
from .tests_exceptions import *
import time
from nose.tools import assert_equal

class CTRexIPv6_Test(CTRexGeneral_Test):
    """This class defines the IPv6 testcase of the TRex traffic generator"""
    def __init__(self, *args, **kwargs):
        super(CTRexIPv6_Test, self).__init__(*args, **kwargs)

    def setUp(self):
        super(CTRexIPv6_Test, self).setUp() # launch super test class setUp process
#       print " before sleep setup !!"
#       time.sleep(100000);
#       pass

    def test_ipv6_simple(self):
        if self.is_virt_nics:
            self.skip('--ipv6 flag does not work correctly in with virtual NICs') # TODO: fix
        # test initializtion
        if not self.is_loopback:
            self.router.configure_basic_interfaces()

            self.router.config_pbr(mode = "config")
            self.router.config_ipv6_pbr(mode = "config")

        mult = self.get_benchmark_param('multiplier')
        core = self.get_benchmark_param('cores')

        ret = self.trex.start_trex(
            c = core,
            m = mult,
            p  = True,
            nc = True,
            ipv6 = True,
            d = 60,   
            f = 'avl/sfr_delay_10_1g.yaml',
            l = 1000)

        trex_res = self.trex.sample_to_run_finish()

        # trex_res is a CTRexResult instance- and contains the summary of the test results
        # you may see all the results keys by simply calling here for 'print trex_res.result'
        print("\nLATEST RESULT OBJECT:")
        print(trex_res)

        self.check_general_scenario_results(trex_res)
        
        self.check_CPU_benchmark (trex_res, 10.0)

        assert True


    def test_ipv6_negative (self):
        if self.is_loopback:
            self.skip('The test checks ipv6 drops by device and we are in loopback setup')
        # test initializtion
        self.router.configure_basic_interfaces()

        # NOT CONFIGURING IPv6 INTENTIONALLY TO GET DROPS!
        self.router.config_pbr(mode = "config")
        
        # same params as test_ipv6_simple
        mult = self.get_benchmark_param('multiplier', test_name = 'test_ipv6_simple')
        core = self.get_benchmark_param('cores', test_name = 'test_ipv6_simple')

        ret = self.trex.start_trex(
            c = core,
            m = mult,
            p  = True,
            nc = True,
            ipv6 = True,
            d = 60,   
            f = 'avl/sfr_delay_10_1g.yaml',
            l = 1000)

        trex_res = self.trex.sample_to_run_finish()

        # trex_res is a CTRexResult instance- and contains the summary of the test results
        # you may see all the results keys by simply calling here for 'print trex_res.result'
        print("\nLATEST RESULT OBJECT:")
        print(trex_res)

        trex_tx_pckt    = float(trex_res.get_last_value("trex-global.data.m_total_tx_pkts"))
        trex_drops      = int(trex_res.get_total_drops())

        trex_drop_rate  = trex_res.get_drop_rate()

        # make sure that at least 50% of the total transmitted packets failed
        self.assert_gt((trex_drops/trex_tx_pckt), 0.5, 'packet drop ratio is not high enough')

        

    def tearDown(self):
        CTRexGeneral_Test.tearDown(self)
        # remove config here
        pass

if __name__ == "__main__":
    pass