Added affinity group creation API.