Hostgroup CRUD functions and tests