refactor - move common functions to cloudstack_common