parameters: (
      ssid: str,
      security_type: SECURITY_TYPES,
      psk: Optional[str],
      hidden: bool,
      eap_args: Optional[Dict[str, Any]],
  )
return_statement: return configure_cmd
docstring: Build the nmcli connection add command to configure the new network.
  
      The parameters are the same as configure but without the defaults; this
      should be called only by configure.
docstring_summary: Build the nmcli connection add command to configure the new network.
docstring_tokens: Build the nmcli connection add command to configure the new network .
function: def _build_con_add_cmd(
      ssid: str,
      security_type: SECURITY_TYPES,
      psk: Optional[str],
      hidden: bool,
      eap_args: Optional[Dict[str, Any]],
  ) -> List[str]:
      """Build the nmcli connection add command to configure the new network.
  
      The parameters are the same as configure but without the defaults; this
      should be called only by configure.
      """
      configure_cmd = [
          "connection",
          "add",
          "save",
          "yes",
          "autoconnect",
          "yes",
          "ifname",
          NETWORK_IFACES.WIFI.value,
          "type",
          "wifi",
          "con-name",
          ssid,
          "wifi.ssid",
          ssid,
          "802-11-wireless.cloned-mac-address",
          "permanent",
      ]
      if hidden:
          configure_cmd += ["wifi.hidden", "true"]
      if security_type == SECURITY_TYPES.WPA_PSK:
          configure_cmd += ["wifi-sec.key-mgmt", security_type.value]
          if psk is None:
              raise ValueError("wpa-psk security type requires psk")
          configure_cmd += ["wifi-sec.psk", psk]
      elif security_type == SECURITY_TYPES.WPA_EAP:
          if eap_args is None:
              raise ValueError("wpa-eap security type requires eap_args")
          configure_cmd += _add_eap_args(eap_args)
      elif security_type == SECURITY_TYPES.NONE:
          pass
      else:
          raise ValueError("Bad security_type {}".format(security_type))
  
      return configure_cmd
function_tokens: def _build_con_add_cmd ( ssid : str , security_type : SECURITY_TYPES , psk : Optional [ str ] , hidden : bool , eap_args : Optional [ Dict [ str , Any ] ] , ) -> List [ str ] : configure_cmd = [ "connection" , "add" , "save" , "yes" , "autoconnect" , "yes" , "ifname" , NETWORK_IFACES . WIFI . value , "type" , "wifi" , "con-name" , ssid , "wifi.ssid" , ssid , "802-11-wireless.cloned-mac-address" , "permanent" , ] if hidden : configure_cmd += [ "wifi.hidden" , "true" ] if security_type == SECURITY_TYPES . WPA_PSK : configure_cmd += [ "wifi-sec.key-mgmt" , security_type . value ] if psk is None : raise ValueError ( "wpa-psk security type requires psk" ) configure_cmd += [ "wifi-sec.psk" , psk ] elif security_type == SECURITY_TYPES . WPA_EAP : if eap_args is None : raise ValueError ( "wpa-eap security type requires eap_args" ) configure_cmd += _add_eap_args ( eap_args ) elif security_type == SECURITY_TYPES . NONE : pass else : raise ValueError ( "Bad security_type {}" . format ( security_type ) ) return configure_cmd