#!/usr/bin/env python3
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated by LANforge JsonApiPythonGenerator, Mon Jun 21 23:25:47 PDT 2021
This file expects to live in py-json/LANforge directory.
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
import sys
import json
import keyword
from enum import Enum
from LANforge import LFRequest
from LANforge.lfcli_base import LFCliBase
from lfcli_base import LFCliBase
from typing import NewType, Type
class LFJsonGet(LFCliBase):
def __init__(self, lfclient_host='localhost',
lfclient_port=8080,
debug_=False,
_exit_on_error=False,
_exit_on_fail=False,
_proxy_str=None,
_capture_signal_list=[]
):
super().__init__(_lfjson_host=lfclient_host,
_lfjson_port=lfclient_port,
_debug=debug_,
_exit_on_error=_exit_on_error,
_exit_on_fail=_exit_on_fail,
_proxy_str=_proxy_str,
_capture_signal_list=_capture_signal_list)
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Extract fields from this response using the expected keys:
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def extractValues(self, response=None, singular_key=None, plural_key=None):
if (singular_key is None) or (plural_key is None) or (not singular_key) or (not plural_key):
raise ValueError("extractValues wants non-empty response, singular_key and plural_key")
if (singular_key in response) and (not response[ singular_key ]):
return []
elif ( singular_key in response) and ( type(response[ singular_key ]) is dict):
return [ response[ singular_key ] ]
elif ( plural_key in response) and (not response[ plural_key ]):
return []
else:
return response[ plural_key ]
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /attenuator
URL Encoded Column Names JSON keys
use these in a URL use these to get value
------------------ ----------------------
entity+id entity id
module+1 module 1
module+2 module 2
module+3 module 3
module+4 module 4
module+5 module 5
module+6 module 6
module+7 module 7
module+8 module 8
name name
script script
state state
temperature temperature
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def get_attenuator(self,
fields=[],
debug_=False):
debug_ |= self.debug
url = "/attenuator"
if (fields is not None) and (type(fields) is not list):
raise ValueError("fields must be a None or a list")
if (fields is not None) and (len(fields) > 0):
for field in fields:
if field.index(" ") > -1 :
raise ValueError("field should be URL encoded: [%s]" % (field))
url += "?fields=%s" % (",".join(fields))
response = self.json_get(url, debug_=debug_)
if response is None:
return None
return self.extractValues(response=response,
singular_key="attenuator",
plural_key="attenuators")
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /chamber
URL Encoded Column Names JSON keys
use these in a URL use these to get value
------------------ ----------------------
chamber chamber
chamber+connections chamber connections
chamber+resources chamber resources
chamber+type chamber type
duts duts
entity+id entity id
flags flags
hide hide
isolation isolation
marked marked
open open
reported+rotation+%28deg%29 reported rotation (deg)
reported+rpm reported rpm
reported+tilt+%28deg%29 reported tilt (deg)
resource resource
rotation+%28deg%29 rotation (deg)
rpm rpm
smas smas
tilt+%28deg%29 tilt (deg)
turntable turntable
turntable+type turntable type
virtual virtual
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def get_chamber(self,
fields=[],
debug_=False):
debug_ |= self.debug
url = "/chamber"
if (fields is not None) and (type(fields) is not list):
raise ValueError("fields must be a None or a list")
if (fields is not None) and (len(fields) > 0):
for field in fields:
if field.index(" ") > -1 :
raise ValueError("field should be URL encoded: [%s]" % (field))
url += "?fields=%s" % (",".join(fields))
response = self.json_get(url, debug_=debug_)
if response is None:
return None
return self.extractValues(response=response,
singular_key="chamber",
plural_key="chambers")
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cx
URL Encoded Column Names JSON keys
use these in a URL use these to get value
------------------ ----------------------
avg+rtt avg rtt
bps+rx+a bps rx a
bps+rx+b bps rx b
drop+pkts+a drop pkts a
drop+pkts+b drop pkts b
eid eid
endpoints+%28a%C2%A0%E2%86%94%C2%A0b%29 endpoints (a ↔ b)
entity+id entity id
name name
pkt+rx+a pkt rx a
pkt+rx+b pkt rx b
rpt+timer rpt timer
rx+drop+%25+a rx drop % a
rx+drop+%25+b rx drop % b
state state
type type
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def get_cx(self,
fields=[],
debug_=False):
debug_ |= self.debug
url = "/cx"
if (fields is not None) and (type(fields) is not list):
raise ValueError("fields must be a None or a list")
if (fields is not None) and (len(fields) > 0):
for field in fields:
if field.index(" ") > -1 :
raise ValueError("field should be URL encoded: [%s]" % (field))
url += "?fields=%s" % (",".join(fields))
response = self.json_get(url, debug_=debug_)
if response is None:
return None
return self.extractValues(response=response,
singular_key="",
plural_key="")
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /dut
URL Encoded Column Names JSON keys
use these in a URL use these to get value
------------------ ----------------------
api+version api version
bssid-1 bssid-1
bssid-2 bssid-2
bssid-3 bssid-3
bssid-4 bssid-4
bssid-5 bssid-5
bssid-6 bssid-6
bssid-7 bssid-7
bssid-8 bssid-8
dut dut
eap-id eap-id
entity+id entity id
hw+info hw info
image+file image file
lan lan
mgt+ip mgt ip
model+number model number
notes notes
num+ant+radio+1 num ant radio 1
num+ant+radio+2 num ant radio 2
num+ant+radio+3 num ant radio 3
password-1 password-1
password-2 password-2
password-3 password-3
password-4 password-4
password-5 password-5
password-6 password-6
password-7 password-7
password-8 password-8
serial+number serial number
serial+port serial port
ssid-1 ssid-1
ssid-2 ssid-2
ssid-3 ssid-3
ssid-4 ssid-4
ssid-5 ssid-5
ssid-6 ssid-6
ssid-7 ssid-7
ssid-8 ssid-8
sw+info sw info
wan wan
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def get_dut(self,
fields=[],
debug_=False):
debug_ |= self.debug
url = "/dut"
if (fields is not None) and (type(fields) is not list):
raise ValueError("fields must be a None or a list")
if (fields is not None) and (len(fields) > 0):
for field in fields:
if field.index(" ") > -1 :
raise ValueError("field should be URL encoded: [%s]" % (field))
url += "?fields=%s" % (",".join(fields))
response = self.json_get(url, debug_=debug_)
if response is None:
return None
return self.extractValues(response=response,
singular_key="dut",
plural_key="duts")
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /endp
URL Encoded Column Names JSON keys
use these in a URL use these to get value
------------------ ----------------------
1st+rx 1st rx
a%2Fb a/b
bursty bursty
crc+fail crc fail
cwnd cwnd
cx+active cx active
cx+estab cx estab
cx+estab%2Fs cx estab/s
cx+to cx to
delay delay
destination+addr destination addr
dropped dropped
dup+pkts dup pkts
eid eid
elapsed elapsed
entity+id entity id
jitter jitter
max+pdu max pdu
max+rate max rate
min+pdu min pdu
min+rate min rate
mng mng
name name
ooo+pkts ooo pkts
pattern pattern
pdu%2Fs+rx pdu/s rx
pdu%2Fs+tx pdu/s tx
pps+rx+ll pps rx ll
pps+tx+ll pps tx ll
rcv+buf rcv buf
replays replays
run run
rx+ber rx ber
rx+bytes rx bytes
rx+drop+%25 rx drop %
rx+dup+%25 rx dup %
rx+ooo+%25 rx ooo %
rx+pdus rx pdus
rx+pkts+ll rx pkts ll
rx+rate rx rate
rx+rate+%281%C2%A0min%29 rx rate (1 min)
rx+rate+%28last%29 rx rate (last)
rx+rate+ll rx rate ll
rx+wrong+dev rx wrong dev
script script
send+buf send buf
source+addr source addr
tcp+mss tcp mss
tcp+rtx tcp rtx
tx+bytes tx bytes
tx+pdus tx pdus
tx+pkts+ll tx pkts ll
tx+rate tx rate
tx+rate+%281%C2%A0min%29 tx rate (1 min)
tx+rate+%28last%29 tx rate (last)
tx+rate+ll tx rate ll
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def get_endp(self,
fields=[],
debug_=False):
debug_ |= self.debug
url = "/endp"
if (fields is not None) and (type(fields) is not list):
raise ValueError("fields must be a None or a list")
if (fields is not None) and (len(fields) > 0):
for field in fields:
if field.index(" ") > -1 :
raise ValueError("field should be URL encoded: [%s]" % (field))
url += "?fields=%s" % (",".join(fields))
response = self.json_get(url, debug_=debug_)
if response is None:
return None
return self.extractValues(response=response,
singular_key="endpoint",
plural_key="endpoint")
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /events
URL Encoded Column Names JSON keys
use these in a URL use these to get value
------------------ ----------------------
eid eid
entity+id entity id
event event
event+description event description
id id
name name
priority priority
time-stamp time-stamp
type type
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def get_events(self,
fields=[],
debug_=False):
debug_ |= self.debug
url = "/events"
if (fields is not None) and (type(fields) is not list):
raise ValueError("fields must be a None or a list")
if (fields is not None) and (len(fields) > 0):
for field in fields:
if field.index(" ") > -1 :
raise ValueError("field should be URL encoded: [%s]" % (field))
url += "?fields=%s" % (",".join(fields))
response = self.json_get(url, debug_=debug_)
if response is None:
return None
return self.extractValues(response=response,
singular_key="alert",
plural_key="alerts")
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /fileio
URL Encoded Column Names JSON keys
use these in a URL use these to get value
------------------ ----------------------
buf-rd buf-rd
buf-wr buf-wr
bytes-rd bytes-rd
bytes-wr bytes-wr
crc+fail crc fail
eid eid
entity+id entity id
files+%23 files #
files-read files-read
files-wr files-wr
io+fail io fail
max-file-sz max-file-sz
max-rd-bps max-rd-bps
max-rw-sz max-rw-sz
max-wr-bps max-wr-bps
min-file-sz min-file-sz
min-rd-bps min-rd-bps
min-rw-sz min-rw-sz
min-wr-bps min-wr-bps
name name
read-bps read-bps
rpt+timer rpt timer
rx-bps-20s rx-bps-20s
status status
tx-bps-20s tx-bps-20s
type type
write-bps write-bps
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def get_fileio(self,
fields=[],
debug_=False):
debug_ |= self.debug
url = "/fileio"
if (fields is not None) and (type(fields) is not list):
raise ValueError("fields must be a None or a list")
if (fields is not None) and (len(fields) > 0):
for field in fields:
if field.index(" ") > -1 :
raise ValueError("field should be URL encoded: [%s]" % (field))
url += "?fields=%s" % (",".join(fields))
response = self.json_get(url, debug_=debug_)
if response is None:
return None
return self.extractValues(response=response,
singular_key="endpoint",
plural_key="endpoint")
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /generic
URL Encoded Column Names JSON keys
use these in a URL use these to get value
------------------ ----------------------
bps+rx bps rx
bps+tx bps tx
command command
dropped dropped
eid eid
elapsed elapsed
entity+id entity id
last+results last results
name name
pdu%2Fs+rx pdu/s rx
pdu%2Fs+tx pdu/s tx
rpt+timer rpt timer
rpt%23 rpt#
rx+bytes rx bytes
rx+pkts rx pkts
status status
tx+bytes tx bytes
tx+pkts tx pkts
type type
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def get_generic(self,
fields=[],
debug_=False):
debug_ |= self.debug
url = "/generic"
if (fields is not None) and (type(fields) is not list):
raise ValueError("fields must be a None or a list")
if (fields is not None) and (len(fields) > 0):
for field in fields:
if field.index(" ") > -1 :
raise ValueError("field should be URL encoded: [%s]" % (field))
url += "?fields=%s" % (",".join(fields))
response = self.json_get(url, debug_=debug_)
if response is None:
return None
return self.extractValues(response=response,
singular_key="endpoint",
plural_key="endpoints")
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /gui-cli
URL Encoded Column Names JSON keys
use these in a URL use these to get value
------------------ ----------------------
na na
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def get_gui_cli(self,
fields=[],
debug_=False):
debug_ |= self.debug
url = "/gui-cli"
if (fields is not None) and (type(fields) is not list):
raise ValueError("fields must be a None or a list")
if (fields is not None) and (len(fields) > 0):
for field in fields:
if field.index(" ") > -1 :
raise ValueError("field should be URL encoded: [%s]" % (field))
url += "?fields=%s" % (",".join(fields))
response = self.json_get(url, debug_=debug_)
if response is None:
return None
return self.extractValues(response=response,
singular_key="",
plural_key="")
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /layer4
URL Encoded Column Names JSON keys
use these in a URL use these to get value
------------------ ----------------------
%21conn !conn
acc.+denied acc. denied
bad-proto bad-proto
bad-url bad-url
bytes-rd bytes-rd
bytes-wr bytes-wr
dns-avg dns-avg
dns-max dns-max
dns-min dns-min
eid eid
elapsed elapsed
entity+id entity id
fb-avg fb-avg
fb-max fb-max
fb-min fb-min
ftp-host ftp-host
ftp-port ftp-port
ftp-stor ftp-stor
http-p http-p
http-r http-r
http-t http-t
login-denied login-denied
name name
nf+%284xx%29 nf (4xx)
other-err other-err
read read
redir redir
rpt+timer rpt timer
rslv-h rslv-h
rslv-p rslv-p
rx+rate rx rate
rx+rate+%281%C2%A0min%29 rx rate (1 min)
status status
timeout timeout
total-err total-err
total-urls total-urls
tx+rate tx rate
tx+rate+%281%C2%A0min%29 tx rate (1 min)
type type
uc-avg uc-avg
uc-max uc-max
uc-min uc-min
urls%2Fs urls/s
write write
# hidden columns:
rpt-time rpt-time
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def get_layer4(self,
fields=[],
debug_=False):
debug_ |= self.debug
url = "/layer4"
if (fields is not None) and (type(fields) is not list):
raise ValueError("fields must be a None or a list")
if (fields is not None) and (len(fields) > 0):
for field in fields:
if field.index(" ") > -1 :
raise ValueError("field should be URL encoded: [%s]" % (field))
url += "?fields=%s" % (",".join(fields))
response = self.json_get(url, debug_=debug_)
if response is None:
return None
return self.extractValues(response=response,
singular_key="endpoint",
plural_key="endpoint")
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /port
URL Encoded Column Names JSON keys
use these in a URL use these to get value
------------------ ----------------------
4way+time+%28us%29 4way time (us)
activity activity
alias alias
anqp+time+%28us%29 anqp time (us)
ap ap
beacon beacon
bps+rx bps rx
bps+rx+ll bps rx ll
bps+tx bps tx
bps+tx+ll bps tx ll
bytes+rx+ll bytes rx ll
bytes+tx+ll bytes tx ll
channel channel
collisions collisions
connections connections
crypt crypt
cx+ago cx ago
cx+time+%28us%29 cx time (us)
device device
dhcp+%28ms%29 dhcp (ms)
down down
entity+id entity id
gateway+ip gateway ip
ip ip
ipv6+address ipv6 address
ipv6+gateway ipv6 gateway
key%2Fphrase key/phrase
login-fail login-fail
login-ok login-ok
logout-fail logout-fail
logout-ok logout-ok
mac mac
mask mask
misc misc
mode mode
mtu mtu
no+cx+%28us%29 no cx (us)
noise noise
parent+dev parent dev
phantom phantom
port port
port+type port type
pps+rx pps rx
pps+tx pps tx
qlen qlen
reset reset
retry+failed retry failed
rx+bytes rx bytes
rx+crc rx crc
rx+drop rx drop
rx+errors rx errors
rx+fifo rx fifo
rx+frame rx frame
rx+length rx length
rx+miss rx miss
rx+over rx over
rx+pkts rx pkts
rx-rate rx-rate
sec sec
signal signal
ssid ssid
status status
time-stamp time-stamp
tx+abort tx abort
tx+bytes tx bytes
tx+crr tx crr
tx+errors tx errors
tx+fifo tx fifo
tx+hb tx hb
tx+pkts tx pkts
tx+wind tx wind
tx-failed+%25 tx-failed %
tx-rate tx-rate
wifi+retries wifi retries
# hidden columns:
beacon_rx_signal beacon_rx_signal
port_cur_flags_h port_cur_flags_h
port_cur_flags_l port_cur_flags_l
port_supported_flags_h port_supported_flags_h
port_supported_flags_l port_supported_flags_l
resource resource
rx_multicast rx_multicast
tx_dropped tx_dropped
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def get_port(self,
fields=[],
debug_=False):
debug_ |= self.debug
url = "/port"
if (fields is not None) and (type(fields) is not list):
raise ValueError("fields must be a None or a list")
if (fields is not None) and (len(fields) > 0):
for field in fields:
if field.index(" ") > -1 :
raise ValueError("field should be URL encoded: [%s]" % (field))
url += "?fields=%s" % (",".join(fields))
response = self.json_get(url, debug_=debug_)
if response is None:
return None
return self.extractValues(response=response,
singular_key="interface",
plural_key="interfaces")
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /radiostatus
URL Encoded Column Names JSON keys
use these in a URL use these to get value
------------------ ----------------------
_links _links
antenna antenna
ap ap
capabilities capabilities
channel channel
country country
driver driver
entity+id entity id
entity+id entity id
frag frag
frequency frequency
max_sta max_sta
max_vap max_vap
max_vifs max_vifs
monitors_up monitors_up
monitors_up monitors_up
phantom phantom
port port
resource resource
rts rts
stations_down stations_down
stations_up stations_up
tx-power tx-power
vaps_down vaps_down
vaps_up vaps_up
verbose+debug verbose debug
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def get_radiostatus(self,
fields=[],
debug_=False):
debug_ |= self.debug
url = "/radiostatus"
if (fields is not None) and (type(fields) is not list):
raise ValueError("fields must be a None or a list")
if (fields is not None) and (len(fields) > 0):
for field in fields:
if field.index(" ") > -1 :
raise ValueError("field should be URL encoded: [%s]" % (field))
url += "?fields=%s" % (",".join(fields))
response = self.json_get(url, debug_=debug_)
if response is None:
return None
return self.extractValues(response=response,
singular_key="radio",
plural_key="radios")
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /resource
URL Encoded Column Names JSON keys
use these in a URL use these to get value
------------------ ----------------------
bps-rx-3s bps-rx-3s
bps-tx-3s bps-tx-3s
cli-port cli-port
cpu cpu
ctrl-ip ctrl-ip
ctrl-port ctrl-port
eid eid
entity+id entity id
free+mem free mem
free+swap free swap
gps gps
hostname hostname
hw+version hw version
load load
max+if-up max if-up
max+staged max staged
mem mem
phantom phantom
ports ports
rx+bytes rx bytes
shelf shelf
sta+up sta up
sw+version sw version
swap swap
tx+bytes tx bytes
# hidden columns:
timestamp timestamp
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def get_resource(self,
fields=[],
debug_=False):
debug_ |= self.debug
url = "/resource"
if (fields is not None) and (type(fields) is not list):
raise ValueError("fields must be a None or a list")
if (fields is not None) and (len(fields) > 0):
for field in fields:
if field.index(" ") > -1 :
raise ValueError("field should be URL encoded: [%s]" % (field))
url += "?fields=%s" % (",".join(fields))
response = self.json_get(url, debug_=debug_)
if response is None:
return None
return self.extractValues(response=response,
singular_key="resource",
plural_key="resources")
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /scan
URL Encoded Column Names JSON keys
use these in a URL use these to get value
------------------ ----------------------
na na
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def get_scan(self,
fields=[],
debug_=False):
debug_ |= self.debug
url = "/scan"
if (fields is not None) and (type(fields) is not list):
raise ValueError("fields must be a None or a list")
if (fields is not None) and (len(fields) > 0):
for field in fields:
if field.index(" ") > -1 :
raise ValueError("field should be URL encoded: [%s]" % (field))
url += "?fields=%s" % (",".join(fields))
response = self.json_get(url, debug_=debug_)
if response is None:
return None
return self.extractValues(response=response,
singular_key="scan-results",
plural_key="scan-results")
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /stations
URL Encoded Column Names JSON keys
use these in a URL use these to get value
------------------ ----------------------
ap ap
auth-for auth-for
capabilities capabilities
entity+id entity id
idle idle
roam-duration roam-duration
rx+bytes rx bytes
rx+pkts rx pkts
rx+rate rx rate
signal signal
station+bssid station bssid
tx+bytes tx bytes
tx+pkts tx pkts
tx+rate tx rate
tx+retries tx retries
tx-failed tx-failed
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def get_stations(self,
fields=[],
debug_=False):
debug_ |= self.debug
url = "/stations"
if (fields is not None) and (type(fields) is not list):
raise ValueError("fields must be a None or a list")
if (fields is not None) and (len(fields) > 0):
for field in fields:
if field.index(" ") > -1 :
raise ValueError("field should be URL encoded: [%s]" % (field))
url += "?fields=%s" % (",".join(fields))
response = self.json_get(url, debug_=debug_)
if response is None:
return None
return self.extractValues(response=response,
singular_key="station",
plural_key="stations")
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /status-msg
URL Encoded Column Names JSON keys
use these in a URL use these to get value
------------------ ----------------------
na na
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def get_status_msg(self,
fields=[],
debug_=False):
debug_ |= self.debug
url = "/status-msg"
if (fields is not None) and (type(fields) is not list):
raise ValueError("fields must be a None or a list")
if (fields is not None) and (len(fields) > 0):
for field in fields:
if field.index(" ") > -1 :
raise ValueError("field should be URL encoded: [%s]" % (field))
url += "?fields=%s" % (",".join(fields))
response = self.json_get(url, debug_=debug_)
if response is None:
return None
return self.extractValues(response=response,
singular_key="sessions/messages",
plural_key="sessions/messages")
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /test-group
URL Encoded Column Names JSON keys
use these in a URL use these to get value
------------------ ----------------------
cross+connects cross connects
entity+id entity id
name name
run run
script script
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def get_test_group(self,
fields=[],
debug_=False):
debug_ |= self.debug
url = "/test-group"
if (fields is not None) and (type(fields) is not list):
raise ValueError("fields must be a None or a list")
if (fields is not None) and (len(fields) > 0):
for field in fields:
if field.index(" ") > -1 :
raise ValueError("field should be URL encoded: [%s]" % (field))
url += "?fields=%s" % (",".join(fields))
response = self.json_get(url, debug_=debug_)
if response is None:
return None
return self.extractValues(response=response,
singular_key="groups",
plural_key="groups")
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /text
URL Encoded Column Names JSON keys
use these in a URL use these to get value
------------------ ----------------------
eid eid
name name
text text
type type
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def get_text(self,
fields=[],
debug_=False):
debug_ |= self.debug
url = "/text"
if (fields is not None) and (type(fields) is not list):
raise ValueError("fields must be a None or a list")
if (fields is not None) and (len(fields) > 0):
for field in fields:
if field.index(" ") > -1 :
raise ValueError("field should be URL encoded: [%s]" % (field))
url += "?fields=%s" % (",".join(fields))
response = self.json_get(url, debug_=debug_)
if response is None:
return None
return self.extractValues(response=response,
singular_key="record",
plural_key="records")
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /voip
URL Encoded Column Names JSON keys
use these in a URL use these to get value
------------------ ----------------------
bps+rx+a bps rx a
bps+rx+b bps rx b
delay+a+%E2%86%90+b delay a ← b
delay+a+%E2%86%92+b delay a → b
eid eid
endpoints+%28a%C2%A0%E2%86%94%C2%A0b%29 endpoints (a ↔ b)
entity+id entity id
jitter+a+%E2%86%90+b jitter a ← b
jitter+a+%E2%86%92+b jitter a → b
name name
pkt+tx+a%C2%A0%E2%86%90%C2%A0b pkt tx a ← b
pkt+tx+a%C2%A0%E2%86%92%C2%A0b pkt tx a → b
rpt+timer rpt timer
rx+drop+%25+a rx drop % a
rx+drop+%25+b rx drop % b
state state
type type
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def get_voip(self,
fields=[],
debug_=False):
debug_ |= self.debug
url = "/voip"
if (fields is not None) and (type(fields) is not list):
raise ValueError("fields must be a None or a list")
if (fields is not None) and (len(fields) > 0):
for field in fields:
if field.index(" ") > -1 :
raise ValueError("field should be URL encoded: [%s]" % (field))
url += "?fields=%s" % (",".join(fields))
response = self.json_get(url, debug_=debug_)
if response is None:
return None
return self.extractValues(response=response,
singular_key="connection",
plural_key="connections")
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /voip-endp
URL Encoded Column Names JSON keys
use these in a URL use these to get value
------------------ ----------------------
calls+answered calls answered
calls+attempted calls attempted
calls+completed calls completed
calls+failed calls failed
cf+404 cf 404
cf+408 cf 408
cf+busy cf busy
cf+canceled cf canceled
delay delay
destination+addr destination addr
dropped dropped
dup+pkts dup pkts
eid eid
elapsed elapsed
entity+id entity id
jb+cur jb cur
jb+over jb over
jb+silence jb silence
jb+under jb under
jitter jitter
mng mng
name name
ooo+pkts ooo pkts
pesq pesq
pesq+bklg pesq bklg
pesq%23 pesq#
reg+state reg state
rst rst
rtp+rtt rtp rtt
run run
rx+bytes rx bytes
rx+pkts rx pkts
source+addr source addr
state state
tx+bytes tx bytes
tx+pkts tx pkts
vad+pkts vad pkts
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def get_voip_endp(self,
fields=[],
debug_=False):
debug_ |= self.debug
url = "/voip-endp"
if (fields is not None) and (type(fields) is not list):
raise ValueError("fields must be a None or a list")
if (fields is not None) and (len(fields) > 0):
for field in fields:
if field.index(" ") > -1 :
raise ValueError("field should be URL encoded: [%s]" % (field))
url += "?fields=%s" % (",".join(fields))
response = self.json_get(url, debug_=debug_)
if response is None:
return None
return self.extractValues(response=response,
singular_key="endpoint",
plural_key="endpoints")
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /vr
URL Encoded Column Names JSON keys
use these in a URL use these to get value
------------------ ----------------------
active+ipv6+router active ipv6 router
bgp+4byte+as bgp 4byte as
bgp+damping bgp damping
bgp+peers bgp peers
cluster+id cluster id
collision+domain+id collision domain id
confederation+id confederation id
damping+half+life damping half life
damping+max+suppress damping max suppress
damping+reuse damping reuse
damping+suppress damping suppress
entity+id entity id
height height
ipv6+radv ipv6 radv
is+bgp+reflector is bgp reflector
local+as local as
multicast+routing multicast routing
name name
netsmith-state netsmith-state
notes notes
pad pad
ripv2 ripv2
router+connections router connections
router+id router id
router+id router id
use+confederation use confederation
use+existing+cfg use existing cfg
use+ospf use ospf
use+rip+dft+route use rip dft route
using+bgp using bgp
using+olsr using olsr
width width
x x
xorp+sha xorp sha
y y
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def get_vr(self,
fields=[],
debug_=False):
debug_ |= self.debug
url = "/vr"
if (fields is not None) and (type(fields) is not list):
raise ValueError("fields must be a None or a list")
if (fields is not None) and (len(fields) > 0):
for field in fields:
if field.index(" ") > -1 :
raise ValueError("field should be URL encoded: [%s]" % (field))
url += "?fields=%s" % (",".join(fields))
response = self.json_get(url, debug_=debug_)
if response is None:
return None
return self.extractValues(response=response,
singular_key="virtual-routers",
plural_key="virtual-routers")
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /vrcx
URL Encoded Column Names JSON keys
use these in a URL use these to get value
------------------ ----------------------
entity+id entity id
height height
interface+cost interface cost
local-a local-a
local-b local-b
netsmith-state netsmith-state
remote-a remote-a
remote-b remote-b
resource resource
rip+metric rip metric
vrrp+id vrrp id
vrrp+interval vrrp interval
vrrp+ip vrrp ip
vrrp+ip-prefix vrrp ip-prefix
vrrp+priority vrrp priority
wan+link wan link
width width
x x
y y
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def get_vrcx(self,
fields=[],
debug_=False):
debug_ |= self.debug
url = "/vrcx"
if (fields is not None) and (type(fields) is not list):
raise ValueError("fields must be a None or a list")
if (fields is not None) and (len(fields) > 0):
for field in fields:
if field.index(" ") > -1 :
raise ValueError("field should be URL encoded: [%s]" % (field))
url += "?fields=%s" % (",".join(fields))
response = self.json_get(url, debug_=debug_)
if response is None:
return None
return self.extractValues(response=response,
singular_key="router-connections",
plural_key="router-connections")
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /wl
URL Encoded Column Names JSON keys
use these in a URL use these to get value
------------------ ----------------------
bps+rx+a bps rx a
bps+rx+b bps rx b
eid eid
endpoints+%28a%C2%A0%E2%86%94%C2%A0b%29 endpoints (a ↔ b)
entity+id entity id
k-m k-m
name name
pkt+tx+a%C2%A0%E2%86%90%C2%A0b pkt tx a ← b
pkt+tx+a%C2%A0%E2%86%92%C2%A0b pkt tx a → b
rpt+timer rpt timer
state state
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def get_wl(self,
fields=[],
debug_=False):
debug_ |= self.debug
url = "/wl"
if (fields is not None) and (type(fields) is not list):
raise ValueError("fields must be a None or a list")
if (fields is not None) and (len(fields) > 0):
for field in fields:
if field.index(" ") > -1 :
raise ValueError("field should be URL encoded: [%s]" % (field))
url += "?fields=%s" % (",".join(fields))
response = self.json_get(url, debug_=debug_)
if response is None:
return None
return self.extractValues(response=response,
singular_key="",
plural_key="")
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /wl-endp
URL Encoded Column Names JSON keys
use these in a URL use these to get value
------------------ ----------------------
buffer buffer
corrupt+1 corrupt 1
corrupt+2 corrupt 2
corrupt+3 corrupt 3
corrupt+4 corrupt 4
corrupt+5 corrupt 5
corrupt+6 corrupt 6
delay delay
dropfreq+%25 dropfreq %
dropped dropped
dup+pkts dup pkts
dupfreq+%25 dupfreq %
eid eid
elapsed elapsed
extrabuf extrabuf
failed-late failed-late
jitfreq+%25 jitfreq %
max+rate max rate
maxjitter maxjitter
maxlate maxlate
name name
ooo+pkts ooo pkts
qdisc qdisc
reordfrq+%25 reordfrq %
run run
rx+bytes rx bytes
rx+pkts rx pkts
script script
serdelay serdelay
tx+bytes tx bytes
tx+drop+%25 tx drop %
tx+pkts tx pkts
tx+rate tx rate
tx-failed tx-failed
wps wps
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def get_wl_endp(self,
fields=[],
debug_=False):
debug_ |= self.debug
url = "/wl-endp"
if (fields is not None) and (type(fields) is not list):
raise ValueError("fields must be a None or a list")
if (fields is not None) and (len(fields) > 0):
for field in fields:
if field.index(" ") > -1 :
raise ValueError("field should be URL encoded: [%s]" % (field))
url += "?fields=%s" % (",".join(fields))
response = self.json_get(url, debug_=debug_)
if response is None:
return None
return self.extractValues(response=response,
singular_key="endpoint",
plural_key="endpoint")
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /ws-msg
URL Encoded Column Names JSON keys
use these in a URL use these to get value
------------------ ----------------------
na na
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def get_ws_msg(self,
fields=[],
debug_=False):
debug_ |= self.debug
url = "/ws-msg"
if (fields is not None) and (type(fields) is not list):
raise ValueError("fields must be a None or a list")
if (fields is not None) and (len(fields) > 0):
for field in fields:
if field.index(" ") > -1 :
raise ValueError("field should be URL encoded: [%s]" % (field))
url += "?fields=%s" % (",".join(fields))
response = self.json_get(url, debug_=debug_)
if response is None:
return None
return self.extractValues(response=response,
singular_key="",
plural_key="")
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
These are POST requests
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class LFJsonPost(LFCliBase):
def __init__(self, lfclient_host='localhost',
lfclient_port=8080,
debug_=False,
_exit_on_error=False,
_exit_on_fail=False,
_proxy_str=None,
_capture_signal_list=[]
):
super().__init__(_lfjson_host=lfclient_host,
_lfjson_port=lfclient_port,
_debug=debug_,
_exit_on_error=_exit_on_error,
_exit_on_fail=_exit_on_fail,
_proxy_str=_proxy_str,
_capture_signal_list=_capture_signal_list)
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_arm_endp
https://www.candelatech.com/lfcli_ug.php#add_arm_endp
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_add_arm_endp(self,
alias=None,
cpu_id=None,
mx_pkt_sz=None,
pkt_sz=None,
port=None,
pps=None,
resource=None,
shelf=None,
tos=None,
type=None,
debug_=False):
debug_ |= self.debug
data = {
"alias" : alias,
"cpu_id" : cpu_id,
"mx_pkt_sz" : mx_pkt_sz,
"pkt_sz" : pkt_sz,
"port" : port,
"pps" : pps,
"resource" : resource,
"shelf" : shelf,
"tos" : tos,
"type" : type,
}
response = self.json_post("/cli-json/add_arm_endp",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_bgp_peer
https://www.candelatech.com/lfcli_ug.php#add_bgp_peer
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class add_bgp_peer_flags(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
ENABLE_PEER = 0x1 # Set this to zero if you don't want this peer enabled.
PEER_CLIENT = 0x2 # Sets corresponding Xorp flag in BGP Peer section.
PEER_CONFED_MEMBER = 0x4 # Sets corresponding Xorp flag in BGP Peer section.
PEER_UNICAST_V4 = 0x8 # Sets corresponding Xorp flag in BGP Peer section.
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
def post_add_bgp_peer(self,
p_as=None,
delay_open_time=None,
flags=None,
holdtime=None,
local_dev=None,
nexthop=None,
nexthop6=None,
peer_id=None,
peer_index=None,
resource=None,
shelf=None,
vr_id=None,
debug_=False):
debug_ |= self.debug
data = {
"as" : p_as,
"delay_open_time" : delay_open_time,
"flags" : flags,
"holdtime" : holdtime,
"local_dev" : local_dev,
"nexthop" : nexthop,
"nexthop6" : nexthop6,
"peer_id" : peer_id,
"peer_index" : peer_index,
"resource" : resource,
"shelf" : shelf,
"vr_id" : vr_id,
}
response = self.json_post("/cli-json/add_bgp_peer",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_bond
https://www.candelatech.com/lfcli_ug.php#add_bond
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_add_bond(self,
network_devs=None,
port=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"network_devs" : network_devs,
"port" : port,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/add_bond",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_br
https://www.candelatech.com/lfcli_ug.php#add_br
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class add_br_br_flags(Enum):
none = 0 # no features
stp_enabled = 1 # Enable Spanning Tree Protocol (STP)
def post_add_br(self,
br_aging_time=None,
br_flags=None,
br_forwarding_delay=None,
br_hello_time=None,
br_max_age=None,
br_priority=None,
network_devs=None,
port=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"br_aging_time" : br_aging_time,
"br_flags" : br_flags,
"br_forwarding_delay" : br_forwarding_delay,
"br_hello_time" : br_hello_time,
"br_max_age" : br_max_age,
"br_priority" : br_priority,
"network_devs" : network_devs,
"port" : port,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/add_br",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_cd
https://www.candelatech.com/lfcli_ug.php#add_cd
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class add_cd_flags(Enum):
ERR = 2 # Set to kernel mode.
RUNNING = 1 # Set to running state.
def post_add_cd(self,
alias=None,
bps=None,
flags=None,
report_timer=None,
resource=None,
shelf=None,
state=None,
type=None,
debug_=False):
debug_ |= self.debug
data = {
"alias" : alias,
"bps" : bps,
"flags" : flags,
"report_timer" : report_timer,
"resource" : resource,
"shelf" : shelf,
"state" : state,
"type" : type,
}
response = self.json_post("/cli-json/add_cd",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_cd_endp
https://www.candelatech.com/lfcli_ug.php#add_cd_endp
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_add_cd_endp(self,
cd=None,
endp=None,
debug_=False):
debug_ |= self.debug
data = {
"cd" : cd,
"endp" : endp,
}
response = self.json_post("/cli-json/add_cd_endp",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_cd_vr
https://www.candelatech.com/lfcli_ug.php#add_cd_vr
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_add_cd_vr(self,
cd=None,
vr=None,
debug_=False):
debug_ |= self.debug
data = {
"cd" : cd,
"vr" : vr,
}
response = self.json_post("/cli-json/add_cd_vr",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_chamber
https://www.candelatech.com/lfcli_ug.php#add_chamber
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class add_chamber_chamber_flags(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
OPEN = 0x4 # (3) Door is open, no real isolation right now.
PHANTOM = 0x1 # (1) Chamber is not actually here right now.
VIRTUAL = 0x2 # (2) No real chamber, open-air grouping of equipment.
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
def post_add_chamber(self,
chamber_type=None,
dut_name1=None,
dut_name2=None,
dut_name3=None,
dut_name4=None,
flags=None,
flags_mask=None,
height=None,
isolation=None,
lanforge1=None,
lanforge2=None,
lanforge3=None,
lanforge4=None,
name=None,
resource=None,
sma_count=None,
turntable_type=None,
width=None,
x=None,
y=None,
debug_=False):
debug_ |= self.debug
data = {
"chamber_type" : chamber_type,
"dut_name1" : dut_name1,
"dut_name2" : dut_name2,
"dut_name3" : dut_name3,
"dut_name4" : dut_name4,
"flags" : flags,
"flags_mask" : flags_mask,
"height" : height,
"isolation" : isolation,
"lanforge1" : lanforge1,
"lanforge2" : lanforge2,
"lanforge3" : lanforge3,
"lanforge4" : lanforge4,
"name" : name,
"resource" : resource,
"sma_count" : sma_count,
"turntable_type" : turntable_type,
"width" : width,
"x" : x,
"y" : y,
}
response = self.json_post("/cli-json/add_chamber",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_chamber_cx
https://www.candelatech.com/lfcli_ug.php#add_chamber_cx
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class add_chamber_cx_chamber_cx_flags(Enum):
CONNECTED = 1 # (1) Connected to something. If flag is not set, connection is open to the air (maybe with antenna)
TERMINATED = 2 # (2) Connection is terminated, signal shall not pass!
def post_add_chamber_cx(self,
a_id=None,
atten_id=None,
b_id=None,
connection_idx=None,
flags=None,
flags_mask=None,
internal=None,
min_atten=None,
name=None,
zrssi2=None,
zrssi5=None,
debug_=False):
debug_ |= self.debug
data = {
"a_id" : a_id,
"atten_id" : atten_id,
"b_id" : b_id,
"connection_idx" : connection_idx,
"flags" : flags,
"flags_mask" : flags_mask,
"internal" : internal,
"min_atten" : min_atten,
"name" : name,
"zrssi2" : zrssi2,
"zrssi5" : zrssi5,
}
response = self.json_post("/cli-json/add_chamber_cx",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_chamber_path
https://www.candelatech.com/lfcli_ug.php#add_chamber_path
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_add_chamber_path(self,
chamber=None,
content=None,
path=None,
debug_=False):
debug_ |= self.debug
data = {
"chamber" : chamber,
"content" : content,
"path" : path,
}
response = self.json_post("/cli-json/add_chamber_path",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_channel_group
https://www.candelatech.com/lfcli_ug.php#add_channel_group
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class add_channel_group_types(Enum):
clear = "clear" # Channel(s) are bundled into a single span. No conversion or
e_m = "e&m" # Channel(s) are signalled using E&M signalling (specific
fcshdlc = "fcshdlc" # The zapdel driver performs HDLC encoding and decoding on the
fxogs = "fxogs" # Channel(s) are signalled using FXO Groundstart protocol.
fxoks = "fxoks" # Channel(s) are signalled using FXO Koolstart protocol.
fxols = "fxols" # Channel(s) are signalled using FXO Loopstart protocol.
fxsgs = "fxsgs" # Channel(s) are signalled using FXS Groundstart protocol.
fxsks = "fxsks" # Channel(s) are signalled using FXS Koolstart protocol.
fxsls = "fxsls" # Channel(s) are signalled using FXS Loopstart protocol.
indclear = "indclear" # Like 'clear' except all channels are treated individually and
nethdlc = "nethdlc" # The zaptel driver bundles the channels together into an
rawhdlc = "rawhdlc" # The zaptel driver performs HDLC encoding and decoding on the
unused = "unused" # No signalling is performed, each channel in the list remains idle
def post_add_channel_group(self,
alias=None,
channels=None,
idle_flag=None,
mtu=None,
resource=None,
shelf=None,
span_num=None,
type=None,
debug_=False):
debug_ |= self.debug
data = {
"alias" : alias,
"channels" : channels,
"idle_flag" : idle_flag,
"mtu" : mtu,
"resource" : resource,
"shelf" : shelf,
"span_num" : span_num,
"type" : type,
}
response = self.json_post("/cli-json/add_channel_group",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_cx
https://www.candelatech.com/lfcli_ug.php#add_cx
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_add_cx(self,
alias=None,
rx_endp=None,
test_mgr=None,
tx_endp=None,
debug_=False):
debug_ |= self.debug
data = {
"alias" : alias,
"rx_endp" : rx_endp,
"test_mgr" : test_mgr,
"tx_endp" : tx_endp,
}
response = self.json_post("/cli-json/add_cx",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_dut
https://www.candelatech.com/lfcli_ug.php#add_dut
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class add_dut_dut_flags(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
p_11r = 0x200 # Use .11r connection logic on all ssids, deprecated, see add_dut_ssid.
AP_MODE = 0x2 # (2) DUT acts as AP.
DHCPD_LAN = 0x40 # Provides DHCP server on LAN port
DHCPD_WAN = 0x80 # Provides DHCP server on WAN port
EAP_PEAP = 0x800 # Use EAP-PEAP connection logic on all ssids, deprecated, see add_dut_ssid.
EAP_TTLS = 0x400 # Use EAP-TTLS connection logic on all ssids, deprecated, see add_dut_ssid.
INACTIVE = 0x4 # (3) Ignore this in ChamberView, etc
NOT_DHCPCD = 0x1000 # Station/edge device that is NOT using DHCP.
STA_MODE = 0x1 # (1) DUT acts as Station.
WEP = 0x8 # Use WEP encryption on all ssids, deprecated, see add_dut_ssid.
WPA = 0x10 # Use WPA encryption on all ssids, deprecated, see add_dut_ssid.
WPA2 = 0x20 # Use WPA2 encryption on all ssids, deprecated, see add_dut_ssid.
WPA3 = 0x100 # Use WPA3 encryption on all ssids, deprecated, see add_dut_extras.
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
def post_add_dut(self,
antenna_count1=None,
antenna_count2=None,
antenna_count3=None,
api_id=None,
bssid1=None,
bssid2=None,
bssid3=None,
eap_id=None,
flags=None,
flags_mask=None,
hw_version=None,
img_file=None,
lan_port=None,
mgt_ip=None,
model_num=None,
name=None,
passwd1=None,
passwd2=None,
passwd3=None,
serial_num=None,
serial_port=None,
ssid1=None,
ssid2=None,
ssid3=None,
sw_version=None,
top_left_x=None,
top_left_y=None,
wan_port=None,
debug_=False):
debug_ |= self.debug
data = {
"antenna_count1" : antenna_count1,
"antenna_count2" : antenna_count2,
"antenna_count3" : antenna_count3,
"api_id" : api_id,
"bssid1" : bssid1,
"bssid2" : bssid2,
"bssid3" : bssid3,
"eap_id" : eap_id,
"flags" : flags,
"flags_mask" : flags_mask,
"hw_version" : hw_version,
"img_file" : img_file,
"lan_port" : lan_port,
"mgt_ip" : mgt_ip,
"model_num" : model_num,
"name" : name,
"passwd1" : passwd1,
"passwd2" : passwd2,
"passwd3" : passwd3,
"serial_num" : serial_num,
"serial_port" : serial_port,
"ssid1" : ssid1,
"ssid2" : ssid2,
"ssid3" : ssid3,
"sw_version" : sw_version,
"top_left_x" : top_left_x,
"top_left_y" : top_left_y,
"wan_port" : wan_port,
}
response = self.json_post("/cli-json/add_dut",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_dut_notes
https://www.candelatech.com/lfcli_ug.php#add_dut_notes
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_add_dut_notes(self,
dut=None,
text=None,
debug_=False):
debug_ |= self.debug
data = {
"dut" : dut,
"text" : text,
}
response = self.json_post("/cli-json/add_dut_notes",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_dut_ssid
https://www.candelatech.com/lfcli_ug.php#add_dut_ssid
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class add_dut_ssid_dut_flags(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
p_11r = 0x200 # Use .11r connection logic
EAP_PEAP = 0x800 # Use EAP-PEAP connection logic
EAP_TTLS = 0x400 # Use EAP-TTLS connection logic
WEP = 0x8 # Use WEP encryption
WPA = 0x10 # Use WPA encryption
WPA2 = 0x20 # Use WPA2 encryption
WPA3 = 0x100 # Use WPA3 encryption
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
def post_add_dut_ssid(self,
bssid=None,
name=None,
passwd=None,
ssid=None,
ssid_flags=None,
ssid_flags_mask=None,
ssid_idx=None,
debug_=False):
debug_ |= self.debug
data = {
"bssid" : bssid,
"name" : name,
"passwd" : passwd,
"ssid" : ssid,
"ssid_flags" : ssid_flags,
"ssid_flags_mask" : ssid_flags_mask,
"ssid_idx" : ssid_idx,
}
response = self.json_post("/cli-json/add_dut_ssid",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_endp
https://www.candelatech.com/lfcli_ug.php#add_endp
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class add_endp_payload_pattern(Enum):
PRBS_11_8_10 = "PRBS_11_8_10" # PRBS (see above)
PRBS_15_0_14 = "PRBS_15_0_14" # PRBS (see above)
PRBS_4_0_3 = "PRBS_4_0_3" # Use linear feedback shift register to generate pseudo random sequence.
PRBS_7_0_6 = "PRBS_7_0_6" # PRBS (see above)
custom = "custom" # Enter your own payload with the set_endp_payload cmd.
decreasing = "decreasing" # bytes start at FF and decrease, wrapping if needed
increasing = "increasing" # bytes start at 00 and increase, wrapping if needed
ones = "ones" # payload is all ones (FF)
random = "random" # generate a new random payload each time sent
random_fixed = "random_fixed" # means generate one random payload, and send it over and over again.
zeros = "zeros" # payload is all zeros (00)
class add_endp_type(Enum):
custom_ether = "custom_ether" # LF frames with custom options, use with playback
custom_mc_udp = "custom_mc_udp" # LF Multicast UDP IPv4
custom_tcp = "custom_tcp" # LF TCP IPv4 frame with custom options
custom_udp = "custom_udp" # LF UDP IPv4 frame with custom options
lf = "lf" # LF protocol
lf_sctp = "lf_sctp" # SCTP IPv4 protocol
lf_sctp6 = "lf_sctp6" # SCTP IPv6 protocol
lf_tcp = "lf_tcp" # TCP IPv4 connection
lf_tcp6 = "lf_tcp6" # TCP IPv6 connection
lf_udp = "lf_udp" # UDP IPv4 connection
lf_udp6 = "lf_udp6" # UDP IPv6 connection
mc_udp = "mc_udp" # LF Multicast IPv4
def post_add_endp(self,
alias=None,
ip_port=None,
is_pkt_sz_random=None,
is_rate_bursty=None,
max_pkt=None,
max_rate=None,
min_pkt=None,
min_rate=None,
multi_conn=None,
payload_pattern=None,
port=None,
resource=None,
send_bad_crc_per_million=None,
shelf=None,
ttl=None,
type=None,
use_checksum=None,
debug_=False):
debug_ |= self.debug
data = {
"alias" : alias,
"ip_port" : ip_port,
"is_pkt_sz_random" : is_pkt_sz_random,
"is_rate_bursty" : is_rate_bursty,
"max_pkt" : max_pkt,
"max_rate" : max_rate,
"min_pkt" : min_pkt,
"min_rate" : min_rate,
"multi_conn" : multi_conn,
"payload_pattern" : payload_pattern,
"port" : port,
"resource" : resource,
"send_bad_crc_per_million" : send_bad_crc_per_million,
"shelf" : shelf,
"ttl" : ttl,
"type" : type,
"use_checksum" : use_checksum,
}
response = self.json_post("/cli-json/add_endp",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_event
https://www.candelatech.com/lfcli_ug.php#add_event
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_add_event(self,
details=None,
event_id=None,
name=None,
priority=None,
debug_=False):
debug_ |= self.debug
data = {
"details" : details,
"event_id" : event_id,
"name" : name,
"priority" : priority,
}
response = self.json_post("/cli-json/add_event",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_file_endp
https://www.candelatech.com/lfcli_ug.php#add_file_endp
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class add_file_endp_fio_flags(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
AUTO_MOUNT = 0x2 # (2) Attempt to mount with the provided information if not already mounted.
AUTO_UNMOUNT = 0x4 # (4) Attempt to un-mount when stopping test.
CHECK_MOUNT = 0x1 # (1) Attempt to verify NFS and SMB mounts match the configured values.
O_APPEND = 0x200 # (512) Open files for writing with O_APPEND instead
O_DIRECT = 0x8 # (8) Open file with O_DIRECT flag, disables caching. Must use block-size read/write calls.
O_LARGEFILE = 0x20 # (32) Open files with O_LARGEFILE. This allows greater than 2GB files on 32-bit systems.
UNLINK_BW = 0x10 # (16) Unlink file before writing. This works around issues with CIFS for some file-servers.
UNMOUNT_FORCE = 0x40 # (64) Use -f flag when calling umount
UNMOUNT_LAZY = 0x80 # (128) Use -l flag when calling umount
USE_FSTATFS = 0x100 # (256) Use fstatfs system call to verify file-system type when opening files.
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
class add_file_endp_payload_pattern(Enum):
PRBS_11_8_10 = "PRBS_11_8_10" # PRBS (see above)
PRBS_15_0_14 = "PRBS_15_0_14" # PRBS (see above)
PRBS_4_0_3 = "PRBS_4_0_3" # Use linear feedback shift register to generate pseudo random sequence.
PRBS_7_0_6 = "PRBS_7_0_6" # PRBS (see above)
custom = "custom" # Enter your own payload with the set_endp_payload cmd.
decreasing = "decreasing" # bytes start at FF and decrease, wrapping if needed.
increasing = "increasing" # bytes start at 00 and increase, wrapping if needed.
ones = "ones" # Payload is all ones (FF).
random = "random" # generate a new random payload each time sent.
random_fixed = "random_fixed" # Means generate one random payload, and send it over
zeros = "zeros" # Payload is all zeros (00).
def post_add_file_endp(self,
alias=None,
directory=None,
fio_flags=None,
max_read_rate=None,
max_write_rate=None,
min_read_rate=None,
min_write_rate=None,
mount_dir=None,
mount_options=None,
payload_pattern=None,
port=None,
prefix=None,
resource=None,
retry_timer=None,
server_mount=None,
shelf=None,
type=None,
volume=None,
debug_=False):
debug_ |= self.debug
data = {
"alias" : alias,
"directory" : directory,
"fio_flags" : fio_flags,
"max_read_rate" : max_read_rate,
"max_write_rate" : max_write_rate,
"min_read_rate" : min_read_rate,
"min_write_rate" : min_write_rate,
"mount_dir" : mount_dir,
"mount_options" : mount_options,
"payload_pattern" : payload_pattern,
"port" : port,
"prefix" : prefix,
"resource" : resource,
"retry_timer" : retry_timer,
"server_mount" : server_mount,
"shelf" : shelf,
"type" : type,
"volume" : volume,
}
response = self.json_post("/cli-json/add_file_endp",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_gen_endp
https://www.candelatech.com/lfcli_ug.php#add_gen_endp
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_add_gen_endp(self,
alias=None,
port=None,
resource=None,
shelf=None,
type=None,
debug_=False):
debug_ |= self.debug
data = {
"alias" : alias,
"port" : port,
"resource" : resource,
"shelf" : shelf,
"type" : type,
}
response = self.json_post("/cli-json/add_gen_endp",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_gre
https://www.candelatech.com/lfcli_ug.php#add_gre
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_add_gre(self,
local_lower_ip=None,
port=None,
remote_lower_ip=None,
report_timer=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"local_lower_ip" : local_lower_ip,
"port" : port,
"remote_lower_ip" : remote_lower_ip,
"report_timer" : report_timer,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/add_gre",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_group
https://www.candelatech.com/lfcli_ug.php#add_group
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class add_group_flags(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
group_total_rates = 0x4 # Set rates as total for group.
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
def post_add_group(self,
flags=None,
flags_mask=None,
name=None,
debug_=False):
debug_ |= self.debug
data = {
"flags" : flags,
"flags_mask" : flags_mask,
"name" : name,
}
response = self.json_post("/cli-json/add_group",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_l4_endp
https://www.candelatech.com/lfcli_ug.php#add_l4_endp
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class add_l4_endp_http_auth_type(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
BASIC = 0x1 # Basic authentication
DIGEST = 0x2 # Digest (MD5) authentication
GSSNEGOTIATE = 0x4 # GSS authentication
NTLM = 0x8 # NTLM authentication
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
class add_l4_endp_proxy_auth_type(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
BASIC = 0x1 # 1 Basic authentication
BIND_DNS = 0x200 # 512 Make DNS requests go out endpoints Port.
DIGEST = 0x2 # 2 Digest (MD5) authentication
DISABLE_EPSV = 0x1000 # 4096 Disable FTP EPSV option
DISABLE_PASV = 0x800 # 2048 Disable FTP PASV option (will use PORT command)
GSSNEGOTIATE = 0x4 # 4 GSS authentication
INCLUDE_HEADERS = 0x100 # 256 especially for IMAP
NTLM = 0x8 # 8 NTLM authentication
USE_DEFLATE_COMPRESSION = 0x80 # 128 Use deflate compression
USE_GZIP_COMPRESSION = 0x40 # 64 Use gzip compression
USE_IPV6 = 0x400 # 1024 Resolve URL is IPv6. Will use IPv4 if not selected.
USE_PROXY_CACHE = 0x20 # 32 Use proxy cache
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
class add_l4_endp_type(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
l4_generic = 0x0 # Layer 4 type
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
def post_add_l4_endp(self,
alias=None,
block_size=None,
dns_cache_timeout=None,
http_auth_type=None,
ip_addr=None,
max_speed=None,
port=None,
proxy_auth_type=None,
proxy_port=None,
proxy_server=None,
proxy_userpwd=None,
quiesce_after=None,
resource=None,
shelf=None,
smtp_from=None,
ssl_cert_fname=None,
timeout=None,
type=None,
url=None,
url_rate=None,
user_agent=None,
debug_=False):
debug_ |= self.debug
data = {
"alias" : alias,
"block_size" : block_size,
"dns_cache_timeout" : dns_cache_timeout,
"http_auth_type" : http_auth_type,
"ip_addr" : ip_addr,
"max_speed" : max_speed,
"port" : port,
"proxy_auth_type" : proxy_auth_type,
"proxy_port" : proxy_port,
"proxy_server" : proxy_server,
"proxy_userpwd" : proxy_userpwd,
"quiesce_after" : quiesce_after,
"resource" : resource,
"shelf" : shelf,
"smtp_from" : smtp_from,
"ssl_cert_fname" : ssl_cert_fname,
"timeout" : timeout,
"type" : type,
"url" : url,
"url_rate" : url_rate,
"user_agent" : user_agent,
}
response = self.json_post("/cli-json/add_l4_endp",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_monitor
https://www.candelatech.com/lfcli_ug.php#add_monitor
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class add_monitor_flags(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
disable_ht40 = 0x800 # Disable HT-40 even if hardware and AP support it.
disable_ht80 = 0x8000000 # Disable HT80 (for AC chipset NICs only)
ht160_enable = 0x100000000 # Enable HT160 mode.
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
def post_add_monitor(self,
aid=None,
ap_name=None,
bssid=None,
flags=None,
flags_mask=None,
radio=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"aid" : aid,
"ap_name" : ap_name,
"bssid" : bssid,
"flags" : flags,
"flags_mask" : flags_mask,
"radio" : radio,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/add_monitor",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_mvlan
https://www.candelatech.com/lfcli_ug.php#add_mvlan
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_add_mvlan(self,
flags=None,
index=None,
mac=None,
old_name=None,
port=None,
report_timer=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"flags" : flags,
"index" : index,
"mac" : mac,
"old_name" : old_name,
"port" : port,
"report_timer" : report_timer,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/add_mvlan",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_ppp_link
https://www.candelatech.com/lfcli_ug.php#add_ppp_link
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_add_ppp_link(self,
auth=None,
channel_groups=None,
debug=None,
down_time_max_ms=None,
down_time_min_ms=None,
dst_ip=None,
extra_args=None,
holdoff=None,
lcp_echo_failure=None,
lcp_echo_interval=None,
mlppp_descriptor=None,
persist=None,
pppoe_transport_port=None,
resource=None,
run_time_max_ms=None,
run_time_min_ms=None,
shelf=None,
src_ip=None,
transport_type=None,
tty_transport_device=None,
unit=None,
debug_=False):
debug_ |= self.debug
data = {
"auth" : auth,
"channel_groups" : channel_groups,
"debug" : debug,
"down_time_max_ms" : down_time_max_ms,
"down_time_min_ms" : down_time_min_ms,
"dst_ip" : dst_ip,
"extra_args" : extra_args,
"holdoff" : holdoff,
"lcp_echo_failure" : lcp_echo_failure,
"lcp_echo_interval" : lcp_echo_interval,
"mlppp_descriptor" : mlppp_descriptor,
"persist" : persist,
"pppoe_transport_port" : pppoe_transport_port,
"resource" : resource,
"run_time_max_ms" : run_time_max_ms,
"run_time_min_ms" : run_time_min_ms,
"shelf" : shelf,
"src_ip" : src_ip,
"transport_type" : transport_type,
"tty_transport_device" : tty_transport_device,
"unit" : unit,
}
response = self.json_post("/cli-json/add_ppp_link",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_profile
https://www.candelatech.com/lfcli_ug.php#add_profile
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class add_profile_profile_flags(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
p_11r = 0x40 # Use 802.11r roaming setup.
BSS_TRANS = 0x400 # Enable BSS Transition logic
DHCP_SERVER = 0x1 # This should provide DHCP server.
EAP_PEAP = 0x200 # Enable EAP-PEAP
EAP_TTLS = 0x80 # Use 802.1x EAP-TTLS
NAT = 0x100 # Enable NAT if this object is in a virtual router
SKIP_DHCP_ROAM = 0x10 # Ask station to not re-do DHCP on roam.
WEP = 0x2 # Use WEP encryption
WPA = 0x4 # Use WPA encryption
WPA2 = 0x8 # Use WPA2 encryption
WPA3 = 0x20 # Use WPA3 encryption
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
class add_profile_wifi_mode(Enum):
p_802_11a = "802.11a" # 802.11a
AUTO = "AUTO" # 802.11g
abg = "abg" # 802.11abg
abgn = "abgn" # 802.11abgn
abgnAC = "abgnAC" # 802.11abgn-AC
abgnAX = "abgnAX" # 802.11abgn-AX
an = "an" # 802.11an
anAC = "anAC" # 802.11an-AC
anAX = "anAX" # 802.11an-AX
as_is = "as_is" # Make no changes to current configuration
b = "b" # 802.11b
bg = "bg" # 802.11bg
bgn = "bgn" # 802.11bgn
bgnAC = "bgnAC" # 802.11bgn-AC
bgnAX = "bgnAX" # 802.11bgn-AX
bond = "bond" # Bonded pair of Ethernet ports.
bridged_ap = "bridged_ap" # AP device in bridged mode. The EIDs may specify radio and bridged port.
client = "client" # Client-side non-WiFi device (Ethernet port, for instance).
g = "g" # 802.11g
mobile_sta = "mobile_sta" # Mobile station device. Expects to connect to DUT AP(s) and upstream LANforge.
monitor = "monitor" # Monitor device/sniffer. The EIDs may specify which radios to use.
peer = "peer" # Edge device, client or server (Ethernet port, for instance).
rdd = "rdd" # Pair of redirect devices, typically associated with VR to act as traffic endpoint
routed_ap = "routed_ap" # AP in routed mode. The EIDs may specify radio and upstream port.
sta = "sta" # Station device, most likely non mobile. The EIDs may specify radio(s) to use.
uplink = "uplink" # Uplink towards rest of network (can go in virtual router and do NAT)
upstream = "upstream" # Upstream server device. The EIDs may specify which ports to use.
vlan = "vlan" # 802.1q VLAN. Specify VID with the 'freq' option.
def post_add_profile(self,
alias_prefix=None,
antenna=None,
bandwidth=None,
eap_id=None,
flags_mask=None,
freq=None,
instance_count=None,
mac_pattern=None,
name=None,
passwd=None,
profile_flags=None,
profile_type=None,
ssid=None,
vid=None,
wifi_mode=None,
debug_=False):
debug_ |= self.debug
data = {
"alias_prefix" : alias_prefix,
"antenna" : antenna,
"bandwidth" : bandwidth,
"eap_id" : eap_id,
"flags_mask" : flags_mask,
"freq" : freq,
"instance_count" : instance_count,
"mac_pattern" : mac_pattern,
"name" : name,
"passwd" : passwd,
"profile_flags" : profile_flags,
"profile_type" : profile_type,
"ssid" : ssid,
"vid" : vid,
"wifi_mode" : wifi_mode,
}
response = self.json_post("/cli-json/add_profile",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_profile_notes
https://www.candelatech.com/lfcli_ug.php#add_profile_notes
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_add_profile_notes(self,
dut=None,
text=None,
debug_=False):
debug_ |= self.debug
data = {
"dut" : dut,
"text" : text,
}
response = self.json_post("/cli-json/add_profile_notes",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_rdd
https://www.candelatech.com/lfcli_ug.php#add_rdd
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_add_rdd(self,
peer_ifname=None,
port=None,
report_timer=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"peer_ifname" : peer_ifname,
"port" : port,
"report_timer" : report_timer,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/add_rdd",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_sec_ip
https://www.candelatech.com/lfcli_ug.php#add_sec_ip
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_add_sec_ip(self,
ip_list=None,
port=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"ip_list" : ip_list,
"port" : port,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/add_sec_ip",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_sta
https://www.candelatech.com/lfcli_ug.php#add_sta
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class add_sta_flags(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
p_80211r_pmska_cache = 0x4000000 # Enable oportunistic PMSKA caching for WPA2 (Related to 802.11r).
p_80211u_additional = 0x100000 # AP requires additional step for access (802.11u Interworking)
p_80211u_auto = 0x40000 # Enable 802.11u (Interworking) Auto-internetworking feature. Always enabled currently.
p_80211u_e911 = 0x200000 # AP claims emergency services reachable (802.11u Interworking)
p_80211u_e911_unauth = 0x400000 # AP provides Unauthenticated emergency services (802.11u Interworking)
p_80211u_enable = 0x20000 # Enable 802.11u (Interworking) feature.
p_80211u_gw = 0x80000 # AP Provides access to internet (802.11u Interworking)
p_8021x_radius = 0x2000000 # Use 802.1x (RADIUS for AP).
create_admin_down = 0x1000000000 # Station should be created admin-down.
custom_conf = 0x20 # Use Custom wpa_supplicant config file.
disable_twt = 0x100000000000 # Disable TWT mode
disable_fast_reauth = 0x200000000 # Disable fast_reauth option for virtual stations.
disable_gdaf = 0x1000000 # AP: Disable DGAF (used by HotSpot 2.0).
disable_ht80 = 0x8000000 # Disable HT80 (for AC chipset NICs only)
disable_roam = 0x80000000 # Disable automatic station roaming based on scan results.
disable_sgi = 0x4000 # Disable SGI (Short Guard Interval).
hs20_enable = 0x800000 # Enable Hotspot 2.0 (HS20) feature. Requires WPA-2.
ht160_enable = 0x100000000 # Enable HT160 mode.
ht40_disable = 0x800 # Disable HT-40 even if hardware and AP support it.
ibss_mode = 0x20000000 # Station should be in IBSS mode.
lf_sta_migrate = 0x8000 # OK-To-Migrate (Allow station migration between LANforge radios)
mesh_mode = 0x400000000 # Station should be in MESH mode.
no_supp_op_class_ie = 0x4000000000 # Do not include supported-oper-class-IE in assoc requests. May work around AP bugs.
osen_enable = 0x40000000 # Enable OSEN protocol (OSU Server-only Authentication)
passive_scan = 0x2000 # Use passive scanning (don't send probe requests).
power_save_enable = 0x800000000 # Station should enable power-save. May not work in all drivers/configurations.
scan_ssid = 0x1000 # Enable SCAN-SSID flag in wpa_supplicant.
txo_enable = 0x8000000000 # Enable/disable tx-offloads, typically managed by set_wifi_txo command
use_bss_transition = 0x80000000000 # Enable BSS transition.
use_wpa3 = 0x10000000000 # Enable WPA-3 (SAE Personal) mode.
verbose = 0x10000 # Verbose-Debug: Increase debug info in wpa-supplicant and hostapd logs.
wds_mode = 0x2000000000 # WDS station (sort of like a lame mesh), not supported on ath10k
wep_enable = 0x200 # Use wpa_supplicant configured for WEP encryption.
wpa2_enable = 0x400 # Use wpa_supplicant configured for WPA2 encryption.
wpa_enable = 0x10 # Enable WPA
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
class add_sta_mode(Enum):
p_802_11a = 1 # 802.11a
AUTO = 0 # 802.11g
abg = 4 # 802.11abg
abgn = 5 # 802.11abgn
abgnAC = 8 # 802.11abgn-AC
abgnAX = 12 # 802.11abgn-AX
an = 10 # 802.11an
anAC = 9 # 802.11an-AC
anAX = 14 # 802.11an-AX
b = 2 # 802.11b
bg = 7 # 802.11bg
bgn = 6 # 802.11bgn
bgnAC = 11 # 802.11bgn-AC
bgnAX = 13 # 802.11bgn-AX
g = 3 # 802.11g
class add_sta_rate(Enum):
p_a_g = "/a/g" # 6 Mbps, 9 Mbps, 12 Mbps, 18 Mbps, 24 Mbps, 36 Mbps, 48 Mbps, 54 Mbps
p_b = "/b" # 1Mbps, 2Mbps, 5.5 Mbps, 11 Mbps
DEFAULT = "DEFAULT" # Use maximum available speed
MCS0_76 = "MCS0-76" # /n rates
p_bitmap_ = "[bitmap]" # '0xff 00 ...' to directly specify the MCS bitmap.
def post_add_sta(self,
ampdu_density=None,
ampdu_factor=None,
ap=None,
flags=None,
flags_mask=None,
ieee80211w=None,
key=None,
mac=None,
max_amsdu=None,
mode=None,
nickname=None,
radio=None,
rate=None,
resource=None,
shelf=None,
ssid=None,
sta_br_ip=None,
sta_name=None,
wpa_cfg_file=None,
x_coord=None,
y_coord=None,
z_coord=None,
debug_=False):
debug_ |= self.debug
data = {
"ampdu_density" : ampdu_density,
"ampdu_factor" : ampdu_factor,
"ap" : ap,
"flags" : flags,
"flags_mask" : flags_mask,
"ieee80211w" : ieee80211w,
"key" : key,
"mac" : mac,
"max_amsdu" : max_amsdu,
"mode" : mode,
"nickname" : nickname,
"radio" : radio,
"rate" : rate,
"resource" : resource,
"shelf" : shelf,
"ssid" : ssid,
"sta_br_ip" : sta_br_ip,
"sta_name" : sta_name,
"wpa_cfg_file" : wpa_cfg_file,
"x_coord" : x_coord,
"y_coord" : y_coord,
"z_coord" : z_coord,
}
response = self.json_post("/cli-json/add_sta",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_t1_span
https://www.candelatech.com/lfcli_ug.php#add_t1_span
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class add_t1_span_buildout(Enum):
p_15db = 6 # -15db (CSU)
p_22_5db = 7 # -22.5db (CSU)
p_7_5db = 5 # -7.5db (CSU)
p_0db = 8 # 0db (CSU)
p_133_ft = 0 # 1-133 feet
p_266_ft = 1 # 122-266 feet
p_399_ft = 2 # 266-399 feet
p_533_ft = 3 # 399-533 feet
p_655_ft = 4 # 533-655 feet
def post_add_t1_span(self,
buildout=None,
coding=None,
cpu_id=None,
first_channel=None,
framing=None,
mtu=None,
pci_bus=None,
pci_slot=None,
resource=None,
shelf=None,
span_num=None,
timing=None,
type=None,
debug_=False):
debug_ |= self.debug
data = {
"buildout" : buildout,
"coding" : coding,
"cpu_id" : cpu_id,
"first_channel" : first_channel,
"framing" : framing,
"mtu" : mtu,
"pci_bus" : pci_bus,
"pci_slot" : pci_slot,
"resource" : resource,
"shelf" : shelf,
"span_num" : span_num,
"timing" : timing,
"type" : type,
}
response = self.json_post("/cli-json/add_t1_span",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_text_blob
https://www.candelatech.com/lfcli_ug.php#add_text_blob
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_add_text_blob(self,
name=None,
text=None,
type=None,
debug_=False):
debug_ |= self.debug
data = {
"name" : name,
"text" : text,
"type" : type,
}
response = self.json_post("/cli-json/add_text_blob",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_tgcx
https://www.candelatech.com/lfcli_ug.php#add_tgcx
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_add_tgcx(self,
cxname=None,
tgname=None,
debug_=False):
debug_ |= self.debug
data = {
"cxname" : cxname,
"tgname" : tgname,
}
response = self.json_post("/cli-json/add_tgcx",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_threshold
https://www.candelatech.com/lfcli_ug.php#add_threshold
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class add_threshold_thresh_id(Enum):
Delete_Marked = -3 # Delete any marked.
Mark_All = -2 # Mark all
class add_threshold_thresh_type(Enum):
NO_RX_SINCE = 6 # Have not received any bytes/packets in specified time.
RX_BPS_RATE_OOR_1m = 5 # rx-bps over last 1 minute is out of range.
RX_BPS_RATE_OOR_30S = 3 # rx-bps over last 30 seconds is out of range.
RX_BPS_RATE_OOR_3S = 1 # rx-bps over last 3 seconds is out of range.
TT_RX_DROP_OOR = 8 # RX Drop percentage is out of range (per-million).
TT_RX_LAT_OOR = 7 # Latency running-average out of range.
TX_BPS_RATE_OOR_1m = 4 # tx-bps over last 1 minute is out of range.
TX_BPS_RATE_OOR_30S = 2 # tx-bps over last 30 seconds is out of range.
TX_BPS_RATE_OOR_3S = 0 # tx-bps over last 3 seconds is out of range.
def post_add_threshold(self,
endp=None,
thresh_id=None,
thresh_max=None,
thresh_min=None,
thresh_type=None,
debug_=False):
debug_ |= self.debug
data = {
"endp" : endp,
"thresh_id" : thresh_id,
"thresh_max" : thresh_max,
"thresh_min" : thresh_min,
"thresh_type" : thresh_type,
}
response = self.json_post("/cli-json/add_threshold",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_tm
https://www.candelatech.com/lfcli_ug.php#add_tm
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_add_tm(self,
name=None,
debug_=False):
debug_ |= self.debug
data = {
"name" : name,
}
response = self.json_post("/cli-json/add_tm",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_traffic_profile
https://www.candelatech.com/lfcli_ug.php#add_traffic_profile
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class add_traffic_profile_traffic_profile_flags(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
BI_DIRECTIONAL = 0x2 # Should we do bi-directional traffic?
IPERF_UDP = 0x4 # If Iperf, should use UDP. If not set, then will use TCP.
UP = 0x1 # Upload direction (this not set means download)
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
class add_traffic_profile_wifi_mode(Enum):
Iperf3_Client = "Iperf3-Client" # iperf3 client
Iperf3_Server = "Iperf3-Server" # iperf3 server
as_is = "as_is" # Make no changes to current configuration
http = "http" # Not yet implemented
https = "https" # Not yet implemented
tcp = "tcp"
udp = "udp"
def post_add_traffic_profile(self,
instance_count=None,
max_pdu=None,
max_speed=None,
min_pdu=None,
min_speed=None,
name=None,
tos=None,
traffic_profile_flags=None,
traffic_profile_flags_mask=None,
type=None,
debug_=False):
debug_ |= self.debug
data = {
"instance_count" : instance_count,
"max_pdu" : max_pdu,
"max_speed" : max_speed,
"min_pdu" : min_pdu,
"min_speed" : min_speed,
"name" : name,
"tos" : tos,
"traffic_profile_flags" : traffic_profile_flags,
"traffic_profile_flags_mask" : traffic_profile_flags_mask,
"type" : type,
}
response = self.json_post("/cli-json/add_traffic_profile",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_traffic_profile_notes
https://www.candelatech.com/lfcli_ug.php#add_traffic_profile_notes
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_add_traffic_profile_notes(self,
dut=None,
text=None,
debug_=False):
debug_ |= self.debug
data = {
"dut" : dut,
"text" : text,
}
response = self.json_post("/cli-json/add_traffic_profile_notes",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_vap
https://www.candelatech.com/lfcli_ug.php#add_vap
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class add_vap_flags(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
p_80211h_enable = 0x10000000 # Enable 802.11h (needed for running on DFS channels) Requires 802.11d.
p_80211r_pmska_cache = 0x4000000 # Enable oportunistic PMSKA caching for WPA2 (Related to 802.11r).
p_80211u_additional = 0x100000 # AP requires additional step for access (802.11u Interworking)
p_80211u_auto = 0x40000 # Enable 802.11u (Interworking) Auto-internetworking feature. Always enabled currently.
p_80211u_e911 = 0x200000 # AP claims emergency services reachable (802.11u Interworking)
p_80211u_e911_unauth = 0x400000 # AP provides Unauthenticated emergency services (802.11u Interworking)
p_80211u_enable = 0x20000 # Enable 802.11u (Interworking) feature.
p_80211u_gw = 0x80000 # AP Provides access to internet (802.11u Interworking)
p_8021x_radius = 0x2000000 # Use 802.1x (RADIUS for AP).
create_admin_down = 0x1000000000 # Station should be created admin-down.
disable_dgaf = 0x1000000 # AP Disable DGAF (used by HotSpot 2.0).
disable_ht40 = 0x800 # Disable HT-40 (will use HT-20 if available).
disable_ht80 = 0x8000000 # Disable HT80 (for AC chipset NICs only)
enable_80211d = 0x40 # Enable 802.11D to broadcast country-code & channels in VAPs
enable_wpa = 0x10 # Enable WPA
hostapd_config = 0x20 # Use Custom hostapd config file.
hs20_enable = 0x800000 # Enable Hotspot 2.0 (HS20) feature. Requires WPA-2.
ht160_enable = 0x100000000 # Enable HT160 mode.
osen_enable = 0x40000000 # Enable OSEN protocol (OSU Server-only Authentication)
pri_sec_ch_enable = 0x100 # Enable Primary/Secondary channel switch.
short_preamble = 0x80 # Allow short-preamble
use_bss_load = 0x20000000000 # Enable BSS Load IE in Beacons and Probe Responses (.11e).
use_bss_transition = 0x80000000000 # Enable BSS transition.
use_rrm_report = 0x40000000000 # Enable Radio measurements IE in beacon and probe responses.
use_wpa3 = 0x10000000000 # Enable WPA-3 (SAE Personal) mode.
verbose = 0x10000 # Verbose-Debug: Increase debug info in wpa-supplicant and hostapd logs.
wep_enable = 0x200 # Enable WEP Encryption
wpa2_enable = 0x400 # Enable WPA2 Encryption
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
class add_vap_mode(Enum):
p_802_11a = 1 # 802.11a
AUTO = 0 # 802.11g
abg = 4 # 802.11abg
abgn = 5 # 802.11abgn
abgnAC = 8 # 802.11abgn-AC
abgnAX = 12 # 802.11abgn-AX
an = 10 # 802.11an
anAC = 9 # 802.11an-AC
anAX = 14 # 802.11an-AXAUTO | 0 #
b = 2 # 802.11b
bg = 7 # 802.11bg
bgn = 6 # 802.11bgn
bgnAC = 11 # 802.11bgn-AC
bgnAX = 13 # 802.11bgn-AX
g = 3 # 802.11g
def post_add_vap(self,
ap_name=None,
beacon=None,
custom_cfg=None,
dtim_period=None,
flags=None,
flags_mask=None,
frag_thresh=None,
ieee80211w=None,
key=None,
mac=None,
max_sta=None,
mode=None,
radio=None,
rate=None,
resource=None,
shelf=None,
ssid=None,
x_coord=None,
y_coord=None,
z_coord=None,
debug_=False):
debug_ |= self.debug
data = {
"ap_name" : ap_name,
"beacon" : beacon,
"custom_cfg" : custom_cfg,
"dtim_period" : dtim_period,
"flags" : flags,
"flags_mask" : flags_mask,
"frag_thresh" : frag_thresh,
"ieee80211w" : ieee80211w,
"key" : key,
"mac" : mac,
"max_sta" : max_sta,
"mode" : mode,
"radio" : radio,
"rate" : rate,
"resource" : resource,
"shelf" : shelf,
"ssid" : ssid,
"x_coord" : x_coord,
"y_coord" : y_coord,
"z_coord" : z_coord,
}
response = self.json_post("/cli-json/add_vap",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_venue
https://www.candelatech.com/lfcli_ug.php#add_venue
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class add_venue_freq_24(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
ALL = 0xffff # ALL
Ch_1 = 0x1 # Channel 1
Ch_2 = 0x2 # Channel 2
Ch_3 = 0x4 # Channel 3
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
class add_venue_freq_5(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
Ch_100 = 0x800 # Channel 100 5500
Ch_104 = 0x1000 # Channel 104 5520
Ch_108 = 0x2000 # Channel 108 5540
Ch_112 = 0x4000 # Channel 112 5560
Ch_116 = 0x8000 # Channel 116 5580
Ch_120 = 0x10000 # Channel 120 5600
Ch_124 = 0x20000 # Channel 124 5620
Ch_128 = 0x40000 # Channel 128 5640
Ch_132 = 0x80000 # Channel 132 5660
Ch_136 = 0x100000 # Channel 136 5680
Ch_140 = 0x200000 # Channel 140 5700
Ch_149 = 0x400000 # Channel 149 5745
Ch_153 = 0x800000 # Channel 153 5765
Ch_157 = 0x1000000 # Channel 157 5785
Ch_161 = 0x2000000 # Channel 161 5805
Ch_165 = 0x4000000 # Channel 165 5825
Ch_36 = 0x1 # Channel 36 5180
Ch_38 = 0x2 # Channel 38 5190
Ch_40 = 0x4 # Channel 40 5200
Ch_42 = 0x8 # Channel 42 5210
Ch_44 = 0x10 # Channel 44 5220
Ch_46 = 0x20 # Channel 46 5230
Ch_48 = 0x40 # Channel 48 5240
Ch_52 = 0x80 # Channel 52 5260
Ch_56 = 0x100 # Channel 56 5280
Ch_60 = 0x200 # Channel 60 5300
Ch_64 = 0x400 # Channel 64 5320
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
def post_add_venue(self,
description=None,
freq_24=None,
freq_5=None,
resource=None,
shelf=None,
venu_id=None,
x1=None,
x2=None,
y1=None,
y2=None,
debug_=False):
debug_ |= self.debug
data = {
"description" : description,
"freq_24" : freq_24,
"freq_5" : freq_5,
"resource" : resource,
"shelf" : shelf,
"venu_id" : venu_id,
"x1" : x1,
"x2" : x2,
"y1" : y1,
"y2" : y2,
}
response = self.json_post("/cli-json/add_venue",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_vlan
https://www.candelatech.com/lfcli_ug.php#add_vlan
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_add_vlan(self,
old_name=None,
port=None,
report_timer=None,
resource=None,
shelf=None,
vid=None,
debug_=False):
debug_ |= self.debug
data = {
"old_name" : old_name,
"port" : port,
"report_timer" : report_timer,
"resource" : resource,
"shelf" : shelf,
"vid" : vid,
}
response = self.json_post("/cli-json/add_vlan",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_voip_endp
https://www.candelatech.com/lfcli_ug.php#add_voip_endp
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_add_voip_endp(self,
alias=None,
auth_user_name=None,
display_name=None,
gateway_port=None,
ip_addr=None,
peer_phone_num=None,
phone_num=None,
port=None,
proxy_passwd=None,
resource=None,
rtp_port=None,
rx_sound_file=None,
shelf=None,
sip_gateway=None,
tx_sound_file=None,
vad_max_timer=None,
vad_timer=None,
debug_=False):
debug_ |= self.debug
data = {
"alias" : alias,
"auth_user_name" : auth_user_name,
"display_name" : display_name,
"gateway_port" : gateway_port,
"ip_addr" : ip_addr,
"peer_phone_num" : peer_phone_num,
"phone_num" : phone_num,
"port" : port,
"proxy_passwd" : proxy_passwd,
"resource" : resource,
"rtp_port" : rtp_port,
"rx_sound_file" : rx_sound_file,
"shelf" : shelf,
"sip_gateway" : sip_gateway,
"tx_sound_file" : tx_sound_file,
"vad_max_timer" : vad_max_timer,
"vad_timer" : vad_timer,
}
response = self.json_post("/cli-json/add_voip_endp",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_vr
https://www.candelatech.com/lfcli_ug.php#add_vr
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class add_vr_flags(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
p_4BYTE_AS_NUMBER = 0x40 # Sets corresponding Xorp flag.
BGP_CONFED = 0x100 # Configure BGP in a confederation.
BGP_DAMPING = 0x200 # Enable BGP damping section in Xorp configuration file.
ENABLE_BGP = 0x20 # Set this to zero if you don't want BGP on this VR.
RIP_ACCEPT_DR = 0x800 # Tell RIP to accept default-routes.
ROUTE_REFLECTOR = 0x80 # Act as BGP Route Reflector.
USE_IPV6 = 0x10 # Enable IPv6 OSPF routing for this virtual router.
USE_IPV6_RADVD = 0x8 # Enable IPv6 RADV Daemon for interfaces in this virtual router.
USE_RIP = 0x400 # Enable RIP routing protocol in Xorp.
USE_XORP_MCAST = 0x2 # Enable Xorp Multicast routing (requires OSPF to be enabled currently)
USE_XORP_OLSR = 0x1000 # Enable OLSR routing protocol in Xorp.
USE_XORP_OSPF = 0x1 # Enable Xorp router daemon with OSPF (IPv4) protocol
USE_XORP_SHA = 0x4 # Enable Telcordia's Xorp SHA option (requires OSPF to be enabled)
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
def post_add_vr(self,
alias=None,
flags=None,
height=None,
notes=None,
resource=None,
shelf=None,
vr_id=None,
width=None,
x=None,
y=None,
debug_=False):
debug_ |= self.debug
data = {
"alias" : alias,
"flags" : flags,
"height" : height,
"notes" : notes,
"resource" : resource,
"shelf" : shelf,
"vr_id" : vr_id,
"width" : width,
"x" : x,
"y" : y,
}
response = self.json_post("/cli-json/add_vr",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_vr_bgp
https://www.candelatech.com/lfcli_ug.php#add_vr_bgp
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class add_vr_bgp_flags(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
p_4BYTE_AS_NUMBER = 0x40 # Sets corresponding Xorp flag.
BGP_CONFED = 0x100 # Configure BGP in a confederation.
BGP_DAMPING = 0x200 # Enable BGP damping section in Xorp configuration file.
ENABLE_BGP = 0x20 # Set this to zero if you don't want BGP on this VR.
ROUTE_REFLECTOR = 0x80 # Act as BGP Route Reflector.
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
def post_add_vr_bgp(self,
bgp_id=None,
cluster_id=None,
confed_id=None,
flags=None,
half_life=None,
local_as=None,
max_suppress=None,
resource=None,
reuse=None,
shelf=None,
suppress=None,
vr_id=None,
debug_=False):
debug_ |= self.debug
data = {
"bgp_id" : bgp_id,
"cluster_id" : cluster_id,
"confed_id" : confed_id,
"flags" : flags,
"half_life" : half_life,
"local_as" : local_as,
"max_suppress" : max_suppress,
"resource" : resource,
"reuse" : reuse,
"shelf" : shelf,
"suppress" : suppress,
"vr_id" : vr_id,
}
response = self.json_post("/cli-json/add_vr_bgp",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_vrcx
https://www.candelatech.com/lfcli_ug.php#add_vrcx
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class add_vrcx_flags(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
custom_dhcpd = 0x400 # Use custom DHCP config file
dhcpd_enabled = 0x200 # Serve IPv4 DHCP on this interface
ipv6_enabled = 0x2000 # Serve IPv6 DHCP on this interface
nat_enabled = 0x100 # This connection will NAT outgoing packets
subnet_0 = 0x1 # Specify subnet 0
subnet_1 = 0x2 # Specify subnet 1
subnet_2 = 0x4 # Specify subnet 2
subnet_3 = 0x8 # Specify subnet 3
subnet_4 = 0x10 # Specify subnet 4
subnet_5 = 0x20 # Specify subnet 5
subnet_6 = 0x40 # Specify subnet 6
subnet_7 = 0x80 # Specify subnet 7
use_multicast = 0x800 # Use this interface for multicast and-rp
use_vrrp = 0x1000 # Use this interface for VRRP
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
def post_add_vrcx(self,
dhcp_dns=None,
dhcp_dns6=None,
dhcp_domain=None,
dhcp_lease_time=None,
dhcp_max=None,
dhcp_max6=None,
dhcp_min=None,
dhcp_min6=None,
flags=None,
height=None,
interface_cost=None,
local_dev=None,
local_dev_b=None,
nexthop=None,
ospf_area=None,
remote_dev=None,
remote_dev_b=None,
resource=None,
rip_metric=None,
shelf=None,
subnets=None,
vr_name=None,
vrrp_id=None,
vrrp_interval=None,
vrrp_ip=None,
vrrp_ip_prefix=None,
vrrp_priority=None,
wanlink=None,
width=None,
x=None,
y=None,
debug_=False):
debug_ |= self.debug
data = {
"dhcp_dns" : dhcp_dns,
"dhcp_dns6" : dhcp_dns6,
"dhcp_domain" : dhcp_domain,
"dhcp_lease_time" : dhcp_lease_time,
"dhcp_max" : dhcp_max,
"dhcp_max6" : dhcp_max6,
"dhcp_min" : dhcp_min,
"dhcp_min6" : dhcp_min6,
"flags" : flags,
"height" : height,
"interface_cost" : interface_cost,
"local_dev" : local_dev,
"local_dev_b" : local_dev_b,
"nexthop" : nexthop,
"ospf_area" : ospf_area,
"remote_dev" : remote_dev,
"remote_dev_b" : remote_dev_b,
"resource" : resource,
"rip_metric" : rip_metric,
"shelf" : shelf,
"subnets" : subnets,
"vr_name" : vr_name,
"vrrp_id" : vrrp_id,
"vrrp_interval" : vrrp_interval,
"vrrp_ip" : vrrp_ip,
"vrrp_ip_prefix" : vrrp_ip_prefix,
"vrrp_priority" : vrrp_priority,
"wanlink" : wanlink,
"width" : width,
"x" : x,
"y" : y,
}
response = self.json_post("/cli-json/add_vrcx",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_vrcx2
https://www.candelatech.com/lfcli_ug.php#add_vrcx2
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_add_vrcx2(self,
local_dev=None,
nexthop6=None,
resource=None,
shelf=None,
subnets6=None,
vr_name=None,
debug_=False):
debug_ |= self.debug
data = {
"local_dev" : local_dev,
"nexthop6" : nexthop6,
"resource" : resource,
"shelf" : shelf,
"subnets6" : subnets6,
"vr_name" : vr_name,
}
response = self.json_post("/cli-json/add_vrcx2",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_vsta
https://www.candelatech.com/lfcli_ug.php#add_sta
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class add_sta_flags(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
p_80211r_pmska_cache = 0x4000000 # Enable oportunistic PMSKA caching for WPA2 (Related to 802.11r).
p_80211u_additional = 0x100000 # AP requires additional step for access (802.11u Interworking)
p_80211u_auto = 0x40000 # Enable 802.11u (Interworking) Auto-internetworking feature. Always enabled currently.
p_80211u_e911 = 0x200000 # AP claims emergency services reachable (802.11u Interworking)
p_80211u_e911_unauth = 0x400000 # AP provides Unauthenticated emergency services (802.11u Interworking)
p_80211u_enable = 0x20000 # Enable 802.11u (Interworking) feature.
p_80211u_gw = 0x80000 # AP Provides access to internet (802.11u Interworking)
p_8021x_radius = 0x2000000 # Use 802.1x (RADIUS for AP).
create_admin_down = 0x1000000000 # Station should be created admin-down.
custom_conf = 0x20 # Use Custom wpa_supplicant config file.
disable_twt = 0x100000000000 # Disable TWT mode
disable_fast_reauth = 0x200000000 # Disable fast_reauth option for virtual stations.
disable_gdaf = 0x1000000 # AP: Disable DGAF (used by HotSpot 2.0).
disable_ht80 = 0x8000000 # Disable HT80 (for AC chipset NICs only)
disable_roam = 0x80000000 # Disable automatic station roaming based on scan results.
disable_sgi = 0x4000 # Disable SGI (Short Guard Interval).
hs20_enable = 0x800000 # Enable Hotspot 2.0 (HS20) feature. Requires WPA-2.
ht160_enable = 0x100000000 # Enable HT160 mode.
ht40_disable = 0x800 # Disable HT-40 even if hardware and AP support it.
ibss_mode = 0x20000000 # Station should be in IBSS mode.
lf_sta_migrate = 0x8000 # OK-To-Migrate (Allow station migration between LANforge radios)
mesh_mode = 0x400000000 # Station should be in MESH mode.
no_supp_op_class_ie = 0x4000000000 # Do not include supported-oper-class-IE in assoc requests. May work around AP bugs.
osen_enable = 0x40000000 # Enable OSEN protocol (OSU Server-only Authentication)
passive_scan = 0x2000 # Use passive scanning (don't send probe requests).
power_save_enable = 0x800000000 # Station should enable power-save. May not work in all drivers/configurations.
scan_ssid = 0x1000 # Enable SCAN-SSID flag in wpa_supplicant.
txo_enable = 0x8000000000 # Enable/disable tx-offloads, typically managed by set_wifi_txo command
use_bss_transition = 0x80000000000 # Enable BSS transition.
use_wpa3 = 0x10000000000 # Enable WPA-3 (SAE Personal) mode.
verbose = 0x10000 # Verbose-Debug: Increase debug info in wpa-supplicant and hostapd logs.
wds_mode = 0x2000000000 # WDS station (sort of like a lame mesh), not supported on ath10k
wep_enable = 0x200 # Use wpa_supplicant configured for WEP encryption.
wpa2_enable = 0x400 # Use wpa_supplicant configured for WPA2 encryption.
wpa_enable = 0x10 # Enable WPA
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
class add_sta_mode(Enum):
p_802_11a = 1 # 802.11a
AUTO = 0 # 802.11g
abg = 4 # 802.11abg
abgn = 5 # 802.11abgn
abgnAC = 8 # 802.11abgn-AC
abgnAX = 12 # 802.11abgn-AX
an = 10 # 802.11an
anAC = 9 # 802.11an-AC
anAX = 14 # 802.11an-AX
b = 2 # 802.11b
bg = 7 # 802.11bg
bgn = 6 # 802.11bgn
bgnAC = 11 # 802.11bgn-AC
bgnAX = 13 # 802.11bgn-AX
g = 3 # 802.11g
class add_sta_rate(Enum):
p_a_g = "/a/g" # 6 Mbps, 9 Mbps, 12 Mbps, 18 Mbps, 24 Mbps, 36 Mbps, 48 Mbps, 54 Mbps
p_b = "/b" # 1Mbps, 2Mbps, 5.5 Mbps, 11 Mbps
DEFAULT = "DEFAULT" # Use maximum available speed
MCS0_76 = "MCS0-76" # /n rates
p_bitmap_ = "[bitmap]" # '0xff 00 ...' to directly specify the MCS bitmap.
def post_add_vsta(self,
ampdu_density=None,
ampdu_factor=None,
ap=None,
flags=None,
flags_mask=None,
ieee80211w=None,
key=None,
mac=None,
max_amsdu=None,
mode=None,
nickname=None,
radio=None,
rate=None,
resource=None,
shelf=None,
ssid=None,
sta_br_ip=None,
sta_name=None,
wpa_cfg_file=None,
x_coord=None,
y_coord=None,
z_coord=None,
debug_=False):
debug_ |= self.debug
data = {
"ampdu_density" : ampdu_density,
"ampdu_factor" : ampdu_factor,
"ap" : ap,
"flags" : flags,
"flags_mask" : flags_mask,
"ieee80211w" : ieee80211w,
"key" : key,
"mac" : mac,
"max_amsdu" : max_amsdu,
"mode" : mode,
"nickname" : nickname,
"radio" : radio,
"rate" : rate,
"resource" : resource,
"shelf" : shelf,
"ssid" : ssid,
"sta_br_ip" : sta_br_ip,
"sta_name" : sta_name,
"wpa_cfg_file" : wpa_cfg_file,
"x_coord" : x_coord,
"y_coord" : y_coord,
"z_coord" : z_coord,
}
response = self.json_post("/cli-json/add_vsta",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/add_wl_endp
https://www.candelatech.com/lfcli_ug.php#add_wl_endp
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class add_wl_endp_wle_flags(Enum):
SHOW_WP = 1 # Show WanPaths in wanlink endpoint table in GUI
def post_add_wl_endp(self,
alias=None,
cpu_id=None,
description=None,
dest_ip=None,
dest_ip_mask=None,
drop_every_xth_pkt=None,
drop_freq=None,
dup_every_xth_pkt=None,
dup_freq=None,
extra_buffer=None,
ignore_bandwidth=None,
ignore_dup=None,
ignore_latency=None,
ignore_loss=None,
jitter_freq=None,
latency=None,
max_drop_amt=None,
max_jitter=None,
max_lateness=None,
max_rate=None,
max_reorder_amt=None,
min_drop_amt=None,
min_reorder_amt=None,
playback_capture=None,
playback_capture_file=None,
playback_loop=None,
port=None,
reorder_every_xth_pkt=None,
reorder_freq=None,
resource=None,
shelf=None,
source_ip=None,
source_ip_mask=None,
speed=None,
test_mgr=None,
wanlink=None,
wle_flags=None,
debug_=False):
debug_ |= self.debug
data = {
"alias" : alias,
"cpu_id" : cpu_id,
"description" : description,
"dest_ip" : dest_ip,
"dest_ip_mask" : dest_ip_mask,
"drop_every_xth_pkt" : drop_every_xth_pkt,
"drop_freq" : drop_freq,
"dup_every_xth_pkt" : dup_every_xth_pkt,
"dup_freq" : dup_freq,
"extra_buffer" : extra_buffer,
"ignore_bandwidth" : ignore_bandwidth,
"ignore_dup" : ignore_dup,
"ignore_latency" : ignore_latency,
"ignore_loss" : ignore_loss,
"jitter_freq" : jitter_freq,
"latency" : latency,
"max_drop_amt" : max_drop_amt,
"max_jitter" : max_jitter,
"max_lateness" : max_lateness,
"max_rate" : max_rate,
"max_reorder_amt" : max_reorder_amt,
"min_drop_amt" : min_drop_amt,
"min_reorder_amt" : min_reorder_amt,
"playback_capture" : playback_capture,
"playback_capture_file" : playback_capture_file,
"playback_loop" : playback_loop,
"port" : port,
"reorder_every_xth_pkt" : reorder_every_xth_pkt,
"reorder_freq" : reorder_freq,
"resource" : resource,
"shelf" : shelf,
"source_ip" : source_ip,
"source_ip_mask" : source_ip_mask,
"speed" : speed,
"test_mgr" : test_mgr,
"wanlink" : wanlink,
"wle_flags" : wle_flags,
}
response = self.json_post("/cli-json/add_wl_endp",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/admin
https://www.candelatech.com/lfcli_ug.php#admin
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_admin(self,
arg1=None,
arg2=None,
arg3=None,
arg5=None,
cmd=None,
debug_=False):
debug_ |= self.debug
data = {
"arg1" : arg1,
"arg2" : arg2,
"arg3" : arg3,
"arg5" : arg5,
"cmd" : cmd,
}
response = self.json_post("/cli-json/admin",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/apply_vr_cfg
https://www.candelatech.com/lfcli_ug.php#apply_vr_cfg
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_apply_vr_cfg(self,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/apply_vr_cfg",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/blink_attenuator
https://www.candelatech.com/lfcli_ug.php#blink_attenuator
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_blink_attenuator(self,
resource=None,
serno=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"resource" : resource,
"serno" : serno,
"shelf" : shelf,
}
response = self.json_post("/cli-json/blink_attenuator",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/c_show_ports
https://www.candelatech.com/lfcli_ug.php#c_show_ports
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class c_show_ports_probe_flags(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
BRIDGE = 0x8 # 8 include bridges
EASY_IP_INFO = 0x10 # 16 Everything but gateway information, which is expensive to probe.
ETHTOOL = 0x4 # 4 include ethtool results
GW = 0x20 # 32 include gateway information
GW_FORCE_REFRESH = 0x40 # 64 Force GW (re)probe. Otherwise, cached values *might* be used.
MII = 0x2 # 2 include MII
WIFI = 0x1 # 1 include wifi stations
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
def post_c_show_ports(self,
port=None,
probe_flags=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"port" : port,
"probe_flags" : probe_flags,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/c_show_ports",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/cancel_vr_cfg
https://www.candelatech.com/lfcli_ug.php#cancel_vr_cfg
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_cancel_vr_cfg(self,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/cancel_vr_cfg",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/clear_card_counters
https://www.candelatech.com/lfcli_ug.php#clear_resource_counters
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_clear_card_counters(self,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/clear_card_counters",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/clear_cd_counters
https://www.candelatech.com/lfcli_ug.php#clear_cd_counters
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_clear_cd_counters(self,
cd_name=None,
debug_=False):
debug_ |= self.debug
data = {
"cd_name" : cd_name,
}
response = self.json_post("/cli-json/clear_cd_counters",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/clear_cx_counters
https://www.candelatech.com/lfcli_ug.php#clear_cx_counters
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_clear_cx_counters(self,
cx_name=None,
debug_=False):
debug_ |= self.debug
data = {
"cx_name" : cx_name,
}
response = self.json_post("/cli-json/clear_cx_counters",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/clear_endp_counters
https://www.candelatech.com/lfcli_ug.php#clear_endp_counters
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_clear_endp_counters(self,
endp_name=None,
incr_seqno=None,
just_latency=None,
debug_=False):
debug_ |= self.debug
data = {
"endp_name" : endp_name,
"incr_seqno" : incr_seqno,
"just_latency" : just_latency,
}
response = self.json_post("/cli-json/clear_endp_counters",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/clear_group
https://www.candelatech.com/lfcli_ug.php#clear_group
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_clear_group(self,
name=None,
debug_=False):
debug_ |= self.debug
data = {
"name" : name,
}
response = self.json_post("/cli-json/clear_group",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/clear_port_counters
https://www.candelatech.com/lfcli_ug.php#clear_port_counters
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class clear_port_counters_extra(Enum):
dhcp4_lease = "dhcp4_lease" # Remove dhcp lease files for IPv4 DHCP
dhcp6_lease = "dhcp6_lease" # Remove dhcp lease files for IPv6 DHCP
dhcp_leases = "dhcp_leases" # Remove dhcp lease files for IPv4 and IPv6 DHCP
def post_clear_port_counters(self,
extra=None,
port=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"extra" : extra,
"port" : port,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/clear_port_counters",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/clear_resource_counters
https://www.candelatech.com/lfcli_ug.php#clear_resource_counters
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_clear_resource_counters(self,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/clear_resource_counters",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/clear_wp_counters
https://www.candelatech.com/lfcli_ug.php#clear_wp_counters
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_clear_wp_counters(self,
endp_name=None,
wp_name=None,
debug_=False):
debug_ |= self.debug
data = {
"endp_name" : endp_name,
"wp_name" : wp_name,
}
response = self.json_post("/cli-json/clear_wp_counters",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/create_client
https://www.candelatech.com/lfcli_ug.php#create_client
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_create_client(self,
name=None,
password=None,
super_user=None,
debug_=False):
debug_ |= self.debug
data = {
"name" : name,
"password" : password,
"super_user" : super_user,
}
response = self.json_post("/cli-json/create_client",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/diag
https://www.candelatech.com/lfcli_ug.php#diag
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_diag(self,
arg1=None,
type=None,
debug_=False):
debug_ |= self.debug
data = {
"arg1" : arg1,
"type" : type,
}
response = self.json_post("/cli-json/diag",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/discover
https://www.candelatech.com/lfcli_ug.php#discover
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_discover(self,
disconnect=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"disconnect" : disconnect,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/discover",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/do_pesq
https://www.candelatech.com/lfcli_ug.php#do_pesq
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_do_pesq(self,
endp_name=None,
result_file_name=None,
debug_=False):
debug_ |= self.debug
data = {
"endp_name" : endp_name,
"result_file_name" : result_file_name,
}
response = self.json_post("/cli-json/do_pesq",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/exit
https://www.candelatech.com/lfcli_ug.php#quit
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_exit(self,
debug_=False):
debug_ |= self.debug
data = {
}
response = self.json_post("/cli-json/exit",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/file
https://www.candelatech.com/lfcli_ug.php#file
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_file(self,
card=None,
cmd=None,
filename=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"card" : card,
"cmd" : cmd,
"filename" : filename,
"shelf" : shelf,
}
response = self.json_post("/cli-json/file",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/flash_attenuator
https://www.candelatech.com/lfcli_ug.php#flash_attenuator
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_flash_attenuator(self,
filename=None,
resource=None,
serno=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"filename" : filename,
"resource" : resource,
"serno" : serno,
"shelf" : shelf,
}
response = self.json_post("/cli-json/flash_attenuator",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/getavglatency
https://www.candelatech.com/lfcli_ug.php#getavglatency
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_getavglatency(self,
aorb=None,
cx=None,
debug_=False):
debug_ |= self.debug
data = {
"aorb" : aorb,
"cx" : cx,
}
response = self.json_post("/cli-json/getavglatency",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/getinrxbps
https://www.candelatech.com/lfcli_ug.php#getinrxbps
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_getinrxbps(self,
aorb=None,
cx=None,
debug_=False):
debug_ |= self.debug
data = {
"aorb" : aorb,
"cx" : cx,
}
response = self.json_post("/cli-json/getinrxbps",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/getinrxrate
https://www.candelatech.com/lfcli_ug.php#getinrxrate
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_getinrxrate(self,
aorb=None,
cx=None,
debug_=False):
debug_ |= self.debug
data = {
"aorb" : aorb,
"cx" : cx,
}
response = self.json_post("/cli-json/getinrxrate",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/getintxrate
https://www.candelatech.com/lfcli_ug.php#getintxrate
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_getintxrate(self,
aorb=None,
cx=None,
debug_=False):
debug_ |= self.debug
data = {
"aorb" : aorb,
"cx" : cx,
}
response = self.json_post("/cli-json/getintxrate",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/getipadd
https://www.candelatech.com/lfcli_ug.php#getipadd
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_getipadd(self,
aorb=None,
cx=None,
debug_=False):
debug_ |= self.debug
data = {
"aorb" : aorb,
"cx" : cx,
}
response = self.json_post("/cli-json/getipadd",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/getmac
https://www.candelatech.com/lfcli_ug.php#getmac
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_getmac(self,
aorb=None,
cx=None,
debug_=False):
debug_ |= self.debug
data = {
"aorb" : aorb,
"cx" : cx,
}
response = self.json_post("/cli-json/getmac",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/getmask
https://www.candelatech.com/lfcli_ug.php#getmask
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_getmask(self,
aorb=None,
cx=None,
debug_=False):
debug_ |= self.debug
data = {
"aorb" : aorb,
"cx" : cx,
}
response = self.json_post("/cli-json/getmask",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/getpktdrops
https://www.candelatech.com/lfcli_ug.php#getpktdrops
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_getpktdrops(self,
aorb=None,
cx=None,
debug_=False):
debug_ |= self.debug
data = {
"aorb" : aorb,
"cx" : cx,
}
response = self.json_post("/cli-json/getpktdrops",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/getrxendperrpkts
https://www.candelatech.com/lfcli_ug.php#getrxendperrpkts
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_getrxendperrpkts(self,
aorb=None,
cx=None,
debug_=False):
debug_ |= self.debug
data = {
"aorb" : aorb,
"cx" : cx,
}
response = self.json_post("/cli-json/getrxendperrpkts",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/getrxpkts
https://www.candelatech.com/lfcli_ug.php#getrxpkts
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_getrxpkts(self,
aorb=None,
cx=None,
debug_=False):
debug_ |= self.debug
data = {
"aorb" : aorb,
"cx" : cx,
}
response = self.json_post("/cli-json/getrxpkts",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/getrxporterrpkts
https://www.candelatech.com/lfcli_ug.php#getrxporterrpkts
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_getrxporterrpkts(self,
aorb=None,
cx=None,
debug_=False):
debug_ |= self.debug
data = {
"aorb" : aorb,
"cx" : cx,
}
response = self.json_post("/cli-json/getrxporterrpkts",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/gettxpkts
https://www.candelatech.com/lfcli_ug.php#gettxpkts
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_gettxpkts(self,
aorb=None,
cx=None,
debug_=False):
debug_ |= self.debug
data = {
"aorb" : aorb,
"cx" : cx,
}
response = self.json_post("/cli-json/gettxpkts",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/gossip
https://www.candelatech.com/lfcli_ug.php#gossip
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_gossip(self,
message=None,
debug_=False):
debug_ |= self.debug
data = {
"message" : message,
}
response = self.json_post("/cli-json/gossip",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/help
https://www.candelatech.com/lfcli_ug.php#help
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_help(self,
command=None,
debug_=False):
debug_ |= self.debug
data = {
"command" : command,
}
response = self.json_post("/cli-json/help",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/init_wiser
https://www.candelatech.com/lfcli_ug.php#init_wiser
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_init_wiser(self,
file_name=None,
node_count=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"file_name" : file_name,
"node_count" : node_count,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/init_wiser",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/licenses
https://www.candelatech.com/lfcli_ug.php#licenses
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_licenses(self,
popup=None,
show_file=None,
debug_=False):
debug_ |= self.debug
data = {
"popup" : popup,
"show_file" : show_file,
}
response = self.json_post("/cli-json/licenses",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/load
https://www.candelatech.com/lfcli_ug.php#load
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_load(self,
action=None,
clean_chambers=None,
clean_dut=None,
clean_profiles=None,
name=None,
debug_=False):
debug_ |= self.debug
data = {
"action" : action,
"clean_chambers" : clean_chambers,
"clean_dut" : clean_dut,
"clean_profiles" : clean_profiles,
"name" : name,
}
response = self.json_post("/cli-json/load",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/log_level
https://www.candelatech.com/lfcli_ug.php#log_level
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class log_level_level(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
ALL = 0xffffffff # Log everything
CUST1 = 0x10000 # Cust-1, latency info (65536)
DB = 0x80 # Database related logging (128)
DBG = 0x20 # debug (32)
DBG2 = 0x1000 # very verbose logging (4096)
DIS = 0x1 # disasters (1)
ERR = 0x2 # errors (2)
INF = 0x8 # info (8)
LIO = 0x2000 # IO logging (8192)
LL_PROF = 0x8000 # Profiling information (32768)
OUT1 = 0x4000 # Some std-out logging (16384)
PARSE = 0x800 # PARSE specific (2048)
SCRIPT = 0x400 # Scripting specific stuff (1024)
SEC = 0x40 # log security violations (64)
TRC = 0x10 # function trace (16)
WRN = 0x4 # warnings (4)
XMT = 0x100 # Output going to clients (256)
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
def post_log_level(self,
level=None,
target=None,
debug_=False):
debug_ |= self.debug
data = {
"level" : level,
"target" : target,
}
response = self.json_post("/cli-json/log_level",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/log_msg
https://www.candelatech.com/lfcli_ug.php#log_msg
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_log_msg(self,
message=None,
debug_=False):
debug_ |= self.debug
data = {
"message" : message,
}
response = self.json_post("/cli-json/log_msg",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/login
https://www.candelatech.com/lfcli_ug.php#login
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_login(self,
name=None,
password=None,
debug_=False):
debug_ |= self.debug
data = {
"name" : name,
"password" : password,
}
response = self.json_post("/cli-json/login",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/logout
https://www.candelatech.com/lfcli_ug.php#quit
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_logout(self,
debug_=False):
debug_ |= self.debug
data = {
}
response = self.json_post("/cli-json/logout",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/motd
https://www.candelatech.com/lfcli_ug.php#motd
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_motd(self,
debug_=False):
debug_ |= self.debug
data = {
}
response = self.json_post("/cli-json/motd",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/nc_show_cd
https://www.candelatech.com/lfcli_ug.php#nc_show_cd
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_nc_show_cd(self,
collision_domain=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"collision_domain" : collision_domain,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/nc_show_cd",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/nc_show_channel_groups
https://www.candelatech.com/lfcli_ug.php#nc_show_channel_groups
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_nc_show_channel_groups(self,
channel_name=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"channel_name" : channel_name,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/nc_show_channel_groups",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/nc_show_endpoints
https://www.candelatech.com/lfcli_ug.php#nc_show_endpoints
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_nc_show_endpoints(self,
endpoint=None,
extra=None,
debug_=False):
debug_ |= self.debug
data = {
"endpoint" : endpoint,
"extra" : extra,
}
response = self.json_post("/cli-json/nc_show_endpoints",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/nc_show_pesq
https://www.candelatech.com/lfcli_ug.php#nc_show_pesq
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_nc_show_pesq(self,
endpoint=None,
debug_=False):
debug_ |= self.debug
data = {
"endpoint" : endpoint,
}
response = self.json_post("/cli-json/nc_show_pesq",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/nc_show_ports
https://www.candelatech.com/lfcli_ug.php#nc_show_ports
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class nc_show_ports_probe_flags(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
BRIDGE = 0x8 # 8 include bridges
EASY_IP_INFO = 0x10 # 16 Everything but gateway information, which is expensive to probe.
ETHTOOL = 0x4 # 4 include ethtool results
GW = 0x20 # 32 include gateway information
GW_FORCE_REFRESH = 0x40 # 64 Force GW (re)probe. Otherwise, cached values *might* be used.
MII = 0x2 # 2 include MII
WIFI = 0x1 # 1 include wifi stations
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
def post_nc_show_ports(self,
port=None,
probe_flags=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"port" : port,
"probe_flags" : probe_flags,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/nc_show_ports",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/nc_show_ppp_links
https://www.candelatech.com/lfcli_ug.php#nc_show_ppp_links
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_nc_show_ppp_links(self,
link_num=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"link_num" : link_num,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/nc_show_ppp_links",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/nc_show_spans
https://www.candelatech.com/lfcli_ug.php#nc_show_spans
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_nc_show_spans(self,
resource=None,
shelf=None,
span_number=None,
debug_=False):
debug_ |= self.debug
data = {
"resource" : resource,
"shelf" : shelf,
"span_number" : span_number,
}
response = self.json_post("/cli-json/nc_show_spans",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/nc_show_vr
https://www.candelatech.com/lfcli_ug.php#nc_show_vr
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_nc_show_vr(self,
resource=None,
router=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"resource" : resource,
"router" : router,
"shelf" : shelf,
}
response = self.json_post("/cli-json/nc_show_vr",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/nc_show_vrcx
https://www.candelatech.com/lfcli_ug.php#nc_show_vrcx
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_nc_show_vrcx(self,
cx_name=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"cx_name" : cx_name,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/nc_show_vrcx",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/notify_dhcp
https://www.candelatech.com/lfcli_ug.php#notify_dhcp
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_notify_dhcp(self,
cmd=None,
netmask=None,
new_dns=None,
new_ip=None,
new_ip6=None,
new_mtu=None,
new_router=None,
port=None,
reason=None,
debug_=False):
debug_ |= self.debug
data = {
"cmd" : cmd,
"netmask" : netmask,
"new_dns" : new_dns,
"new_ip" : new_ip,
"new_ip6" : new_ip6,
"new_mtu" : new_mtu,
"new_router" : new_router,
"port" : port,
"reason" : reason,
}
response = self.json_post("/cli-json/notify_dhcp",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/port_reset_completed
https://www.candelatech.com/lfcli_ug.php#port_reset_completed
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_port_reset_completed(self,
extra=None,
port=None,
type=None,
debug_=False):
debug_ |= self.debug
data = {
"extra" : extra,
"port" : port,
"type" : type,
}
response = self.json_post("/cli-json/port_reset_completed",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/probe_port
https://www.candelatech.com/lfcli_ug.php#probe_port
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_probe_port(self,
key=None,
port=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"key" : key,
"port" : port,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/probe_port",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/probe_ports
https://www.candelatech.com/lfcli_ug.php#probe_ports
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_probe_ports(self,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/probe_ports",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/quiesce_endp
https://www.candelatech.com/lfcli_ug.php#quiesce_endp
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_quiesce_endp(self,
endp_name=None,
debug_=False):
debug_ |= self.debug
data = {
"endp_name" : endp_name,
}
response = self.json_post("/cli-json/quiesce_endp",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/quiesce_group
https://www.candelatech.com/lfcli_ug.php#quiesce_group
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_quiesce_group(self,
name=None,
debug_=False):
debug_ |= self.debug
data = {
"name" : name,
}
response = self.json_post("/cli-json/quiesce_group",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/quit
https://www.candelatech.com/lfcli_ug.php#quit
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_quit(self,
debug_=False):
debug_ |= self.debug
data = {
}
response = self.json_post("/cli-json/quit",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/reboot_os
https://www.candelatech.com/lfcli_ug.php#reboot_os
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_reboot_os(self,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/reboot_os",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/report
https://www.candelatech.com/lfcli_ug.php#report
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_report(self,
reporting_on=None,
rpt_dir=None,
save_endps=None,
save_ports=None,
save_resource=None,
debug_=False):
debug_ |= self.debug
data = {
"reporting_on" : reporting_on,
"rpt_dir" : rpt_dir,
"save_endps" : save_endps,
"save_ports" : save_ports,
"save_resource" : save_resource,
}
response = self.json_post("/cli-json/report",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/reset_port
https://www.candelatech.com/lfcli_ug.php#reset_port
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class reset_port_pre_ifdown(Enum):
P_IN = "P-IN" # Only call the portal login (do not reset drivers/supplicant/dhcp)
P_OUT = "P-OUT" # Only call the portal logout (do not reset drivers/supplicant/dhcp)
YES = "YES" # (include logout) Call portal-bot.pl ... --logout before going down.
def post_reset_port(self,
port=None,
pre_ifdown=None,
reset_ospf=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"port" : port,
"pre_ifdown" : pre_ifdown,
"reset_ospf" : reset_ospf,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/reset_port",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/reset_serial_span
https://www.candelatech.com/lfcli_ug.php#reset_serial_span
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_reset_serial_span(self,
resource=None,
shelf=None,
span=None,
debug_=False):
debug_ |= self.debug
data = {
"resource" : resource,
"shelf" : shelf,
"span" : span,
}
response = self.json_post("/cli-json/reset_serial_span",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/rm_attenuator
https://www.candelatech.com/lfcli_ug.php#rm_attenuator
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_rm_attenuator(self,
resource=None,
serno=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"resource" : resource,
"serno" : serno,
"shelf" : shelf,
}
response = self.json_post("/cli-json/rm_attenuator",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/rm_cd
https://www.candelatech.com/lfcli_ug.php#rm_cd
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_rm_cd(self,
cd=None,
debug_=False):
debug_ |= self.debug
data = {
"cd" : cd,
}
response = self.json_post("/cli-json/rm_cd",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/rm_cd_endp
https://www.candelatech.com/lfcli_ug.php#rm_cd_endp
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_rm_cd_endp(self,
cd=None,
endp=None,
debug_=False):
debug_ |= self.debug
data = {
"cd" : cd,
"endp" : endp,
}
response = self.json_post("/cli-json/rm_cd_endp",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/rm_cd_vr
https://www.candelatech.com/lfcli_ug.php#rm_cd_vr
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_rm_cd_vr(self,
cd=None,
endp=None,
debug_=False):
debug_ |= self.debug
data = {
"cd" : cd,
"endp" : endp,
}
response = self.json_post("/cli-json/rm_cd_vr",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/rm_chamber
https://www.candelatech.com/lfcli_ug.php#rm_chamber
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_rm_chamber(self,
chamber=None,
debug_=False):
debug_ |= self.debug
data = {
"chamber" : chamber,
}
response = self.json_post("/cli-json/rm_chamber",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/rm_chamber_path
https://www.candelatech.com/lfcli_ug.php#rm_chamber_path
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_rm_chamber_path(self,
chamber=None,
path=None,
debug_=False):
debug_ |= self.debug
data = {
"chamber" : chamber,
"path" : path,
}
response = self.json_post("/cli-json/rm_chamber_path",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/rm_channel_group
https://www.candelatech.com/lfcli_ug.php#rm_channel_group
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_rm_channel_group(self,
channel_name=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"channel_name" : channel_name,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/rm_channel_group",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/rm_client
https://www.candelatech.com/lfcli_ug.php#rm_client
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_rm_client(self,
client_name=None,
client_password=None,
debug_=False):
debug_ |= self.debug
data = {
"client_name" : client_name,
"client_password" : client_password,
}
response = self.json_post("/cli-json/rm_client",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/rm_cx
https://www.candelatech.com/lfcli_ug.php#rm_cx
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_rm_cx(self,
cx_name=None,
test_mgr=None,
debug_=False):
debug_ |= self.debug
data = {
"cx_name" : cx_name,
"test_mgr" : test_mgr,
}
response = self.json_post("/cli-json/rm_cx",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/rm_db
https://www.candelatech.com/lfcli_ug.php#rm_db
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_rm_db(self,
db_name=None,
debug_=False):
debug_ |= self.debug
data = {
"db_name" : db_name,
}
response = self.json_post("/cli-json/rm_db",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/rm_dut
https://www.candelatech.com/lfcli_ug.php#rm_dut
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_rm_dut(self,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"shelf" : shelf,
}
response = self.json_post("/cli-json/rm_dut",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/rm_endp
https://www.candelatech.com/lfcli_ug.php#rm_endp
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_rm_endp(self,
endp_name=None,
debug_=False):
debug_ |= self.debug
data = {
"endp_name" : endp_name,
}
response = self.json_post("/cli-json/rm_endp",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/rm_event
https://www.candelatech.com/lfcli_ug.php#rm_event
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_rm_event(self,
event_id=None,
debug_=False):
debug_ |= self.debug
data = {
"event_id" : event_id,
}
response = self.json_post("/cli-json/rm_event",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/rm_group
https://www.candelatech.com/lfcli_ug.php#rm_group
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_rm_group(self,
name=None,
debug_=False):
debug_ |= self.debug
data = {
"name" : name,
}
response = self.json_post("/cli-json/rm_group",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/rm_ppp_link
https://www.candelatech.com/lfcli_ug.php#rm_ppp_link
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_rm_ppp_link(self,
resource=None,
shelf=None,
unit_num=None,
debug_=False):
debug_ |= self.debug
data = {
"resource" : resource,
"shelf" : shelf,
"unit_num" : unit_num,
}
response = self.json_post("/cli-json/rm_ppp_link",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/rm_profile
https://www.candelatech.com/lfcli_ug.php#rm_profile
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_rm_profile(self,
name=None,
debug_=False):
debug_ |= self.debug
data = {
"name" : name,
}
response = self.json_post("/cli-json/rm_profile",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/rm_resource
https://www.candelatech.com/lfcli_ug.php#rm_resource
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_rm_resource(self,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/rm_resource",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/rm_rfgen
https://www.candelatech.com/lfcli_ug.php#rm_rfgen
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_rm_rfgen(self,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/rm_rfgen",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/rm_sec_ip
https://www.candelatech.com/lfcli_ug.php#rm_sec_ip
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_rm_sec_ip(self,
ip_list=None,
port=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"ip_list" : ip_list,
"port" : port,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/rm_sec_ip",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/rm_span
https://www.candelatech.com/lfcli_ug.php#rm_span
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_rm_span(self,
resource=None,
shelf=None,
span_num=None,
debug_=False):
debug_ |= self.debug
data = {
"resource" : resource,
"shelf" : shelf,
"span_num" : span_num,
}
response = self.json_post("/cli-json/rm_span",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/rm_test_mgr
https://www.candelatech.com/lfcli_ug.php#rm_test_mgr
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_rm_test_mgr(self,
test_mgr=None,
debug_=False):
debug_ |= self.debug
data = {
"test_mgr" : test_mgr,
}
response = self.json_post("/cli-json/rm_test_mgr",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/rm_text_blob
https://www.candelatech.com/lfcli_ug.php#rm_text_blob
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_rm_text_blob(self,
name=None,
type=None,
debug_=False):
debug_ |= self.debug
data = {
"name" : name,
"type" : type,
}
response = self.json_post("/cli-json/rm_text_blob",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/rm_tgcx
https://www.candelatech.com/lfcli_ug.php#rm_tgcx
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_rm_tgcx(self,
cxname=None,
tgname=None,
debug_=False):
debug_ |= self.debug
data = {
"cxname" : cxname,
"tgname" : tgname,
}
response = self.json_post("/cli-json/rm_tgcx",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/rm_threshold
https://www.candelatech.com/lfcli_ug.php#rm_threshold
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_rm_threshold(self,
endp=None,
thresh_id=None,
debug_=False):
debug_ |= self.debug
data = {
"endp" : endp,
"thresh_id" : thresh_id,
}
response = self.json_post("/cli-json/rm_threshold",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/rm_traffic_profile
https://www.candelatech.com/lfcli_ug.php#rm_traffic_profile
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_rm_traffic_profile(self,
name=None,
debug_=False):
debug_ |= self.debug
data = {
"name" : name,
}
response = self.json_post("/cli-json/rm_traffic_profile",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/rm_venue
https://www.candelatech.com/lfcli_ug.php#rm_venue
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_rm_venue(self,
resource=None,
shelf=None,
venu_id=None,
debug_=False):
debug_ |= self.debug
data = {
"resource" : resource,
"shelf" : shelf,
"venu_id" : venu_id,
}
response = self.json_post("/cli-json/rm_venue",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/rm_vlan
https://www.candelatech.com/lfcli_ug.php#rm_vlan
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_rm_vlan(self,
port=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"port" : port,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/rm_vlan",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/rm_vr
https://www.candelatech.com/lfcli_ug.php#rm_vr
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_rm_vr(self,
resource=None,
router_name=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"resource" : resource,
"router_name" : router_name,
"shelf" : shelf,
}
response = self.json_post("/cli-json/rm_vr",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/rm_vrcx
https://www.candelatech.com/lfcli_ug.php#rm_vrcx
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_rm_vrcx(self,
connection_name=None,
resource=None,
shelf=None,
vr_id=None,
vrcx_only=None,
debug_=False):
debug_ |= self.debug
data = {
"connection_name" : connection_name,
"resource" : resource,
"shelf" : shelf,
"vr_id" : vr_id,
"vrcx_only" : vrcx_only,
}
response = self.json_post("/cli-json/rm_vrcx",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/rm_wanpath
https://www.candelatech.com/lfcli_ug.php#rm_wanpath
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_rm_wanpath(self,
endp_name=None,
wp_name=None,
debug_=False):
debug_ |= self.debug
data = {
"endp_name" : endp_name,
"wp_name" : wp_name,
}
response = self.json_post("/cli-json/rm_wanpath",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/rpt_script
https://www.candelatech.com/lfcli_ug.php#rpt_script
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_rpt_script(self,
endp=None,
flags=None,
group_action=None,
loop_count=None,
name=None,
private=None,
type=None,
debug_=False):
debug_ |= self.debug
data = {
"endp" : endp,
"flags" : flags,
"group_action" : group_action,
"loop_count" : loop_count,
"name" : name,
"private" : private,
"type" : type,
}
response = self.json_post("/cli-json/rpt_script",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/save
https://www.candelatech.com/lfcli_ug.php#write
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_save(self,
db_name=None,
debug_=False):
debug_ |= self.debug
data = {
"db_name" : db_name,
}
response = self.json_post("/cli-json/save",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/scan_wifi
https://www.candelatech.com/lfcli_ug.php#scan_wifi
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class scan_wifi_extra(Enum):
NA = "NA" # (or left blank) the system does a full scan
dump = "dump" # then only cached values are returned
trigger_freq__freq_ = "trigger freq [freq]" # scan exactly those frequencies
def post_scan_wifi(self,
extra=None,
key=None,
port=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"extra" : extra,
"key" : key,
"port" : port,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/scan_wifi",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_arm_info
https://www.candelatech.com/lfcli_ug.php#set_arm_info
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class set_arm_info_arm_flags(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
random_payload = 0x10000 # Use random payload sizes instead of linear increase
rel_tstamp = 0x400 # Use Relative Timestamps. This will increase performance
slow_start = 0x2000 # Use slow-start logic. This ramps up
udp_checksum = 0x4000 # Use UDP Checksums.
use_gw_mac = 0x1000 # Use default gateway's MAC for destination MAC.
use_tcp = 0x8000 # Use TCP instead of UDP protocol. (Note this is NOT stateful TCP!)
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
def post_set_arm_info(self,
arm_flags=None,
burst=None,
dst_mac=None,
dst_mac_count=None,
ip_dst_max=None,
ip_dst_min=None,
ip_src_max=None,
ip_src_min=None,
max_pkt_size=None,
min_pkt_size=None,
multi_pkts=None,
name=None,
pkts_to_send=None,
src_mac=None,
src_mac_count=None,
udp_dst_max=None,
udp_dst_min=None,
udp_src_max=None,
udp_src_min=None,
debug_=False):
debug_ |= self.debug
data = {
"arm_flags" : arm_flags,
"burst" : burst,
"dst_mac" : dst_mac,
"dst_mac_count" : dst_mac_count,
"ip_dst_max" : ip_dst_max,
"ip_dst_min" : ip_dst_min,
"ip_src_max" : ip_src_max,
"ip_src_min" : ip_src_min,
"max_pkt_size" : max_pkt_size,
"min_pkt_size" : min_pkt_size,
"multi_pkts" : multi_pkts,
"name" : name,
"pkts_to_send" : pkts_to_send,
"src_mac" : src_mac,
"src_mac_count" : src_mac_count,
"udp_dst_max" : udp_dst_max,
"udp_dst_min" : udp_dst_min,
"udp_src_max" : udp_src_max,
"udp_src_min" : udp_src_min,
}
response = self.json_post("/cli-json/set_arm_info",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_attenuator
https://www.candelatech.com/lfcli_ug.php#set_attenuator
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_set_attenuator(self,
atten_idx=None,
mode=None,
pulse_count=None,
pulse_interval_ms=None,
pulse_time_ms=None,
pulse_width_us5=None,
resource=None,
serno=None,
shelf=None,
val=None,
debug_=False):
debug_ |= self.debug
data = {
"atten_idx" : atten_idx,
"mode" : mode,
"pulse_count" : pulse_count,
"pulse_interval_ms" : pulse_interval_ms,
"pulse_time_ms" : pulse_time_ms,
"pulse_width_us5" : pulse_width_us5,
"resource" : resource,
"serno" : serno,
"shelf" : shelf,
"val" : val,
}
response = self.json_post("/cli-json/set_attenuator",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_chamber
https://www.candelatech.com/lfcli_ug.php#set_chamber
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_set_chamber(self,
chamber=None,
cur_rotation=None,
position=None,
speed_rpm=None,
tilt=None,
turntable=None,
debug_=False):
debug_ |= self.debug
data = {
"chamber" : chamber,
"cur_rotation" : cur_rotation,
"position" : position,
"speed_rpm" : speed_rpm,
"tilt" : tilt,
"turntable" : turntable,
}
response = self.json_post("/cli-json/set_chamber",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_cx_report_timer
https://www.candelatech.com/lfcli_ug.php#set_cx_report_timer
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_set_cx_report_timer(self,
cx_name=None,
cxonly=None,
milliseconds=None,
test_mgr=None,
debug_=False):
debug_ |= self.debug
data = {
"cx_name" : cx_name,
"cxonly" : cxonly,
"milliseconds" : milliseconds,
"test_mgr" : test_mgr,
}
response = self.json_post("/cli-json/set_cx_report_timer",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_cx_state
https://www.candelatech.com/lfcli_ug.php#set_cx_state
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class set_cx_state_cx_state(Enum):
DELETED = "DELETED" # Deletes the CX(s).
QUIESCE = "QUIESCE" # Stop transmitting and gracefully stop cross-connect.
RUNNING = "RUNNING" # Sets the CX(s) in the running state.
STOPPED = "STOPPED" # Sets the CX(s) in the stopped state.
SWITCH = "SWITCH" # Sets the CX(s) in the running state, stopping any conflicting tests.
def post_set_cx_state(self,
cx_name=None,
cx_state=None,
test_mgr=None,
debug_=False):
debug_ |= self.debug
data = {
"cx_name" : cx_name,
"cx_state" : cx_state,
"test_mgr" : test_mgr,
}
response = self.json_post("/cli-json/set_cx_state",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_endp_addr
https://www.candelatech.com/lfcli_ug.php#set_endp_addr
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_set_endp_addr(self,
ip=None,
mac=None,
max_port=None,
min_port=None,
name=None,
debug_=False):
debug_ |= self.debug
data = {
"ip" : ip,
"mac" : mac,
"max_port" : max_port,
"min_port" : min_port,
"name" : name,
}
response = self.json_post("/cli-json/set_endp_addr",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_endp_details
https://www.candelatech.com/lfcli_ug.php#set_endp_details
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_set_endp_details(self,
conn_timeout=None,
dst_mac=None,
max_conn_timer=None,
max_ip_port=None,
max_reconn_pause=None,
mcast_src_ip=None,
mcast_src_port=None,
min_conn_timer=None,
min_reconn_pause=None,
name=None,
pkts_to_send=None,
rcvbuf_size=None,
sndbuf_size=None,
tcp_delack_segs=None,
tcp_max_delack=None,
tcp_min_delack=None,
tcp_mss=None,
debug_=False):
debug_ |= self.debug
data = {
"conn_timeout" : conn_timeout,
"dst_mac" : dst_mac,
"max_conn_timer" : max_conn_timer,
"max_ip_port" : max_ip_port,
"max_reconn_pause" : max_reconn_pause,
"mcast_src_ip" : mcast_src_ip,
"mcast_src_port" : mcast_src_port,
"min_conn_timer" : min_conn_timer,
"min_reconn_pause" : min_reconn_pause,
"name" : name,
"pkts_to_send" : pkts_to_send,
"rcvbuf_size" : rcvbuf_size,
"sndbuf_size" : sndbuf_size,
"tcp_delack_segs" : tcp_delack_segs,
"tcp_max_delack" : tcp_max_delack,
"tcp_min_delack" : tcp_min_delack,
"tcp_mss" : tcp_mss,
}
response = self.json_post("/cli-json/set_endp_details",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_endp_file
https://www.candelatech.com/lfcli_ug.php#set_endp_file
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_set_endp_file(self,
file=None,
name=None,
playback=None,
debug_=False):
debug_ |= self.debug
data = {
"file" : file,
"name" : name,
"playback" : playback,
}
response = self.json_post("/cli-json/set_endp_file",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_endp_flag
https://www.candelatech.com/lfcli_ug.php#set_endp_flag
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class set_endp_flag_flag(Enum):
AutoHelper = "AutoHelper" # Automatically run on helper process
ClearPortOnStart = "ClearPortOnStart" # clear stats on start
DoChecksum = "DoChecksum" # Enable checksumming
EnableConcurrentSrcIP = "EnableConcurrentSrcIP" # Concurrent source IPs?
EnableLinearSrcIP = "EnableLinearSrcIP" # linearized source IPs
EnableLinearSrcIPPort = "EnableLinearSrcIPPort" # linearized IP ports
EnableRndSrcIP = "EnableRndSrcIP" # randomize source IP
KernelMode = "KernelMode" # Enable kernel mode
QuiesceAfterDuration = "QuiesceAfterDuration" # quiesce after time period
QuiesceAfterRange = "QuiesceAfterRange" # quiesce after range of bytes
Unmanaged = "Unmanaged" # Set endpoint unmanaged
UseAutoNAT = "UseAutoNAT" # NAT friendly behavior
def post_set_endp_flag(self,
flag=None,
name=None,
val=None,
debug_=False):
debug_ |= self.debug
data = {
"flag" : flag,
"name" : name,
"val" : val,
}
response = self.json_post("/cli-json/set_endp_flag",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_endp_payload
https://www.candelatech.com/lfcli_ug.php#set_endp_payload
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class set_endp_payload_payload_type(Enum):
PRBS_11_8_10 = "PRBS_11_8_10" # PRBS (see above)
PRBS_15_0_14 = "PRBS_15_0_14" # PRBS (see above)
PRBS_4_0_3 = "PRBS_4_0_3" # Use linear feedback shift register to generate pseudo random sequence.
PRBS_7_0_6 = "PRBS_7_0_6" # PRBS (see above)
custom = "custom" # Enter your own payload with the set_endp_payload
decreasing = "decreasing" # bytes start at FF and decrease, wrapping if needed.
increasing = "increasing" # bytes start at 00 and increase, wrapping if needed.
ones = "ones" # Payload is all ones (FF).
random = "random" # generate a new random payload each time sent.
random_fixed = "random_fixed" # means generate one random payload, and send it over and over again.
zeros = "zeros" # Payload is all zeros (00).
def post_set_endp_payload(self,
name=None,
payload=None,
payload_type=None,
debug_=False):
debug_ |= self.debug
data = {
"name" : name,
"payload" : payload,
"payload_type" : payload_type,
}
response = self.json_post("/cli-json/set_endp_payload",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_endp_pld_bounds
https://www.candelatech.com/lfcli_ug.php#set_endp_pld_bounds
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_set_endp_pld_bounds(self,
is_random=None,
max_pld_size=None,
min_pld_size=None,
name=None,
use_checksum=None,
debug_=False):
debug_ |= self.debug
data = {
"is_random" : is_random,
"max_pld_size" : max_pld_size,
"min_pld_size" : min_pld_size,
"name" : name,
"use_checksum" : use_checksum,
}
response = self.json_post("/cli-json/set_endp_pld_bounds",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_endp_proxy
https://www.candelatech.com/lfcli_ug.php#set_endp_proxy
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_set_endp_proxy(self,
enabled=None,
endp_name=None,
proxy_ip=None,
proxy_ip_port=None,
debug_=False):
debug_ |= self.debug
data = {
"enabled" : enabled,
"endp_name" : endp_name,
"proxy_ip" : proxy_ip,
"proxy_ip_port" : proxy_ip_port,
}
response = self.json_post("/cli-json/set_endp_proxy",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_endp_quiesce
https://www.candelatech.com/lfcli_ug.php#set_endp_quiesce
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_set_endp_quiesce(self,
name=None,
quiesce=None,
debug_=False):
debug_ |= self.debug
data = {
"name" : name,
"quiesce" : quiesce,
}
response = self.json_post("/cli-json/set_endp_quiesce",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_endp_report_timer
https://www.candelatech.com/lfcli_ug.php#set_endp_report_timer
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_set_endp_report_timer(self,
endp_name=None,
milliseconds=None,
debug_=False):
debug_ |= self.debug
data = {
"endp_name" : endp_name,
"milliseconds" : milliseconds,
}
response = self.json_post("/cli-json/set_endp_report_timer",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_endp_tos
https://www.candelatech.com/lfcli_ug.php#set_endp_tos
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class set_endp_tos_tos(Enum):
LOWCOST = "LOWCOST"
LOWDELAY = "LOWDELAY"
RELIABILITY = "RELIABILITY"
THROUGHPUT = "THROUGHPUT"
def post_set_endp_tos(self,
name=None,
priority=None,
tos=None,
debug_=False):
debug_ |= self.debug
data = {
"name" : name,
"priority" : priority,
"tos" : tos,
}
response = self.json_post("/cli-json/set_endp_tos",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_endp_tx_bounds
https://www.candelatech.com/lfcli_ug.php#set_endp_tx_bounds
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_set_endp_tx_bounds(self,
is_bursty=None,
max_tx_rate=None,
min_tx_rate=None,
name=None,
debug_=False):
debug_ |= self.debug
data = {
"is_bursty" : is_bursty,
"max_tx_rate" : max_tx_rate,
"min_tx_rate" : min_tx_rate,
"name" : name,
}
response = self.json_post("/cli-json/set_endp_tx_bounds",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_event_interest
https://www.candelatech.com/lfcli_ug.php#set_event_interest
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class set_event_interest_ei_flags(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
CLEAR = 0x0 # will clear interest
SET = 0x1 # set interest flag
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
class set_event_interest_events1(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
BAD_TOS = 0x400000 # Endpoint has bad ToS values configured.
Bad_MAC = 0x100000 # Invalid MAC address configured.
Cleared = 0x2000 # Counters were cleared for some entity.
Connect = 0x100 # WiFi interface connected to AP.
Custom = 0x4 # Custom event (generated by USER in GUI or CLI).
DHCP_Fail = 0x8000 # DHCP Failed, maybe out of leases?
DHCP_Timeout = 0x10000 # Timed out talking to DHCP server.
DHCP4_Error = 0x20000 # DHCP gave out duplicated IP address.
DHCP6_Error = 0x40000 # DHCPv6 gave out duplicated IPv6 address.
Disconnect = 0x80 # WiFi interface disconnected from AP.
Endp_Started = 0x40 # Endpoint was started.
Endp_Stopped = 0x20 # Endpoint stopped for some reason.
Link_Down = 0x1 # Notify when Interface Link goes DOWN.
Link_Errors = 0x4000 # Port shows low-level link errors.
Link_Up = 0x2 # Notify when Interface Link goes UP.
Login = 0x400 # CLI/GUI user connected to LANforge.
Logout = 0x200 # CLI/GUI user disconnected from LANforge.
Migrated = 0x200000 # Port (station network interface) migrated.
NO_RX_SINCE = 0x800000 # Endpoint threshold alert.
NO_RX_SINCE_CLEARED = 0x1000000 # Endpoint threshold alert cleared.
RX_BPS_OOR_1M = 0x20000000 # Endpoint threshold alert.
RX_BPS_OOR_1M_CLEARED = 0x40000000 # Endpoint threshold alert cleared.
RX_BPS_OOR_30S = 0x8000000 # Endpoint threshold alert.
RX_BPS_OOR_30S_CLEARED = 0x10000000 # Endpoint threshold alert cleared.
RX_BPS_OOR_3S = 0x2000000 # Endpoint threshold alert.
RX_BPS_OOR_3S_CLEARED = 0x4000000 # Endpoint threshold alert cleared.
Resource_Down = 0x8 # Resource has crashed, rebooted, etc.
Resource_Up = 0x10 # Resource has connected to manager.
Start_Reports = 0x1000 # Start saving report data files (CSV).
Stop_Reports = 0x800 # Stop saving report data files (CSV).
TX_BPS_OOR_3S = 0x80000000 # Endpoint threshold alert.
WiFi_Config = 0x80000 # WiFi Configuration Error.
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
class set_event_interest_events2(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
FW_CRASH = 0x800 # Firmware for entity has crashed.
FW_FAIL = 0x1000 # Firmware failed powerup, may require reboot.
IFDOWN_FAIL = 0x8000 # IFDOWN-PRE Script (ifup --logout) returned error code.
IFDOWN_OK = 0x10000 # IFDOWN-PRE Script (ifup --logout) completed successfully.
IFUP_FAIL = 0x2000 # IFUP-POST Script returned error code.
IFUP_OK = 0x4000 # IFUP-POST Script completed successfully.
RX_DROP_OOR_1M = 0x200 # Endpoint threshold alert.
RX_DROP_OOR_1M_CLEARED = 0x400 # Endpoint threshold alert cleared.
RX_DROP_OOR_3S = 0x80 # Endpoint threshold alert.
RX_DROP_OOR_3S_CLEARED = 0x100 # Endpoint threshold alert cleared.
RX_LAT_OOR = 0x20 # Endpoint threshold alert.
RX_LAT_OOR_CLEARED = 0x40 # Endpoint threshold alert cleared.
TX_BPS_OOR_1M = 0x8 # Endpoint threshold alert.
TX_BPS_OOR_1M_CLEARED = 0x10 # Endpoint threshold alert cleared.
TX_BPS_OOR_30S = 0x2 # Endpoint threshold alert.
TX_BPS_OOR_30S_CLEARED = 0x4 # Endpoint threshold alert cleared.
TX_BPS_OOR_3S_CLEARED = 0x1 # Endpoint threshold alert cleared.
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
def post_set_event_interest(self,
ei_flags=None,
event_cnt=None,
events1=None,
events2=None,
events3=None,
events4=None,
var1=None,
debug_=False):
debug_ |= self.debug
data = {
"ei_flags" : ei_flags,
"event_cnt" : event_cnt,
"events1" : events1,
"events2" : events2,
"events3" : events3,
"events4" : events4,
"var1" : var1,
}
response = self.json_post("/cli-json/set_event_interest",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_event_priority
https://www.candelatech.com/lfcli_ug.php#set_event_priority
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class set_event_priority_event(Enum):
Bad_MAC = 20 # Invalid MAC address configured.
Cleared = 13 # Counters were cleared for some entity.
Connect = 8 # WiFi interface connected to AP.
Custom = 2 # Custom event (generated by USER in GUI or CLI).
DHCP_Fail = 15 # DHCP Failed, maybe out of leases?
DHCP_Timeout = 16 # Timed out talking to DHCP server.
DHCP4_Error = 17 # DHCP gave out duplicated IP address.
DHCP6_Error = 18 # DHCPv6 gave out duplicated IPv6 address.
Disconnect = 7 # WiFi interface disconnected from AP.
Endp_Started = 6 # Endpoint was started.
Endp_Stopped = 5 # Endpoint stopped for some reason.
Link_Down = 0 # Notify when Interface Link goes UP.
Link_Errors = 14 # Port shows low-level link errors.
Link_Up = 1 # Notify when Interface Link goes DOWN.
Login = 10 # CLI/GUI user connected to LANforge.
Logout = 9 # CLI/GUI user disconnected from LANforge.
Migrated = 21 # Port (station network interface) migrated.
Resource_Down = 3 # Resource has crashed, rebooted, etc.
Resource_Up = 4 # Resource has connected to manager.
Start_Reports = 12 # Start saving report data files (CSV).
Stop_Reports = 11 # Stop saving report data files (CSV).
WiFi_Config = 19 # WiFi Configuration Error.
class set_event_priority_priority(Enum):
AUTO = "AUTO" # Let event creator decide the priority.
CRITICAL = "CRITICAL"
DEBUG = "DEBUG"
FATAL = "FATAL"
INFO = "INFO"
WARNING = "WARNING"
def post_set_event_priority(self,
event=None,
priority=None,
debug_=False):
debug_ |= self.debug
data = {
"event" : event,
"priority" : priority,
}
response = self.json_post("/cli-json/set_event_priority",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_fe_info
https://www.candelatech.com/lfcli_ug.php#set_fe_info
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_set_fe_info(self,
directory=None,
io_direction=None,
max_file_size=None,
max_rw_sz=None,
min_file_size=None,
min_rw_sz=None,
name=None,
num_files=None,
prefix=None,
quiesce_after_files=None,
debug_=False):
debug_ |= self.debug
data = {
"directory" : directory,
"io_direction" : io_direction,
"max_file_size" : max_file_size,
"max_rw_sz" : max_rw_sz,
"min_file_size" : min_file_size,
"min_rw_sz" : min_rw_sz,
"name" : name,
"num_files" : num_files,
"prefix" : prefix,
"quiesce_after_files" : quiesce_after_files,
}
response = self.json_post("/cli-json/set_fe_info",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_flag
https://www.candelatech.com/lfcli_ug.php#set_flag
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class set_flag_flag(Enum):
brief = "brief" # Request more abbreviated output to various commands.
prompt_newlines = "prompt_newlines" # Add a newline after every prompt. Can help with scripts
push_all_rpts = "push_all_rpts" # If enabled, server will send port, endpoint, and other
push_endp_rpts = "push_endp_rpts" # If enabled, server will send endpoint reports without
request_keyed_text = "request_keyed_text" # Normally most keyed-text events are only sent to the GUI
stream_events = "stream_events" # Normally the CLI will not show Events (as seen in the Event
def post_set_flag(self,
client=None,
flag=None,
val=None,
debug_=False):
debug_ |= self.debug
data = {
"client" : client,
"flag" : flag,
"val" : val,
}
response = self.json_post("/cli-json/set_flag",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_gen_cmd
https://www.candelatech.com/lfcli_ug.php#set_gen_cmd
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_set_gen_cmd(self,
command=None,
name=None,
debug_=False):
debug_ |= self.debug
data = {
"command" : command,
"name" : name,
}
response = self.json_post("/cli-json/set_gen_cmd",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_gps_info
https://www.candelatech.com/lfcli_ug.php#set_gps_info
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_set_gps_info(self,
altitude=None,
ew=None,
lattitude=None,
longitude=None,
ns=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"altitude" : altitude,
"ew" : ew,
"lattitude" : lattitude,
"longitude" : longitude,
"ns" : ns,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/set_gps_info",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_ifup_script
https://www.candelatech.com/lfcli_ug.php#set_ifup_script
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_set_ifup_script(self,
flags=None,
port=None,
post_ifup_script=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"flags" : flags,
"port" : port,
"post_ifup_script" : post_ifup_script,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/set_ifup_script",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_license
https://www.candelatech.com/lfcli_ug.php#set_license
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_set_license(self,
licenses=None,
debug_=False):
debug_ |= self.debug
data = {
"licenses" : licenses,
}
response = self.json_post("/cli-json/set_license",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_mc_endp
https://www.candelatech.com/lfcli_ug.php#set_mc_endp
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_set_mc_endp(self,
mcast_dest_port=None,
mcast_group=None,
name=None,
rcv_mcast=None,
ttl=None,
debug_=False):
debug_ |= self.debug
data = {
"mcast_dest_port" : mcast_dest_port,
"mcast_group" : mcast_group,
"name" : name,
"rcv_mcast" : rcv_mcast,
"ttl" : ttl,
}
response = self.json_post("/cli-json/set_mc_endp",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_password
https://www.candelatech.com/lfcli_ug.php#set_password
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_set_password(self,
client=None,
new_password=None,
old_password=None,
debug_=False):
debug_ |= self.debug
data = {
"client" : client,
"new_password" : new_password,
"old_password" : old_password,
}
response = self.json_post("/cli-json/set_password",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_poll_mode
https://www.candelatech.com/lfcli_ug.php#set_poll_mode
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_set_poll_mode(self,
mode=None,
debug_=False):
debug_ |= self.debug
data = {
"mode" : mode,
}
response = self.json_post("/cli-json/set_poll_mode",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_port
https://www.candelatech.com/lfcli_ug.php#set_port
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class set_port_cmd_flags(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
abort_if_scripts = 0x400 # Forceably abort all ifup/down scripts on this Port.
force_MII_probe = 0x4 # Force MII probe
from_dhcp = 0x200 # Settings come from DHCP client.
from_user = 0x80 # from_user (Required to change Mgt Port config
new_gw_probe = 0x20 # Force new GW probe
new_gw_probe_dev = 0x40 # Force new GW probe for ONLY this interface
no_hw_probe = 0x8 # Don't probe hardware
probe_wifi = 0x10 # Probe WIFI
reset_transceiver = 0x1 # Reset transciever
restart_link_neg = 0x2 # Restart link negotiation
skip_port_bounce = 0x100 # skip-port-bounce (Don't ifdown/up
use_pre_ifdown = 0x800 # Call pre-ifdown script before bringing interface down.
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
class set_port_current_flags(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
adv_100bt_fd = 0x800000 # advert-100bt-FD
adv_100bt_hd = 0x400000 # advert-100bt-HD
adv_10bt_fd = 0x200000 # advert-10bt-FD
adv_10bt_hd = 0x100000 # advert-10bt-HD
adv_10g_fd = 0x800000000 # advert-10G-FD
adv_2_5g_fd = 0x400000000 # advert-2.5G-FD
adv_5g_fd = 0x400000000000000 # Advertise 5Gbps link speed.
adv_flow_ctl = 0x8000000 # advert-flow-control
auto_neg = 0x100 # auto-negotiate
aux_mgt = 0x800000000000 # Enable Auxillary-Management flag for this port.
fixed_100bt_fd = 0x10 # Fixed-100bt-FD
fixed_100bt_hd = 0x8 # Fixed-100bt-HD
fixed_10bt_fd = 0x4 # Fixed-10bt-FD
fixed_10bt_hd = 0x2 # Fixed-10bt-HD (half duplex)
ftp_enabled = 0x400000000000 # Enable FTP (vsftpd) service for this port.
gro_enabled = 0x4000000000 # GRO-Enabled
gso_enabled = 0x10000000000 # GSO-Enabled
http_enabled = 0x200000000000 # Enable HTTP (nginx) service for this port.
if_down = 0x1 # Interface Down
ignore_dhcp = 0x2000000000000 # Don't set DHCP acquired IP on interface,
ipsec_client = 0x40000000000000 # Enable client IPSEC xfrm on this port.
ipsec_concentrator = 0x80000000000000 # Enable concentrator (upstream) IPSEC xfrm on this port.
lro_enabled = 0x2000000000 # LRO-Enabled
no_dhcp_rel = 0x80000000000 # No-DHCP-Release
no_dhcp_restart = 0x1000000000000 # Disable restart of DHCP on link connect (ie, wifi).
no_ifup_post = 0x4000000000000 # Skip ifup-post script if we can detect that we
promisc = 0x10000000 # PROMISC
radius_enabled = 0x20000000000000 # Enable RADIUS service (using hostapd as radius server)
rxfcs = 0x40000000000 # RXFCS
service_dns = 0x100000000000000 # Enable DNS (dnsmasq) service on this port.
staged_ifup = 0x100000000000 # Staged-IFUP
tso_enabled = 0x1000000000 # TSO-Enabled
ufo_enabled = 0x8000000000 # UFO-Enabled
use_dhcp = 0x80000000 # USE-DHCP
use_dhcpv6 = 0x20000000000 # USE-DHCPv6
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
class set_port_dhcp_client_id(Enum):
NA = "NA" # Do not change from current value.
NONE = "NONE" # Do not use dhcp client ID.
p_string_ = "[string]" # Use the string for the client ID.
p__DEVNAME = "__DEVNAME" # Use the interface's name as the client ID.
p__MAC = "__MAC" # Use interface's MAC address for the client ID.
class set_port_dhcp_hostname(Enum):
NA = "NA" # Do not change from current value.
NONE = "NONE" # Do not use dhcp Hostname
p_string_ = "[string]" # Use the string for the Hostname.
p__ALIAS__ = "__ALIAS__" # Use alias if set, or EID behaviour if alias is not set..
p__EID__ = "__EID__" # Use hostname 'CT-[resource-id].[port-name]'
class set_port_dhcp_vendor_id(Enum):
NA = "NA" # Do not change from current value.
NONE = "NONE" # Do not use dhcp vendor ID
p_string_ = "[string]" # Use the string for the vendor ID.
class set_port_flags2(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
bypass_disconnect = 0x200 # Logically disconnect the cable (link-down)
bypass_enabled = 0x10 # Enable Bypass Device
bypass_power_down = 0x80 # Should bypass be on when we shutdown or loose power?
bypass_power_on = 0x100 # Should bypass be on when we first power up?
supports_bypass = 0x2 # Support Bypass Devices
use_stp = 0x1 # Use Spanning Tree Protocol
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
class set_port_interest(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
alias = 0x1000 # Port alias
aux_mgt = 0x20000000 # Enable/disable Auxillary-Management for a port
bridge = 0x10000 # BRIDGE
bypass = 0x40000 # Bypass
command_flags = 0x1 # apply command flags
cpu_mask = 0x100000 # CPU Mask, useful for pinning process to CPU core
current_flags = 0x2 # apply current flags
dhcp = 0x4000 # including client-id.
dhcp_rls = 0x4000000 # DHCP release
dhcpv6 = 0x1000000 # Use DHCPv6
gen_offload = 0x80000 # Generic offload flags, everything but LRO
ifdown = 0x800000 # Down interface
interal_use_1 = 0x800 # (INTERNAL USE)
ip_Mask = 0x8 # IP mask
ip_address = 0x4 # IP address
ip_gateway = 0x10 # IP gateway
ipv6_addrs = 0x20000 # IPv6 Address
link_speed = 0x80 # Link speed
lro_offload = 0x200000 # LRO (Must be disabled when used in Wanlink,
mac_address = 0x20 # MAC address
mtu = 0x100 # MTU
no_apply_dhcp = 0x80000000 # Enable/disable NO-APPLY-DHCP flag for a port
no_dhcp_conn = 0x40000000 # Enable/disable NO-DHCP-ON-CONNECT flag for a port
promisc_mode = 0x400 # PROMISC mode
rpt_timer = 0x8000 # Report Timer
rx_all = 0x2000 # Rx-ALL
rxfcs = 0x2000000 # RXFCS
skip_ifup_roam = 0x100000000 # Enable/disable SKIP-IFUP-ON-ROAM flag for a port
sta_br_id = 0x400000 # WiFi Bridge identifier. 0 means no bridging.
supported_flags = 0x40 # apply supported flags
svc_ftpd = 0x10000000 # Enable/disable FTP Service for a port
svc_httpd = 0x8000000 # Enable/disable HTTP Service for a port
tx_queue_length = 0x200 # TX Queue Length
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
def post_set_port(self,
alias=None,
br_aging_time=None,
br_forwarding_delay=None,
br_hello_time=None,
br_max_age=None,
br_port_cost=None,
br_port_priority=None,
br_priority=None,
bypass_wdt=None,
cmd_flags=None,
cpu_mask=None,
current_flags=None,
current_flags_msk=None,
dhcp_client_id=None,
dhcp_hostname=None,
dhcp_vendor_id=None,
dns_servers=None,
flags2=None,
gateway=None,
interest=None,
ip_addr=None,
ipsec_concentrator=None,
ipsec_local_id=None,
ipsec_passwd=None,
ipsec_remote_id=None,
ipv6_addr_global=None,
ipv6_addr_link=None,
ipv6_dflt_gw=None,
mac=None,
mtu=None,
netmask=None,
port=None,
report_timer=None,
resource=None,
shelf=None,
sta_br_id=None,
tx_queue_len=None,
debug_=False):
debug_ |= self.debug
data = {
"alias" : alias,
"br_aging_time" : br_aging_time,
"br_forwarding_delay" : br_forwarding_delay,
"br_hello_time" : br_hello_time,
"br_max_age" : br_max_age,
"br_port_cost" : br_port_cost,
"br_port_priority" : br_port_priority,
"br_priority" : br_priority,
"bypass_wdt" : bypass_wdt,
"cmd_flags" : cmd_flags,
"cpu_mask" : cpu_mask,
"current_flags" : current_flags,
"current_flags_msk" : current_flags_msk,
"dhcp_client_id" : dhcp_client_id,
"dhcp_hostname" : dhcp_hostname,
"dhcp_vendor_id" : dhcp_vendor_id,
"dns_servers" : dns_servers,
"flags2" : flags2,
"gateway" : gateway,
"interest" : interest,
"ip_addr" : ip_addr,
"ipsec_concentrator" : ipsec_concentrator,
"ipsec_local_id" : ipsec_local_id,
"ipsec_passwd" : ipsec_passwd,
"ipsec_remote_id" : ipsec_remote_id,
"ipv6_addr_global" : ipv6_addr_global,
"ipv6_addr_link" : ipv6_addr_link,
"ipv6_dflt_gw" : ipv6_dflt_gw,
"mac" : mac,
"mtu" : mtu,
"netmask" : netmask,
"port" : port,
"report_timer" : report_timer,
"resource" : resource,
"shelf" : shelf,
"sta_br_id" : sta_br_id,
"tx_queue_len" : tx_queue_len,
}
response = self.json_post("/cli-json/set_port",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_port_alias
https://www.candelatech.com/lfcli_ug.php#set_port_alias
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_set_port_alias(self,
alias=None,
port=None,
resource=None,
shelf=None,
vport=None,
debug_=False):
debug_ |= self.debug
data = {
"alias" : alias,
"port" : port,
"resource" : resource,
"shelf" : shelf,
"vport" : vport,
}
response = self.json_post("/cli-json/set_port_alias",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_ppp_link_state
https://www.candelatech.com/lfcli_ug.php#set_ppp_link_state
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_set_ppp_link_state(self,
link=None,
ppp_state=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"link" : link,
"ppp_state" : ppp_state,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/set_ppp_link_state",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_resource
https://www.candelatech.com/lfcli_ug.php#set_resource
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class set_resource_resource_flags(Enum):
skip_load_db_on_start = 1 # Should we skip loading the DB on start?
def post_set_resource(self,
device_profiles=None,
max_helper_count=None,
max_staged_bringup=None,
max_station_bringup=None,
max_trying_ifup=None,
resource=None,
resource_flags=None,
resource_flags_mask=None,
shelf=None,
top_left_x=None,
top_left_y=None,
debug_=False):
debug_ |= self.debug
data = {
"device_profiles" : device_profiles,
"max_helper_count" : max_helper_count,
"max_staged_bringup" : max_staged_bringup,
"max_station_bringup" : max_station_bringup,
"max_trying_ifup" : max_trying_ifup,
"resource" : resource,
"resource_flags" : resource_flags,
"resource_flags_mask" : resource_flags_mask,
"shelf" : shelf,
"top_left_x" : top_left_x,
"top_left_y" : top_left_y,
}
response = self.json_post("/cli-json/set_resource",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_rfgen
https://www.candelatech.com/lfcli_ug.php#set_rfgen
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class set_rfgen_rfgen_flags(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
one_burst = 0x8 # Run for about 1 second and stop. Uses 5-sec sweep time for single pulse train.
running = 0x2 # Should we start the RF Generator or not?
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
def post_set_rfgen(self,
bb_gain=None,
freq_khz=None,
gain=None,
id=None,
if_gain=None,
pulse_count=None,
pulse_interval_us=None,
pulse_width_us=None,
resource=None,
rfgen_flags=None,
rfgen_flags_mask=None,
shelf=None,
sweep_time_ms=None,
debug_=False):
debug_ |= self.debug
data = {
"bb_gain" : bb_gain,
"freq_khz" : freq_khz,
"gain" : gain,
"id" : id,
"if_gain" : if_gain,
"pulse_count" : pulse_count,
"pulse_interval_us" : pulse_interval_us,
"pulse_width_us" : pulse_width_us,
"resource" : resource,
"rfgen_flags" : rfgen_flags,
"rfgen_flags_mask" : rfgen_flags_mask,
"shelf" : shelf,
"sweep_time_ms" : sweep_time_ms,
}
response = self.json_post("/cli-json/set_rfgen",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_script
https://www.candelatech.com/lfcli_ug.php#set_script
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class set_script_flags(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
SCR_COMPLETED = 0x80 # Set automatically by LANforge.
SCR_HIDE_CONSTRAINTS = 0x2000 # Hide constraints messages.
SCR_HIDE_CSV = 0x20 # Don't print the CSV data in the report.
SCR_HIDE_HUNT = 0x800 # Hide the individual hunt steps..just show results.
SCR_HIDE_ITER_DETAILS = 0x8 # Hide iteration detail reports.
SCR_HIDE_LAT = 0x1000 # Hide latency distribution reports.
SCR_HIDE_LEGEND = 0x10 # Don't print the legend in the report.
SCR_LOOP = 0x100 # Loop script until manually stopped.
SCR_NO_KEYED_RPT = 0x2 # Script should NOT send reports to the CLI/GUI.
SCR_RUN_ON_MGR = 0x40 # Set automatically by LANforge.
SCR_SHOW_ATTENUATION = 0x4000 # Show attenuation packet stats.
SCR_SHOW_DUPS = 0x200 # Report duplicate packets.
SCR_SHOW_GOLDEN_3P = 0x20000 # Add 'golden' third-party AP graph for comparison (where available).
SCR_SHOW_GOLDEN_LF = 0x10000 # Add 'golden' LANforge graph for comparison (where available).
SCR_SHOW_OOO = 0x400 # Report out-of-order packets.
SCR_STOPPED = 0x1 # Script should NOT have any affect on the endpoint.
SCR_SYMMETRIC = 0x4 # This script should apply settings to the peer endpoing as well.
SCR_USE_MSS = 0x8000 # When setting packet size, set TCP MSS instead if endpoint supports that.
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
class set_script_type(Enum):
NONE = "NONE" # Delete any existing script.
Script2544 = "Script2544" # For RFC 2544 type testing.
ScriptAtten = "ScriptAtten" # For Attenuators only.
ScriptHunt = "ScriptHunt" # Hunt for maximum speed with constraints.
ScriptWL = "ScriptWL" # For iterating through WanLink settings
def post_set_script(self,
endp=None,
flags=None,
group_action=None,
loop_count=None,
name=None,
private=None,
type=None,
debug_=False):
debug_ |= self.debug
data = {
"endp" : endp,
"flags" : flags,
"group_action" : group_action,
"loop_count" : loop_count,
"name" : name,
"private" : private,
"type" : type,
}
response = self.json_post("/cli-json/set_script",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_sec_ip
https://www.candelatech.com/lfcli_ug.php#set_sec_ip
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_set_sec_ip(self,
ip_list=None,
port=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"ip_list" : ip_list,
"port" : port,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/set_sec_ip",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_voip_info
https://www.candelatech.com/lfcli_ug.php#set_voip_info
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_set_voip_info(self,
codec=None,
first_call_delay=None,
jitter_buffer_sz=None,
local_sip_port=None,
loop_call_count=None,
loop_wavefile_count=None,
max_call_duration=None,
max_inter_call_gap=None,
messaging_protocol=None,
min_call_duration=None,
min_inter_call_gap=None,
name=None,
pesq_server_ip=None,
pesq_server_passwd=None,
pesq_server_port=None,
reg_expire_timer=None,
ringing_timer=None,
sound_dev=None,
debug_=False):
debug_ |= self.debug
data = {
"codec" : codec,
"first_call_delay" : first_call_delay,
"jitter_buffer_sz" : jitter_buffer_sz,
"local_sip_port" : local_sip_port,
"loop_call_count" : loop_call_count,
"loop_wavefile_count" : loop_wavefile_count,
"max_call_duration" : max_call_duration,
"max_inter_call_gap" : max_inter_call_gap,
"messaging_protocol" : messaging_protocol,
"min_call_duration" : min_call_duration,
"min_inter_call_gap" : min_inter_call_gap,
"name" : name,
"pesq_server_ip" : pesq_server_ip,
"pesq_server_passwd" : pesq_server_passwd,
"pesq_server_port" : pesq_server_port,
"reg_expire_timer" : reg_expire_timer,
"ringing_timer" : ringing_timer,
"sound_dev" : sound_dev,
}
response = self.json_post("/cli-json/set_voip_info",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_vrcx_cost
https://www.candelatech.com/lfcli_ug.php#set_vrcx_cost
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_set_vrcx_cost(self,
interface_cost=None,
local_dev=None,
local_dev_b=None,
remote_dev=None,
remote_dev_b=None,
resource=None,
shelf=None,
vr_name=None,
wanlink=None,
debug_=False):
debug_ |= self.debug
data = {
"interface_cost" : interface_cost,
"local_dev" : local_dev,
"local_dev_b" : local_dev_b,
"remote_dev" : remote_dev,
"remote_dev_b" : remote_dev_b,
"resource" : resource,
"shelf" : shelf,
"vr_name" : vr_name,
"wanlink" : wanlink,
}
response = self.json_post("/cli-json/set_vrcx_cost",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_wanlink_info
https://www.candelatech.com/lfcli_ug.php#set_wanlink_info
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_set_wanlink_info(self,
drop_freq=None,
dup_freq=None,
extra_buffer=None,
jitter_freq=None,
latency=None,
max_drop_amt=None,
max_jitter=None,
max_lateness=None,
max_reorder_amt=None,
min_drop_amt=None,
min_reorder_amt=None,
name=None,
playback_capture_file=None,
reorder_freq=None,
speed=None,
debug_=False):
debug_ |= self.debug
data = {
"drop_freq" : drop_freq,
"dup_freq" : dup_freq,
"extra_buffer" : extra_buffer,
"jitter_freq" : jitter_freq,
"latency" : latency,
"max_drop_amt" : max_drop_amt,
"max_jitter" : max_jitter,
"max_lateness" : max_lateness,
"max_reorder_amt" : max_reorder_amt,
"min_drop_amt" : min_drop_amt,
"min_reorder_amt" : min_reorder_amt,
"name" : name,
"playback_capture_file" : playback_capture_file,
"reorder_freq" : reorder_freq,
"speed" : speed,
}
response = self.json_post("/cli-json/set_wanlink_info",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_wanlink_pcap
https://www.candelatech.com/lfcli_ug.php#set_wanlink_pcap
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_set_wanlink_pcap(self,
capture=None,
directory=None,
name=None,
debug_=False):
debug_ |= self.debug
data = {
"capture" : capture,
"directory" : directory,
"name" : name,
}
response = self.json_post("/cli-json/set_wanlink_pcap",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_wanpath_corruption
https://www.candelatech.com/lfcli_ug.php#set_wanpath_corruption
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class set_wanpath_corruption_flags(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
BIT_FLIP = 0x4 # Flip a random bit in a byte.
BIT_TRANSPOSE = 0x8 # Transpose two side-by-side bits in a byte.
DO_CHAIN_ON_HIT = 0x10 # Do next corruption if this corruption is applied.
OVERWRITE_FIXED = 0x2 # Write a fixed value to a byte.
OVERWRITE_RANDOM = 0x1 # Write a random value to a byte.
RECALC_CSUMS = 0x20 # Attempt to re-calculate UDP and TCP checksums.
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
def post_set_wanpath_corruption(self,
byte=None,
flags=None,
index=None,
max_offset=None,
min_offset=None,
name=None,
path=None,
rate=None,
debug_=False):
debug_ |= self.debug
data = {
"byte" : byte,
"flags" : flags,
"index" : index,
"max_offset" : max_offset,
"min_offset" : min_offset,
"name" : name,
"path" : path,
"rate" : rate,
}
response = self.json_post("/cli-json/set_wanpath_corruption",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_wanpath_filter
https://www.candelatech.com/lfcli_ug.php#set_wanpath_filter
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_set_wanpath_filter(self,
defer_flush=None,
dst_filter=None,
filter_type=None,
passive=None,
reverse=None,
src_filter=None,
wl_name=None,
wp_name=None,
debug_=False):
debug_ |= self.debug
data = {
"defer_flush" : defer_flush,
"dst_filter" : dst_filter,
"filter_type" : filter_type,
"passive" : passive,
"reverse" : reverse,
"src_filter" : src_filter,
"wl_name" : wl_name,
"wp_name" : wp_name,
}
response = self.json_post("/cli-json/set_wanpath_filter",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_wanpath_running
https://www.candelatech.com/lfcli_ug.php#set_wanpath_running
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class set_wanpath_running_running(Enum):
AS_PARENT = "AS_PARENT" # then it will be started and stopped as the parent WanLink is.
RUNNING = "RUNNING" # then it will be running at all times
STOPPED = "STOPPED" # then it will not be running at any time.
def post_set_wanpath_running(self,
running=None,
wl_name=None,
wp_name=None,
debug_=False):
debug_ |= self.debug
data = {
"running" : running,
"wl_name" : wl_name,
"wp_name" : wp_name,
}
response = self.json_post("/cli-json/set_wanpath_running",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_wifi_corruptions
https://www.candelatech.com/lfcli_ug.php#set_wifi_corruptions
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class set_wifi_corruptions_corrupt_flags(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
MSG_TYPE_DEAUTH = 0x2 # de-authentication message
MSG_TYPE_EAPOL = 0x1 # Any EAPOL message
MSG_TYPE_EAPOL_1_OF_2 = 0x40 # EAPOL message 1/2
MSG_TYPE_EAPOL_1_OF_4 = 0x4 # EAPOL message 1/4
MSG_TYPE_EAPOL_2_OF_2 = 0x80 # EAPOL message 2/2
MSG_TYPE_EAPOL_2_OF_4 = 0x8 # EAPOL message 2/4
MSG_TYPE_EAPOL_3_OF_4 = 0x10 # EAPOL message 3/4
MSG_TYPE_EAPOL_4_OF_4 = 0x20 # EAPOL message 4/4
MSG_TYPE_EAPOL_ASSOC = 0x200 # EAP Association
MSG_TYPE_EAPOL_KEY_REQ = 0x100 # EAP Key Request (not sure if this works properly)
MST_TYPE_EAPOL_ID_REQ = 0x400 # EAP Identity request
MST_TYPE_EAPOL_ID_RESP = 0x800 # EAP Identity response
MST_TYPE_EAPOL_OTHER_REQ = 0x1000 # EAP Requests that do not match other things.
MST_TYPE_EAPOL_OTHER_RESP = 0x2000 # EAP Responses that do not match other things.
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
def post_set_wifi_corruptions(self,
corrupt_flags=None,
corrupt_per_mil=None,
delay_flags=None,
delay_max=None,
delay_min=None,
dup_flags=None,
dup_per_65535=None,
ignore_flags=None,
ignore_per_mil=None,
port=None,
req_flush=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"corrupt_flags" : corrupt_flags,
"corrupt_per_mil" : corrupt_per_mil,
"delay_flags" : delay_flags,
"delay_max" : delay_max,
"delay_min" : delay_min,
"dup_flags" : dup_flags,
"dup_per_65535" : dup_per_65535,
"ignore_flags" : ignore_flags,
"ignore_per_mil" : ignore_per_mil,
"port" : port,
"req_flush" : req_flush,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/set_wifi_corruptions",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_wifi_custom
https://www.candelatech.com/lfcli_ug.php#set_wifi_custom
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_set_wifi_custom(self,
port=None,
resource=None,
shelf=None,
text=None,
type=None,
debug_=False):
debug_ |= self.debug
data = {
"port" : port,
"resource" : resource,
"shelf" : shelf,
"text" : text,
"type" : type,
}
response = self.json_post("/cli-json/set_wifi_custom",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_wifi_extra
https://www.candelatech.com/lfcli_ug.php#set_wifi_extra
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_set_wifi_extra(self,
anonymous_identity=None,
anqp_3gpp_cell_net=None,
ca_cert=None,
client_cert=None,
domain=None,
eap=None,
group=None,
hessid=None,
identity=None,
imsi=None,
ipaddr_type_avail=None,
key=None,
key_mgmt=None,
milenage=None,
network_auth_type=None,
network_type=None,
pac_file=None,
pairwise=None,
password=None,
phase1=None,
phase2=None,
pin=None,
pk_passwd=None,
port=None,
private_key=None,
psk=None,
realm=None,
resource=None,
roaming_consortium=None,
shelf=None,
venue_group=None,
venue_type=None,
debug_=False):
debug_ |= self.debug
data = {
"anonymous_identity" : anonymous_identity,
"anqp_3gpp_cell_net" : anqp_3gpp_cell_net,
"ca_cert" : ca_cert,
"client_cert" : client_cert,
"domain" : domain,
"eap" : eap,
"group" : group,
"hessid" : hessid,
"identity" : identity,
"imsi" : imsi,
"ipaddr_type_avail" : ipaddr_type_avail,
"key" : key,
"key_mgmt" : key_mgmt,
"milenage" : milenage,
"network_auth_type" : network_auth_type,
"network_type" : network_type,
"pac_file" : pac_file,
"pairwise" : pairwise,
"password" : password,
"phase1" : phase1,
"phase2" : phase2,
"pin" : pin,
"pk_passwd" : pk_passwd,
"port" : port,
"private_key" : private_key,
"psk" : psk,
"realm" : realm,
"resource" : resource,
"roaming_consortium" : roaming_consortium,
"shelf" : shelf,
"venue_group" : venue_group,
"venue_type" : venue_type,
}
response = self.json_post("/cli-json/set_wifi_extra",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_wifi_extra2
https://www.candelatech.com/lfcli_ug.php#set_wifi_extra2
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_set_wifi_extra2(self,
corrupt_gtk_rekey_mic=None,
freq_24=None,
freq_5=None,
ignore_assoc=None,
ignore_auth=None,
ignore_probe=None,
ignore_reassoc=None,
ocsp=None,
port=None,
post_ifup_script=None,
radius_ip=None,
radius_port=None,
req_flush=None,
resource=None,
shelf=None,
venue_id=None,
debug_=False):
debug_ |= self.debug
data = {
"corrupt_gtk_rekey_mic" : corrupt_gtk_rekey_mic,
"freq_24" : freq_24,
"freq_5" : freq_5,
"ignore_assoc" : ignore_assoc,
"ignore_auth" : ignore_auth,
"ignore_probe" : ignore_probe,
"ignore_reassoc" : ignore_reassoc,
"ocsp" : ocsp,
"port" : port,
"post_ifup_script" : post_ifup_script,
"radius_ip" : radius_ip,
"radius_port" : radius_port,
"req_flush" : req_flush,
"resource" : resource,
"shelf" : shelf,
"venue_id" : venue_id,
}
response = self.json_post("/cli-json/set_wifi_extra2",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_wifi_radio
https://www.candelatech.com/lfcli_ug.php#set_wifi_radio
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class set_wifi_radio_flags(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
ct_sta_mode = 0x40000 # Enable CT-STA mode if radio supports it. Efficiently replaces sw-crypt in some firmware.
firmware_cfg = 0x80000 # Apply firmware config.
hw_sim = 0x1 # Create hw-sim virtual radio if radio does not already exist.
ignore_radar = 0x100000 # Ignore RADAR events reported by firmware.
no_scan_share = 0x40 # Disable sharing scan results.
no_sw_crypt = 0x20000 # Disable software-crypt for this radio. Disables some virtual-station features.
use_syslog = 0x20000000 # Put supplicant logs in syslog instead of a file.
verbose = 0x10000 # Verbose-Debug: Increase debug info in wpa-supplicant and hostapd logs.
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
class set_wifi_radio_mode(Enum):
p_802_11a = 1 # 802.11a
AUTO = 0 # 802.11g
abg = 4 # 802.11abg
abgn = 5 # 802.11abgn
abgnAC = 8 # 802.11abgn-AC
abgnAX = 12 # 802.11abgn-AX
an = 10 # 802.11an
anAC = 9 # 802.11an-AC
anAX = 14 # 802.11an-AX
b = 2 # 802.11b
bg = 7 # 802.11bg
bgn = 6 # 802.11bgn
bgnAC = 11 # 802.11bgn-AC
bgnAX = 13 # 802.11bgn-AX
g = 3 # 802.11g
def post_set_wifi_radio(self,
active_peer_count=None,
ampdu_factor=None,
antenna=None,
channel=None,
const_tx=None,
country=None,
flags=None,
flags_mask=None,
frag_thresh=None,
frequency=None,
fwname=None,
fwver=None,
mac=None,
max_amsdu=None,
mode=None,
peer_count=None,
pref_ap=None,
pulse2_interval_us=None,
pulse_interval=None,
pulse_width=None,
radio=None,
rate=None,
rate_ctrl_count=None,
resource=None,
rts=None,
shelf=None,
skid_limit=None,
stations_count=None,
tids_count=None,
tx_pulses=None,
txdesc_count=None,
txpower=None,
vdev_count=None,
debug_=False):
debug_ |= self.debug
data = {
"active_peer_count" : active_peer_count,
"ampdu_factor" : ampdu_factor,
"antenna" : antenna,
"channel" : channel,
"const_tx" : const_tx,
"country" : country,
"flags" : flags,
"flags_mask" : flags_mask,
"frag_thresh" : frag_thresh,
"frequency" : frequency,
"fwname" : fwname,
"fwver" : fwver,
"mac" : mac,
"max_amsdu" : max_amsdu,
"mode" : mode,
"peer_count" : peer_count,
"pref_ap" : pref_ap,
"pulse2_interval_us" : pulse2_interval_us,
"pulse_interval" : pulse_interval,
"pulse_width" : pulse_width,
"radio" : radio,
"rate" : rate,
"rate_ctrl_count" : rate_ctrl_count,
"resource" : resource,
"rts" : rts,
"shelf" : shelf,
"skid_limit" : skid_limit,
"stations_count" : stations_count,
"tids_count" : tids_count,
"tx_pulses" : tx_pulses,
"txdesc_count" : txdesc_count,
"txpower" : txpower,
"vdev_count" : vdev_count,
}
response = self.json_post("/cli-json/set_wifi_radio",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_wifi_txo
https://www.candelatech.com/lfcli_ug.php#set_wifi_txo
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_set_wifi_txo(self,
port=None,
resource=None,
shelf=None,
txo_bw=None,
txo_enable=None,
txo_mcs=None,
txo_nss=None,
txo_pream=None,
txo_retries=None,
txo_sgi=None,
txo_txpower=None,
debug_=False):
debug_ |= self.debug
data = {
"port" : port,
"resource" : resource,
"shelf" : shelf,
"txo_bw" : txo_bw,
"txo_enable" : txo_enable,
"txo_mcs" : txo_mcs,
"txo_nss" : txo_nss,
"txo_pream" : txo_pream,
"txo_retries" : txo_retries,
"txo_sgi" : txo_sgi,
"txo_txpower" : txo_txpower,
}
response = self.json_post("/cli-json/set_wifi_txo",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_wl_corruption
https://www.candelatech.com/lfcli_ug.php#set_wl_corruption
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class set_wl_corruption_flags(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
BIT_FLIP = 0x4 # Flip a random bit in a byte.
BIT_TRANSPOSE = 0x8 # Transpose two side-by-side bits in a byte.
DO_CHAIN_ON_HIT = 0x10 # Do next corruption if this corruption is applied.
OVERWRITE_FIXED = 0x2 # Write a fixed value to a byte.
OVERWRITE_RANDOM = 0x1 # Write a random value to a byte.
RECALC_CSUMS = 0x20 # Attempt to re-calculate UDP and TCP checksums.
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
def post_set_wl_corruption(self,
byte=None,
flags=None,
index=None,
max_offset=None,
min_offset=None,
name=None,
rate=None,
debug_=False):
debug_ |= self.debug
data = {
"byte" : byte,
"flags" : flags,
"index" : index,
"max_offset" : max_offset,
"min_offset" : min_offset,
"name" : name,
"rate" : rate,
}
response = self.json_post("/cli-json/set_wl_corruption",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_wl_qdisc
https://www.candelatech.com/lfcli_ug.php#set_wl_qdisc
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class set_wl_qdisc_qdisc(Enum):
FIFO = "FIFO" # is the default queuing discipline, no arguments
WRR__queue_queue_____ = "WRR,[queue,queue,...]" # Weighted Round Robbin is also available
def post_set_wl_qdisc(self,
name=None,
qdisc=None,
debug_=False):
debug_ |= self.debug
data = {
"name" : name,
"qdisc" : qdisc,
}
response = self.json_post("/cli-json/set_wl_qdisc",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_wp_corruption
https://www.candelatech.com/lfcli_ug.php#set_wanpath_corruption
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class set_wanpath_corruption_flags(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
BIT_FLIP = 0x4 # Flip a random bit in a byte.
BIT_TRANSPOSE = 0x8 # Transpose two side-by-side bits in a byte.
DO_CHAIN_ON_HIT = 0x10 # Do next corruption if this corruption is applied.
OVERWRITE_FIXED = 0x2 # Write a fixed value to a byte.
OVERWRITE_RANDOM = 0x1 # Write a random value to a byte.
RECALC_CSUMS = 0x20 # Attempt to re-calculate UDP and TCP checksums.
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
def post_set_wp_corruption(self,
byte=None,
flags=None,
index=None,
max_offset=None,
min_offset=None,
name=None,
path=None,
rate=None,
debug_=False):
debug_ |= self.debug
data = {
"byte" : byte,
"flags" : flags,
"index" : index,
"max_offset" : max_offset,
"min_offset" : min_offset,
"name" : name,
"path" : path,
"rate" : rate,
}
response = self.json_post("/cli-json/set_wp_corruption",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_wp_filter
https://www.candelatech.com/lfcli_ug.php#set_wanpath_filter
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_set_wp_filter(self,
defer_flush=None,
dst_filter=None,
filter_type=None,
passive=None,
reverse=None,
src_filter=None,
wl_name=None,
wp_name=None,
debug_=False):
debug_ |= self.debug
data = {
"defer_flush" : defer_flush,
"dst_filter" : dst_filter,
"filter_type" : filter_type,
"passive" : passive,
"reverse" : reverse,
"src_filter" : src_filter,
"wl_name" : wl_name,
"wp_name" : wp_name,
}
response = self.json_post("/cli-json/set_wp_filter",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/set_wp_running
https://www.candelatech.com/lfcli_ug.php#set_wanpath_running
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class set_wanpath_running_running(Enum):
AS_PARENT = "AS_PARENT" # then it will be started and stopped as the parent WanLink is.
RUNNING = "RUNNING" # then it will be running at all times
STOPPED = "STOPPED" # then it will not be running at any time.
def post_set_wp_running(self,
running=None,
wl_name=None,
wp_name=None,
debug_=False):
debug_ |= self.debug
data = {
"running" : running,
"wl_name" : wl_name,
"wp_name" : wp_name,
}
response = self.json_post("/cli-json/set_wp_running",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_alerts
https://www.candelatech.com/lfcli_ug.php#show_alerts
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class show_alerts_type(Enum):
All = "All"
CX = "CX"
Card = "Card"
Channel_Group = "Channel_Group"
CollisionDomain = "CollisionDomain"
Endp = "Endp"
PESQ = "PESQ"
PPP_Link = "PPP_Link"
Port = "Port"
Shelf = "Shelf"
Span = "Span"
Test_Mgr = "Test_Mgr"
def post_show_alerts(self,
card=None,
endp=None,
extra=None,
port=None,
shelf=None,
type=None,
debug_=False):
debug_ |= self.debug
data = {
"card" : card,
"endp" : endp,
"extra" : extra,
"port" : port,
"shelf" : shelf,
"type" : type,
}
response = self.json_post("/cli-json/show_alerts",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_attenuators
https://www.candelatech.com/lfcli_ug.php#show_attenuators
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_attenuators(self,
resource=None,
serno=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"resource" : resource,
"serno" : serno,
"shelf" : shelf,
}
response = self.json_post("/cli-json/show_attenuators",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_cards
https://www.candelatech.com/lfcli_ug.php#show_resources
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_cards(self,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/show_cards",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_cd
https://www.candelatech.com/lfcli_ug.php#show_cd
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_cd(self,
collision_domain=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"collision_domain" : collision_domain,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/show_cd",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_chamber
https://www.candelatech.com/lfcli_ug.php#show_chamber
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_chamber(self,
name=None,
debug_=False):
debug_ |= self.debug
data = {
"name" : name,
}
response = self.json_post("/cli-json/show_chamber",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_channel_groups
https://www.candelatech.com/lfcli_ug.php#show_channel_groups
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_channel_groups(self,
channel_name=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"channel_name" : channel_name,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/show_channel_groups",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_clients
https://www.candelatech.com/lfcli_ug.php#show_clients
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_clients(self,
debug_=False):
debug_ |= self.debug
data = {
}
response = self.json_post("/cli-json/show_clients",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_cx
https://www.candelatech.com/lfcli_ug.php#show_cx
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_cx(self,
cross_connect=None,
test_mgr=None,
debug_=False):
debug_ |= self.debug
data = {
"cross_connect" : cross_connect,
"test_mgr" : test_mgr,
}
response = self.json_post("/cli-json/show_cx",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_cxe
https://www.candelatech.com/lfcli_ug.php#show_cxe
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_cxe(self,
cross_connect=None,
test_mgr=None,
debug_=False):
debug_ |= self.debug
data = {
"cross_connect" : cross_connect,
"test_mgr" : test_mgr,
}
response = self.json_post("/cli-json/show_cxe",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_dbs
https://www.candelatech.com/lfcli_ug.php#show_dbs
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_dbs(self,
debug_=False):
debug_ |= self.debug
data = {
}
response = self.json_post("/cli-json/show_dbs",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_dut
https://www.candelatech.com/lfcli_ug.php#show_dut
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_dut(self,
name=None,
debug_=False):
debug_ |= self.debug
data = {
"name" : name,
}
response = self.json_post("/cli-json/show_dut",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_endp_payload
https://www.candelatech.com/lfcli_ug.php#show_endp_payload
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_endp_payload(self,
max_bytes=None,
name=None,
debug_=False):
debug_ |= self.debug
data = {
"max_bytes" : max_bytes,
"name" : name,
}
response = self.json_post("/cli-json/show_endp_payload",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_endpoints
https://www.candelatech.com/lfcli_ug.php#show_endpoints
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_endpoints(self,
endpoint=None,
extra=None,
debug_=False):
debug_ |= self.debug
data = {
"endpoint" : endpoint,
"extra" : extra,
}
response = self.json_post("/cli-json/show_endpoints",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_err
https://www.candelatech.com/lfcli_ug.php#show_err
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_err(self,
message=None,
debug_=False):
debug_ |= self.debug
data = {
"message" : message,
}
response = self.json_post("/cli-json/show_err",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_event_interest
https://www.candelatech.com/lfcli_ug.php#show_event_interest
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_event_interest(self,
debug_=False):
debug_ |= self.debug
data = {
}
response = self.json_post("/cli-json/show_event_interest",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_events
https://www.candelatech.com/lfcli_ug.php#show_events
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class show_events_type(Enum):
All = "All"
CX = "CX"
Card = "Card"
Channel_Group = "Channel_Group"
CollisionDomain = "CollisionDomain"
Endp = "Endp"
PESQ = "PESQ"
PPP_Link = "PPP_Link"
Port = "Port"
Shelf = "Shelf"
Span = "Span"
Test_Mgr = "Test_Mgr"
def post_show_events(self,
card=None,
endp=None,
extra=None,
port=None,
shelf=None,
type=None,
debug_=False):
debug_ |= self.debug
data = {
"card" : card,
"endp" : endp,
"extra" : extra,
"port" : port,
"shelf" : shelf,
"type" : type,
}
response = self.json_post("/cli-json/show_events",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_files
https://www.candelatech.com/lfcli_ug.php#show_files
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_files(self,
dir_flags=None,
directory=None,
filter=None,
key=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"dir_flags" : dir_flags,
"directory" : directory,
"filter" : filter,
"key" : key,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/show_files",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_group
https://www.candelatech.com/lfcli_ug.php#show_group
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_group(self,
group=None,
debug_=False):
debug_ |= self.debug
data = {
"group" : group,
}
response = self.json_post("/cli-json/show_group",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_pesq
https://www.candelatech.com/lfcli_ug.php#show_pesq
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_pesq(self,
endpoint=None,
debug_=False):
debug_ |= self.debug
data = {
"endpoint" : endpoint,
}
response = self.json_post("/cli-json/show_pesq",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_ports
https://www.candelatech.com/lfcli_ug.php#show_ports
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_ports(self,
port=None,
probe_flags=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"port" : port,
"probe_flags" : probe_flags,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/show_ports",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_ppp_links
https://www.candelatech.com/lfcli_ug.php#show_ppp_links
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_ppp_links(self,
link_num=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"link_num" : link_num,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/show_ppp_links",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_profile
https://www.candelatech.com/lfcli_ug.php#show_profile
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_profile(self,
name=None,
debug_=False):
debug_ |= self.debug
data = {
"name" : name,
}
response = self.json_post("/cli-json/show_profile",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_resources
https://www.candelatech.com/lfcli_ug.php#show_resources
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_resources(self,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/show_resources",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_rfgen
https://www.candelatech.com/lfcli_ug.php#show_rfgen
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_rfgen(self,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/show_rfgen",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_rt
https://www.candelatech.com/lfcli_ug.php#show_rt
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_rt(self,
key=None,
resource=None,
shelf=None,
virtual_router=None,
debug_=False):
debug_ |= self.debug
data = {
"key" : key,
"resource" : resource,
"shelf" : shelf,
"virtual_router" : virtual_router,
}
response = self.json_post("/cli-json/show_rt",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_script_results
https://www.candelatech.com/lfcli_ug.php#show_script_results
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_script_results(self,
endpoint=None,
key=None,
debug_=False):
debug_ |= self.debug
data = {
"endpoint" : endpoint,
"key" : key,
}
response = self.json_post("/cli-json/show_script_results",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_spans
https://www.candelatech.com/lfcli_ug.php#show_spans
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_spans(self,
resource=None,
shelf=None,
span_number=None,
debug_=False):
debug_ |= self.debug
data = {
"resource" : resource,
"shelf" : shelf,
"span_number" : span_number,
}
response = self.json_post("/cli-json/show_spans",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_text_blob
https://www.candelatech.com/lfcli_ug.php#show_text_blob
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_text_blob(self,
brief=None,
name=None,
type=None,
debug_=False):
debug_ |= self.debug
data = {
"brief" : brief,
"name" : name,
"type" : type,
}
response = self.json_post("/cli-json/show_text_blob",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_tm
https://www.candelatech.com/lfcli_ug.php#show_tm
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_tm(self,
test_mgr=None,
debug_=False):
debug_ |= self.debug
data = {
"test_mgr" : test_mgr,
}
response = self.json_post("/cli-json/show_tm",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_traffic_profile
https://www.candelatech.com/lfcli_ug.php#show_traffic_profile
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_traffic_profile(self,
name=None,
debug_=False):
debug_ |= self.debug
data = {
"name" : name,
}
response = self.json_post("/cli-json/show_traffic_profile",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_venue
https://www.candelatech.com/lfcli_ug.php#show_venue
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_venue(self,
resource=None,
shelf=None,
venu_id=None,
debug_=False):
debug_ |= self.debug
data = {
"resource" : resource,
"shelf" : shelf,
"venu_id" : venu_id,
}
response = self.json_post("/cli-json/show_venue",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_vr
https://www.candelatech.com/lfcli_ug.php#show_vr
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_vr(self,
resource=None,
router=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"resource" : resource,
"router" : router,
"shelf" : shelf,
}
response = self.json_post("/cli-json/show_vr",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_vrcx
https://www.candelatech.com/lfcli_ug.php#show_vrcx
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_vrcx(self,
cx_name=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"cx_name" : cx_name,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/show_vrcx",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_wanpaths
https://www.candelatech.com/lfcli_ug.php#show_wanpaths
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_wanpaths(self,
endpoint=None,
wanpath=None,
debug_=False):
debug_ |= self.debug
data = {
"endpoint" : endpoint,
"wanpath" : wanpath,
}
response = self.json_post("/cli-json/show_wanpaths",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/show_wps
https://www.candelatech.com/lfcli_ug.php#show_wanpaths
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_show_wps(self,
endpoint=None,
wanpath=None,
debug_=False):
debug_ |= self.debug
data = {
"endpoint" : endpoint,
"wanpath" : wanpath,
}
response = self.json_post("/cli-json/show_wps",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/shutdown
https://www.candelatech.com/lfcli_ug.php#shutdown
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_shutdown(self,
chdir=None,
really=None,
serverctl=None,
debug_=False):
debug_ |= self.debug
data = {
"chdir" : chdir,
"really" : really,
"serverctl" : serverctl,
}
response = self.json_post("/cli-json/shutdown",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/shutdown_card
https://www.candelatech.com/lfcli_ug.php#shutdown_resource
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_shutdown_card(self,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/shutdown_card",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/shutdown_os
https://www.candelatech.com/lfcli_ug.php#shutdown_os
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_shutdown_os(self,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/shutdown_os",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/shutdown_resource
https://www.candelatech.com/lfcli_ug.php#shutdown_resource
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_shutdown_resource(self,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/shutdown_resource",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/sniff_port
https://www.candelatech.com/lfcli_ug.php#sniff_port
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
class sniff_port_flags(Enum):
selected_named_flag_map = {}
temp_flag_value = 0x0
DUMPCAP = 0x2 # Use command-line dumpcap, more efficient than tshark
MATE_TERMINAL = 0x4 # Launch tshark/dumpcap in mate-terminal
MATE_XTERM = 0x8 # Launch tshark/dumpcap in xterm
TSHARK = 0x1 # Use command-line tshark instead of wireshark
def update_flag_value(self):
self.temp_flag_value = 0x0
for flag in self.selected_named_flag_map.keys():
self.temp_flag_value |= flag.value
def add_flag(self, flag_name):
self.selected_named_flag_map.put(flag_name, 0)
self.update_flag_value()
def clear_flag(self, flag_name):
if self.selected_named_flag_map.contains(flag_name):
self.selected_named_flag_map.remove(flag_name)
self.update_flag_value()
def post_sniff_port(self,
display=None,
duration=None,
flags=None,
outfile=None,
port=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"display" : display,
"duration" : duration,
"flags" : flags,
"outfile" : outfile,
"port" : port,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/sniff_port",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/start_endp
https://www.candelatech.com/lfcli_ug.php#start_endp
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_start_endp(self,
endp_name=None,
debug_=False):
debug_ |= self.debug
data = {
"endp_name" : endp_name,
}
response = self.json_post("/cli-json/start_endp",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/start_group
https://www.candelatech.com/lfcli_ug.php#start_group
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_start_group(self,
name=None,
debug_=False):
debug_ |= self.debug
data = {
"name" : name,
}
response = self.json_post("/cli-json/start_group",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/start_ppp_link
https://www.candelatech.com/lfcli_ug.php#start_ppp_link
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_start_ppp_link(self,
resource=None,
shelf=None,
unit_num=None,
debug_=False):
debug_ |= self.debug
data = {
"resource" : resource,
"shelf" : shelf,
"unit_num" : unit_num,
}
response = self.json_post("/cli-json/start_ppp_link",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/stop_endp
https://www.candelatech.com/lfcli_ug.php#stop_endp
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_stop_endp(self,
endp_name=None,
debug_=False):
debug_ |= self.debug
data = {
"endp_name" : endp_name,
}
response = self.json_post("/cli-json/stop_endp",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/stop_group
https://www.candelatech.com/lfcli_ug.php#stop_group
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_stop_group(self,
name=None,
debug_=False):
debug_ |= self.debug
data = {
"name" : name,
}
response = self.json_post("/cli-json/stop_group",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/stop_ppp_link
https://www.candelatech.com/lfcli_ug.php#stop_ppp_link
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_stop_ppp_link(self,
resource=None,
shelf=None,
unit_num=None,
debug_=False):
debug_ |= self.debug
data = {
"resource" : resource,
"shelf" : shelf,
"unit_num" : unit_num,
}
response = self.json_post("/cli-json/stop_ppp_link",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/tail
https://www.candelatech.com/lfcli_ug.php#tail
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_tail(self,
cmd=None,
key=None,
message=None,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"cmd" : cmd,
"key" : key,
"message" : message,
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/tail",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/tm_register
https://www.candelatech.com/lfcli_ug.php#tm_register
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_tm_register(self,
client_name=None,
test_mgr=None,
debug_=False):
debug_ |= self.debug
data = {
"client_name" : client_name,
"test_mgr" : test_mgr,
}
response = self.json_post("/cli-json/tm_register",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/tm_unregister
https://www.candelatech.com/lfcli_ug.php#tm_unregister
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_tm_unregister(self,
client_name=None,
test_mgr=None,
debug_=False):
debug_ |= self.debug
data = {
"client_name" : client_name,
"test_mgr" : test_mgr,
}
response = self.json_post("/cli-json/tm_unregister",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/version
https://www.candelatech.com/lfcli_ug.php#version
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_version(self,
debug_=False):
debug_ |= self.debug
data = {
}
response = self.json_post("/cli-json/version",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/who
https://www.candelatech.com/lfcli_ug.php#who
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_who(self,
debug_=False):
debug_ |= self.debug
data = {
}
response = self.json_post("/cli-json/who",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/wifi_cli_cmd
https://www.candelatech.com/lfcli_ug.php#wifi_cli_cmd
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_wifi_cli_cmd(self,
port=None,
resource=None,
shelf=None,
wpa_cli_cmd=None,
debug_=False):
debug_ |= self.debug
data = {
"port" : port,
"resource" : resource,
"shelf" : shelf,
"wpa_cli_cmd" : wpa_cli_cmd,
}
response = self.json_post("/cli-json/wifi_cli_cmd",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/wifi_event
https://www.candelatech.com/lfcli_ug.php#wifi_event
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_wifi_event(self,
device=None,
event=None,
msg=None,
status=None,
debug_=False):
debug_ |= self.debug
data = {
"device" : device,
"event" : event,
"msg" : msg,
"status" : status,
}
response = self.json_post("/cli-json/wifi_event",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/wiser_reset
https://www.candelatech.com/lfcli_ug.php#wiser_reset
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_wiser_reset(self,
resource=None,
shelf=None,
debug_=False):
debug_ |= self.debug
data = {
"resource" : resource,
"shelf" : shelf,
}
response = self.json_post("/cli-json/wiser_reset",
data,
debug_=debug_)
return response
#
"""----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
Generated method for /cli-json/write
https://www.candelatech.com/lfcli_ug.php#write
----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----"""
def post_write(self,
db_name=None,
debug_=False):
debug_ |= self.debug
data = {
"db_name" : db_name,
}
response = self.json_post("/cli-json/write",
data,
debug_=debug_)
return response
#