I recently added the first of three YDK sample applications for creating VRF definitions on IOS-XE (16.7.1) devices, for both IPv4 and IPv6. The goal of this use case is to create the suite of YDK applications that allow the operator to automate defining and configuring VRF's on an IOS-XE device, including VRF definition, VRF enabled interface and VRF aware BGP.
The VRF definition applications can be found here:
nc-create-xe-native-vrf-20-ydk.py - VRF Definition for IPv4
nc-create-xe-native-vrf-22-ydk.py - VRF Definition for IPv6
For more details on the IOS-XE configuration CLI txt and XML output, follow this link:
https://github.com/CiscoDevNet/ydk-py-samples/tree/master/samples/basic/crud/models/cisco-ios-xe/Cisco-IOS-XE-native/native/vrf