mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-11-04 04:38:02 +00:00 
			
		
		
		
	Resolved merge conflicts
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
This commit is contained in:
		
							
								
								
									
										
											BIN
										
									
								
								lf_libs/__pycache__/lf_libs.cpython-39.pyc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								lf_libs/__pycache__/lf_libs.cpython-39.pyc
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							@@ -117,7 +117,7 @@ class lf_libs:
 | 
			
		||||
    """
 | 
			
		||||
    wave2_radios = []
 | 
			
		||||
 | 
			
		||||
    """
 | 
			
		||||
    """lf_tests
 | 
			
		||||
        ax radio - supports (2.4G and 5gHz Band)
 | 
			
		||||
        Maximum 64 Station per radio
 | 
			
		||||
        """
 | 
			
		||||
@@ -505,50 +505,3 @@ class SCP_File:
 | 
			
		||||
            scp.get(remote_path=self.remote_path, local_path=self.local_path, recursive=True)
 | 
			
		||||
            scp.close()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
if __name__ == '__main__':
 | 
			
		||||
    basic_02 = {
 | 
			
		||||
        "controller": {
 | 
			
		||||
            "url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001",
 | 
			
		||||
            "username": "tip@ucentral.com",
 | 
			
		||||
            "password": "OpenWifi%123"
 | 
			
		||||
        },
 | 
			
		||||
        "access_point": [
 | 
			
		||||
            {
 | 
			
		||||
                "model": "hfcl_ion4",
 | 
			
		||||
                "mode": "wifi5",
 | 
			
		||||
                "serial": "0006aee53b84",
 | 
			
		||||
                "jumphost": True,
 | 
			
		||||
                "ip": "10.28.3.100",
 | 
			
		||||
                "username": "lanforge",
 | 
			
		||||
                "password": "pumpkin77",
 | 
			
		||||
                "port": 22,
 | 
			
		||||
                "jumphost_tty": "/dev/ttyAP2",
 | 
			
		||||
                "version": "next-latest"
 | 
			
		||||
            }
 | 
			
		||||
        ],
 | 
			
		||||
        "traffic_generator": {
 | 
			
		||||
            "name": "lanforge",
 | 
			
		||||
            "testbed": "basic",
 | 
			
		||||
            "scenario": "dhcp-bridge",  # dhcp-bridge / dhcp-external
 | 
			
		||||
            "details": {
 | 
			
		||||
                "manager_ip": "10.28.3.12",
 | 
			
		||||
                "http_port": 8080,
 | 
			
		||||
                "ssh_port": 22,
 | 
			
		||||
                "default_setup_DB": "Test_Scenario",
 | 
			
		||||
                "wan_ports": ["1.1.eth3"],
 | 
			
		||||
                "lan_ports": ["1.1.eth1"],
 | 
			
		||||
                "uplink_nat_ports": ["1.1.eth2"]
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    obj = lf_libs(lf_data=dict(basic_02["traffic_generator"]), dut_data=list(basic_02["access_point"]),
 | 
			
		||||
                  log_level=logging.DEBUG)
 | 
			
		||||
    # x = obj.chamber_view()
 | 
			
		||||
    # print(x)
 | 
			
		||||
    # obj.add_vlan(vlan_ids=[100,200])
 | 
			
		||||
    # # obj.setup_dut()
 | 
			
		||||
    # obj.setup_relevent_profiles()
 | 
			
		||||
    # obj.add_vlan(vlan_ids=[200])
 | 
			
		||||
    # obj.chamber_view()
 | 
			
		||||
 
 | 
			
		||||
@@ -24,10 +24,10 @@ create_chamberview = importlib.import_module("py-scripts.create_chamberview")
 | 
			
		||||
CreateChamberview = create_chamberview.CreateChamberview
 | 
			
		||||
sta_connect2 = importlib.import_module("py-scripts.sta_connect2")
 | 
			
		||||
StaConnect2 = sta_connect2.StaConnect2
 | 
			
		||||
lf_libs_module = importlib.import_module("lf_libs")
 | 
			
		||||
lf_libs = lf_libs_module.lf_libs
 | 
			
		||||
Report = lf_libs.Report
 | 
			
		||||
SCP_File = lf_libs.SCP_File
 | 
			
		||||
lf_library = importlib.import_module("lf_libs")
 | 
			
		||||
lf_libs = lf_library.lf_libs
 | 
			
		||||
Report = lf_library.Report
 | 
			
		||||
SCP_File = lf_library.SCP_File
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class lf_tests(lf_libs):
 | 
			
		||||
@@ -208,7 +208,7 @@ if __name__ == '__main__':
 | 
			
		||||
            "username": "tip@ucentral.com",
 | 
			
		||||
            "password": "OpenWifi%123"
 | 
			
		||||
        },
 | 
			
		||||
        "access_point": [
 | 
			
		||||
        "device_under_tests": [
 | 
			
		||||
            {
 | 
			
		||||
                "model": "hfcl_ion4",
 | 
			
		||||
                "mode": "wifi5",
 | 
			
		||||
@@ -238,7 +238,7 @@ if __name__ == '__main__':
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    obj = lf_tests(lf_data=dict(basic_02["traffic_generator"]), dut_data=list(basic_02["access_point"]),
 | 
			
		||||
    obj = lf_tests(lf_data=dict(basic_02["traffic_generator"]), dut_data=list(basic_02["device_under_tests"]),
 | 
			
		||||
                   log_level=logging.DEBUG)
 | 
			
		||||
    # obj.read_cv_scenario()
 | 
			
		||||
    # obj.setup_dut()
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										16
									
								
								to_pip.sh
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								to_pip.sh
									
									
									
									
									
								
							@@ -86,7 +86,16 @@ __license__ = ''" > __init__.py
 | 
			
		||||
sed -i -- 's/from LANforge/from py_json.LANforge/g' *.py
 | 
			
		||||
sed -i -- 's/from py_json/from .py_json/g' *.py
 | 
			
		||||
 | 
			
		||||
cd py_scripts || exit 1
 | 
			
		||||
sed -i -- 's/py-scripts/py_scripts/g' *.py
 | 
			
		||||
cd lf_libs || exit 1
 | 
			
		||||
sed -i -- 's/py-scripts/py_scripts/g' *.py
 | 
			
		||||
sed -i -- 's/py-json/py_json/g' *.py
 | 
			
		||||
echo "from .lf_libs import lf_libs
 | 
			
		||||
from .lf_libs import Report
 | 
			
		||||
from .lf_libs import SCP_File
 | 
			
		||||
from .lf_tests import lf_tests
 | 
			
		||||
" > __init__.py
 | 
			
		||||
cd ../py_scripts || exit 1
 | 
			
		||||
 | 
			
		||||
echo "#from .connection_test import ConnectionTest
 | 
			
		||||
from .create_bond import CreateBond
 | 
			
		||||
@@ -98,7 +107,6 @@ from .create_macvlan import CreateMacVlan
 | 
			
		||||
from .create_qvlan import CreateQVlan
 | 
			
		||||
from .create_station import CreateStation
 | 
			
		||||
from .create_vap import CreateVAP
 | 
			
		||||
from .csv_convert import CSVParcer
 | 
			
		||||
from .csv_to_influx import CSVtoInflux
 | 
			
		||||
from .csv_to_grafana import UseGrafana
 | 
			
		||||
from .example_security_connection import IPv4Test
 | 
			
		||||
@@ -154,7 +162,6 @@ from .wlan_capacity_calculator import main as WlanCapacityCalculator
 | 
			
		||||
from .ws_generic_monitor_test import WS_Listener" > __init__.py
 | 
			
		||||
 | 
			
		||||
# Fix files in py_scripts
 | 
			
		||||
sed -i -- 's/import importlib/ /g' *.py
 | 
			
		||||
sed -i -- 's/import realm/ /g' create_vap.py lf_dut_sta_vap_test.py lf_sniff_radio.py run_cv_scenario.py sta_connect.py station_layer3.py test_client_admission.py
 | 
			
		||||
sed -i -- 's/import realm/from realm import Realm/g' lf_atten_mod_test.py lf_multipsk.py test_fileio.py test_ip_connection.py test_ipv4_ttls.py test_l3_WAN_LAN.py test_l3_unicast_traffic_gen.py test_l4.py testgroup.py
 | 
			
		||||
sed -i -- 's/realm.Realm/Realm/g' lf_atten_mod_test.py lf_multipsk.py lf_sniff_radio.py station_layer3.py test_client_admission.py test_fileio.py test_ip_connection.py
 | 
			
		||||
@@ -168,7 +175,7 @@ sed -i -- 's/import wlan_theoretical_sta/from wlan_theoretical_sta import abg11_
 | 
			
		||||
sed -i -- 's/sys.path.append(os.path.join(os.path.abspath(__file__ + "..\/..\/..\/")))/ /g' *.py
 | 
			
		||||
 | 
			
		||||
#Change importlib to pip compliant method
 | 
			
		||||
sed -i -- 's/import importlib/ /g' *.py
 | 
			
		||||
sed -i -- 's/lf_logger_config = importlib.import_module("py-scripts.lf_logger_config")/from lanforge_scripts.py_scripts.lf_logger_config import lf_logger_config/g' *.py
 | 
			
		||||
sed -i -- 's/influx = importlib.import_module("py-scripts.influx_utils")/from lanforge_scripts.py_scripts.influx_utils import RecordInflux/g' *.py
 | 
			
		||||
sed -i -- 's/RecordInflux = influx.RecordInflux/ /g' *.py
 | 
			
		||||
sed -i -- 's/create_chamberview_dut = importlib.import_module("py-scripts.create_chamberview_dut")/import create_chamberview_dut/g' *.py
 | 
			
		||||
@@ -459,6 +466,7 @@ if [[ $ARCHIVE -eq 1 ]]; then
 | 
			
		||||
  mv py_json lanforge_scripts
 | 
			
		||||
  mv py_dashboard lanforge_scripts
 | 
			
		||||
  mv py_scripts lanforge_scripts
 | 
			
		||||
  mv lf_libs lanforge_scripts
 | 
			
		||||
  mv label-printer lanforge_scripts/label_printer
 | 
			
		||||
  mv "auto-install-gui.py" "auto_install_gui.py"
 | 
			
		||||
  for i in "${py_modules[@]}"; do
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user