This is unrelated to this pull request, but I was thinking if we should, for readability, move all those "definitions" outside of the functions to the top of the file where the other "constants' live.

Basically, we would build one big `RESOURCE_EXTRA_ATTRIBUTES_MAP` `dict` which maps "resource" (node, storage volume, network, etc.) to extra attributes definition for that resource.