mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 19:28:00 +00:00
Revert "Update py_scripts to be in line with pip standards"
This reverts commit 37df48594e.
This commit is contained in:
@@ -1,75 +0,0 @@
|
|||||||
#from .connection_test import ConnectionTest
|
|
||||||
from .create_bond import CreateBond
|
|
||||||
from .create_bridge import CreateBridge
|
|
||||||
from .create_chamberview import CreateChamberview
|
|
||||||
from .create_l3 import CreateL3
|
|
||||||
from .create_l4 import CreateL4
|
|
||||||
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_processor import L3CSVParcer
|
|
||||||
from .csv_to_influx import CSVtoInflux
|
|
||||||
from .csv_to_grafana import UseGrafana
|
|
||||||
from .download_test import DownloadTest
|
|
||||||
from .event_breaker import EventBreaker
|
|
||||||
from .event_flood import EventBreaker as EventFlood
|
|
||||||
from .example_security_connection import IPv4Test
|
|
||||||
from .ghost_profile import UseGhost
|
|
||||||
from .grafana_profile import UseGrafana
|
|
||||||
from .influx import RecordInflux
|
|
||||||
from .layer3_test import Layer3Test
|
|
||||||
from .layer4_test import HTTPTest
|
|
||||||
from .lf_ap_auto_test import ApAutoTest
|
|
||||||
from .lf_atten_mod_test import CreateAttenuator
|
|
||||||
from .lf_csv import lf_csv, lf_kpi_csv
|
|
||||||
from .lf_dataplane_test import DataplaneTest
|
|
||||||
from .lf_dfs_test import FileAdapter, CreateCtlr, L3VariableTime
|
|
||||||
from .lf_dut_sta_vap_test import Login_DUT, LoadScenario, CreateSTA_CX
|
|
||||||
from .lf_ftp_test import ftp_test
|
|
||||||
from .lf_ftp import FtpTest
|
|
||||||
from .lf_graph import lf_bar_graph, lf_stacked_graph, lf_horizontal_stacked_graph, lf_scatter_graph, lf_line_graph
|
|
||||||
from .lf_mesh_test import MeshTest
|
|
||||||
from .lf_multipsk import MultiPsk
|
|
||||||
from .lf_report import lf_report
|
|
||||||
from .lf_rvr_test import RvrTest
|
|
||||||
from .lf_rx_sensitivity_test import RxSensitivityTest
|
|
||||||
from .lf_sniff_radio import SniffRadio
|
|
||||||
#from .lf_snp_test import SAME CLASS NAMES AS LF_DFS_TEST
|
|
||||||
#from .lf_tr398_test import DataPlaneTest
|
|
||||||
from .lf_webpage import HttpDownload
|
|
||||||
from .lf_wifi_capacity_test import WiFiCapacityTest
|
|
||||||
from .measure_station_time_up import MeasureTimeUp
|
|
||||||
from .modify_station import ModifyStation
|
|
||||||
from .modify_vap import ModifyVAP
|
|
||||||
from .run_cv_scenario import RunCvScenario
|
|
||||||
from .sta_connect import StaConnect
|
|
||||||
from .sta_connect2 import StaConnect2
|
|
||||||
from .sta_connect_bssid_mac import client_connect
|
|
||||||
from .station_layer3 import STATION
|
|
||||||
from .stations_connected import StationsConnected
|
|
||||||
from .test_1k_clients_jedtest import Test1KClients
|
|
||||||
from .test_client_admission import LoadLayer3
|
|
||||||
from .test_fileio import FileIOTest
|
|
||||||
from .test_generic import GenTest
|
|
||||||
from .test_ip_connection import ConnectTest
|
|
||||||
from .test_ip_variable_time import IPVariableTime
|
|
||||||
from .test_ipv4_ttls import TTLSTest
|
|
||||||
from .test_ipv4_ps import IPV4VariableTime
|
|
||||||
#from .test_l3_longevity import L3VariableTime ALSO IN LF_DFS_TEST
|
|
||||||
from .test_l3_powersave_traffic import L3PowersaveTraffic
|
|
||||||
#from .test_l3_scenario_throughput import
|
|
||||||
from .test_l3_unicast_traffic_gen import L3VariableTimeLongevity
|
|
||||||
from .test_l3_WAN_LAN import VRTest
|
|
||||||
from .test_l4 import IPV4L4
|
|
||||||
from .test_status_msg import TestStatusMessage
|
|
||||||
from .test_wanlink import LANtoWAN
|
|
||||||
from .test_wpa_passphrases import WPAPassphrases
|
|
||||||
from .testgroup import TestGroup
|
|
||||||
from .testgroup2 import TestGroup2
|
|
||||||
from .tip_station_powersave import TIPStationPowersave
|
|
||||||
from .vap_stations_example import VapStations
|
|
||||||
from .video_rates import VideoRates
|
|
||||||
from .wlan_capacity_calculator import main as WlanCapacityCalculator
|
|
||||||
from .ws_generic_monitor_test import WS_Listener
|
|
||||||
@@ -20,8 +20,12 @@ if sys.version_info[0] != 3:
|
|||||||
|
|
||||||
if 'py-json' not in sys.path:
|
if 'py-json' not in sys.path:
|
||||||
sys.path.append(os.path.join(os.path.abspath('..'), 'py-json'))
|
sys.path.append(os.path.join(os.path.abspath('..'), 'py-json'))
|
||||||
|
import LANforge
|
||||||
from LANforge.lfcli_base import LFCliBase
|
from LANforge.lfcli_base import LFCliBase
|
||||||
|
from LANforge import LFUtils
|
||||||
|
from realm import Realm
|
||||||
import time
|
import time
|
||||||
|
import pprint
|
||||||
|
|
||||||
|
|
||||||
class CreateBond(LFCliBase):
|
class CreateBond(LFCliBase):
|
||||||
|
|||||||
@@ -14,9 +14,11 @@ if sys.version_info[0] != 3:
|
|||||||
|
|
||||||
if 'py-json' not in sys.path:
|
if 'py-json' not in sys.path:
|
||||||
sys.path.append(os.path.join(os.path.abspath('..'), 'py-json'))
|
sys.path.append(os.path.join(os.path.abspath('..'), 'py-json'))
|
||||||
|
import LANforge
|
||||||
from LANforge.lfcli_base import LFCliBase
|
from LANforge.lfcli_base import LFCliBase
|
||||||
from LANforge import LFUtils
|
from LANforge import LFUtils
|
||||||
from realm import Realm
|
from realm import Realm
|
||||||
|
import time
|
||||||
import pprint
|
import pprint
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -14,9 +14,12 @@ if sys.version_info[0] != 3:
|
|||||||
|
|
||||||
if 'py-json' not in sys.path:
|
if 'py-json' not in sys.path:
|
||||||
sys.path.append(os.path.join(os.path.abspath('..'), 'py-json'))
|
sys.path.append(os.path.join(os.path.abspath('..'), 'py-json'))
|
||||||
|
import LANforge
|
||||||
from LANforge.lfcli_base import LFCliBase
|
from LANforge.lfcli_base import LFCliBase
|
||||||
from LANforge import LFUtils
|
from LANforge import LFUtils
|
||||||
|
import realm
|
||||||
from realm import Realm
|
from realm import Realm
|
||||||
|
import time
|
||||||
import pprint
|
import pprint
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,8 +9,10 @@ if sys.version_info[0] != 3:
|
|||||||
if 'py-json' not in sys.path:
|
if 'py-json' not in sys.path:
|
||||||
sys.path.append('../py-json')
|
sys.path.append('../py-json')
|
||||||
from LANforge import LFUtils
|
from LANforge import LFUtils
|
||||||
|
from LANforge import lfcli_base
|
||||||
from LANforge.lfcli_base import LFCliBase
|
from LANforge.lfcli_base import LFCliBase
|
||||||
from LANforge.LFUtils import *
|
from LANforge.LFUtils import *
|
||||||
|
import realm
|
||||||
from realm import Realm
|
from realm import Realm
|
||||||
import argparse
|
import argparse
|
||||||
import datetime
|
import datetime
|
||||||
@@ -40,7 +42,7 @@ class Layer3Test(LFCliBase):
|
|||||||
self.traffic_type = traffic_type
|
self.traffic_type = traffic_type
|
||||||
self.side_a_speed = side_a_speed
|
self.side_a_speed = side_a_speed
|
||||||
self.side_b_speed = side_b_speed
|
self.side_b_speed = side_b_speed
|
||||||
self.local_realm = Realm(lfclient_host=self.host, lfclient_port=self.port)
|
self.local_realm = realm.Realm(lfclient_host=self.host, lfclient_port=self.port)
|
||||||
self.station_profile = self.local_realm.new_station_profile()
|
self.station_profile = self.local_realm.new_station_profile()
|
||||||
self.cx_profile = self.local_realm.new_l3_cx_profile()
|
self.cx_profile = self.local_realm.new_l3_cx_profile()
|
||||||
|
|
||||||
|
|||||||
@@ -17,13 +17,17 @@ if sys.version_info[0] != 3:
|
|||||||
if 'py-json' not in sys.path:
|
if 'py-json' not in sys.path:
|
||||||
sys.path.append('../py-json')
|
sys.path.append('../py-json')
|
||||||
from LANforge import LFUtils
|
from LANforge import LFUtils
|
||||||
|
from LANforge import lfcli_base
|
||||||
from LANforge.lfcli_base import LFCliBase
|
from LANforge.lfcli_base import LFCliBase
|
||||||
from LANforge.LFUtils import *
|
from LANforge.LFUtils import *
|
||||||
from realm import PortUtils, Realm
|
import realm
|
||||||
|
from realm import PortUtils
|
||||||
import argparse
|
import argparse
|
||||||
import datetime
|
import datetime
|
||||||
import time
|
import time
|
||||||
from test_utility import CreateHTML, RuntimeUpdates
|
from test_utility import CreateHTML
|
||||||
|
from test_utility import RuntimeUpdates
|
||||||
|
import pdfkit
|
||||||
import json
|
import json
|
||||||
import re
|
import re
|
||||||
import os
|
import os
|
||||||
@@ -56,7 +60,7 @@ class HTTPTest(LFCliBase):
|
|||||||
self.urls_ps = url_ps
|
self.urls_ps = url_ps
|
||||||
self.test_update =_test_update
|
self.test_update =_test_update
|
||||||
self.test_update.send_update({"test_status": '1', "duration_left": "initializing...", "data": 'None'})
|
self.test_update.send_update({"test_status": '1', "duration_left": "initializing...", "data": 'None'})
|
||||||
self.local_realm = Realm(lfclient_host=self.host, lfclient_port=self.port)
|
self.local_realm = realm.Realm(lfclient_host=self.host, lfclient_port=self.port)
|
||||||
self.test_duration = self.local_realm.parse_time(duration)
|
self.test_duration = self.local_realm.parse_time(duration)
|
||||||
self.station_profile = self.local_realm.new_station_profile()
|
self.station_profile = self.local_realm.new_station_profile()
|
||||||
self.port_util = PortUtils(self.local_realm)
|
self.port_util = PortUtils(self.local_realm)
|
||||||
|
|||||||
@@ -32,14 +32,16 @@ if 'py-json' not in sys.path:
|
|||||||
import argparse
|
import argparse
|
||||||
from LANforge.lfcli_base import LFCliBase
|
from LANforge.lfcli_base import LFCliBase
|
||||||
from LANforge.LFUtils import *
|
from LANforge.LFUtils import *
|
||||||
from realm import Realm
|
from LANforge import LFUtils
|
||||||
|
import realm
|
||||||
|
import time
|
||||||
|
|
||||||
class CreateAttenuator(LFCliBase):
|
class CreateAttenuator(LFCliBase):
|
||||||
def __init__(self, host, port, serno, idx, val,
|
def __init__(self, host, port, serno, idx, val,
|
||||||
_debug_on=False,
|
_debug_on=False,
|
||||||
_exit_on_error=False,
|
_exit_on_error=False,
|
||||||
_exit_on_fail=False):
|
_exit_on_fail=False):
|
||||||
super().__init__(host, port, _local_realm=Realm(host, port), _debug=_debug_on, _exit_on_fail=_exit_on_fail)
|
super().__init__(host, port, _local_realm=realm.Realm(host, port), _debug=_debug_on, _exit_on_fail=_exit_on_fail)
|
||||||
self.host = host
|
self.host = host
|
||||||
self.port = port
|
self.port = port
|
||||||
self.serno = serno
|
self.serno = serno
|
||||||
|
|||||||
@@ -27,24 +27,29 @@ import sys
|
|||||||
if sys.version_info[0] != 3:
|
if sys.version_info[0] != 3:
|
||||||
print("This script requires Python 3")
|
print("This script requires Python 3")
|
||||||
exit(1)
|
exit(1)
|
||||||
if 'py_json' not in sys.path:
|
if 'py-json' not in sys.path:
|
||||||
sys.path.append('../py_json')
|
sys.path.append('../py-json')
|
||||||
|
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import time
|
import time
|
||||||
from LANforge import LFUtils
|
from LANforge import LFUtils
|
||||||
|
from LANforge import lfcli_base
|
||||||
from LANforge.lfcli_base import LFCliBase
|
from LANforge.lfcli_base import LFCliBase
|
||||||
from LANforge.LFUtils import *
|
from LANforge.LFUtils import *
|
||||||
|
import realm
|
||||||
|
|
||||||
from realm import Realm
|
from realm import Realm
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import paramiko as pm
|
import paramiko as pm
|
||||||
from paramiko.ssh_exception import NoValidConnectionsError as exception
|
from paramiko.ssh_exception import NoValidConnectionsError as exception
|
||||||
import xlsxwriter
|
import xlsxwriter
|
||||||
from bokeh.io import show
|
from bokeh.io import output_file, show
|
||||||
from bokeh.plotting import figure
|
from bokeh.plotting import figure
|
||||||
from bokeh.models import LinearAxis, Range1d
|
from bokeh.models import LinearAxis, Range1d
|
||||||
|
from bokeh.models import HoverTool
|
||||||
|
from bokeh.layouts import row
|
||||||
|
|
||||||
|
|
||||||
# Specifically for Measuring CPU Core Temperatures
|
# Specifically for Measuring CPU Core Temperatures
|
||||||
@@ -329,44 +334,44 @@ def main():
|
|||||||
# Lanforge Manager IP Address
|
# Lanforge Manager IP Address
|
||||||
if (args.manager is None):
|
if (args.manager is None):
|
||||||
manager = "localhost"
|
manager = "localhost"
|
||||||
if (args.manager != None):
|
if (args.manager is not None):
|
||||||
manager = args.manager
|
manager = args.manager
|
||||||
|
|
||||||
# Scenario Name
|
# Scenario Name
|
||||||
if (args.scenario != None):
|
if (args.scenario is not None):
|
||||||
scenario = args.scenario
|
scenario = args.scenario
|
||||||
# Radio Name
|
# Radio Name
|
||||||
if (args.radio != None):
|
if (args.radio is not None):
|
||||||
radio = args.radio
|
radio = args.radio
|
||||||
|
|
||||||
# Number of Stations
|
# Number of Stations
|
||||||
if (args.num_sta is None):
|
if (args.num_sta is None):
|
||||||
num_sta = 0
|
num_sta = 0
|
||||||
if (args.num_sta != None):
|
if (args.num_sta is not None):
|
||||||
num_sta = args.num_sta
|
num_sta = args.num_sta
|
||||||
|
|
||||||
# Station ID
|
# Station ID
|
||||||
if (args.sta_id is None):
|
if (args.sta_id is None):
|
||||||
sta_id = '0'
|
sta_id = '0'
|
||||||
if (args.sta_id != None):
|
if (args.sta_id is not None):
|
||||||
sta_id = args.sta_id
|
sta_id = args.sta_id
|
||||||
|
|
||||||
# SSID
|
# SSID
|
||||||
if (args.ssid != None):
|
if (args.ssid is not None):
|
||||||
ssid = args.ssid
|
ssid = args.ssid
|
||||||
if (args.ssid != None):
|
if (args.ssid is not None):
|
||||||
ssid = args.ssid
|
ssid = args.ssid
|
||||||
|
|
||||||
# Security (Open by Default)
|
# Security (Open by Default)
|
||||||
if (args.security is None):
|
if (args.security is None):
|
||||||
security = 'open'
|
security = 'open'
|
||||||
if (args.security != None):
|
if (args.security is not None):
|
||||||
security = args.security
|
security = args.security
|
||||||
|
|
||||||
# Password (if Security is not Open)
|
# Password (if Security is not Open)
|
||||||
if (args.password != None):
|
if (args.password is not None):
|
||||||
password = args.password
|
password = args.password
|
||||||
if (args.password == 'open'):
|
if (args.password is 'open'):
|
||||||
password = "[Blank]"
|
password = "[Blank]"
|
||||||
if (args.password is None):
|
if (args.password is None):
|
||||||
password = "[Blank]"
|
password = "[Blank]"
|
||||||
@@ -374,32 +379,32 @@ def main():
|
|||||||
# Upstream Port (By default br0000)
|
# Upstream Port (By default br0000)
|
||||||
if (args.upstream is None):
|
if (args.upstream is None):
|
||||||
upstream = 'br0000'
|
upstream = 'br0000'
|
||||||
if (args.upstream != None):
|
if (args.upstream is not None):
|
||||||
upstream = args.upstream
|
upstream = args.upstream
|
||||||
|
|
||||||
# Protocol (By Default lf_udp)
|
# Protocol (By Default lf_udp)
|
||||||
if (args.protocol != None):
|
if (args.protocol is not None):
|
||||||
protocol = args.protocol
|
protocol = args.protocol
|
||||||
if (args.protocol is None):
|
if (args.protocol is None):
|
||||||
protocol = 'lf_udp'
|
protocol = 'lf_udp'
|
||||||
|
|
||||||
#Min BPS
|
#Min BPS
|
||||||
if (args.min_mbps != None):
|
if (args.min_mbps is not None):
|
||||||
min_bps = int(args.min_mbps)*1000000
|
min_bps = int(args.min_mbps)*1000000
|
||||||
if (args.min_mbps is None):
|
if (args.min_mbps is None):
|
||||||
min_bps = int(1000)*1000000
|
min_bps = int(1000)*1000000
|
||||||
if (args.max_mbps is None ):
|
if (args.max_mbps is None ):
|
||||||
max_bps = int(1000)*1000000
|
max_bps = int(1000)*1000000
|
||||||
|
|
||||||
if (args.min_mbps != None):
|
if (args.min_mbps is not None):
|
||||||
min_bps = int(args.min_mbps)*1000000
|
min_bps = int(args.min_mbps)*1000000
|
||||||
if (args.max_mbps != None and args.max_mbps != "same"):
|
if (args.max_mbps is not None and args.max_mbps is not "same"):
|
||||||
max_bps = int(args.max_mbps)*1000000
|
max_bps = int(args.max_mbps)*1000000
|
||||||
if (args.max_mbps != None and args.max_mbps == "same"):
|
if (args.max_mbps is not None and args.max_mbps is "same"):
|
||||||
max_bps = args.min_mbps
|
max_bps = args.min_mbps
|
||||||
if (args.duration != None):
|
if (args.duration is not None):
|
||||||
duration = (args.duration * 60)/5
|
duration = (args.duration * 60)/5
|
||||||
if (args.report_name != None):
|
if (args.report_name is not None):
|
||||||
report_name = args.report_name
|
report_name = args.report_name
|
||||||
if (args.duration is None):
|
if (args.duration is None):
|
||||||
duration = (1 * 60)/5
|
duration = (1 * 60)/5
|
||||||
|
|||||||
@@ -15,10 +15,12 @@ if 'py-json' not in sys.path:
|
|||||||
from LANforge import LFUtils
|
from LANforge import LFUtils
|
||||||
from LANforge.lfcli_base import LFCliBase
|
from LANforge.lfcli_base import LFCliBase
|
||||||
from LANforge.LFUtils import *
|
from LANforge.LFUtils import *
|
||||||
from realm import Realm, PortUtils
|
import realm
|
||||||
import argparse
|
import argparse
|
||||||
|
import datetime
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import time
|
import time
|
||||||
|
import os
|
||||||
import matplotlib.patches as mpatches
|
import matplotlib.patches as mpatches
|
||||||
from lf_report import *
|
from lf_report import *
|
||||||
from lf_graph import *
|
from lf_graph import *
|
||||||
@@ -50,10 +52,10 @@ class FtpTest(LFCliBase):
|
|||||||
self.duration = duration
|
self.duration = duration
|
||||||
self.traffic_duration = traffic_duration
|
self.traffic_duration = traffic_duration
|
||||||
self.ssh_port = ssh_port
|
self.ssh_port = ssh_port
|
||||||
self.local_realm = Realm(lfclient_host=self.host, lfclient_port=self.port)
|
self.local_realm = realm.Realm(lfclient_host=self.host, lfclient_port=self.port)
|
||||||
self.station_profile = self.local_realm.new_station_profile()
|
self.station_profile = self.local_realm.new_station_profile()
|
||||||
self.cx_profile = self.local_realm.new_http_profile()
|
self.cx_profile = self.local_realm.new_http_profile()
|
||||||
self.port_util = PortUtils(self.local_realm)
|
self.port_util = realm.PortUtils(self.local_realm)
|
||||||
self.cx_profile.requests_per_ten = self.requests_per_ten
|
self.cx_profile.requests_per_ten = self.requests_per_ten
|
||||||
|
|
||||||
print("Test is Initialized")
|
print("Test is Initialized")
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ if 'py-json' not in sys.path:
|
|||||||
from LANforge import LFUtils
|
from LANforge import LFUtils
|
||||||
from LANforge.lfcli_base import LFCliBase
|
from LANforge.lfcli_base import LFCliBase
|
||||||
from LANforge.LFUtils import *
|
from LANforge.LFUtils import *
|
||||||
from realm import Realm, PortUtils
|
import realm
|
||||||
import argparse
|
import argparse
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import time
|
import time
|
||||||
@@ -64,10 +64,10 @@ class ftp_test(LFCliBase):
|
|||||||
self.band=band
|
self.band=band
|
||||||
self.file_size=file_size
|
self.file_size=file_size
|
||||||
self.direction=direction
|
self.direction=direction
|
||||||
self.local_realm = Realm(lfclient_host=self.host, lfclient_port=self.port)
|
self.local_realm = realm.Realm(lfclient_host=self.host, lfclient_port=self.port)
|
||||||
self.station_profile = self.local_realm.new_station_profile()
|
self.station_profile = self.local_realm.new_station_profile()
|
||||||
self.cx_profile = self.local_realm.new_http_profile()
|
self.cx_profile = self.local_realm.new_http_profile()
|
||||||
self.port_util = PortUtils(self.local_realm)
|
self.port_util = realm.PortUtils(self.local_realm)
|
||||||
self.cx_profile.requests_per_ten = self.requests_per_ten
|
self.cx_profile.requests_per_ten = self.requests_per_ten
|
||||||
|
|
||||||
print("Test is Initialized")
|
print("Test is Initialized")
|
||||||
|
|||||||
@@ -19,8 +19,11 @@ INCLUDE_IN_README
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
|
import matplotlib as mpl
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
import pandas as pd
|
||||||
import pdfkit
|
import pdfkit
|
||||||
|
import math
|
||||||
from matplotlib.colors import ListedColormap
|
from matplotlib.colors import ListedColormap
|
||||||
from lf_csv import lf_csv
|
from lf_csv import lf_csv
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,9 @@ if sys.version_info[0] != 3:
|
|||||||
|
|
||||||
if 'py-json' not in sys.path:
|
if 'py-json' not in sys.path:
|
||||||
sys.path.append(os.path.join(os.path.abspath('..'), 'py-json'))
|
sys.path.append(os.path.join(os.path.abspath('..'), 'py-json'))
|
||||||
|
from LANforge.lfcli_base import LFCliBase
|
||||||
from LANforge import LFUtils
|
from LANforge import LFUtils
|
||||||
|
import realm
|
||||||
from realm import Realm
|
from realm import Realm
|
||||||
|
|
||||||
|
|
||||||
@@ -64,7 +66,7 @@ class MultiPsk(Realm):
|
|||||||
self.resource = resource
|
self.resource = resource
|
||||||
self.sta_prefix = sta_prefix
|
self.sta_prefix = sta_prefix
|
||||||
self.debug = debug_
|
self.debug = debug_
|
||||||
self.local_realm = Realm(lfclient_host=self.host, lfclient_port=self.port)
|
self.local_realm = realm.Realm(lfclient_host=self.host, lfclient_port=self.port)
|
||||||
self.station_profile = self.local_realm.new_station_profile()
|
self.station_profile = self.local_realm.new_station_profile()
|
||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import argparse
|
|||||||
import time
|
import time
|
||||||
from LANforge.LFUtils import *
|
from LANforge.LFUtils import *
|
||||||
from realm import Realm
|
from realm import Realm
|
||||||
|
import realm
|
||||||
|
|
||||||
|
|
||||||
class SniffRadio(Realm):
|
class SniffRadio(Realm):
|
||||||
@@ -41,7 +42,7 @@ class SniffRadio(Realm):
|
|||||||
self.lfclient_host = lfclient_host
|
self.lfclient_host = lfclient_host
|
||||||
self.lfclient_port = lfclient_port
|
self.lfclient_port = lfclient_port
|
||||||
self.debug = debug_on_
|
self.debug = debug_on_
|
||||||
self.local_realm = Realm(lfclient_host=self.lfclient_host,
|
self.local_realm = realm.Realm(lfclient_host=self.lfclient_host,
|
||||||
lfclient_port=self.lfclient_port,
|
lfclient_port=self.lfclient_port,
|
||||||
debug_=self.debug)
|
debug_=self.debug)
|
||||||
self.monitor = self.local_realm.new_wifi_monitor_profile()
|
self.monitor = self.local_realm.new_wifi_monitor_profile()
|
||||||
|
|||||||
@@ -17,7 +17,9 @@ if 'py-json' not in sys.path:
|
|||||||
sys.path.append('../py-json')
|
sys.path.append('../py-json')
|
||||||
from LANforge import LFUtils
|
from LANforge import LFUtils
|
||||||
from LANforge.LFUtils import *
|
from LANforge.LFUtils import *
|
||||||
from realm import Realm, PortUtils
|
import realm
|
||||||
|
from realm import Realm
|
||||||
|
from realm import PortUtils
|
||||||
|
|
||||||
from lf_report import *
|
from lf_report import *
|
||||||
from lf_graph import *
|
from lf_graph import *
|
||||||
@@ -42,7 +44,7 @@ class HttpDownload(Realm):
|
|||||||
self.debug = _debug_on
|
self.debug = _debug_on
|
||||||
print(bands)
|
print(bands)
|
||||||
|
|
||||||
self.local_realm = Realm(lfclient_host=self.host, lfclient_port=self.port)
|
self.local_realm = realm.Realm(lfclient_host=self.host, lfclient_port=self.port)
|
||||||
self.station_profile = self.local_realm.new_station_profile()
|
self.station_profile = self.local_realm.new_station_profile()
|
||||||
self.http_profile = self.local_realm.new_http_profile()
|
self.http_profile = self.local_realm.new_http_profile()
|
||||||
self.http_profile.requests_per_ten = self.target_per_ten
|
self.http_profile.requests_per_ten = self.target_per_ten
|
||||||
|
|||||||
@@ -14,8 +14,10 @@ if 'py-json' not in sys.path:
|
|||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
from LANforge import LFUtils
|
from LANforge import LFUtils
|
||||||
|
from LANforge import lfcli_base
|
||||||
from LANforge.lfcli_base import LFCliBase
|
from LANforge.lfcli_base import LFCliBase
|
||||||
from LANforge.LFUtils import *
|
from LANforge.LFUtils import *
|
||||||
|
import realm
|
||||||
from realm import Realm
|
from realm import Realm
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -16,8 +16,11 @@ if 'py-json' not in sys.path:
|
|||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
from LANforge import LFUtils
|
from LANforge import LFUtils
|
||||||
|
# from LANforge import LFCliBase
|
||||||
|
from LANforge import lfcli_base
|
||||||
from LANforge.lfcli_base import LFCliBase
|
from LANforge.lfcli_base import LFCliBase
|
||||||
from LANforge.LFUtils import *
|
from LANforge.LFUtils import *
|
||||||
|
import realm
|
||||||
from realm import Realm
|
from realm import Realm
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
|||||||
@@ -391,7 +391,7 @@ class StaConnect2(LFCliBase):
|
|||||||
def main():
|
def main():
|
||||||
lfjson_host = "localhost"
|
lfjson_host = "localhost"
|
||||||
lfjson_port = 8080
|
lfjson_port = 8080
|
||||||
parser = Realm.create_basic_argparse(
|
parser = argparse.ArgumentParser(
|
||||||
description="""LANforge Unit Test: Connect Station to AP
|
description="""LANforge Unit Test: Connect Station to AP
|
||||||
Example:
|
Example:
|
||||||
./sta_connect2.py --dest 192.168.100.209 --dut_ssid OpenWrt-2 --dut_bssid 24:F5:A2:08:21:6C
|
./sta_connect2.py --dest 192.168.100.209 --dut_ssid OpenWrt-2 --dut_bssid 24:F5:A2:08:21:6C
|
||||||
|
|||||||
@@ -12,7 +12,10 @@ import time
|
|||||||
if 'py-json' not in sys.path:
|
if 'py-json' not in sys.path:
|
||||||
sys.path.append('../py-json')
|
sys.path.append('../py-json')
|
||||||
from LANforge import LFUtils
|
from LANforge import LFUtils
|
||||||
|
from LANforge import lfcli_base
|
||||||
|
from LANforge.lfcli_base import LFCliBase
|
||||||
from LANforge.LFUtils import *
|
from LANforge.LFUtils import *
|
||||||
|
import realm
|
||||||
from realm import Realm
|
from realm import Realm
|
||||||
|
|
||||||
|
|
||||||
@@ -30,7 +33,7 @@ class LoadLayer3(Realm):
|
|||||||
self.name_prefix = name_prefix
|
self.name_prefix = name_prefix
|
||||||
self.upstream = upstream
|
self.upstream = upstream
|
||||||
|
|
||||||
self.local_realm = Realm(lfclient_host=self.host, lfclient_port=self.port)
|
self.local_realm = realm.Realm(lfclient_host=self.host, lfclient_port=self.port)
|
||||||
self.station_profile = self.local_realm.new_station_profile()
|
self.station_profile = self.local_realm.new_station_profile()
|
||||||
self.station_profile.ssid = self.ssid
|
self.station_profile.ssid = self.ssid
|
||||||
self.station_profile.ssid_pass = self.paswd,
|
self.station_profile.ssid_pass = self.paswd,
|
||||||
|
|||||||
@@ -40,11 +40,13 @@ if 'py-json' not in sys.path:
|
|||||||
from LANforge.lfcli_base import LFCliBase
|
from LANforge.lfcli_base import LFCliBase
|
||||||
from LANforge.LFUtils import *
|
from LANforge.LFUtils import *
|
||||||
from LANforge import LFUtils
|
from LANforge import LFUtils
|
||||||
|
from LANforge import add_file_endp
|
||||||
from LANforge.add_file_endp import *
|
from LANforge.add_file_endp import *
|
||||||
import argparse
|
import argparse
|
||||||
from realm import Realm
|
import realm
|
||||||
import time
|
import time
|
||||||
import datetime
|
import datetime
|
||||||
|
import pprint
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
@@ -136,7 +138,7 @@ class FileIOTest(LFCliBase):
|
|||||||
# self.min_write_rate_bps = self.parse_size_bps(min_write_rate_bps)
|
# self.min_write_rate_bps = self.parse_size_bps(min_write_rate_bps)
|
||||||
#self.max_write_rate_bps = self.parse_size_bps(max_write_rate_bps)
|
#self.max_write_rate_bps = self.parse_size_bps(max_write_rate_bps)
|
||||||
|
|
||||||
self.local_realm = Realm(lfclient_host=self.host, lfclient_port=self.port)
|
self.local_realm = realm.Realm(lfclient_host=self.host, lfclient_port=self.port)
|
||||||
self.wo_profile = self.local_realm.new_fio_endp_profile()
|
self.wo_profile = self.local_realm.new_fio_endp_profile()
|
||||||
self.mvlan_profile = self.local_realm.new_mvlan_profile()
|
self.mvlan_profile = self.local_realm.new_mvlan_profile()
|
||||||
|
|
||||||
|
|||||||
@@ -32,9 +32,10 @@ if sys.version_info[0] != 3:
|
|||||||
|
|
||||||
if 'py-json' not in sys.path:
|
if 'py-json' not in sys.path:
|
||||||
sys.path.append(os.path.join(os.path.abspath('..'), 'py-json'))
|
sys.path.append(os.path.join(os.path.abspath('..'), 'py-json'))
|
||||||
|
import LANforge
|
||||||
from LANforge.lfcli_base import LFCliBase
|
from LANforge.lfcli_base import LFCliBase
|
||||||
from LANforge import LFUtils
|
from LANforge import LFUtils
|
||||||
from realm import Realm
|
import realm
|
||||||
import time
|
import time
|
||||||
import pprint
|
import pprint
|
||||||
|
|
||||||
@@ -60,7 +61,7 @@ class ConnectTest(LFCliBase):
|
|||||||
super().__init__(_host,
|
super().__init__(_host,
|
||||||
_port,
|
_port,
|
||||||
_proxy_str=_proxy_str,
|
_proxy_str=_proxy_str,
|
||||||
_local_realm=Realm(lfclient_host=_host,
|
_local_realm=realm.Realm(lfclient_host=_host,
|
||||||
lfclient_port=_port,
|
lfclient_port=_port,
|
||||||
_exit_on_error=_exit_on_error,
|
_exit_on_error=_exit_on_error,
|
||||||
_exit_on_fail=_exit_on_fail,
|
_exit_on_fail=_exit_on_fail,
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ if 'py-json' not in sys.path:
|
|||||||
import argparse
|
import argparse
|
||||||
from LANforge.lfcli_base import LFCliBase
|
from LANforge.lfcli_base import LFCliBase
|
||||||
from LANforge import LFUtils
|
from LANforge import LFUtils
|
||||||
from realm import Realm, WifiMonitor
|
import realm
|
||||||
import time
|
import time
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
@@ -40,12 +40,12 @@ class IPV4VariableTime(LFCliBase):
|
|||||||
self.debug = _debug_on
|
self.debug = _debug_on
|
||||||
self.name_prefix = name_prefix
|
self.name_prefix = name_prefix
|
||||||
self.test_duration = test_duration
|
self.test_duration = test_duration
|
||||||
self.local_realm = Realm(lfclient_host=self.host, lfclient_port=self.port)
|
self.local_realm = realm.Realm(lfclient_host=self.host, lfclient_port=self.port)
|
||||||
self.station_profile = self.local_realm.new_station_profile()
|
self.station_profile = self.local_realm.new_station_profile()
|
||||||
self.cx_profile = self.local_realm.new_l3_cx_profile()
|
self.cx_profile = self.local_realm.new_l3_cx_profile()
|
||||||
self.vap_profile = self.local_realm.new_vap_profile()
|
self.vap_profile = self.local_realm.new_vap_profile()
|
||||||
self.vap_profile.vap_name = "vap0000"
|
self.vap_profile.vap_name = "vap0000"
|
||||||
self.monitor = WifiMonitor(self.lfclient_url, self.local_realm, debug_=_debug_on)
|
self.monitor = realm.WifiMonitor(self.lfclient_url, self.local_realm, debug_=_debug_on)
|
||||||
|
|
||||||
self.station_profile.lfclient_url = self.lfclient_url
|
self.station_profile.lfclient_url = self.lfclient_url
|
||||||
self.station_profile.ssid = self.ssid
|
self.station_profile.ssid = self.ssid
|
||||||
|
|||||||
@@ -11,9 +11,10 @@ if sys.version_info[0] != 3:
|
|||||||
|
|
||||||
if 'py-json' not in sys.path:
|
if 'py-json' not in sys.path:
|
||||||
sys.path.append(os.path.join(os.path.abspath('..'), 'py-json'))
|
sys.path.append(os.path.join(os.path.abspath('..'), 'py-json'))
|
||||||
|
import LANforge
|
||||||
from LANforge.lfcli_base import LFCliBase
|
from LANforge.lfcli_base import LFCliBase
|
||||||
from LANforge import LFUtils
|
from LANforge import LFUtils
|
||||||
from realm import Realm
|
import realm
|
||||||
import time
|
import time
|
||||||
import pprint
|
import pprint
|
||||||
from test_ip_variable_time import IPVariableTime
|
from test_ip_variable_time import IPVariableTime
|
||||||
@@ -108,7 +109,7 @@ class TTLSTest(LFCliBase):
|
|||||||
self.timeout = 120
|
self.timeout = 120
|
||||||
self.number_template = number_template
|
self.number_template = number_template
|
||||||
self.debug = _debug_on
|
self.debug = _debug_on
|
||||||
self.local_realm = Realm(lfclient_host=self.host, lfclient_port=self.port)
|
self.local_realm = realm.Realm(lfclient_host=self.host, lfclient_port=self.port)
|
||||||
self.station_profile = self.local_realm.new_station_profile()
|
self.station_profile = self.local_realm.new_station_profile()
|
||||||
self.vap = vap
|
self.vap = vap
|
||||||
self.upstream_port = "eth1"
|
self.upstream_port = "eth1"
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ if 'py-json' not in sys.path:
|
|||||||
import argparse
|
import argparse
|
||||||
from LANforge.lfcli_base import LFCliBase
|
from LANforge.lfcli_base import LFCliBase
|
||||||
from LANforge import LFUtils
|
from LANforge import LFUtils
|
||||||
from realm import Realm
|
import realm
|
||||||
import time
|
import time
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ class VRTest(LFCliBase):
|
|||||||
self.debug = _debug_on
|
self.debug = _debug_on
|
||||||
self.name_prefix = name_prefix
|
self.name_prefix = name_prefix
|
||||||
self.test_duration = test_duration
|
self.test_duration = test_duration
|
||||||
self.local_realm = Realm(lfclient_host=self.host, lfclient_port=self.port)
|
self.local_realm = realm.Realm(lfclient_host=self.host, lfclient_port=self.port)
|
||||||
self.station_profile = self.local_realm.new_station_profile()
|
self.station_profile = self.local_realm.new_station_profile()
|
||||||
self.cx_profile = self.local_realm.new_l3_cx_profile()
|
self.cx_profile = self.local_realm.new_l3_cx_profile()
|
||||||
self.vr_profile = self.local_realm.new_vr_profile()
|
self.vr_profile = self.local_realm.new_vr_profile()
|
||||||
|
|||||||
@@ -10,10 +10,12 @@ if sys.version_info[0] != 3:
|
|||||||
if 'py-json' not in sys.path:
|
if 'py-json' not in sys.path:
|
||||||
sys.path.append(os.path.join(os.path.abspath('..'), 'py-json'))
|
sys.path.append(os.path.join(os.path.abspath('..'), 'py-json'))
|
||||||
|
|
||||||
|
import argparse
|
||||||
from LANforge.lfcli_base import LFCliBase
|
from LANforge.lfcli_base import LFCliBase
|
||||||
from LANforge.LFUtils import *
|
from LANforge.LFUtils import *
|
||||||
from l3_cxprofile import L3CXProfile
|
from LANforge import LFUtils
|
||||||
from realm import StationProfile, WifiMonitor, Realm
|
import l3_cxprofile
|
||||||
|
import realm
|
||||||
import time
|
import time
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
@@ -34,28 +36,28 @@ class L3PowersaveTraffic(LFCliBase):
|
|||||||
self.sta_list = station_list
|
self.sta_list = station_list
|
||||||
self.prefix = prefix
|
self.prefix = prefix
|
||||||
self.debug = _debug_on
|
self.debug = _debug_on
|
||||||
self.local_realm = Realm(lfclient_host=self.host, lfclient_port=self.port, debug_=False)
|
self.local_realm = realm.Realm(lfclient_host=self.host, lfclient_port=self.port, debug_=False)
|
||||||
# upload
|
# upload
|
||||||
self.cx_prof_upload = L3CXProfile(self.host, self.port, self.local_realm,
|
self.cx_prof_upload = l3_cxprofile.L3CXProfile(self.host, self.port, self.local_realm,
|
||||||
side_a_min_bps=side_a_min_rate, side_b_min_bps=0,
|
side_a_min_bps=side_a_min_rate, side_b_min_bps=0,
|
||||||
side_a_max_bps=side_a_max_rate, side_b_max_bps=0,
|
side_a_max_bps=side_a_max_rate, side_b_max_bps=0,
|
||||||
side_a_min_pdu=pdu_size, side_a_max_pdu=pdu_size,
|
side_a_min_pdu=pdu_size, side_a_max_pdu=pdu_size,
|
||||||
side_b_min_pdu=0, side_b_max_pdu=0, debug_=False)
|
side_b_min_pdu=0, side_b_max_pdu=0, debug_=False)
|
||||||
|
|
||||||
# download
|
# download
|
||||||
self.cx_prof_download = L3CXProfile(self.host, self.port, self.local_realm,
|
self.cx_prof_download = l3_cxprofile.L3CXProfile(self.host, self.port, self.local_realm,
|
||||||
side_a_min_bps=0, side_b_min_bps=side_b_min_rate,
|
side_a_min_bps=0, side_b_min_bps=side_b_min_rate,
|
||||||
side_a_max_bps=0, side_b_max_bps=side_b_max_rate,
|
side_a_max_bps=0, side_b_max_bps=side_b_max_rate,
|
||||||
side_a_min_pdu=0, side_a_max_pdu=0,
|
side_a_min_pdu=0, side_a_max_pdu=0,
|
||||||
side_b_min_pdu=pdu_size, side_b_max_pdu=pdu_size, debug_=False)
|
side_b_min_pdu=pdu_size, side_b_max_pdu=pdu_size, debug_=False)
|
||||||
self.test_duration = test_duration
|
self.test_duration = test_duration
|
||||||
self.station_profile = StationProfile(self.lfclient_url, self.local_realm, ssid=self.ssid,
|
self.station_profile = realm.StationProfile(self.lfclient_url, self.local_realm, ssid=self.ssid,
|
||||||
ssid_pass=self.password,
|
ssid_pass=self.password,
|
||||||
security=self.security, number_template_=self.prefix, mode=0,
|
security=self.security, number_template_=self.prefix, mode=0,
|
||||||
up=True,
|
up=True,
|
||||||
dhcp=True,
|
dhcp=True,
|
||||||
debug_=False)
|
debug_=False)
|
||||||
self.new_monitor = WifiMonitor(self.lfclient_url, self.local_realm, debug_=_debug_on)
|
self.new_monitor = realm.WifiMonitor(self.lfclient_url, self.local_realm, debug_=_debug_on)
|
||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
self.station_profile.use_security("open", ssid=self.ssid, passwd=self.password)
|
self.station_profile.use_security("open", ssid=self.ssid, passwd=self.password)
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ if 'py-json' not in sys.path:
|
|||||||
import argparse
|
import argparse
|
||||||
from LANforge.lfcli_base import LFCliBase
|
from LANforge.lfcli_base import LFCliBase
|
||||||
from LANforge import LFUtils
|
from LANforge import LFUtils
|
||||||
from realm import Realm
|
import realm
|
||||||
import time
|
import time
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ class L3VariableTimeLongevity(LFCliBase):
|
|||||||
self.radios = radios # from the command line
|
self.radios = radios # from the command line
|
||||||
self.radio_list = radio_name_list
|
self.radio_list = radio_name_list
|
||||||
self.number_of_stations_per_radio_list = number_of_stations_per_radio_list
|
self.number_of_stations_per_radio_list = number_of_stations_per_radio_list
|
||||||
self.local_realm = Realm(lfclient_host=self.host, lfclient_port=self.port)
|
self.local_realm = realm.Realm(lfclient_host=self.host, lfclient_port=self.port)
|
||||||
self.cx_profile = self.local_realm.new_l3_cx_profile()
|
self.cx_profile = self.local_realm.new_l3_cx_profile()
|
||||||
self.station_profiles = []
|
self.station_profiles = []
|
||||||
|
|
||||||
|
|||||||
@@ -65,9 +65,11 @@ if 'py-json' not in sys.path:
|
|||||||
import argparse
|
import argparse
|
||||||
from LANforge.lfcli_base import LFCliBase
|
from LANforge.lfcli_base import LFCliBase
|
||||||
from LANforge import LFUtils
|
from LANforge import LFUtils
|
||||||
|
import realm
|
||||||
import time
|
import time
|
||||||
import datetime
|
import datetime
|
||||||
from realm import Realm, PortUtils
|
from realm import TestGroupProfile
|
||||||
|
from port_utils import PortUtils
|
||||||
|
|
||||||
|
|
||||||
class IPV4L4(LFCliBase):
|
class IPV4L4(LFCliBase):
|
||||||
@@ -117,7 +119,7 @@ class IPV4L4(LFCliBase):
|
|||||||
self.num_tests = int(num_tests)
|
self.num_tests = int(num_tests)
|
||||||
self.target_requests_per_ten = int(target_requests_per_ten)
|
self.target_requests_per_ten = int(target_requests_per_ten)
|
||||||
|
|
||||||
self.local_realm = Realm(lfclient_host=self.host, lfclient_port=self.port)
|
self.local_realm = realm.Realm(lfclient_host=self.host, lfclient_port=self.port)
|
||||||
self.station_profile = self.local_realm.new_station_profile()
|
self.station_profile = self.local_realm.new_station_profile()
|
||||||
self.cx_profile = self.local_realm.new_l4_cx_profile()
|
self.cx_profile = self.local_realm.new_l4_cx_profile()
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ Copyright 2021 Candela Technologies Inc
|
|||||||
License: Free to distribute and modify. LANforge systems must be licensed.
|
License: Free to distribute and modify. LANforge systems must be licensed.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import sys
|
|
||||||
import os
|
|
||||||
|
|
||||||
if sys.version_info[0] != 3:
|
if sys.version_info[0] != 3:
|
||||||
print("This script requires Python 3")
|
print("This script requires Python 3")
|
||||||
|
|||||||
@@ -10,8 +10,9 @@ if 'py-json' not in sys.path:
|
|||||||
|
|
||||||
from LANforge.lfcli_base import LFCliBase
|
from LANforge.lfcli_base import LFCliBase
|
||||||
from LANforge.LFUtils import *
|
from LANforge.LFUtils import *
|
||||||
|
from LANforge import LFUtils
|
||||||
import argparse
|
import argparse
|
||||||
from realm import Realm
|
import realm
|
||||||
|
|
||||||
class TestGroup(LFCliBase):
|
class TestGroup(LFCliBase):
|
||||||
def __init__(self, host, port,
|
def __init__(self, host, port,
|
||||||
@@ -23,7 +24,7 @@ class TestGroup(LFCliBase):
|
|||||||
list_groups=None,
|
list_groups=None,
|
||||||
show_group=None):
|
show_group=None):
|
||||||
|
|
||||||
self.local_realm = Realm(lfclient_host=host, lfclient_port=port)
|
self.local_realm = realm.Realm(lfclient_host=host, lfclient_port=port)
|
||||||
self.tg_profile = self.local_realm.new_test_group_profile()
|
self.tg_profile = self.local_realm.new_test_group_profile()
|
||||||
if group_name is None and list_groups is None and (tg_action is not None or cx_action is not None or
|
if group_name is None and list_groups is None and (tg_action is not None or cx_action is not None or
|
||||||
add_cx_list is not None or rm_cx_list is not None or show_group is not None):
|
add_cx_list is not None or rm_cx_list is not None or show_group is not None):
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import argparse
|
|||||||
from LANforge.lfcli_base import LFCliBase
|
from LANforge.lfcli_base import LFCliBase
|
||||||
from LANforge.LFUtils import *
|
from LANforge.LFUtils import *
|
||||||
from LANforge import LFUtils
|
from LANforge import LFUtils
|
||||||
from realm import Realm, PacketFilter
|
import realm
|
||||||
import time
|
import time
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
@@ -69,8 +69,8 @@ class TIPStationPowersave(LFCliBase):
|
|||||||
self.powersave_sta_radio = powersave_station_radio_
|
self.powersave_sta_radio = powersave_station_radio_
|
||||||
self.sta_mac_map = {}
|
self.sta_mac_map = {}
|
||||||
self.debug = debug_on_
|
self.debug = debug_on_
|
||||||
self.packet_filter = PacketFilter()
|
self.packet_filter = realm.PacketFilter()
|
||||||
self.local_realm = Realm(lfclient_host=self.host,
|
self.local_realm = realm.Realm(lfclient_host=self.host,
|
||||||
lfclient_port=self.port,
|
lfclient_port=self.port,
|
||||||
debug_=self.debug)
|
debug_=self.debug)
|
||||||
|
|
||||||
|
|||||||
@@ -8,9 +8,12 @@ if sys.version_info[0] != 3:
|
|||||||
exit(1)
|
exit(1)
|
||||||
if 'py-json' not in sys.path:
|
if 'py-json' not in sys.path:
|
||||||
sys.path.append('../py-json')
|
sys.path.append('../py-json')
|
||||||
|
import traceback
|
||||||
|
|
||||||
|
from LANforge import LFUtils
|
||||||
from LANforge.LFUtils import *
|
from LANforge.LFUtils import *
|
||||||
from LANforge.lfcli_base import LFCliBase
|
from LANforge.lfcli_base import LFCliBase
|
||||||
|
from generic_cx import GenericCx
|
||||||
|
|
||||||
mgrURL = "http://localhost:8080/"
|
mgrURL = "http://localhost:8080/"
|
||||||
staName = "sta0"
|
staName = "sta0"
|
||||||
|
|||||||
@@ -12,15 +12,15 @@ import os
|
|||||||
|
|
||||||
from pip._internal.utils import logging
|
from pip._internal.utils import logging
|
||||||
|
|
||||||
if 'py_json' not in sys.path:
|
if 'py-json' not in sys.path:
|
||||||
sys.path.append(os.path.join(os.path.abspath('..'), 'py_json'))
|
sys.path.append(os.path.join(os.path.abspath('..'), 'py-json'))
|
||||||
from wlan_theoretical_sta import abg11_calculator, n11_calculator, ac11_calculator
|
import wlan_theoretical_sta
|
||||||
|
|
||||||
# main method
|
# main method
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
parse = abg11_calculator.create_argparse( prog='wlan_capacity_calculator.py',
|
parse = wlan_theoretical_sta.abg11_calculator.create_argparse( prog='wlan_capacity_calculator.py',
|
||||||
formatter_class=argparse.RawTextHelpFormatter,
|
formatter_class=argparse.RawTextHelpFormatter,
|
||||||
epilog='''\
|
epilog='''\
|
||||||
This python script calculates the theoretical value of three different stations( 11abg/11n/11ac)''',
|
This python script calculates the theoretical value of three different stations( 11abg/11n/11ac)''',
|
||||||
@@ -226,20 +226,20 @@ def main():
|
|||||||
# Select station(802.11a/b/g/n/ac standards)
|
# Select station(802.11a/b/g/n/ac standards)
|
||||||
|
|
||||||
if "11abg" in Calculator_name:
|
if "11abg" in Calculator_name:
|
||||||
Station1 = abg11_calculator(traffic_name, phy_name, encryption_name, qos_name, mac_name, basic_name,
|
Station1 = wlan_theoretical_sta.abg11_calculator(traffic_name, phy_name, encryption_name, qos_name, mac_name, basic_name,
|
||||||
preamble_name, slot_name, codec_name, rts_name, cts_name)
|
preamble_name, slot_name, codec_name, rts_name, cts_name)
|
||||||
Station1.calculate()
|
Station1.calculate()
|
||||||
Station1.get_result()
|
Station1.get_result()
|
||||||
|
|
||||||
if "11n" in Calculator_name:
|
if "11n" in Calculator_name:
|
||||||
Station2 = n11_calculator(traffic_name, data_name, channel_name, guard_name, highest_name, encryption_name,
|
Station2 = wlan_theoretical_sta.n11_calculator(traffic_name, data_name, channel_name, guard_name, highest_name, encryption_name,
|
||||||
qos_name, ip_name,
|
qos_name, ip_name,
|
||||||
mc_name, basic_name, mac_name,
|
mc_name, basic_name, mac_name,
|
||||||
codec_name, plcp_name, cwin_name, rts_name, cts_name)
|
codec_name, plcp_name, cwin_name, rts_name, cts_name)
|
||||||
Station2.calculate()
|
Station2.calculate()
|
||||||
Station2.get_result()
|
Station2.get_result()
|
||||||
if "11ac" in Calculator_name:
|
if "11ac" in Calculator_name:
|
||||||
Station3 = ac11_calculator(traffic_name, data_name, spatial_name, channel_name, guard_name, highest_name,
|
Station3 = wlan_theoretical_sta.ac11_calculator(traffic_name, data_name, spatial_name, channel_name, guard_name, highest_name,
|
||||||
encryption_name
|
encryption_name
|
||||||
, qos_name, ip_name, mc_name, basic_name, mac_name,
|
, qos_name, ip_name, mc_name, basic_name, mac_name,
|
||||||
codec_name, cwin_name, rtscts_name)
|
codec_name, cwin_name, rtscts_name)
|
||||||
|
|||||||
Reference in New Issue
Block a user