lfcli_base.py init may now be passed a copy of local_realm in constructor

This commit is contained in:
Jed Reynolds
2020-10-22 22:03:04 -07:00
parent 7d3338050e
commit ba66e2cdd8

View File

@@ -1,5 +1,6 @@
#!env /usr/bin/python #!env /usr/bin/python
import sys
import traceback import traceback
# Extend this class to use common set of debug and request features for your script # Extend this class to use common set of debug and request features for your script
from pprint import pprint from pprint import pprint
@@ -17,12 +18,15 @@ class LFCliBase:
_debug=False, _debug=False,
_halt_on_error=False, _halt_on_error=False,
_exit_on_error=False, _exit_on_error=False,
_exit_on_fail=False): _exit_on_fail=False,
_local_realm=False):
self.fail_pref = "FAILED: " self.fail_pref = "FAILED: "
self.pass_pref = "PASSED: " self.pass_pref = "PASSED: "
self.lfclient_host = _lfjson_host self.lfclient_host = _lfjson_host
self.lfclient_port = _lfjson_port self.lfclient_port = _lfjson_port
self.debug = _debug self.debug = _debug
if (_local_realm is not False):
self.local_realm = _local_realm;
self.lfclient_url = "http://%s:%s" % (self.lfclient_host, self.lfclient_port) self.lfclient_url = "http://%s:%s" % (self.lfclient_host, self.lfclient_port)
self.test_results = [] self.test_results = []