create_wanlink.py: make ports a variable

This commit is contained in:
Jed Reynolds
2021-01-13 19:25:32 -08:00
parent 877faafc79
commit 5de806509e

View File

@@ -30,6 +30,9 @@ def main():
num_wanlinks = -1 num_wanlinks = -1
# see if there are old wanlinks to remove # see if there are old wanlinks to remove
lf_r = LFRequest.LFRequest(base_url+"/wl/list") lf_r = LFRequest.LFRequest(base_url+"/wl/list")
port_a ="rd0a"
port_b ="rd1a"
try: try:
json_response = lf_r.getAsJson() json_response = lf_r.getAsJson()
LFUtils.debug_printer.pprint(json_response) LFUtils.debug_printer.pprint(json_response)
@@ -69,7 +72,7 @@ def main():
'alias': 'wl_eg1-A', 'alias': 'wl_eg1-A',
'shelf': 1, 'shelf': 1,
'resource': '1', 'resource': '1',
'port': 'eth3', 'port': port_a,
'latency': '75', 'latency': '75',
'max_rate': '128000', 'max_rate': '128000',
'description': 'cookbook-example' 'description': 'cookbook-example'
@@ -83,7 +86,7 @@ def main():
'alias': 'wl_eg1-B', 'alias': 'wl_eg1-B',
'shelf': 1, 'shelf': 1,
'resource': '1', 'resource': '1',
'port': 'eth5', 'port': port_b,
'latency': '95', 'latency': '95',
'max_rate': '256000', 'max_rate': '256000',
'description': 'cookbook-example' 'description': 'cookbook-example'