factor out hook logic in setupNetworks

Change-Id: Iad0808bc2fc6260636390af925ca754ed6c51de1
Signed-off-by: ibarkan <ibarkan@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/35693
Reviewed-by: Dan Kenigsberg <danken@redhat.com>