Instead making name and url positional args.
We can add a flag to change the meaning of the URL
later.
::
- suricata-update add-source [--name name] [--url <url>]
+ suricata-update add-source <name> <url>
Description
===========
Options
=======
-.. option:: --name <name>
-
- The name of the source. If not provided on the command line the
- user will be prompted.
-
-.. option:: --url <url>
-
- The URL of the source. If not provided on the command line the user
- will be prompted.
-
.. include:: ./common-options.rst
logger = logging.getLogger()
def register(parser):
- parser.add_argument("--name", metavar="<name>", help="Name of source")
- parser.add_argument("--url", metavar="<url>", help="Source URL")
+ parser.add_argument("name", metavar="<name>", help="Name of source")
+ parser.add_argument("url", metavar="<url>", help="Source URL")
parser.set_defaults(func=add_source)
def add_source(config):