sudo firewall-cmd --add-port=80/tcp --add-port=443/tcp doesn't work. It also doesn't throw an error, it just doesn't do anything. I also notice that the argument parsing being used is fairly crude. Python has the excellent argparse module which will create your usage output for you and can be used to modularize the options, set required options, etc.
Marking as an RFE. Using this will also fix #874912.
(In reply to comment #0) > sudo firewall-cmd --add-port=80/tcp --add-port=443/tcp > doesn't work. It also doesn't throw an error, it just doesn't do anything. Added upstream http://git.fedorahosted.org/cgit/firewalld.git/commit/?id=1bb7ba26af1de1ffba65f4232d5ea06c24d07393 > I also notice that the argument parsing being used is fairly crude. Python > has the excellent argparse module Upstream firewall-cmd has been using argparse since http://git.fedorahosted.org/cgit/firewalld.git/commit/?id=1b7d5908f1018e883dded781b4d073cc18b8045c > which will create your usage output for > you and can be used to modularize the options, set required options, etc. Yes, the generated usage is nice. Problem is that we have so many options and some of them are dependent on others so it's almost impossible to set the parser for the generated usage to look nice. Splitting (like in bug #876394, comment #2) them to sub-commands [1] would probably solve this, but it'd also change the syntax completely and I'm not sure it's what we want now. [1] http://docs.python.org/dev/library/argparse.html#sub-commands
Fixed since 0.3.0