PaloAltoNetworks / PaloAltoNetworks/pan.dev
Issue/Help with "Update a tunnel interface"
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/ngfw/network/create-tunnel-interfaces/
Describe the problem
The parameter default-value isn't processed by the API.
Expected Behavior
The Tunnel interface should be created with the default-value sent to the API.
Current Behavior
The interface is created on Strata Cloud Manage but with an EMPTY "Default Interface Assignment".
Output of the API response : {'folder': 'FW-Corporate', 'id': 'REDACTED', 'interface_management_profile': 'Ping-Only', 'name': '$Tunnel-VPN-01'}
It seams like the default-value parameter doesn't work when sending an integer value. (it does nothing, no error and no return from the API.)
If i use the default_value (with an underscore and not a hyphen) with the string "tunnel.54" it works.
default-value --> default_value
int(54) --> "tunnel.54"
Reproduce (python)
PYTHON CODE :
access_token = [REDACTED]
api_url = "https://api.strata.paloaltonetworks.com/config/network/v1/tunnel-interfaces"
params = json.dumps({
"folder": "FW-Corporate",
"default-value": int(54),
"name": "$Tunnel-VPN-01",
"interface_management_profile": "Ping-Only",
})
headers = {
"Authorization": f"Bearer {access_token}",
"Content-Type": "application/json"
}
response = requests.request("POST", api_url, headers=headers, data=params)
print(response.json())
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
Start with the linked tunnel-interface documentation page and reproduce the POST request using the supplied Python example. Compare the hyphenated integer parameter with the working underscored string form, then determine whether the API behavior or the documentation needs correction. Done means the documented parameter behavior is accurate and the expected default interface assignment is confirmed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100