mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-10-30 02:12:38 +00:00
Making it so that lanforge-scripts can work if the repository isn't named exactly the same way
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
This commit is contained in:
@@ -14,10 +14,10 @@ if sys.version_info[0] != 3:
|
||||
print("This script requires Python 3")
|
||||
exit()
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
LFUtils = importlib.import_module("lanforge-scripts.py-json.LANforge.LFUtils")
|
||||
LFUtils = importlib.import_module("py-json.LANforge.LFUtils")
|
||||
|
||||
|
||||
class LFRequest:
|
||||
|
||||
@@ -16,10 +16,10 @@ if sys.version_info[0] != 3:
|
||||
print("This script requires Python 3")
|
||||
exit()
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
LFRequest = importlib.import_module("lanforge-scripts.py-json.LANforge.LFRequest")
|
||||
LFRequest = importlib.import_module("py-json.LANforge.LFRequest")
|
||||
|
||||
debug_printer = pprint.PrettyPrinter(indent=2)
|
||||
|
||||
|
||||
@@ -15,10 +15,10 @@ if sys.version_info[0] != 3:
|
||||
print("This script requires Python 3")
|
||||
exit()
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
lfcli_base = importlib.import_module("lanforge-scripts.py-json.LANforge.lfcli_base")
|
||||
lfcli_base = importlib.import_module("py-json.LANforge.lfcli_base")
|
||||
LFCliBase = lfcli_base.LFCliBase
|
||||
|
||||
|
||||
|
||||
@@ -19,11 +19,11 @@ if sys.version_info[0] != 3:
|
||||
print("This script requires Python 3")
|
||||
exit()
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
LFUtils = importlib.import_module("lanforge-scripts.py-json.LANforge.LFUtils")
|
||||
LFRequest = importlib.import_module("lanforge-scripts.py-json.LANforge.LFRequest")
|
||||
LFUtils = importlib.import_module("py-json.LANforge.LFUtils")
|
||||
LFRequest = importlib.import_module("py-json.LANforge.LFRequest")
|
||||
|
||||
|
||||
class LFCliBase:
|
||||
|
||||
@@ -6,10 +6,10 @@ if sys.version_info[0] != 3:
|
||||
print("This script requires Python 3")
|
||||
exit()
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
lf_json_autogen = importlib.import_module("lanforge-scripts.py-json.LANforge.lf_json_autogen")
|
||||
lf_json_autogen = importlib.import_module("py-json.LANforge.lf_json_autogen")
|
||||
LFJsonPost = lf_json_autogen.LFJsonPost
|
||||
|
||||
|
||||
|
||||
@@ -15,11 +15,11 @@ from time import sleep
|
||||
from urllib import error
|
||||
import pprint
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../")))
|
||||
|
||||
LFRequest = importlib.import_module("lanforge-scripts.py-json.LANforge.LFRequest")
|
||||
LFUtils = importlib.import_module("lanforge-scripts.py-json.LANforge.LFUtils")
|
||||
LFRequest = importlib.import_module("py-json.LANforge.LFRequest")
|
||||
LFUtils = importlib.import_module("py-json.LANforge.LFUtils")
|
||||
|
||||
j_printer = pprint.PrettyPrinter(indent=2)
|
||||
# todo: this needs to change
|
||||
|
||||
@@ -7,12 +7,12 @@ if sys.version_info[0] != 3:
|
||||
print("This script requires Python 3")
|
||||
exit()
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../")))
|
||||
|
||||
lfcli_base = importlib.import_module("lanforge-scripts.py-json.LANforge.lfcli_base")
|
||||
lfcli_base = importlib.import_module("py-json.LANforge.lfcli_base")
|
||||
LFCliBase = lfcli_base.LFCliBase
|
||||
add_dut = importlib.import_module("lanforge-scripts.py-json.LANforge.add_dut")
|
||||
add_dut = importlib.import_module("py-json.LANforge.add_dut")
|
||||
add_dut_flags = add_dut.add_dut_flags
|
||||
|
||||
|
||||
|
||||
@@ -15,16 +15,16 @@ if sys.version_info[0] != 3:
|
||||
print("This script requires Python 3")
|
||||
exit()
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../")))
|
||||
|
||||
lfcli_base = importlib.import_module("lanforge-scripts.py-json.LANforge.lfcli_base")
|
||||
lfcli_base = importlib.import_module("py-json.LANforge.lfcli_base")
|
||||
LFCliBase = lfcli_base.LFCliBase
|
||||
realm = importlib.import_module("lanforge-scripts.py-json.realm")
|
||||
realm = importlib.import_module("py-json.realm")
|
||||
Realm = realm.Realm
|
||||
cv_test_reports = importlib.import_module("lanforge-scripts.py-json.cv_test_reports")
|
||||
cv_test_reports = importlib.import_module("py-json.cv_test_reports")
|
||||
lf_rpt = cv_test_reports.lanforge_reports
|
||||
InfluxRequest = importlib.import_module("lanforge-scripts.py-dashboard.InfluxRequest")
|
||||
InfluxRequest = importlib.import_module("py-dashboard.InfluxRequest")
|
||||
influx_add_parser_args = InfluxRequest.influx_add_parser_args
|
||||
RecordInflux = InfluxRequest.RecordInflux
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@ import sys
|
||||
import os
|
||||
import importlib
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../")))
|
||||
|
||||
lf_cv_base = importlib.import_module("lanforge-scripts.py-json.lf_cv_base")
|
||||
lf_cv_base = importlib.import_module("py-json.lf_cv_base")
|
||||
ChamberViewBase = lf_cv_base.ChamberViewBase
|
||||
|
||||
|
||||
|
||||
@@ -7,12 +7,12 @@ from pprint import pprint
|
||||
import time
|
||||
import base64
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../")))
|
||||
|
||||
lfcli_base = importlib.import_module("lanforge-scripts.py-json.LANforge.lfcli_base")
|
||||
lfcli_base = importlib.import_module("py-json.LANforge.lfcli_base")
|
||||
LFCliBase = lfcli_base.LFCliBase
|
||||
add_dut = importlib.import_module("lanforge-scripts.py-json.LANforge.add_dut")
|
||||
add_dut = importlib.import_module("py-json.LANforge.add_dut")
|
||||
|
||||
|
||||
class DUTProfile(LFCliBase):
|
||||
|
||||
@@ -10,10 +10,10 @@ import pprint
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../")))
|
||||
|
||||
lfcli_base = importlib.import_module("lanforge-scripts.py-json.LANforge.lfcli_base")
|
||||
lfcli_base = importlib.import_module("py-json.LANforge.lfcli_base")
|
||||
LFCliBase = lfcli_base.LFCliBase
|
||||
|
||||
|
||||
|
||||
@@ -10,10 +10,10 @@ import time
|
||||
import datetime
|
||||
import json
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../")))
|
||||
|
||||
lfcli_base = importlib.import_module("lanforge-scripts.py-json.LANforge.lfcli_base")
|
||||
lfcli_base = importlib.import_module("py-json.LANforge.lfcli_base")
|
||||
LFCliBase = lfcli_base.LFCliBase
|
||||
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@ from pprint import pprint
|
||||
import pprint
|
||||
import time
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../")))
|
||||
|
||||
port_utils = importlib.import_module("lanforge-scripts.py-json.port_utils")
|
||||
port_utils = importlib.import_module("py-json.port_utils")
|
||||
PortUtils = port_utils.PortUtils
|
||||
lfcli_base = importlib.import_module("lanforge-scripts.py-json.LANforge.lfcli_base")
|
||||
lfcli_base = importlib.import_module("py-json.LANforge.lfcli_base")
|
||||
LFCliBase = lfcli_base.LFCliBase
|
||||
|
||||
|
||||
|
||||
@@ -9,10 +9,10 @@ import pandas as pd
|
||||
import time
|
||||
import datetime
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../")))
|
||||
|
||||
lfcli_base = importlib.import_module("lanforge-scripts.py-json.LANforge.lfcli_base")
|
||||
lfcli_base = importlib.import_module("py-json.LANforge.lfcli_base")
|
||||
LFCliBase = lfcli_base.LFCliBase
|
||||
|
||||
|
||||
|
||||
@@ -14,11 +14,11 @@ import random
|
||||
import string
|
||||
import datetime
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../")))
|
||||
|
||||
lfdata = importlib.import_module("lanforge-scripts.py-json.lfdata")
|
||||
base_profile = importlib.import_module("lanforge-scripts.py-json.base_profile")
|
||||
lfdata = importlib.import_module("py-json.lfdata")
|
||||
base_profile = importlib.import_module("py-json.base_profile")
|
||||
BaseProfile = base_profile.BaseProfile
|
||||
|
||||
|
||||
|
||||
@@ -11,10 +11,10 @@ import datetime
|
||||
import ast
|
||||
import csv
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../")))
|
||||
|
||||
lfcli_base = importlib.import_module("lanforge-scripts.py-json.LANforge.lfcli_base")
|
||||
lfcli_base = importlib.import_module("py-json.LANforge.lfcli_base")
|
||||
LFCliBase = lfcli_base.LFCliBase
|
||||
|
||||
|
||||
|
||||
@@ -4,13 +4,13 @@ import os
|
||||
import importlib
|
||||
import time
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../")))
|
||||
|
||||
lfcli_base = importlib.import_module("lanforge-scripts.py-json.LANforge.lfcli_base")
|
||||
lfcli_base = importlib.import_module("py-json.LANforge.lfcli_base")
|
||||
LFCliBase = lfcli_base.LFCliBase
|
||||
LFRequest = importlib.import_module("lanforge-scripts.py-json.LANforge.LFRequest")
|
||||
LFUtils = importlib.import_module("lanforge-scripts.py-json.LANforge.LFUtils")
|
||||
LFRequest = importlib.import_module("py-json.LANforge.LFRequest")
|
||||
LFUtils = importlib.import_module("py-json.LANforge.LFUtils")
|
||||
|
||||
|
||||
class ATTENUATORProfile(LFCliBase):
|
||||
|
||||
@@ -12,10 +12,10 @@ import sys
|
||||
import os
|
||||
import importlib
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../")))
|
||||
|
||||
lfcli_base = importlib.import_module("lanforge-scripts.py-json.LANforge.lfcli_base")
|
||||
lfcli_base = importlib.import_module("py-json.LANforge.lfcli_base")
|
||||
LFCliBase = lfcli_base.LFCliBase
|
||||
|
||||
|
||||
|
||||
@@ -6,14 +6,14 @@ import pprint
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../")))
|
||||
|
||||
lfcli_base = importlib.import_module("lanforge-scripts.py-json.LANforge.lfcli_base")
|
||||
lfcli_base = importlib.import_module("py-json.LANforge.lfcli_base")
|
||||
LFCliBase = lfcli_base.LFCliBase
|
||||
LFRequest = importlib.import_module("lanforge-scripts.py-json.LANforge.LFRequest")
|
||||
LFUtils = importlib.import_module("lanforge-scripts.py-json.LANforge.LFUtils")
|
||||
set_port = importlib.import_module("lanforge-scripts.py-json.LANforge.set_port")
|
||||
LFRequest = importlib.import_module("py-json.LANforge.LFRequest")
|
||||
LFUtils = importlib.import_module("py-json.LANforge.LFUtils")
|
||||
set_port = importlib.import_module("py-json.LANforge.set_port")
|
||||
|
||||
|
||||
class MACVLANProfile(LFCliBase):
|
||||
|
||||
@@ -5,10 +5,10 @@ import importlib
|
||||
import pprint
|
||||
from pprint import pprint
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../")))
|
||||
|
||||
lfcli_base = importlib.import_module("lanforge-scripts.py-json.LANforge.lfcli_base")
|
||||
lfcli_base = importlib.import_module("py-json.LANforge.lfcli_base")
|
||||
LFCliBase = lfcli_base.LFCliBase
|
||||
|
||||
|
||||
|
||||
@@ -6,13 +6,13 @@ import pprint
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../")))
|
||||
|
||||
lfcli_base = importlib.import_module("lanforge-scripts.py-json.LANforge.lfcli_base")
|
||||
lfcli_base = importlib.import_module("py-json.LANforge.lfcli_base")
|
||||
LFCliBase = lfcli_base.LFCliBase
|
||||
LFRequest = importlib.import_module("lanforge-scripts.py-json.LANforge.LFRequest")
|
||||
LFUtils = importlib.import_module("lanforge-scripts.py-json.LANforge.LFUtils")
|
||||
LFRequest = importlib.import_module("py-json.LANforge.LFRequest")
|
||||
LFUtils = importlib.import_module("py-json.LANforge.LFUtils")
|
||||
|
||||
|
||||
class QVLANProfile(LFCliBase):
|
||||
|
||||
@@ -17,49 +17,49 @@ from pprint import pprint
|
||||
|
||||
# ---- ---- ---- ---- LANforge Base Imports ---- ---- ---- ----
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../")))
|
||||
|
||||
LANforge = importlib.import_module("lanforge-scripts.py-json.LANforge")
|
||||
LFUtils = importlib.import_module("lanforge-scripts.py-json.LANforge.LFUtils")
|
||||
lfcli_base = importlib.import_module("lanforge-scripts.py-json.LANforge.lfcli_base")
|
||||
LANforge = importlib.import_module("py-json.LANforge")
|
||||
LFUtils = importlib.import_module("py-json.LANforge.LFUtils")
|
||||
lfcli_base = importlib.import_module("py-json.LANforge.lfcli_base")
|
||||
LFCliBase = lfcli_base.LFCliBase
|
||||
|
||||
# ---- ---- ---- ---- Profile Imports ---- ---- ---- ----
|
||||
|
||||
l3_cxprofile = importlib.import_module("lanforge-scripts.py-json.l3_cxprofile")
|
||||
l3_cxprofile = importlib.import_module("py-json.l3_cxprofile")
|
||||
L3CXProfile = l3_cxprofile.L3CXProfile
|
||||
l3_cxprofile2 = importlib.import_module("lanforge-scripts.py-json.l3_cxprofile2")
|
||||
l3_cxprofile2 = importlib.import_module("py-json.l3_cxprofile2")
|
||||
L3CXProfile2 = l3_cxprofile2.L3CXProfile2
|
||||
l4_cxprofile = importlib.import_module("lanforge-scripts.py-json.l4_cxprofile")
|
||||
l4_cxprofile = importlib.import_module("py-json.l4_cxprofile")
|
||||
L4CXProfile = l4_cxprofile.L4CXProfile
|
||||
lf_attenmod = importlib.import_module("lanforge-scripts.py-json.lf_attenmod")
|
||||
lf_attenmod = importlib.import_module("py-json.lf_attenmod")
|
||||
ATTENUATORProfile = lf_attenmod.ATTENUATORProfile
|
||||
multicast_profile = importlib.import_module("lanforge-scripts.py-json.multicast_profile")
|
||||
multicast_profile = importlib.import_module("py-json.multicast_profile")
|
||||
MULTICASTProfile = multicast_profile.MULTICASTProfile
|
||||
http_profile = importlib.import_module("lanforge-scripts.py-json.http_profile")
|
||||
http_profile = importlib.import_module("py-json.http_profile")
|
||||
HTTPProfile = http_profile.HTTPProfile
|
||||
station_profile = importlib.import_module("lanforge-scripts.py-json.station_profile")
|
||||
station_profile = importlib.import_module("py-json.station_profile")
|
||||
StationProfile = station_profile.StationProfile
|
||||
fio_endp_profile = importlib.import_module("lanforge-scripts.py-json.fio_endp_profile")
|
||||
fio_endp_profile = importlib.import_module("py-json.fio_endp_profile")
|
||||
FIOEndpProfile = fio_endp_profile.FIOEndpProfile
|
||||
test_group_profile = importlib.import_module("lanforge-scripts.py-json.test_group_profile")
|
||||
test_group_profile = importlib.import_module("py-json.test_group_profile")
|
||||
TestGroupProfile = test_group_profile.TestGroupProfile
|
||||
dut_profile = importlib.import_module("lanforge-scripts.py-json.dut_profile")
|
||||
dut_profile = importlib.import_module("py-json.dut_profile")
|
||||
DUTProfile = dut_profile.DUTProfile
|
||||
vap_profile = importlib.import_module("lanforge-scripts.py-json.vap_profile")
|
||||
vap_profile = importlib.import_module("py-json.vap_profile")
|
||||
VAPProfile = vap_profile.VAPProfile
|
||||
mac_vlan_profile = importlib.import_module("lanforge-scripts.py-json.mac_vlan_profile")
|
||||
mac_vlan_profile = importlib.import_module("py-json.mac_vlan_profile")
|
||||
MACVLANProfile = mac_vlan_profile.MACVLANProfile
|
||||
wifi_monitor_profile = importlib.import_module("lanforge-scripts.py-json.wifi_monitor_profile")
|
||||
wifi_monitor_profile = importlib.import_module("py-json.wifi_monitor_profile")
|
||||
WifiMonitor = wifi_monitor_profile.WifiMonitor
|
||||
gen_cxprofile = importlib.import_module("lanforge-scripts.py-json.gen_cxprofile")
|
||||
gen_cxprofile = importlib.import_module("py-json.gen_cxprofile")
|
||||
GenCXProfile = gen_cxprofile.GenCXProfile
|
||||
qvlan_profile = importlib.import_module("lanforge-scripts.py-json.qvlan_profile")
|
||||
qvlan_profile = importlib.import_module("py-json.qvlan_profile")
|
||||
QVLANProfile = qvlan_profile.QVLANProfile
|
||||
port_utils = importlib.import_module("lanforge-scripts.py-json.port_utils")
|
||||
port_utils = importlib.import_module("py-json.port_utils")
|
||||
PortUtils = port_utils.PortUtils
|
||||
lfdata = importlib.import_module("lanforge-scripts.py-json.lfdata")
|
||||
lfdata = importlib.import_module("py-json.lfdata")
|
||||
LFDataCollection = lfdata.LFDataCollection
|
||||
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@ import pprint
|
||||
import time
|
||||
from pprint import pprint
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../")))
|
||||
|
||||
realm = importlib.import_module("lanforge-scripts.py-json.realm")
|
||||
realm = importlib.import_module("py-json.realm")
|
||||
Realm = realm.Realm
|
||||
LFUtils = importlib.import_module("lanforge-scripts.py-json.LANforge.LFUtils")
|
||||
LFUtils = importlib.import_module("py-json.LANforge.LFUtils")
|
||||
|
||||
|
||||
localrealm = Realm("localhost", 8080, True)
|
||||
|
||||
@@ -13,10 +13,10 @@ if sys.version_info[0] != 3:
|
||||
print("This script requires Python 3")
|
||||
exit()
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../")))
|
||||
|
||||
LFRequest = importlib.import_module("lanforge-scripts.py-json.LANforge.LFRequest")
|
||||
LFRequest = importlib.import_module("py-json.LANforge.LFRequest")
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
@@ -6,26 +6,26 @@ import pprint
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../")))
|
||||
|
||||
lfcli_base = importlib.import_module("lanforge-scripts.py-json.LANforge.lfcli_base")
|
||||
lfcli_base = importlib.import_module("py-json.LANforge.lfcli_base")
|
||||
LFCliBase = lfcli_base.LFCliBase
|
||||
LFRequest = importlib.import_module("lanforge-scripts.py-json.LANforge.LFRequest")
|
||||
LFUtils = importlib.import_module("lanforge-scripts.py-json.LANforge.LFUtils")
|
||||
set_port = importlib.import_module("lanforge-scripts.py-json.LANforge.set_port")
|
||||
add_sta = importlib.import_module("lanforge-scripts.py-json.LANforge.add_sta")
|
||||
LFRequest = importlib.import_module("py-json.LANforge.LFRequest")
|
||||
LFUtils = importlib.import_module("py-json.LANforge.LFUtils")
|
||||
set_port = importlib.import_module("py-json.LANforge.set_port")
|
||||
add_sta = importlib.import_module("py-json.LANforge.add_sta")
|
||||
|
||||
# Uncomment below to include autogen library.
|
||||
# if os.environ.get("LF_USE_AUTOGEN") == 1:
|
||||
# lf_json_autogen = importlib.import_module("lanforge-scripts.py-json.LANforge.lf_json_autogen")
|
||||
# lf_json_autogen = importlib.import_module("py-json.LANforge.lf_json_autogen")
|
||||
# LFJsonPost = jf_json_autogen.LFJsonPost
|
||||
|
||||
# use the station profile to set the combination of features you want on your stations
|
||||
# once this combination is configured, build the stations with the build(resource, radio, number) call
|
||||
# build() calls will fail if the station already exists. Please survey and clean your resource
|
||||
# before calling build()
|
||||
# realm = importlib.import_module("lanforge-scripts.py-json.realm")
|
||||
# realm = importlib.import_module("py-json.realm")
|
||||
# Realm = realm.Realm
|
||||
# survey = Realm.findStations(resource=1)
|
||||
# Realm.removeStations(survey)
|
||||
|
||||
@@ -3,10 +3,10 @@ import sys
|
||||
import os
|
||||
import importlib
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../")))
|
||||
|
||||
lfdata = importlib.import_module("lanforge-scripts.py-json.lfdata")
|
||||
lfdata = importlib.import_module("py-json.lfdata")
|
||||
LFDataCollection = lfdata.LFDataCollection
|
||||
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ import pprint
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../")))
|
||||
|
||||
lfcli_base = importlib.import_module("lanforge-scripts.py-json.LANforge.lfcli_base")
|
||||
lfcli_base = importlib.import_module("py-json.LANforge.lfcli_base")
|
||||
LFCliBase = lfcli_base.LFCliBase
|
||||
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@ import os
|
||||
import importlib
|
||||
import pprint
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../")))
|
||||
|
||||
LFUtils = importlib.import_module("lanforge-scripts.py-json.LANforge.LFUtils")
|
||||
LFUtils = importlib.import_module("py-json.LANforge.LFUtils")
|
||||
|
||||
|
||||
distrib_load = {
|
||||
|
||||
@@ -18,13 +18,13 @@ import threading
|
||||
import re
|
||||
import json
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../")))
|
||||
|
||||
lfcli_base = importlib.import_module("lanforge-scripts.py-json.LANforge.lfcli_base")
|
||||
lfcli_base = importlib.import_module("py-json.LANforge.lfcli_base")
|
||||
LFCliBase = lfcli_base.LFCliBase
|
||||
LFUtils = importlib.import_module("lanforge-scripts.py-json.LANforge.LFUtils")
|
||||
realm = importlib.import_module("lanforge-scripts.py-json.realm")
|
||||
LFUtils = importlib.import_module("py-json.LANforge.LFUtils")
|
||||
realm = importlib.import_module("py-json.realm")
|
||||
PortUtils = realm.PortUtils
|
||||
|
||||
webconsole_dir = os.path.dirname(os.path.dirname(os.path.dirname(os.getcwd())))
|
||||
|
||||
@@ -6,15 +6,15 @@ import pprint
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../")))
|
||||
|
||||
lfcli_base = importlib.import_module("lanforge-scripts.py-json.LANforge.lfcli_base")
|
||||
lfcli_base = importlib.import_module("py-json.LANforge.lfcli_base")
|
||||
LFCliBase = lfcli_base.LFCliBase
|
||||
LFRequest = importlib.import_module("lanforge-scripts.py-json.LANforge.LFRequest")
|
||||
add_vap = importlib.import_module("lanforge-scripts.py-json.LANforge.add_vap")
|
||||
set_port = importlib.import_module("lanforge-scripts.py-json.LANforge.set_port")
|
||||
LFUtils = importlib.import_module("lanforge-scripts.py-json.LANforge.LFUtils")
|
||||
LFRequest = importlib.import_module("py-json.LANforge.LFRequest")
|
||||
add_vap = importlib.import_module("py-json.LANforge.add_vap")
|
||||
set_port = importlib.import_module("py-json.LANforge.set_port")
|
||||
LFUtils = importlib.import_module("py-json.LANforge.LFUtils")
|
||||
|
||||
|
||||
class VAPProfile(LFCliBase):
|
||||
|
||||
@@ -5,11 +5,11 @@ import time
|
||||
from pprint import pprint
|
||||
from random import randint
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../")))
|
||||
|
||||
LFUtils = importlib.import_module("lanforge-scripts.py-json.LANforge.LFUtils")
|
||||
base_profile = importlib.import_module("lanforge-scripts.py-json.base_profile")
|
||||
LFUtils = importlib.import_module("py-json.LANforge.LFUtils")
|
||||
base_profile = importlib.import_module("py-json.base_profile")
|
||||
BaseProfile = base_profile.BaseProfile
|
||||
|
||||
|
||||
|
||||
@@ -6,14 +6,14 @@ import pprint
|
||||
from pprint import pprint
|
||||
import time
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../")))
|
||||
|
||||
lfcli_base = importlib.import_module("lanforge-scripts.py-json.LANforge.lfcli_base")
|
||||
lfcli_base = importlib.import_module("py-json.LANforge.lfcli_base")
|
||||
LFCliBase = lfcli_base.LFCliBase
|
||||
add_monitor = importlib.import_module("lanforge-scripts.py-json.LANforge.add_monitor")
|
||||
LFUtils = importlib.import_module("lanforge-scripts.py-json.LANforge.LFUtils")
|
||||
set_wifi_radio = importlib.import_module("lanforge-scripts.py-json.LANforge.set_wifi_radio")
|
||||
add_monitor = importlib.import_module("py-json.LANforge.add_monitor")
|
||||
LFUtils = importlib.import_module("py-json.LANforge.LFUtils")
|
||||
set_wifi_radio = importlib.import_module("py-json.LANforge.set_wifi_radio")
|
||||
set_radio_mode = set_wifi_radio.set_radio_mode
|
||||
|
||||
|
||||
|
||||
@@ -29,10 +29,10 @@ if sys.version_info[0] != 3:
|
||||
print("This script requires Python 3")
|
||||
exit()
|
||||
|
||||
if 'lanforge-scripts' not in sys.path:
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
|
||||
|
||||
sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../")))
|
||||
|
||||
LFUtils = importlib.import_module("lanforge-scripts.py-json.LANforge.LFUtils")
|
||||
LFUtils = importlib.import_module("py-json.LANforge.LFUtils")
|
||||
|
||||
|
||||
cre={
|
||||
|
||||
Reference in New Issue
Block a user