https://github.com/crowbar/barclamp-pacemaker/pull/26 would provide this helper.