You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
help="Direction of server authorization, 'in': the other server can send requests, 'out': this server can send requests")
124
-
subparser.add_argument("--key", help="The secret key used to authenticate requests to/from the server (default: randomly generate a secure key)")
125
-
subparser.add_argument("--label", help="The display name for the server ")
126
-
subparser.add_argument("--base-url", dest="base_url", help="The base URL for sending API requests to the other server (e.g., <base-url>/match should be a valid endpoint). Must be specified for outgoing requests")
127
-
subparser.set_defaults(function=add_server)
128
+
defadd_server_subcommands(parser, direction):
129
+
"""Add subparser for incoming or outgoing servers
130
+
131
+
direction - 'in': incoming servers, 'out': outgoing servers
subparser.add_argument("--key", help="The secret key used to authenticate requests to/from the {} (default: randomly generate a secure key)".format(server_type))
138
+
subparser.add_argument("--label", help="The display name for the {}".format(server_type))
139
+
ifserver_type=='server':
140
+
subparser.add_argument("--base-url", dest="base_url", help="The base URL for sending API requests to the server (e.g., <base-url>/match should be a valid endpoint). Must be specified for outgoing requests")
141
+
subparser.set_defaults(function=add_server)
142
+
else:
143
+
subparser.set_defaults(function=add_client)
128
144
129
-
subparser=subparsers.add_parser('rm', description="Remove server authorization")
0 commit comments