Refactor device classification into a separate function in order to make the code more readable and easier to maintain. Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>