-
Notifications
You must be signed in to change notification settings - Fork 735
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cisco WLC Command - Show 802 11a|b #501
Conversation
What do you think of converting repetitive fields into lists? Example: parsed_sample:
- ac_support: Enabled
beacon_interval: '100'
data_rate: ["12m", "18m", "24m", "36m", "48m", "54m", "6m", "9m"]
data_rate_value: ["Mandatory", "Supported", "Mandatory", " Supported", "Supported", "Supported", "Mandatory", "Supported"]
edca: default-wmm
max_client: '200'
mcs_rate: ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31"]
mcs_rate_value: ["Supported", "Supported", "Supported", "Supported", "Supported", "Supported", "Supported", "Supported", "Supported", "Supported", "Supported", "Supported", "Supported", "Supported", "Supported", "Supported", "Supported", "Supported", "Supported", "Supported", "Supported", "Supported", "Supported", "Supported", "Supported", "Supported", "Supported", "Supported", "Supported", "Supported", "Supported", "Supported"]
n_support: Enabled
rssi_low_check: Disabled
rssi_thres: '-80'
status: Disabled
video_amc: Disabled
video_cac_method: Static
video_max_bandwidth: '0'
video_roaming_bandwidth: '0'
voice_amc: Disabled
voice_cac_method: Load-Based
voice_max_bandwidth: '75'
voice_roaming_bandwidth: '6' |
I had thought about that, but having them as key:values is helpful when trying to identify which data rates/mcs rates are set to a specific value. Instead of looking up the list index for the value then the using that index in the list of rates. This was the only way I could figure out setting them as key:values. |
We generally post-process TextFSM output, and this would be part of that process. Here is an example of post-processing two corresponding lists. >>> parsed_sample = [
{
'data_rate': ['12m', '18m', '24m', '36m', '48m', '54m', '6m', '9m'],
'data_rate_value': ['Mandatory', 'Supported', 'Mandatory', 'Supported', 'Supported', 'Supported', 'Mandatory', 'Supported'],
}
]
>>> command_data = parsed_sample[0]
>>> data_rate = command_data["data_rate"]
>>> data_rate_value = command_data["data_rate_value"]
>>> post_processed = {"data_rates": dict(zip(data_rate, data_rate_value))}
>>> post_processed
{
'data_rates': {
'12m': 'Mandatory',
'18m': 'Supported',
'24m': 'Mandatory',
'36m': 'Supported',
'48m': 'Supported',
'54m': 'Supported',
'6m': 'Mandatory',
'9m': 'Supported'
}
}
>>> |
Ok so I made lists out of the data rates, mcs rates, and the support specs. This also allowed me to combine the 802.11a and 802.11b commands |
@timjsmith24 The command for the index file should escape the However, I went to make a PR back into your branch, but GitHub is not letting me issue PRs to your fork. Can you check my |
Show 802 11b
looks good. Thanks! |
ISSUE TYPE
COMPONENT
cisco_wlc_ssh_show_802_11b.template, .*, cisco_wlc_ssh, show 802.11b
SUMMARY