refactor real-xivo-upgrade