300-435 · Question #152
Refer to the exhibit. A Cisco Catalyst SD-WAN Fabric Policy must be created in a non-production environment. To implement this, a Python script that pulls the existing policy and updates the…
The correct answer is A. response = requests.request( "PUT", url, headers=headers, data=json.dumps(policy), verify=False ) if response.ok. Updating an existing SD-WAN Fabric Policy requires a PUT request with SSL verification disabled (verify=False) for a non-production environment script.
Question
Exhibit
Options
- Aresponse = requests.request( "PUT", url, headers=headers, data=json.dumps(policy), verify=False ) if response.ok:
- Bresponse = requests.request( "POST", url, headers=headers, data=json.dumps(policy), verify=False ) if response.ok:
- Cresponse = requests.request( "POST", url, headers=headers, data=json.dumps(policy), verify=True ) if response.ok:
- Dresponse = requests.request( "PUT", url, headers=headers, data=json.dumps(policy), verify=True ) if response.ok:
How the community answered
(38 responses)- A79% (30)
- B13% (5)
- C3% (1)
- D5% (2)
Why each option
Updating an existing SD-WAN Fabric Policy requires a PUT request with SSL verification disabled (verify=False) for a non-production environment script.
PUT is the correct HTTP method for updating an existing resource - in this case modifying an existing policy to change the preferred route to MPLS. verify=False is appropriate in non-production environments where self-signed certificates may be in use. Using POST would attempt to create a new policy rather than update the existing one.
POST is used to create a new resource, not to update an existing one - using POST here would attempt to create a duplicate policy rather than modifying the preferred route.
POST is incorrect for updating an existing policy, and verify=True would fail in non-production environments using self-signed certificates.
PUT is correct but verify=True would cause SSL verification failures against self-signed certificates in a non-production vManage environment.
Concept tested: SD-WAN vManage API PUT method for policy update
Source: https://developer.cisco.com/docs/sdwan/
Topics
Community Discussion
No community discussion yet for this question.
