Author: adc Date: Mon Feb 10 00:23:28 2014 New Revision: 1566478 URL: http://svn.apache.org/r1566478 Log: Some documentation for moderator command
Added: labs/panopticon/docs/source/reference/ labs/panopticon/docs/source/reference/api/ labs/panopticon/docs/source/reference/api/index.en.rst labs/panopticon/docs/source/reference/api/person.en.rst labs/panopticon/docs/source/reference/commands/ labs/panopticon/docs/source/reference/commands/common_arguments.en.rst labs/panopticon/docs/source/reference/commands/index.en.rst labs/panopticon/docs/source/reference/commands/moderator.en.rst Modified: labs/panopticon/bin/moderator labs/panopticon/docs/source/conf.py labs/panopticon/docs/source/index.rst Modified: labs/panopticon/bin/moderator URL: http://svn.apache.org/viewvc/labs/panopticon/bin/moderator?rev=1566478&r1=1566477&r2=1566478&view=diff ============================================================================== --- labs/panopticon/bin/moderator (original) +++ labs/panopticon/bin/moderator Mon Feb 10 00:23:28 2014 @@ -18,7 +18,7 @@ # under the License. # """ -Mailing list moderator tool. +Mailing list moderator tool used to manage mailing lists from the command line. """ from asf.cli import entrypoint from asf.data.aliases import get_mail_aliases @@ -55,8 +55,24 @@ def cmd_lookup(args): else: print email_alias, 'is not a registered email alias' -def cmd_check(args): - print 'Email list checking is not supported yet' + +def cmd_add(args): + print 'Email list additions is not supported yet' + + +def cmd_remove(args): + print 'Email list removals is not supported yet' + + +def cmd_list(args): + print 'd...@mock.apache.org' + print 'u...@mock.apache.org' + print 'com...@mock.apache.org' + + +def cmd_members(args): + print 'john....@gmail.com' + print 'jane....@gmail.com*' @entrypoint @@ -71,10 +87,22 @@ def main(cli): lookup_parser.add_argument('email_alias', help='The email alias to lookup') lookup_parser.set_defaults(func=cmd_lookup) - check_parser = subparsers.add_parser('check', description='Lists the projects user is member of') - check_parser.add_argument('email_alias', help='The email alias to lookup') - check_parser.add_argument('mailing_list', help='The mailing list email alias is attempting to join') - check_parser.set_defaults(func=cmd_check) + add_parser = subparsers.add_parser('add', description='Add an email address to a mailing list') + add_parser.add_argument('mailing_list', help='The mailing list that the email address is attempting to join') + add_parser.add_argument('email_address', help='The email address to add') + add_parser.set_defaults(func=cmd_add) + + remove_parser = subparsers.add_parser('remove', description='Remove an email address to a mailing list') + remove_parser.add_argument('mailing_list', help='The mailing list that the email address is being removed from') + remove_parser.add_argument('email_address', help='The email address to remove') + remove_parser.set_defaults(func=cmd_remove) + + list_parser = subparsers.add_parser('list', description='List the ASF mailing lists') + list_parser.set_defaults(func=cmd_list) + + list_parser = subparsers.add_parser('members', description='List the members of a mailing list') + list_parser.add_argument('mailing_list', help='The mailing list whose membership is to be listed') + list_parser.set_defaults(func=cmd_members) with cli.run(): cli.args.func(cli.args) Modified: labs/panopticon/docs/source/conf.py URL: http://svn.apache.org/viewvc/labs/panopticon/docs/source/conf.py?rev=1566478&r1=1566477&r2=1566478&view=diff ============================================================================== --- labs/panopticon/docs/source/conf.py (original) +++ labs/panopticon/docs/source/conf.py Mon Feb 10 00:23:28 2014 @@ -13,6 +13,8 @@ import sys, os +import sphinx_rtd_theme + # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. @@ -41,7 +43,7 @@ master_doc = 'index' # General information about the project. project = u'Apache Panopticon' -copyright = u'2013, Apache Software Foundation' +copyright = u'2013-2014, Apache Software Foundation' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -94,7 +96,7 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'default' +html_theme = "sphinx_rtd_theme" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the @@ -102,7 +104,7 @@ html_theme = 'default' #html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [] +html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # The name for this set of Sphinx documents. If None, it defaults to # "<project> v<release> documentation". Modified: labs/panopticon/docs/source/index.rst URL: http://svn.apache.org/viewvc/labs/panopticon/docs/source/index.rst?rev=1566478&r1=1566477&r2=1566478&view=diff ============================================================================== --- labs/panopticon/docs/source/index.rst (original) +++ labs/panopticon/docs/source/index.rst Mon Feb 10 00:23:28 2014 @@ -1,16 +1,43 @@ -.. Apache Panopticon documentation master file, created by - sphinx-quickstart on Sat Jun 15 14:40:50 2013. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. +Apache Panopticon +================= -Welcome to Apache Panopticon's documentation! -============================================= - -Contents: +.. Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +Apache Panopticon⢠is web UI for tracking/managing ASF projects and +Incubator podlings based on Python/gunicorn. + +What Is Apache Panopticon? +========================== + +Traffic Server is a high-performance web proxy cache that improves +network efficiency and performance by caching frequently-accessed +information at the edge of the network. This brings content physically +closer to end users, while enabling faster delivery and reduced +bandwidth use. Traffic Server is designed to improve content delivery +for enterprises, Internet service providers (ISPs), backbone +providers, and large intranets by maximizing existing and available +bandwidth. .. toctree:: - :maxdepth: 2 + :maxdepth: 1 + reference/commands/index.en + reference/api/index.en Indices and tables Added: labs/panopticon/docs/source/reference/api/index.en.rst URL: http://svn.apache.org/viewvc/labs/panopticon/docs/source/reference/api/index.en.rst?rev=1566478&view=auto ============================================================================== --- labs/panopticon/docs/source/reference/api/index.en.rst (added) +++ labs/panopticon/docs/source/reference/api/index.en.rst Mon Feb 10 00:23:28 2014 @@ -0,0 +1,24 @@ +.. Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +REST API Reference +================== + +.. toctree:: + :maxdepth: 1 + + person.en Added: labs/panopticon/docs/source/reference/api/person.en.rst URL: http://svn.apache.org/viewvc/labs/panopticon/docs/source/reference/api/person.en.rst?rev=1566478&view=auto ============================================================================== --- labs/panopticon/docs/source/reference/api/person.en.rst (added) +++ labs/panopticon/docs/source/reference/api/person.en.rst Mon Feb 10 00:23:28 2014 @@ -0,0 +1,22 @@ +.. Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +====== +Person +====== + +An API to collect information about an Apache Software Foundation Committer (committer). Added: labs/panopticon/docs/source/reference/commands/common_arguments.en.rst URL: http://svn.apache.org/viewvc/labs/panopticon/docs/source/reference/commands/common_arguments.en.rst?rev=1566478&view=auto ============================================================================== --- labs/panopticon/docs/source/reference/commands/common_arguments.en.rst (added) +++ labs/panopticon/docs/source/reference/commands/common_arguments.en.rst Mon Feb 10 00:23:28 2014 @@ -0,0 +1,73 @@ +.. Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +================================= +Arguments common to all utilities +================================= + +Description +=========== + +All Apache Panopticon utilities share a set of common command-line arguments:: + + --debug Turn on debug mode / logging. + --trace Turn on trace logging. Implies --debug. + --log LOG Log file destination. Defaults to stdout only. + --username USERNAME Username + --password PASSWORD Password + --clear-store Clear password keystore + + +.. option:: --debug + + Turn on debug mode / logging. + +.. option:: --trace + + Turn on trace logging. Implies --debug. + +.. option:: --log LOG + + Log file destination. Defaults to stdout only. + +.. option:: --username USERNAME + + Username. + +.. option:: --password PASSWORD + + Password. + +.. option:: --clear-store + + Clear password keystore. + +Using & Managing Your Keystore +============================== + +The Apache Panopticon command-line scripts all allow for the use of local +keystore so that the user does not have to constantly enter in the username +and password. + +Understandably, some users may want to never store their usernames and +passwords to the local keystore. To disable the use of the keystore simply set +the environmental variable ``PANOPTICON_DISABLE_KEYSTORE``. + +.. envvar:: PANOPTICON_DISABLE_KEYSTORE + + If set, the Apache Panopticon command-line scripts will not store the user's + username and password to the local keystore. Added: labs/panopticon/docs/source/reference/commands/index.en.rst URL: http://svn.apache.org/viewvc/labs/panopticon/docs/source/reference/commands/index.en.rst?rev=1566478&view=auto ============================================================================== --- labs/panopticon/docs/source/reference/commands/index.en.rst (added) +++ labs/panopticon/docs/source/reference/commands/index.en.rst Mon Feb 10 00:23:28 2014 @@ -0,0 +1,25 @@ +.. Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +Command Reference +================= + +.. toctree:: + :maxdepth: 1 + + moderator.en + common_arguments.en Added: labs/panopticon/docs/source/reference/commands/moderator.en.rst URL: http://svn.apache.org/viewvc/labs/panopticon/docs/source/reference/commands/moderator.en.rst?rev=1566478&view=auto ============================================================================== --- labs/panopticon/docs/source/reference/commands/moderator.en.rst (added) +++ labs/panopticon/docs/source/reference/commands/moderator.en.rst Mon Feb 10 00:23:28 2014 @@ -0,0 +1,127 @@ +.. Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +============= +``moderator`` +============= + +Synopsis +======== + +A mailing list moderator tool used to manage mailing lists from the command line:: + + + usage: moderator [-h] [--debug] [--trace] [--log LOG] [--username USERNAME] + [--password PASSWORD] [--clear-store] + {list,add,lookup,remove} ... + + Mailing list moderator tool used to manage mailing lists from the command line. + + positional arguments: + {list,add,lookup,remove} + + optional arguments: + -h, --help show this help message and exit + --debug Turn on debug mode / logging. + --trace Turn on trace logging. Implies --debug. + --log LOG Log file destination. Defaults to stdout only. + --username USERNAME Username + --password PASSWORD Password + --clear-store Clear password keystore + +Description +=========== + +:program:`moderator` is used to manage mailing lists from the command line. + +The sub-commands for :program:`moderator` are: + +``list`` +======== + +List the available ASF mailing lists. This is restricted to public mailing +lists unless the user happens to be an ASF member, in which case private +mailing lists are included. If the user happens to be an ASF committer then +the set of private mailing lists for those projects to which the committer +belongs are also included. + +.. option:: mailing_list + +An optional mailing list. When this is supplied then members of that mailing +list email addresses are are listed. Moderators are marked with an asterisk +at the end of their email address. This option is only available for ASF +members or users who happen to be moderators of that mailing list. + +``lookup`` +========== + +Lookup information of an ASF committer. The ``lookup`` subcommand lists the +following information: + +* whether the person looked up is an ASF member +* email aliases register to the person +* projects that the person belongs to +* incubator podlings that the person may be mentoring +* PMCs that the person may be a member of. If that person is a chair of that PMC then that PMC will marked with an asterisk at the end + +The list of a person's email aliases are withheld if the user is not an ASF +member or is not the same person as the user. + +.. option:: email_alias + +The email alias to lookup. + +``add`` +======= + +Add an email address to a specific mailing list. Only mailing list moderators +can add an email address to their own mailing list. ASF members can add an +email address to any mailing list. + +.. option:: mailing_list + +The mailing list to add the email address to. + +.. option:: email_address + +The email address to add. + +``remove`` +========== + +Remove an email address from a specific mailing list. Only mailing list +moderators can remove an email address from their own mailing list. ASF +members can remove an email address from any mailing list. + +.. option:: mailing_list + +The mailing list to remove the email address from. + +.. option:: email_address + +The email address to remove. + +Examples +======== + +Manage the mailing list for ``d...@httpd.apache.org``:: + + $ moderator lookup presid...@whitehouse.gov + $ moderator list d...@httpd.apache.org + $ moderator add d...@httpd.apache.org presid...@whitehouse.gov + $ moderator remove d...@httpd.apache.org jschae...@apache.org + --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@labs.apache.org For additional commands, e-mail: commits-h...@labs.apache.org