def server_exists(s_name, ip=None, s_state=None, **connection_args):
 server = _server_get(s_name, **connection_args)
 if (server is None):
  return False
 if ((ip is not None) and (ip != server.get_ipaddress())):
  return False
 if ((s_state is not None) and (s_state.upper() != server.get_state())):
  return False
 return True

def server_exists ( s_name , ip = None , s_state = None , ** connection_args ) : server = _server_get ( s_name , ** connection_args ) if ( server is None ) : return False if ( ( ip is not None ) and ( ip != server . get_ipaddress ( ) ) ) : return False if ( ( s_state is not None ) and ( s_state . upper ( ) != server . get_state ( ) ) ) : return False return True
checks if a server exists cli example: .