def vswitch(alias_name = nil, &block)
      attrs = VswitchDirective.new(alias_name, &block)
      openflow_version = case Pio::OpenFlow.version
                         when :OpenFlow10
                           1.0
                         when :OpenFlow13
                           1.3
                         else
                           raise "Unknown OpenFlow version: #{Pio::OpenFlow.version}"
                         end
      Vswitch.create(dpid: attrs[:dpid],
                     name: attrs[:name],
                     tcp_port: attrs[:port],
                     openflow_version: openflow_version)
    end
def vswitch(alias_name = nil, &block)
      attrs = VswitchDirective.new(alias_name, &block)
      openflow_version = case Pio::OpenFlow.version
                         when :OpenFlow10
                           1.0
                         when :OpenFlow13
                           1.3
                         else
                           raise "Unknown OpenFlow version: #{Pio::OpenFlow.version}"
                         end
      Vswitch.create(dpid: attrs[:dpid],
                     name: attrs[:name],
                     tcp_port: attrs[:port],
                     openflow_version: openflow_version)
    end
rubocop:disable MethodLength
 rubocop:disable LineLength