#### 8.5.4.17 Partition Attribute Host

Logical nodes (or partitions) can be mapped onto physical nodes. The host-name can be either a static or dynamic value. In case of a static value, the expression is a string literal. In case of a dynamic value, the representation clause argument is a function that accepts a string as parameter and that returns a string value. When the function is called, the partition name is passed as parameter and the host-name is returned.

    FUNCTION_DECLARATION ::=
       function FUNCTION_IDENTIFIER
         (PARAMETER_IDENTIFIER : [in] String)
          return String;

    REPRESENTATION_CLAUSE ::=
       for PARTITION_IDENTIFIER'Host use STRING_LITERAL;
     | for PARTITION_IDENTIFIER'Host use FUNCTION_IDENTIFIER;

The signature of the function must be the following : it takes a string parameter which corresponds to a partition name. It returns a string parameter which corresponds to the host-name. The function that returns the host-name can be an Ada function (default) or a shell script. A pragma Import is used to import a function defined in Ada or in Shell (see Pragma Import).

This function is called on the main partition by the PCS to launch a given partition on a given logical node. In case of load balancing, the function can return the most appropriate among a set of hosts.