1. 07 Oct, 2016 1 commit
  2. 30 Sep, 2016 1 commit
  3. 27 Sep, 2016 1 commit
  4. 10 Jul, 2016 2 commits
    • David Johnson's avatar
      Many interrelated changes: exceptions, caching, managers. · 84a24fbf
      David Johnson authored
        * Move exceptions into common file.  Ok, this isn't interrelated, but
          it became so, sorry.
      
        * Move ensure_slice, ensure_sliver into core ElasticSliceManager
          "abstract" interface, from SimpleElasticSliceManager; refactor them
          to split out create_slice and create_sliver as separate methods; and
          expose all these things via ApplicableMethod.
      
        * Add a new interpretation of the cache-relevant force=(True|False)
          parameter: now if that value is an integer, take that as a max_age
          when querying the cache.  So now the caller can prevent the cache
          from returning non-expired values if the value is older than a
          caller-specified max age.
      
        * Improve _cache_add to use synchronous ctime/xtime if relevant.
      
        * Add ctime to CacheNotifier (.added).
      
        * Add get_sliver_credential().
      
        * Expose the manager should_add_nodes/add_nodes/delete_nodes methods
          via ApplicableMethod.
      
        * Change the manager.*add_nodes* methods to accept an additional
          count=N parameter.  If 0, should_add_nodes will make an estimate of
          how many nodes to add them, and add them.  If nonzero, it will see
          if it should add that number of nodes, and do so if allowed.  This
          allows, for instance, a CLI invocation to force multiple nodes to be
          added if possible, even if by default the manager would only add one
          at a time.
      
        * Add a force= param to ProtoGeniServer.get_wrapped_manifest().
      84a24fbf
    • David Johnson's avatar
      Sort the applicable methods. · 2cfe3e9c
      David Johnson authored
      2cfe3e9c
  5. 08 Jul, 2016 5 commits
  6. 07 Jul, 2016 3 commits
    • David Johnson's avatar
      Fix text-mode printing of lists. · f7052b17
      David Johnson authored
      f7052b17
    • David Johnson's avatar
      Add a custom formatter for get_resources (GetResources). · a188a151
      David Johnson authored
      i.e., to get the list of exclusive, available d430s, as plaintext,
      
        $ ./client.py get_resources -a -e -n d430 -l
      a188a151
    • David Johnson's avatar
      Significant improvements to Applicable*. · bf4ab421
      David Johnson authored
      Now we try to harvest as much info as possible from the function
      metadata (i.e. args, kwargs, default values) and function
      docstrings, assuming that the markup is sphinxy python (i.e.,
      :param foo: help for foo).  This saves a ton of redundant typing in the
      decorators.  The ApplicableMethod decorator can be told *not* to auto-
      populate from the metadata and docstrings, *or* it can be told to
      exclude certain function parameters from promotion to argparse
      parameters.
      
      Also, drink our own koolaid by creating ApplicableFormatters,
      so we can have custom formatters per-function, that each have their
      own arguments.  To reuse all this argparse automation code, they have to
      be decorators on the formatter function.
      bf4ab421
  7. 06 Jul, 2016 2 commits
  8. 29 Jun, 2016 2 commits
    • David Johnson's avatar
      Forgot new file in 23ee438, sigh · b6fb2f0d
      David Johnson authored
      b6fb2f0d
    • David Johnson's avatar
      Add a single-command mode for the client. · 19476ddb
      David Johnson authored
      This is based on a decorator class, ApplicableMethod, that exposes
      methods on objects to direct invocation from the command line.
      
      It uses argparse + subcommands (+ a default subcommand of 'interactive'
      to preserve old behavior).
      
      The decorator class methods create argparse subparsers based on
      the decorator args for each decorated function.  Kinda cool.  Didn't
      end up working as slick as I would have liked, due to decorator
      limitations.  But still, useful... and eliminates tons of boilerplate.
      19476ddb
  9. 13 Jun, 2016 2 commits
  10. 08 Jun, 2016 2 commits
    • David Johnson's avatar
      Fix self-inflicted config bogon. · 51163e44
      David Johnson authored
      51163e44
    • David Johnson's avatar
      Pythonize the whole library so that PYTHONPATH and module paths are sane. · 6501cf07
      David Johnson authored
      There are a couple bugfixes in here -- there was a bad call to
      super().__init__ that passed self as the first arg.  I also removed the
      config file manager_class and helper_class defaults.
      
      Also updates the slurm module and adds important notes about subclassing
      both an existing helper and manager inside of a single class... method
      resolution order is important!  See the slurm module, or the new docs
      for SimpleElasticSliceManager for that.
      6501cf07