def get_hostname(ip_addr, cl_args):
if is_self(ip_addr):<EOL><INDENT>return get_self_hostname()<EOL><DEDENT>cmd = "<STR_LIT>"<EOL>ssh_cmd = ssh_remote_execute(cmd, ip_addr, cl_args)<EOL>pid = subprocess.Popen(ssh_cmd,<EOL>shell=True,<EOL>stdout=subprocess.PIPE,<EOL>stderr=subprocess.PIPE)<EOL>return_code = pid.wait()<EOL>output = pid.communicate()<EOL>if return_code != <NUM_LIT:0>:<EOL><INDENT>Log.error("<STR_LIT>" % (ip_addr, output))<EOL>sys.exit(-<NUM_LIT:1>)<EOL><DEDENT>return output[<NUM_LIT:0>].strip("<STR_LIT:\n>")<EOL>
get host name of remote host