Hierarchy Functions
-------------------



.. index:: Macro function;fn.hierarchy

* *fn.hierarchy*: Return the UUID of the current node.         

.. index:: Macro function;fn.hierarchy_parent

* *fn.hierarchy_parent*: Return the UUID of the parent.               

.. index:: Macro function;fn.hierarchy_path

* *fn.hierarchy_path*: Return the current node hierarchy as a       
  list of UUIDs.                               

.. index:: Macro function;fn.hierarchy_parent_path

* *fn.hierarchy_parent_path*:  Return the current node parent hierarchy     
  as a list of UUIDs.                          

.. index:: Macro function;fn.hierarchy_friendly_path

* *fn.hierarchy_friendly_path*: Return the current node hierarchy as a       
  dot-separated hierarchy string.              

.. index:: Macro function;fn.hierarchy_friendly_parent_path

* *fn.hierarchy_friendly_parent_path*: Return the current node parent hierarchy     
  as a dot-separated hierarchy string.         

.. index:: Macro function;fn.friendly_path_choices

* *fn.friendly_path_choices*: Return a sorted list of friendly hierarchy paths.
  Used with a parameter:

  * ``down``: all hierarchies paths below, including current hierarchy path
  * ``below``: all hierarchies below current hierarchy path, excluding current hierarchy path
  * ``local``: current hierarchy path



.. index:: Macro function;fn.is_site

* *fn.is_site*: Return true or false if run at site context hierarchy or not.


Examples:

.. tabularcolumns:: |p{8cm}|p{7cm}|

+------------------------------------------+-------------------------------------------------+
| Example                                  | Output                                          |
+==========================================+=================================================+
| ::                                       | ::                                              |
|                                          |                                                 |
|    {{fn.hierarchy}}                      |    '52162d552afa433946245bcb'                   |
|                                          |                                                 |
+------------------------------------------+-------------------------------------------------+
| ::                                       | ::                                              |
|                                          |                                                 |
|    {{fn.hierarchy_parent}}               |    '52162d522afa433941245ba0'                   |
|                                          |                                                 |
+------------------------------------------+-------------------------------------------------+
| ::                                       | ::                                              |
|                                          |                                                 |
|    {{fn.hierarchy_path}}                 |    ['1c0efeg2c0deab10da595101',                 |
|                                          |    '52162d4c2afa433940245ba3',                  |
|                                          |    '52162d4e2afa43393b245ba2',                  |
|                                          |    '52162d522afa433941245ba0',                  |
|                                          |    '52162d552afa433946245bcb']                  |
|                                          |                                                 |
+------------------------------------------+-------------------------------------------------+
| ::                                       | ::                                              |
|                                          |                                                 |
|    {{fn.hierarchy_parent_path}}          |    ['1c0efeg2c0deab10da595101',                 |
|                                          |    '52162d4c2afa433940245ba3',                  |
|                                          |    '52162d4e2afa43393b245ba2',                  |
|                                          |    '52162d522afa433941245ba0']                  |
|                                          |                                                 |
+------------------------------------------+-------------------------------------------------+
| ::                                       | ::                                              |
|                                          |                                                 |
|    {{fn.hierarchy_friendly_path}}        |    'sys.GenCorp.SuperCom.ABCGroup.              |
|                                          |     Branch1'                                    |
|                                          |                                                 |
+------------------------------------------+-------------------------------------------------+
| ::                                       | ::                                              |
|                                          |                                                 |
|    {{fn.hierarchy_friendly_parent_path}} |    'sys.GenCorp.SuperCom.ABCGroup'              |
|                                          |                                                 |
+------------------------------------------+-------------------------------------------------+
| Hierarchy =                              |                                                 |
|                                          | ::                                              |
|                                          |                                                 |
|  ``sys.hcs.CS-P.CS-NB.AAAGlobal``        |                                                 |
|                                          |    [                                            |
| ::                                       |      "sys.hcs.CS-P.CS-NB.AAAGlobal",            |
|                                          |      "sys.hcs.CS-P.CS-NB.AAAGlobal.LOC001",     |
|    {# fn.friendly_path_choices ,down #}  |      "sys.hcs.CS-P.CS-NB.AAAGlobal.LOC002",     |
|                                          |      "sys.hcs.CS-P.CS-NB.AAAGlobal.LOC003",     |
|                                          |      "sys.hcs.CS-P.CS-NB.AAAGlobal.LOC004",     |
|                                          |      "sys.hcs.CS-P.CS-NB.AAAGlobal.LOC005",     |
|                                          |      "sys.hcs.CS-P.CS-NB.AAAGlobal.LOCALIZE001" |
|                                          |    ]                                            |
|                                          |                                                 |
|                                          |                                                 |
+------------------------------------------+-------------------------------------------------+
| Hierarchy =                              |                                                 |
|                                          |                                                 |
|                                          |                                                 |
|  ``sys.hcs.CS-P.CS-NB.AAAGlobal`` (cust) |                                                 |
|                                          |                                                 |
| ::                                       |  ::                                             |
|                                          |                                                 |
|    {{ fn.is_site }}                      |     false                                       |
|                                          |                                                 |
|                                          |                                                 |
+------------------------------------------+-------------------------------------------------+


.. |VOSS-4-UC| replace:: VOSS-4-UC
.. |Unified CM| replace:: Unified CM