docs: def vswitch_create(self, name, rdev=None, controller='*',
                         connection='CONNECT', network_type='ETHERNET',
                         router="NONROUTER", vid='UNAWARE', port_type='ACCESS',
                         gvrp='GVRP', queue_mem=8, native_vid=1,
                         persist=True):
          """ Create vswitch.
  
          :param str name: the vswitch name
          :param str rdev: the real device number, a maximum of three devices,
                 all 1-4 characters in length, delimited by blanks. 'NONE'
                 may also be specified
          :param str controller: the vswitch's controller, it could be the userid
                 controlling the real device, or '*' to specifies that any
                 available controller may be used
          :param str connection:
              - CONnect:
                  Activate the real device connection.
              - DISCONnect:
                  Do not activate the real device connection.
              - NOUPLINK:
                  The vswitch will never have connectivity through
                  the UPLINK port
          :param str network_type: Specifies the transport mechanism to be used
                 for the vswitch, as follows: IP, ETHERNET
          :param str router:
              - NONrouter:
                  The OSA-Express device identified in
                  real_device_address= will not act as a router to the
                  vswitch
              - PRIrouter:
                  The OSA-Express device identified in
                  real_device_address= will act as a primary router to the
                  vswitch
              - Note: If the network_type is ETHERNET, this value must be
                  unspecified, otherwise, if this value is unspecified, default
                  is NONROUTER
          :param str/int vid: the VLAN ID. This can be any of the following
                 values: UNAWARE, AWARE or 1-4094
          :param str port_type:
              - ACCESS:
                  The default porttype attribute for
                  guests authorized for the virtual switch.
                  The guest is unaware of VLAN IDs and sends and
                  receives only untagged traffic
              - TRUNK:
                  The default porttype attribute for
                  guests authorized for the virtual switch.
                  The guest is VLAN aware and sends and receives tagged
                  traffic for those VLANs to which the guest is authorized.
                  If the guest is also authorized to the natvid, untagged
                  traffic sent or received by the guest is associated with
                  the native VLAN ID (natvid) of the virtual switch.
          :param str gvrp:
              - GVRP:
                  Indicates that the VLAN IDs in use on the virtual
                  switch should be registered with GVRP-aware switches on the
                  LAN. This provides dynamic VLAN registration and VLAN
                  registration removal for networking switches. This
                  eliminates the need to manually configure the individual
                  port VLAN assignments.
              - NOGVRP:
                  Do not register VLAN IDs with GVRP-aware switches on
                  the LAN. When NOGVRP is specified VLAN port assignments
                  must be configured manually
          :param int queue_mem: A number between 1 and 8, specifying the QDIO
                 buffer size in megabytes.
          :param int native_vid: the native vlan id, 1-4094 or None
          :param bool persist: whether create the vswitch in the permanent
                 configuration for the system
          """
          if ((queue_mem < 1) or (queue_mem > 8)):
              errmsg = ('API vswitch_create: Invalid "queue_mem" input, '
                        'it should be 1-8')
              raise exception.SDKInvalidInputFormat(msg=errmsg)
  
          if isinstance(vid, int) or vid.upper() != 'UNAWARE':
              if ((native_vid is not None) and
                  ((native_vid < 1) or (native_vid > 4094))):
                  errmsg = ('API vswitch_create: Invalid "native_vid" input, '
                            'it should be 1-4094 or None')
                  raise exception.SDKInvalidInputFormat(msg=errmsg)
  
          if network_type.upper() == 'ETHERNET':
              router = None
  
          self._networkops.add_vswitch(name, rdev=rdev, controller=controller,
                                       connection=connection,
                                       network_type=network_type,
                                       router=router, vid=vid,
                                       port_type=port_type, gvrp=gvrp,
                                       queue_mem=queue_mem,
                                       native_vid=native_vid,
                                       persist=persist)