def add_register_args(parser):
    """Add the register command and arguments.

    :param argparse.Subparser parser: parser

    """
    registerp = parser.add_parser('register', help=
        'Register a service for this node')
    registerp.add_argument('name', help='The service name')
    registerp.add_argument('-a', '--address', default=None, help=
        'Specify an address')
    registerp.add_argument('-p', '--port', default=None, type=int, help=
        'Specify a port')
    registerp.add_argument('-s', '--service-id', default=None, help=
        'Specify a service ID')
    registerp.add_argument('-t', '--tags', default=[], help=
        'Specify a comma delimited list of tags')
    rsparsers = registerp.add_subparsers(dest='ctype', title=
        'Service Check Options')
    check = rsparsers.add_parser('check', help=
        'Define an external script-based check')
    check.add_argument('interval', default=10, type=int, help=
        'How often to run the check script')
    check.add_argument('path', default=None, help=
        'Path to the script invoked by Consul')
    httpcheck = rsparsers.add_parser('httpcheck', help=
        'Define an HTTP-based check')
    httpcheck.add_argument('interval', default=10, type=int, help=
        'How often to run the check script')
    httpcheck.add_argument('url', default=None, help=
        'HTTP URL to be polled by Consul')
    rsparsers.add_parser('no-check', help='Do not enable service monitoring')
    ttl = rsparsers.add_parser('ttl', help='Define a duration based TTL check')
    ttl.add_argument('duration', type=int, default=10, help=
        'TTL duration for a service with missing check data')
