Update virtual_switch.rb to eliminate top-level constants

Without this patch, some warnings are raise while running puppet.