099cf98 Refactor ipautil.run

28 files Authored by pviktori 8 years ago, Committed by jcholast 8 years ago,
28 files changed. 476 lines added. 245 lines removed.
install/certmonger/dogtag-ipa-ca-renew-agent-submit
file modified
+11 -3
install/certmonger/ipa-server-guard
file modified
+11 -5
install/oddjob/com.redhat.idm.trust-fetch-domains
file modified
+2 -3
install/tools/ipa-replica-conncheck
file modified
+19 -16
ipa-client/ipa-install/ipa-client-install
file modified
+25 -18
ipalib/plugins/pwpolicy.py
file modified
+3 -3
ipaplatform/base/services.py
file modified
+20 -21
ipaplatform/redhat/services.py
file modified
+2 -2
ipaplatform/redhat/tasks.py
file modified
+5 -2
ipapython/certdb.py
file modified
+17 -13
ipapython/dnssec/bindmgr.py
file modified
+4 -3
ipapython/dnssec/odsmgr.py
file modified
+2 -1
ipapython/ipautil.py
file modified
+119 -25
ipapython/kernel_keyring.py
file modified
+37 -21
ipaserver/dcerpc.py
file modified
+6 -10
ipaserver/install/cainstance.py
file modified
+31 -21
ipaserver/install/certs.py
file modified
+10 -7
ipaserver/install/httpinstance.py
file modified
+8 -1
ipaserver/install/ipa_backup.py
file modified
+30 -25
ipaserver/install/ipa_restore.py
file modified
+20 -18
ipaserver/install/krbinstance.py
file modified
+4 -3
ipaserver/install/opendnssecinstance.py
file modified
+4 -3
ipaserver/install/replication.py
file modified
+2 -2
ipaserver/install/server/install.py
file modified
+6 -7
ipatests/test_cmdline/test_ipagetkeytab.py
file modified
+7 -3
ipatests/test_ipapython/test_ipautil.py
file modified
+61 -0
ipatests/test_ipapython/test_keyring.py
file modified
+9 -8
ipatests/test_xmlrpc/test_host_plugin.py
file modified
+1 -1
    Refactor ipautil.run
    
    The ipautil.run function now returns an object with returncode and
    output are accessible as attributes.
    
    The stdout and stderr of all commands are logged (unless skip_output is given).
    
    The stdout/stderr contents must be explicitly requested with a keyword
    argument, otherwise they are None.
    This is because in Python 3, the output needs to be decoded, and that can
    fail if it's not decodable (human-readable) text.
    
    The raw (bytes) output is always available from the result object,
    as is "leniently" decoded output suitable for logging.
    
    All calls are changed to reflect this.
    
    A use of Popen in cainstance is changed to ipautil.run.
    
    Reviewed-By: Jan Cholasta <jcholast@redhat.com>
    
        
file modified
+3 -3
file modified
+20 -21
file modified
+5 -2
file modified
+17 -13
file modified
+4 -3
file modified
+2 -1
file modified
+119 -25
file modified
+37 -21
file modified
+6 -10
file modified
+31 -21
file modified
+10 -7
file modified
+30 -25