Here are three types of VPN:
Full-mesh (FullMesh)
Each customer site can communicate directly with every other customer site in the VPN.
Hub-and-spoke (HubAndSpoke)
All traffic flows to/from a central hub site.
Partial-mesh (SpokeAndSpoke)
Some customer sites can communicate directly with other customer sites in the VPN. A partial-mesh VPN is a hub-and-spoke VPN that has multiple hubs.
1. For a single RouteTarget, if its ImportedBy and ExportedBy VRF are the same, it is FullMesh
2. Otherwise given a RouteTarget, if there is another RouteTarget whose ExportedBy is the same as the ImportedBy of this RouteTarget, we will create a Hub-and-Spoke VPN