changes to support AffinityGroup model