mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 03:07:56 +00:00
set_port.py: added environment check to utilize the LFJsonPost flag parameters
Signed-off-by: Jed Reynolds <jed@candelatech.com>
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
import os
|
||||
if os.environ.get("LF_USE_AUTOGEN") == 1:
|
||||
import lf_json_autogen
|
||||
from lf_json_autogen import LFJsonPost
|
||||
set_port_current_flags = LFJsonPost.SetPortCurrentFlags.__members__
|
||||
set_port_cmd_flags = LFJsonPost.SetPortCmdFlags.__members__
|
||||
set_port_interest_flags = LFJsonPost.SetPortInterest.__members__
|
||||
|
||||
else:
|
||||
set_port_current_flags = {
|
||||
"if_down": 0x1, # Interface Down
|
||||
"fixed_10bt_hd": 0x2, # Fixed-10bt-HD (half duplex)
|
||||
@@ -98,3 +107,4 @@ set_port_interest_flags = {
|
||||
"no_apply_dhcp" : 0x80000000, # Enable/disable NO-APPLY-DHCP flag for a port
|
||||
"skip_ifup_roam" : 0x100000000, # Enable/disable SKIP-IFUP-ON-ROAM flag for a port
|
||||
}
|
||||
#
|
||||
Reference in New Issue
Block a user