Generate pre and post resource update hooks

Change-Id: Ibe5e5e0086c5a82a8bb641301f99d8a138238697