Skip to content
Snippets Groups Projects
Commit 4518514a authored by Aleksandr Kurbatov's avatar Aleksandr Kurbatov
Browse files

Merge branch 'bugfix/nat-618-opt-checks' into 'develop'

Nokia optical parser updated

See merge request !150
parents 08e545f8 97d55e9f
No related branches found
No related tags found
1 merge request!150Nokia optical parser updated
Pipeline #87477 passed
......@@ -57,7 +57,7 @@
- name: Parse SROS port optical output
ansible.utils.cli_parse:
text: "{{ out.output['rpc-reply']['nokiaoper:results']['nokiaoper:md-cli-output-block'] }}"
text: "{{ out.stdout }}"
parser:
name: ansible.netcommon.native
template_path: "{{ role_path }}/templates/sros_show_port_optical.yaml"
......@@ -68,7 +68,3 @@
ae_result: "{{ ae_result | combine({item.key: item.value}) }}"
with_items:
- { key: "{{ ae_member.interface_name }}", value: "{{ lanes }}" }
- name: Empty lanes variable for the next cycle
ansible.builtin.set_fact:
lanes: []
---
- example: " 1 - 73.2 1.67 1.43"
getval: '\s+(?P<lane_id>\d)\s+-\s+(?P<tx_bias_ma>\d+(\.\d+)?)\s+(?P<tx_power_dbm>\d+(\.\d+)?)\s+(?P<rx_power_dbm>\d+(\.\d+)?)'
getval: '^\s+(?P<lane_id>\d)\s+-\s+(?P<tx_bias_ma>\d{1,3}(\.\d)?)\s+(?P<tx_power_dbm>-?\d(\.\d{1,2})(-?\d\.\d{1,2})?!?)\s+(?P<rx_power_dbm>-?\d(\.\d{1,2})(-?\d\.\d{1,2})?!?)\s+'
result:
"Lane {{ lane_id }}":
TX_bias_mA: "{{ tx_bias_ma }}"
TX_power_dBm: "{{ tx_power_dbm }}"
rx_power_dBm: "{{ rx_power_dbm }}"
TX_PWR_dBm: "{{ tx_power_dbm }}"
RX_PWR_dBm: "{{ rx_power_dbm }}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment