Modified to accept an apientity so i can just getdnsview in the call to add host.