original_docstring: Return top level command handler.
docstring: Return top level command handler.
docstring_tokens: Return top level command handler .
code: def init():
      """Return top level command handler."""
  
      cell_formatter = cli.make_formatter('cell')
  
      @click.group(name='cell')
      @click.option('--api-service-principal', required=False,
                    envvar='TREADMILL_API_SERVICE_PRINCIPAL',
                    callback=cli.handle_context_opt,
                    help='API service principal for SPNEGO auth (default HTTP)',
                    expose_value=False)
      def cell_grp():
          """List & display Treadmill cells."""
  
      @cell_grp.command(name='list')
      @cli.handle_exceptions(restclient.CLI_REST_EXCEPTIONS)
      def _list():
          """List the configured cells."""
          restapi = context.GLOBAL.admin_api()
          cli.out(cell_formatter(restclient.get(restapi, '/cell/').json()))
  
      @cell_grp.command()
      @click.argument('name')
      @cli.handle_exceptions(restclient.CLI_REST_EXCEPTIONS)
      def configure(name):
          """Display the details of a cell."""
          restapi = context.GLOBAL.admin_api()
          cli.out(cell_formatter(restclient.get(restapi,
                                                '/cell/%s' % name).json()))
  
      del _list
      del configure
  
      return cell_grp
code_tokens: def init ( ) : cell_formatter = cli . make_formatter ( 'cell' ) @ click . group ( name = 'cell' ) @ click . option ( '--api-service-principal' , required = False , envvar = 'TREADMILL_API_SERVICE_PRINCIPAL' , callback = cli . handle_context_opt , help = 'API service principal for SPNEGO auth (default HTTP)' , expose_value = False ) def cell_grp ( ) : """List & display Treadmill cells.""" @ cell_grp . command ( name = 'list' ) @ cli . handle_exceptions ( restclient . CLI_REST_EXCEPTIONS ) def _list ( ) : """List the configured cells.""" restapi = context . GLOBAL . admin_api ( ) cli . out ( cell_formatter ( restclient . get ( restapi , '/cell/' ) . json ( ) ) ) @ cell_grp . command ( ) @ click . argument ( 'name' ) @ cli . handle_exceptions ( restclient . CLI_REST_EXCEPTIONS ) def configure ( name ) : """Display the details of a cell.""" restapi = context . GLOBAL . admin_api ( ) cli . out ( cell_formatter ( restclient . get ( restapi , '/cell/%s' % name ) . json ( ) ) ) del _list del configure return cell_grp
short_docstring: Return top level command handler.
short_docstring_tokens: Return top level command handler .
comment: """Return top level command handler."""$SEP$"""List & display Treadmill cells."""$SEP$"""List the configured cells."""$SEP$"""Display the details of a cell."""