QuestionQ247
Cisco Platforms and Development
Refer to the exhibit. Create a new loopback34 on a Cisco IOS XE router with IP address 10.34.1.2/24. Drag the code options into the missing boxes to complete the Python script that configures the interface IP address according to the ietf-interfaces YANG data model. Not all options are used.
Drag & Drop
loopback
interface
ietf-interfaces
ipv4
address
netmask
subnet
int_url = f'https://router01.dev.net/restconf/data/ietf-interfaces:interfaces/' data = json.dumps({ "" : { "" : [{ "name": "Loopback34", "type": "iana-if-type:softwareLoopback", "ietf-ip:ipv4": { "" : [{'ip': '10.34.1.2', "" : '255.255.255.0'}] }}}]}) response = requests.post( int_url, headers=restconf_headers, data=data, auth=(username,password))
Community Discussion