-
- parser.add_option("-n", "--interface", dest="interface", help="specify the TCP IP address")
- parser.add_option("-p", "--port", dest="port", help="specify the TCP port", type="int")
- parser.add_option("--net_interface", dest="netinterface", help="specify the TCP IP address for netrpc")
- parser.add_option("--net_port", dest="netport", help="specify the TCP port for netrpc", type="int")
- parser.add_option("--no-netrpc", dest="netrpc", action="store_false", default=True, help="disable netrpc")
- parser.add_option("--no-xmlrpc", dest="xmlrpc", action="store_false", default=True, help="disable xmlrpc")
+
+ group = optparse.OptionGroup(parser, "XML-RPC Configuration")
+ group.add_option("--xmlrpc-interface", dest="xmlrpc_interface", help="specify the TCP IP address for the XML-RPC protocol")
+ group.add_option("--xmlrpc-port", dest="xmlrpc_port", help="specify the TCP port for the XML-RPC protocol", type="int")
+ group.add_option("--no-xmlrpc", dest="xmlrpc", action="store_false", help="disable the XML-RPC protocol")
+ parser.add_option_group(group)
+
+ title = "XML-RPC Secure Configuration"
+ if not self.has_ssl:
+ title += " (disabled as ssl is unavailable)"
+
+ group = optparse.OptionGroup(parser, title)
+ group.add_option("--xmlrpcs-interface", dest="xmlrpcs_interface", help="specify the TCP IP address for the XML-RPC Secure protocol")
+ group.add_option("--xmlrpcs-port", dest="xmlrpcs_port", help="specify the TCP port for the XML-RPC Secure protocol", type="int")
+ group.add_option("--no-xmlrpcs", dest="xmlrpcs", action="store_false", help="disable the XML-RPC Secure protocol")
+ group.add_option("--cert-file", dest="secure_cert_file", help="specify the certificate file for the SSL connection")
+ group.add_option("--pkey-file", dest="secure_pkey_file", help="specify the private key file for the SSL connection")
+ parser.add_option_group(group)
+
+ # NET-RPC
+ group = optparse.OptionGroup(parser, "NET-RPC Configuration")
+ group.add_option("--netrpc-interface", dest="netrpc_interface", help="specify the TCP IP address for the NETRPC protocol")
+ group.add_option("--netrpc-port", dest="netrpc_port", help="specify the TCP port for the NETRPC protocol", type="int")
+ group.add_option("--no-netrpc", dest="netrpc", action="store_false", help="disable the NETRPC protocol")
+ parser.add_option_group(group)
+
+ # Static HTTP
+ group = optparse.OptionGroup(parser, "Static HTTP service")
+ group.add_option("--static-http-enable", dest="static_http_enable", action="store_true", default=False, help="enable static HTTP service for serving plain HTML files")
+ group.add_option("--static-http-document-root", dest="static_http_document_root", help="specify the directory containing your static HTML files (e.g '/var/www/')")
+ group.add_option("--static-http-url-prefix", dest="static_http_url_prefix", help="specify the URL root prefix where you want web browsers to access your static HTML files (e.g '/')")
+ parser.add_option_group(group)
+