Hook : after_commit, not all data available

I am trying to utilize the foreman hook system to automate setup of a
machine that wasn't provisioned through Foreman (some users still want to
use OpenStack Horizon).

Therefore I wrote some after_commit hooks to automatically set puppet,
puppet CA proxies, location and organization.

The location is based off what subnet the system is in. I simply find the
primary interface, get the IP and then match it to a subnet (as subnet is
valid in only one location in my setup). However I am finding that when
after_commit is first triggered a call to api/v2/HOST_ID/interfaces,
returns the interface list but the majority of the information is blank
(IP, subnet, domain, etc, etc).

At some point this data is available via the API just not after first call
to after_commit.

Any specific reason why? Having to continually check the after_commit for a
time when that data is available brings up a whole bunch of issues.

Thanks