Package osh :: Module builtins
[frames] | no frames]

Module builtins

source code

This module contains miscellaneous functions builtin to osh. See also the osh.process module for other builtins.

Functions
 
ifelse(predicate, if_true, if_false)
Returns if_true if predicate is true, if_false otherwise.
source code
 
hosts(cluster_name)
Returns the value of cluster_name's hosts configuration value, as specified in .oshrc.
source code
Function Details

ifelse(predicate, if_true, if_false)

source code 

Returns if_true if predicate is true, if_false otherwise. Both if_true and if_false are evaluated unconditionally. (This function is provided because the Python equivalent, the if expression, is not present prior to release 2.5.)

hosts(cluster_name)

source code 

Returns the value of cluster_name's hosts configuration value, as specified in .oshrc. Returns a map containing entries in which the key is the node's name, and the value is the node's IP address or DNS name.