diff options
| author | Yuriy Andamasov <yuriy@vyos.io> | 2026-06-30 14:18:50 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-30 21:18:50 +1000 |
| commit | 0e10d136ef280ca147b6f1e332072f6ba14c8844 (patch) | |
| tree | c1f99833376e15b4b47e01d28d20f12ba4a4c123 /plugins/module_utils | |
| parent | 6d7a2184e970624f74f333931f7f70a1f900f7b5 (diff) | |
| download | vyos.vyos-0e10d136ef280ca147b6f1e332072f6ba14c8844.tar.gz vyos.vyos-0e10d136ef280ca147b6f1e332072f6ba14c8844.zip | |
T8522: fix parse_icmp_attr() split delimiter and UnboundLocalError (#464)
* Add easy-wins improvement spec for vyos.vyos collection
Covers five phases: formatting compliance, runtime.yml redirect fix,
deprecated feature cleanup, missing unit tests, and template deduplication.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add implementation plan for easy-wins improvements
15 tasks across 5 phases: formatting compliance, runtime.yml bugfix,
deprecated code cleanup, missing unit tests, template deduplication.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Update spec and plan with architect review corrections
Key changes:
- Defer Phase 5 (template deduplication) to v7.0.0: route_maps
are not identical, BGP dedup blocked by Python module-level
scoping, OSPF has fundamentally different command paradigms
- Add .git-blame-ignore-revs step to Phase 1
- Add missing test cases: overridden/rendered for resource modules,
aggregate/purge/with_address for vyos_vlan
- Fix incorrect claim that version.py LooseVersion is unused
- Add sequential merge requirement to preamble
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* chore: add .worktrees/ and .claude/ to .gitignore
* T8522: fix parse_icmp_attr() split delimiter and UnboundLocalError
- Use val.split("/") instead of val.split(".") when parsing type/code pairs
- In the numeric-only branch, use int(val) instead of the undefined type_no variable
- Cast both type and code to int for consistent typing
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* T8522: remove unrelated planning docs and gitignore changes
These files were included from local main branch commits unrelated
to this bugfix. This commit removes them to keep the PR scoped.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* T8522: add parsed test for legacy type/code ICMP format
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: omnom62 <75066712+omnom62@users.noreply.github.com>
Diffstat (limited to 'plugins/module_utils')
| -rw-r--r-- | plugins/module_utils/network/vyos/facts/firewall_rules/firewall_rules.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/module_utils/network/vyos/facts/firewall_rules/firewall_rules.py b/plugins/module_utils/network/vyos/facts/firewall_rules/firewall_rules.py index 270b4a62..f8f02e7a 100644 --- a/plugins/module_utils/network/vyos/facts/firewall_rules/firewall_rules.py +++ b/plugins/module_utils/network/vyos/facts/firewall_rules/firewall_rules.py @@ -412,11 +412,11 @@ class Firewall_rulesFacts(object): # <1.3 could be # (type), #/# (type/code) or 'type' (type_name) # recent this is only for strings if "/" in val: # type/code - (type_no, code) = val.split(".") - config["type"] = type_no - config["code"] = code + (type_no, code) = val.split("/") + config["type"] = int(type_no) + config["code"] = int(code) elif val.isnumeric(): - config["type"] = type_no + config["type"] = int(val) else: config["type_name"] = val return config |
