def refresh_hosts(): """ Send reload message to the Server Args: Return: - boolean indicates whether the operation was successful or not """ result = True conn = IDMConnection(port=40001) if conn.connect(): conn.reload_hosts() conn.close() else: api_log.error('Cannot send host refresh to server') result = False return result