Move shelve server logic in compute utility

shelve server logic has been duplicated many place and
also needed by more tests.

It better to make that a utils function and used from there.

Change-Id: I391f0bb92da1ddc76efcf026e8dea536edfd3706
5 files changed