mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 19:28:00 +00:00
inheritance of L3CXProf v1 is back to LFClibase
Signed-off-by: Dipti <dipti.dhond@candelatech.com>
This commit is contained in:
@@ -590,31 +590,24 @@ class LFCliBase:
|
|||||||
}
|
}
|
||||||
self.json_post("/cli-json/add_event", data, debug_=debug_)
|
self.json_post("/cli-json/add_event", data, debug_=debug_)
|
||||||
|
|
||||||
# def read_file(self,
|
def read_file(self, filename):
|
||||||
# filename):
|
filename = open(filename, 'r')
|
||||||
# #Convert file contents to a list
|
return [line.split(',') for line in filename.readlines()]
|
||||||
# filename = open(filename, 'r')
|
|
||||||
# return [line.split(',') for line in filename.readlines()]
|
|
||||||
|
|
||||||
# def random_chars(self,
|
#Function creates random characters made of letters
|
||||||
# size,
|
def random_chars(self, size, chars=None):
|
||||||
# chars=None):
|
if chars is None:
|
||||||
# #Create random characters made of letters
|
chars = string.ascii_letters
|
||||||
# if chars is None:
|
return ''.join(random.choice(chars) for x in range(size))
|
||||||
# chars = string.ascii_letters
|
|
||||||
# return ''.join(random.choice(chars) for x in range(size))
|
|
||||||
|
|
||||||
# def get_milliseconds(self,
|
def get_milliseconds(self, timestamp):
|
||||||
# timestamp):
|
return (timestamp - datetime.datetime(1970,1,1)).total_seconds()*1000
|
||||||
# return (timestamp - datetime.datetime(1970,1,1)).total_seconds()*1000
|
|
||||||
# def get_seconds(self,
|
|
||||||
# timestamp):
|
|
||||||
# return (timestamp - datetime.datetime(1970,1,1)).total_seconds()
|
|
||||||
|
|
||||||
|
def get_seconds(self, timestamp):
|
||||||
|
return (timestamp - datetime.datetime(1970,1,1)).total_seconds()
|
||||||
|
|
||||||
# def replace_special_char(self,
|
def replace_special_char(self, str):
|
||||||
# str):
|
return str.replace('+', ' ').replace('_', ' ').strip(' ')
|
||||||
# return str.replace('+', ' ').replace('_', ' ').strip(' ')
|
|
||||||
|
|
||||||
Help_Mode = """Station WiFi modes: use the number value below:
|
Help_Mode = """Station WiFi modes: use the number value below:
|
||||||
auto : 0,
|
auto : 0,
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
import pprint
|
import pprint
|
||||||
from base_profile import BaseProfile
|
from LANforge.lfcli_base import LFCliBase
|
||||||
import csv
|
import csv
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
import os
|
import os
|
||||||
@@ -13,7 +13,7 @@ import random
|
|||||||
import string
|
import string
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
class L3CXProfile(BaseProfile):
|
class L3CXProfile(LFCliBase):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
lfclient_host,
|
lfclient_host,
|
||||||
lfclient_port,
|
lfclient_port,
|
||||||
@@ -46,7 +46,7 @@ class L3CXProfile(BaseProfile):
|
|||||||
:param number_template_: how many zeros wide we padd, possibly a starting integer with left padding
|
:param number_template_: how many zeros wide we padd, possibly a starting integer with left padding
|
||||||
:param debug_:
|
:param debug_:
|
||||||
"""
|
"""
|
||||||
super().__init__(local_realm, debug = debug_)
|
super().__init__(lfclient_host, lfclient_port, _debug = debug_)
|
||||||
self.debug = debug_
|
self.debug = debug_
|
||||||
self.local_realm = local_realm
|
self.local_realm = local_realm
|
||||||
self.side_a_min_pdu = side_a_min_pdu
|
self.side_a_min_pdu = side_a_min_pdu
|
||||||
|
|||||||
Reference in New Issue
Block a user