ScaleOutDellPlugin and ScaleOutAristaPlugin#232
Conversation
| Mapping of port name to a list of | ||
| :class:`DellPfcWatchdogQueueStats`, or ``None``. | ||
| """ | ||
| cmd = "show qos interface Ethall queue all priority-flow-control watchdog-statistics" |
There was a problem hiding this comment.
Is this the same as "Eth all"?
alexbara@ausalexbara02:~/node-scraper_test$ git grep "Eth all"
nodescraper/plugins/inband/switch/scale_out_dell/scale_out_dell_collector.py: "show qos interface Eth all",
nodescraper/plugins/inband/switch/scale_out_dell/scale_out_dell_collector.py: "show qos interface Eth all queue all",
alexbara@ausalexbara02:~/node-scraper_test$ git grep "Ethall"
nodescraper/plugins/inband/switch/scale_out_dell/scale_out_dell_collector.py: cmd = "show qos interface Ethall priority-flow-control statistics"
nodescraper/plugins/inband/switch/scale_out_dell/scale_out_dell_collector.py: cmd = "show qos interface Ethall queue all priority-flow-control watchdog-statistics"
There was a problem hiding this comment.
Slightly different
| accumulated: Optional[Union[dict, list]] = None | ||
| for spec in specs: | ||
| rendered = self._substitute_port_placeholder(command, spec) | ||
| cmd_ret: CommandArtifact = self._run_sut_cmd(f"{rendered} | json | no-more") |
There was a problem hiding this comment.
we need to have the cmds inside run_sut_cmd abstracted at a class level so the documentation generator script can pick them up for the automated doc creation. You can put in place holders, see other plugins. Make sure the cmd names start with CMD_<>. Throughout
| cmd_ret: CommandArtifact = self._run_sut_cmd(f"{rendered} | json | no-more") | ||
| if cmd_ret.exit_code != 0: | ||
| self._log_event( | ||
| category=EventCategory.APPLICATION, |
There was a problem hiding this comment.
maybe we need a new EventCategory? SWITCH? just a suggestion.
| "transmitted_ok": "0", | ||
| "transmitted_drop": "0", | ||
| "received_ok": "0", | ||
| "received_drop": "0", | ||
| "tx_last_ok": "0", | ||
| "tx_last_drop": "0", | ||
| "rx_last_ok": "0", |
There was a problem hiding this comment.
these <>_ok fields here, wont they be non-zero?
| return None | ||
| try: | ||
| return DellInterfaceDetailCounters.model_validate(kwargs) | ||
| except (ValidationError, TypeError): |
There was a problem hiding this comment.
can we print something here? we should know what fails in case some parsing needs updating. Silent failures are not a good idea
|
|
||
| error_fields: ClassVar[dict[str, str]] = { | ||
| "oper": "up", | ||
| "speed": "400000", |
There was a problem hiding this comment.
will this ever change? should this be made a collector arg so we can update it at runtime?
| for port_name in port_names: | ||
| text = self._run_dell_command(f"show interface counters {port_name}") | ||
| if text is None: | ||
| continue | ||
| parsed = self._parse_detail_counters_block(text) | ||
| if parsed is None: | ||
| continue | ||
| result[port_name] = parsed | ||
| return result or None |
There was a problem hiding this comment.
how many ports are we looking at? can we get all ports info in 1 ssh call and then do the parsing on the python side?
There was a problem hiding this comment.
This is a limitation of Dell. The current workaround is have filters to collect (for the commands that cant be done in one call) on the ports we care about.
Summary
Test plan
pytest test/unitpytest test/functional(if applicable)pre-commit run --all-filesChecklist