PaloAltoNetworks / PaloAltoNetworks/pan.dev
Issue/Help with "Push the candidate configuration"
Nobody has claimed this yet.
- Dominant language
- MDX
- Stars
- 78
- Forks
- 88
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 18
Description
Documentation link
https://pan.dev/scm/api/config/cloudngfw/operations/push-candidate-config-versions/
Describe the problem
Devices parameter is actually not a list of numbers, but a list of strings.
I had to do some tests because all my Palo Alto devices start with 00, thus giving some errors when typecasting/truncating from str to int.
One test that passed was actually sending a string of numbers, which I also believe is the correct decision, to avoid the problem i had.
Test: int
Input:
{ "devices": [1234567890], "description": "test" }Response:
{ "_errors": [ { "code": "API_I00035", "message": "...", "details": ["\"devices[0]\" must be a string", "\"devices\" >does not contain 1 required value(s)"] } ] }
Test: str
Input:
{ "devices": ["001234567890"], "description": "test" }Response:
{ "success": true, "job_id": "41", "message": "CommitAndPush job enqueued with jobid 41" }
Suggested fix
Just change the documentation from number[] to string[] and update the examples.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open the linked Push the candidate configuration documentation page and inspect the devices parameter schema and examples. Change the parameter from number[] to string[] and update the examples; done when the page reflects the accepted string values and preserves leading zeroes.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100