The above context id and friendly name refer to the same thing, so it should not even attempt to change it, in this instance. When I look at the subinterface configuration after this, the network_context_id is not set.
If I change the network_context_id in the template to its numeric identifier, then it correctly preserves (if already configured), or sets(if not configured) the context on the subinterface.
e.g. This correctly sets the network_context to the "Guest" context:
wan 1lan 1.2042:
...
network_context_id: "15156366995910130"
Appears to be an issue with applying a network context on subinterfaces.
A site pulled with pull_site.py correctly shows the subinterface by its friendly name:
On application of do_site.py, the network_context_id is removed from the subinterface.
Log output, do_site.py when applying already configured friendly network_context_id name:
The above context id and friendly name refer to the same thing, so it should not even attempt to change it, in this instance. When I look at the subinterface configuration after this, the network_context_id is not set.
If I change the network_context_id in the template to its numeric identifier, then it correctly preserves (if already configured), or sets(if not configured) the context on the subinterface.
e.g. This correctly sets the network_context to the "Guest" context: