Using python and the NX-OS API to Configure OSPF on a device.
This script will authenticate with a Nexus device that has feature nxapi enabled. We store the token received in a variable for later use, and then enable ospf globally, set the router id, and finally configure an interface with an IP address and to participate in our ospf instance in area 0.