parameters: (parser, forClientServerSetup=False)
docstring: Helper function that adds the options for connection and authorization to
      the argument parser.
docstring_summary: Helper function that adds the options for connection and authorization to
      the argument parser.
docstring_tokens: Helper function that adds the options for connection and authorization to the argument parser .
function: def addConnectionAndAuthOptions(parser, forClientServerSetup=False):
      """
      Helper function that adds the options for connection and authorization to
      the argument parser.
      """
      # Server options
      server_group = parser.add_argument_group("Connections")
      server_group.add_argument("-H", "--host",
                                dest="hosts",
                                help="server name or IP (default: 127.0.0.1:8194). Can be specified multiple times.",
                                metavar="host:port",
                                action=HostAction,
                                default=[])
  
      # Auth options
      if forClientServerSetup:
          _addArgGroupsAuthAndEntitlementsClientServerSetup(parser)
      else:
          _addArgGroupAuth(parser)
  
      # TLS Options
      tls_group = parser.add_argument_group("TLS (specify all or none)")
      tls_group.add_argument("--tls-client-credentials",
                             dest="tls_client_credentials",
                             help="name a PKCS#12 file to use as a source of "
                             "client credentials",
                             metavar="file")
      tls_group.add_argument("--tls-client-credentials-password",
                             dest="tls_client_credentials_password",
                             help="specify password for accessing client credentials",
                             metavar="password",
                             default="")
      tls_group.add_argument("--tls-trust-material",
                             dest="tls_trust_material",
                             help="name a PKCS#7 file to use as a source of "
                             "trusted certificates",
                             metavar="file")
      tls_group.add_argument("--read-certificate-files",
                             dest="read_certificate_files",
                             help="Enable reading the TLS files and pass the blobs",
                             action="store_true")
  
      # ZFP Options
      zfp_group = parser.add_argument_group(
          "ZFP connections over leased lines (requires TLS)")
      zfp_group.add_argument("-z", "--zfp-over-leased-line",
                             dest="remote",
                             help="enable ZFP connections over leased lines on the "
                             "specified port (8194 or 8196)"
                             "\n(When this option is enabled, option -H/--host is ignored.)",
                             metavar="port",
                             type=int)
function_tokens: def addConnectionAndAuthOptions ( parser , forClientServerSetup = False ) : # Server options server_group = parser . add_argument_group ( "Connections" ) server_group . add_argument ( "-H" , "--host" , dest = "hosts" , help = "server name or IP (default: 127.0.0.1:8194). Can be specified multiple times." , metavar = "host:port" , action = HostAction , default = [ ] ) # Auth options if forClientServerSetup : _addArgGroupsAuthAndEntitlementsClientServerSetup ( parser ) else : _addArgGroupAuth ( parser ) # TLS Options tls_group = parser . add_argument_group ( "TLS (specify all or none)" ) tls_group . add_argument ( "--tls-client-credentials" , dest = "tls_client_credentials" , help = "name a PKCS#12 file to use as a source of " "client credentials" , metavar = "file" ) tls_group . add_argument ( "--tls-client-credentials-password" , dest = "tls_client_credentials_password" , help = "specify password for accessing client credentials" , metavar = "password" , default = "" ) tls_group . add_argument ( "--tls-trust-material" , dest = "tls_trust_material" , help = "name a PKCS#7 file to use as a source of " "trusted certificates" , metavar = "file" ) tls_group . add_argument ( "--read-certificate-files" , dest = "read_certificate_files" , help = "Enable reading the TLS files and pass the blobs" , action = "store_true" ) # ZFP Options zfp_group = parser . add_argument_group ( "ZFP connections over leased lines (requires TLS)" ) zfp_group . add_argument ( "-z" , "--zfp-over-leased-line" , dest = "remote" , help = "enable ZFP connections over leased lines on the " "specified port (8194 or 8196)" "\n(When this option is enabled, option -H/--host is ignored.)" , metavar = "port" , type = int )