CLOUDIFY-2073 Coded n instances exapnsion func