Comment 4 for bug 1489165

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-qa (stable/7.0)

Reviewed: https://review.openstack.org/224499
Committed: https://git.openstack.org/cgit/stackforge/fuel-qa/commit/?id=d27d5627ea821ccd486120d033795d6f0c1ffe1a
Submitter: Jenkins
Branch: stable/7.0

commit d27d5627ea821ccd486120d033795d6f0c1ffe1a
Author: Maksym Strukov <email address hidden>
Date: Wed Aug 26 23:59:36 2015 +0300

    [stable/7.0]Improve 'run_on_remote' for more general use

    Author: Maksym Strukov
    To use method in cases when ec is expected to be not zero and reduce
    duplicated code in asserts messages new parameters in 'run_on_remote'
    method proposed with following logic:
    * 'assert_ec_equal' with default '[0]'. Error message will be logged only
    when exit_code != assert_ec_equal. Can pass xrange(1,8) or [1, 4, 5]
    * 'raise_on_assert' with default 'True'. Exception now can be
    surpressed when exit_code != assert_ec_equal if 'raiseOnAssert' is 'False'

    Also:
    * 'run_on_remote_get_results' return dict with:
      'command',
      'host',
      'stdout',
      'stdout_str',
      'stdout_len',
      'stdout_json', if jsonify=true
      'stderr',
      'stderr_str',
      'stderr_len',
      'exit_code', instead of just stdout string
    * 'run_on_remote' wrapper leaved for compatibility

    Change-Id: I32a9d743929d01857a88844976074df719d9880a
    Closes-Bug: #1489165
    (cherry picked from commit 32b6bc8cea5c595aa92e2c2c825762b53c49e191)