Skip to content

Add python code for iperf3 pod-to-pod test#629

Merged
alyssa1303 merged 9 commits into
mainfrom
alyssa/move-iperf3
May 9, 2025
Merged

Add python code for iperf3 pod-to-pod test#629
alyssa1303 merged 9 commits into
mainfrom
alyssa/move-iperf3

Conversation

@alyssa1303
Copy link
Copy Markdown
Collaborator

@alyssa1303 alyssa1303 commented May 6, 2025

This pull request introduces significant enhancements to the Kubernetes client module, adds a new PodRoleCommand class for managing Kubernetes pod roles, and includes updates to the iperf3 module documentation for running benchmarks. Key changes focus on improving functionality, modularity, and usability.

Kubernetes Client Enhancements:

  • Refactored the KubernetesClient class to include a _setup_clients method for initializing API clients and a set_context method for switching Kubernetes contexts. Added new utility methods such as get_pod_name_and_ip, get_pod_details, get_node_details, and collect_pod_and_node_info to retrieve and manage pod and node information. [1] [2]

  • Modified the run_pod_exec_command method to use an empty string ("") as the default value for dest_path and updated logic to handle this change. [1] [2]

New PodRoleCommand Class:

  • Introduced the PodRoleCommand class in pod_command.py to manage Kubernetes pods based on roles (e.g., client or server). This includes methods for setting contexts, retrieving pod details, running commands, and validating configurations.

Documentation Updates:

  • Added a new section to the iperf3 module README with detailed instructions for validating, executing, and collecting results from iperf3 benchmarks in Kubernetes environments.

Configuration Updates:

  • Updated .pylintrc to disable additional pylint checks for "too-many-public-methods" and "too-many-branches," allowing more flexibility in the codebase.

Utility Enhancements:

  • Added an import for save_info_to_file in kubernetes_client.py to save pod and node information to files.

@alyssa1303 alyssa1303 force-pushed the alyssa/move-iperf3 branch 13 times, most recently from 118db07 to e0eab8f Compare May 8, 2025 16:02
@alyssa1303 alyssa1303 force-pushed the alyssa/move-iperf3 branch 8 times, most recently from 400ad08 to 32e896b Compare May 8, 2025 23:15
@alyssa1303 alyssa1303 force-pushed the alyssa/move-iperf3 branch from 32e896b to 213b89c Compare May 8, 2025 23:33
@alyssa1303 alyssa1303 marked this pull request as ready for review May 8, 2025 23:35
@alyssa1303 alyssa1303 force-pushed the alyssa/move-iperf3 branch from 45aae21 to 640869b Compare May 9, 2025 00:05
@alyssa1303 alyssa1303 force-pushed the alyssa/move-iperf3 branch 8 times, most recently from 3371631 to ed1834e Compare May 9, 2025 04:26
@alyssa1303 alyssa1303 force-pushed the alyssa/move-iperf3 branch from ed1834e to b09f850 Compare May 9, 2025 04:28
@alyssa1303 alyssa1303 changed the title Move python code for iperf3 Add python code for iperf3 pod-to-pod test May 9, 2025
Comment thread modules/python/tests/iperf3/test_parser.py Outdated
Comment thread modules/python/clients/kubernetes_client.py
Comment thread modules/python/iperf3/parser.py Outdated
Comment thread modules/python/tests/iperf3/test_iperf3_pod.py
@alyssa1303 alyssa1303 merged commit cbc67f9 into main May 9, 2025
5 checks passed
@alyssa1303 alyssa1303 deleted the alyssa/move-iperf3 branch May 9, 2025 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants