1. Following error below is seen while doing template diff in Director UI post Tenant deletion using old "DELETE /v1/tenants/tenant/{uuid}" API in Concerto:

    Remote Server Exception : Error occurred while doing diff. Reason : Error on line 0: invalid value for: site-name in /ncs:devices/ncs:device[ncs:name='Gateway-1-TMP']/ncs:config/org:orgs/org:org[org:name='Tenant-1']/sdwan:sd-wan/sdwan:site/sdwan:site-name: "{$v_Tenant-1_Site_Name__sitesSiteName}" is an invalid value.




  2. This error referencing Bind Data "{$v_Tenant-1_Site_Name__sitesSiteName}" leftover post Tenant deletion which is blocking template diff in Director UI:


  3. To fix the issue we need to perform manual clean-up of all config leftovers associated with the deleted org from the device template:
    1. In Director CLI, run show configuration to identify what is left in the template associated with the deleted org:
      show configuration devices template <Device_Template> config | display set | match <Org_Name>
      NOTE: Highlighted config is referenced in Bind Data that prevents to do a template diff.

    2. In Director CLI config mode, delete all leftovers from the template:
      delete devices template <Device_Template> config orgs org <Org_Name> <all_leftover_config>
      delete devices template <Device_Template> config orgs org-services <Org_Name> <all_leftover_config>

    3. commit and save the template.
      NOTE: All associated TVI interfaces and routing-instances should be deleted as well to completely remove all leftover config associated with the org.

  4. After manual leftover config clean-up template diff works in Director UI again: