PaloAltoNetworks / PaloAltoNetworks/pan.dev

"Create route prefix lists" returns response object in the wrong schema

Open
#1,059 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
MDX
Stars
78
Forks
88
Avg merge
5d 17h
Merged PRs (30d)
18

Description

Describe the bug

When running the API call
https://api.strata.paloaltonetworks.com/config/network/v1/route-prefix-lists
to create a prefix list the response object ist returned in the wrong schema.
The type.ipv4.ipv4_entry[x].prefix object is returned as type "list" instead of type "dict" (which would include either "network" or "entry" as following object).

Example:
{'ipv4': {'ipv4_entry': [{'action': 'permit', 'name': 5, 'prefix': [{'greater_than_or_equal': 16, 'network': '10.64.0.0/16'}]}]}}

The object is still created fine in the SCM.

Expected behavior

The type.ipv4.ipv4_entry[x].prefix object should be returned as type "dict" (which would include either "network" or "entry" as following object).

Current behavior

The type.ipv4.ipv4_entry[x].prefix object is returned as type "list" instead of type "dict" (which would include either "network" or "entry" as following object).

Possible solution

Steps to reproduce

  1. create a route prefix list
  2. observe response object

Context

Your Environment

  • Version used:
  • Environment name and version (e.g. Chrome 59, node.js 5.4, python 3.7.3):
  • Operating System and version (desktop or mobile):
  • Link to your project:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing a create request against the route-prefix-lists API endpoint and inspect the returned type.ipv4.ipv4_entry[x].prefix value. Trace the API schema or response handling for that field. Done means the response returns prefix as a dictionary containing the expected network or entry object while the route prefix list is still created successfully.

Written by the indexing model from the issue text.

Assessment

Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.