def set_config_map(self, config_map): """Set config for the host""" self.config_map = config_map self.check_config_map() # 'ospl' command instance: self.ospl = OSPL( "%s%sbin%s" % (self.ospl_home, self.get_file_sep(), self.get_file_sep()), self.ospl.get_uri())
def __init__(self, ospl_home="", test_root=".", ospl_uri="", host_name=LOCAL_HOST_NAME, staf_port=STAF_DEFAULT_PORT): """Constructs a host. Required are: 1) The root at which the test framework can be found. 2) The value of OSPL_HOME that is to be tested. 3) The OSPL URI value. 4) The/A DNS name of the host. 5) The location of the STAF daemon if not at the default port. """ # The location where the test framework can be found: self.test_root = test_root # The OSPL_HOME of the host to be tested: self.ospl_home = ospl_home # The host name: self.host_name = host_name # The port of the host STAF: self.staf_port = staf_port # Host system environment: self.host_env = [] # List of the processes of the host: self.process_list = [] # Config map for the host - contain system dependent issues: self.config_map = Host.default_config_map # 'ospl' command instance: self.ospl = OSPL( "%s%sbin%s" % (self.ospl_home, self.get_file_sep(), self.get_file_sep()), ospl_uri) # Check if host name is valid: self.check_host_name() # Check if STAF port is valid: self.check_staf_port() # Host log dir: self.log_dir = "" # Host release script name: self.release_script_name = "release" # Host release script ext: self.release_script_ext = "" # The host role: self.role = ""