-
Notifications
You must be signed in to change notification settings - Fork 75
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())