1. 18 12月, 2015 8 次提交
    • C
      Avocado App: use extension name to dispatch command line action · c7d71baa
      Cleber Rosa 提交于
      The Avocado command line application has "subcommands". So far,
      to execute these commands, a special method, named "dispatch"
      was set on the command line parser result object (aka Namespace)
      pointing to the `run` method of the same class.
      
      In truthfullness, the command line parser doesn't have too much
      to do with these methods. Also, the `set_defaults` method of the
      command line argument parser is not exactly intended for that use.
      So, let's ask the subcommands subparser to formally save the chosen
      subcommand, at well, `subcommand`, and nothing more.
      
      Since the application knows about the command plugins (the ones that
      inherit from CLICmdBase), and their interface now *require* a method
      called `run`, let's use the extension entry-point name to locate the
      underlying object and its `run` method.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      c7d71baa
    • C
      New Plugin Architecture: introduce command extensions dispatcher · 5fc33362
      Cleber Rosa 提交于
      The `CLICmdDispatcher` is responsible for loading and configuring all
      plugins based on `CLICmdBase`. After registering the entry point to
      the documented namespace (avocado.plugins.cli.cmd) the new command
      should be visible just by running `$ avocado` or `$ avocado --help`.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      5fc33362
    • C
      e76af8fc
    • C
      New Plugin Architecture: introduce CLICmd · ff1238d5
      Cleber Rosa 提交于
      The CLICmd, is a base class for plugins that want to add commands
      to the Avocado command line application. These commands should be
      given by a user right after the command line application itself, as
      it's common practice in most CLI tools.
      
      This class has minimal functionality (some in the configure method),
      and its main goal is to define the interface that plugin developers
      should follow.
      
      The only mandatory steps for "CLICmd" plugins are a name, and the
      `run` method. `configure` will, by default register the command
      with Avocado command line parser.
      
      By doing just that, the new command is visible on the Avocado command
      line application. So, if a plugin named "foo" would introduce a
      command with the same name (ideally, for consistency) it would be
      called with:
      
       $ avocado foo
      
      And it's help message would be visible with:
      
       $ avocado foo --help
      
      Other command line options to a given introduced command can be added
      by writing a custom `configure` method.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      ff1238d5
    • C
      New Plugin Architecture: add avocado.plugins namespace · 5cbe1550
      Cleber Rosa 提交于
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      5cbe1550
    • C
      Old Plugin Architecture: disable legacy plugin manager completely · a0d4cd77
      Cleber Rosa 提交于
      At this point, no plugin support exists in Avocado. This is in
      preparation for the new plugin code to be cleanly introduced.
      
      The plugins that play a role in the plugin architecture have
      been removed, since they wouldn't be functional under the new
      plugin management code. The ones that are add extra functionality
      to Avocado have been kept, and will be ported to the new
      architecture.
      
      Also, most of the functional tests have been temporarily disabled.
      The reason is that most of them run avocado, which depends on the
      run command, which in turn, depends on the plugin archicture code.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      a0d4cd77
    • C
      Travis CI: enable setuptools entry points · 5b643bd1
      Cleber Rosa 提交于
      The new plugin architecture depends on setuptools entry points being
      properly registered. These entry points are defined in a `setup.py`
      file, as the `entrypoints` parameter, but they are only effective when
      they become an `entry_points.txt` file inside a
      `<your_project>.egg_info` directory.
      
      This can happen in two ways:
      
      1) installing the package, that is, running `$ python setup.py
      install`
      
      2) enabling the development mode, that is, running `$ python setup.py
      develop`.
      
      The approach chosen here is the latter, because it's faster, doesn't
      require a full install and points to the checked out source code tree.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      5b643bd1
    • C
      Command line parser: only show the basic usage info by default · 4dd666e3
      Cleber Rosa 提交于
      This shows a more succint version of the help message (the so called
      "usage" information). It's a certainly a matter of taste and change
      of behavior, so this is marked as an RFC.
      
      It also avoids a hackish injection of the print_help method as the
      default dispatch method.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      4dd666e3
  2. 16 12月, 2015 9 次提交
  3. 15 12月, 2015 2 次提交
  4. 12 12月, 2015 1 次提交
  5. 11 12月, 2015 1 次提交
    • C
      Human output: functional test fixes · cb4b6d97
      Cleber Rosa 提交于
      There are a couple of functional unittests that assume that a given
      output was produced by the regular UI, that is, the Human output
      format.
      
      That is fine, since they're functional tests. But, some situations
      lead to test errors, instead of pointing failures. Let's turn those
      into explicit checks and fail properly instead of producing errors.
      
      Note: These errors were visible when the human output was disabled, in
      the plugin overhaul work, but the fixes still make sense independently
      of that work.
      Signed-off-by: NCleber Rosa <crosa@redhat.com>
      cb4b6d97
  6. 10 12月, 2015 2 次提交
  7. 08 12月, 2015 1 次提交
  8. 07 12月, 2015 3 次提交
  9. 05 12月, 2015 3 次提交
  10. 03 12月, 2015 7 次提交
  11. 02 12月, 2015 3 次提交