Consolidate code of two functions

Move same code of _deploy_network_vxlan and _deploy_dnsmasq into a new
function: _add_recipe

Change-Id: Ied2f27f42772acd4485c43cf44b8cd12a150be93