Fix the generate_id function with PUT methods

Now handle methods such as /v2/alarms/alarm_id/state.

Change-Id: I15cdc6a65f38fee7e4ad6559741144fdf43eb1f6
Merge "Fix the generate_id function with PUT methods"