From 6ed6c4e88d0127b3b57cdfea46cc048d4cbc8a79 Mon Sep 17 00:00:00 2001 From: Hiroki Shirokura Date: Sun, 10 Dec 2023 10:10:28 +0000 Subject: [PATCH] 2023.12.10-10:10 --- examples/trex/external_encap_node/spec.yaml | 2 - examples/trex/external_encap_node/tcp_open.py | 43 ------------------- .../trex/external_encap_node/tcp_openclose.py | 42 ------------------ 3 files changed, 87 deletions(-) delete mode 100644 examples/trex/external_encap_node/tcp_open.py delete mode 100644 examples/trex/external_encap_node/tcp_openclose.py diff --git a/examples/trex/external_encap_node/spec.yaml b/examples/trex/external_encap_node/spec.yaml index 5759f6f..6059819 100644 --- a/examples/trex/external_encap_node/spec.yaml +++ b/examples/trex/external_encap_node/spec.yaml @@ -82,8 +82,6 @@ node_configs: postinit: cmds: - cmd: docker cp cfg.yaml T1:/opt/trex - - cmd: docker cp tcp_open.py T1:/opt/trex - - cmd: docker cp tcp_openclose.py T1:/opt/trex - cmd: >- docker cp new_connection_test.py T1:/opt/trex/automation/trex_control_plane/interactive/trex/examples/astf diff --git a/examples/trex/external_encap_node/tcp_open.py b/examples/trex/external_encap_node/tcp_open.py deleted file mode 100644 index 4a55c41..0000000 --- a/examples/trex/external_encap_node/tcp_open.py +++ /dev/null @@ -1,43 +0,0 @@ -from trex.astf.api import * -import argparse - - -class Prof1(): - def __init__(self): - pass # tunables - - def create_profile(self, cps): - prog_c = ASTFProgram() - prog_c.connect() - prog_c.reset() - prog_s = ASTFProgram() - prog_s.wait_for_peer_close() - - # ip generator - ip_gen_c = ASTFIPGenDist(ip_range=["20.0.0.0", "20.0.255.255"], distribution="seq") - ip_gen_s = ASTFIPGenDist(ip_range=["30.0.0.0", "30.0.255.255"], distribution="seq") - ip_gen = ASTFIPGen(glob=ASTFIPGenGlobal(ip_offset="1.0.0.0"), - dist_client=ip_gen_c, - dist_server=ip_gen_s) - - # template - temp_c = ASTFTCPClientTemplate(program=prog_c, ip_gen=ip_gen, cps=cps) - temp_s = ASTFTCPServerTemplate(program=prog_s) - template = ASTFTemplate(client_template=temp_c, server_template=temp_s) - - # profile - profile = ASTFProfile(default_ip_gen=ip_gen, - templates=template) - return profile - - def get_profile(self, tunables, **kwargs): - parser = argparse.ArgumentParser( - description='Argparser for {}'.format(os.path.basename(__file__)), - formatter_class=argparse.ArgumentDefaultsHelpFormatter) - parser.add_argument('--cps', type=int, default=1) - args = parser.parse_args(tunables) - return self.create_profile(args.cps) - - -def register(): - return Prof1() diff --git a/examples/trex/external_encap_node/tcp_openclose.py b/examples/trex/external_encap_node/tcp_openclose.py deleted file mode 100644 index 2b8c983..0000000 --- a/examples/trex/external_encap_node/tcp_openclose.py +++ /dev/null @@ -1,42 +0,0 @@ -from trex.astf.api import * -import argparse - - -class Prof1(): - def __init__(self): - pass # tunables - - def create_profile(self, cps): - prog_c = ASTFProgram() - prog_c.connect() - prog_s = ASTFProgram() - prog_s.wait_for_peer_close() - - # ip generator - ip_gen_c = ASTFIPGenDist(ip_range=["20.0.0.0", "20.0.255.255"], distribution="seq") - ip_gen_s = ASTFIPGenDist(ip_range=["30.0.0.0", "30.0.255.255"], distribution="seq") - ip_gen = ASTFIPGen(glob=ASTFIPGenGlobal(ip_offset="1.0.0.0"), - dist_client=ip_gen_c, - dist_server=ip_gen_s) - - # template - temp_c = ASTFTCPClientTemplate(program=prog_c, ip_gen=ip_gen, cps=cps) - temp_s = ASTFTCPServerTemplate(program=prog_s) - template = ASTFTemplate(client_template=temp_c, server_template=temp_s) - - # profile - profile = ASTFProfile(default_ip_gen=ip_gen, - templates=template) - return profile - - def get_profile(self, tunables, **kwargs): - parser = argparse.ArgumentParser( - description='Argparser for {}'.format(os.path.basename(__file__)), - formatter_class=argparse.ArgumentDefaultsHelpFormatter) - parser.add_argument('--cps', type=int, default=1) - args = parser.parse_args(tunables) - return self.create_profile(args.cps) - - -def register(): - return Prof1()