Getting XML Parsing Errors When Interacting to AWS Based Panoramas
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 30/100
Hướng nghiên cứu
The traceback points to panos/base.py, from DeviceGroup.refreshall through refreshall_from_xml and parse_xml; start there and reproduce with the AWS Panorama XML configuration. Confirm how the “0-8” value is represented, then verify that the original security and NAT rulebase retrieval flow parses successfully without breaking existing Panorama cases.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
I have a script that uses the panos library and when used against Panorama in AWS I get a parsing error. Below is that error:
File "/Users/ncarabaj/Desktop/pre-post-rule-download/panorama-info-version-1.py", line 127, in
main()
File "/Users/ncarabaj/Desktop/pre-post-rule-download/panorama-info-version-1.py", line 117, in main
device_groups = DeviceGroup.refreshall(panorama)
File "/usr/local/lib/python3.9/site-packages/panos/base.py", line 1338, in refreshall
instances = class_instance.refreshall_from_xml(obj)
File "/usr/local/lib/python3.9/site-packages/panos/base.py", line 1404, in refreshall_from_xml
instance._refresh_children(xml=obj)
File "/usr/local/lib/python3.9/site-packages/panos/base.py", line 1038, in _refresh_children
l = child.refreshall_from_xml(childroot)
File "/usr/local/lib/python3.9/site-packages/panos/base.py", line 1389, in refreshall_from_xml
instance.parse_xml(obj)
File "/usr/local/lib/python3.9/site-packages/panos/base.py", line 2789, in parse_xml
var_path.parse_xml(xml, settings, possibilities)
File "/usr/local/lib/python3.9/site-packages/panos/base.py", line 3223, in parse_xml
self.parse_value_from_xml_last_tag(e, settings, attr)
File "/usr/local/lib/python3.9/site-packages/panos/base.py", line 3306, in parse_value_from_xml_last_tag
settings[self.param] = int(elm.text)
ValueError: invalid literal for int() with base 10: '0-8'
Expected behavior
Should authenticate and parse
Current behavior
Possible solution
Need to be able to ingest the xml config from AWS
Steps to reproduce
- Run the code in the link against AWS Panorama
Screenshots
N/A
Context
Trying to gather pre and post security and nat rulebase from Pano. It does work on others just not ones in AWS.
Your Environment
- Environment name and version (e.g. Chrome 59, node.js 5.4, python 3.7.3):
Python 3.11.3
- Operating System and version (desktop or mobile):
MacOS Catalina Version 10.15.7 - User laptop
Panorama version 10.1.9
aws-2.0.2
- Link to your project:
- Ngôn ngữ chính
- Python
- Star
- 402
- Fork
- 198
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của PaloAltoNetworks/pan-os-python
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
PaloAltoNetworks/pan-os-python#624 · 1 bình luận ·
-
Security: xml.etree.ElementTree used across 10 core modules — no XXE protectionCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
PaloAltoNetworks/pan-os-python#617 · 2 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
-
Feature/Zone Protection ProfilesĐang mởenhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Tất cả issue của PaloAltoNetworks/pan-os-python
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
RunestoneInteractive/rs#1661 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
streamlink/streamlink#7192 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
aws-samples/sample-per-model-bedrock#795 ·
Maintainer thường phản hồi trong vòng 1 ngày