When creating a control plane protocol through NB, create the vrf
if needed instead of only looking up and asserting if it doesn't
exist yet.
Fixes 18429.
Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
(cherry picked from commit
b6ae01f907c071be6cd197df0f3ca6fe9baa631a)
*/
if (nb_node_has_dependency(args->dnode->schema->priv)) {
vrfname = yang_dnode_get_string(args->dnode, "vrf");
- vrf = vrf_lookup_by_name(vrfname);
+ vrf = vrf_get(VRF_UNKNOWN, vrfname);
assert(vrf);
nb_running_set_entry(args->dnode, vrf);
}