[PROVISIONING] refactoring parser code

This commit simply re-factors the code without touching the actual parsing logic or end result.

Signed-off-by: Jarko Poutiainen <Jarko.Poutiainen@oss.tieto.com>