A decorator, that when placed on a class will turn it to a nav tree extension.

Takes the original class and “compiles” it into the nav tree in form of lists/dicts that ui_navigate takes.

The classes in the structure are not instantiated during the scavenge process, they serve as a sort of static container of namespaced functions.


class infra_vms(object):   # This will extend the node infra_vms
    class node_a(object):  # with node a
        def navigate(_):   # that can be reached this way from preceeding one

        def leaf_location(ctx):  # Leaf location, no other child locations

        class node_x(object):  # Or an another location that can contain locations
            def navigate(_):
Parameters:cls – Class to be decorated.[source]

Returns text of the currently selected top level menu item., secondlevel=None)[source], secondlevel=None, reset_action=None)[source], secondlevel_path=None)[source]

Reverse lookup for navigation destinations defined in this module, based on menu text


# Returns 'clouds'

# Returns 'clouds_providers'
reverse_lookup('Clouds', 'Providers')

# Returns 'automate_import_export'
reverse_lookup('Automate', 'Import / Export')


It may be tempting to use this when you don’t know the name of a page, e.g.:

go_to(reverse_lookup(‘Infrastructure’, ‘Providers’))

Don’t do that; use the nav tree name.[source]

Return a list of all the menu pages currently visible top- and second-level pages

Mainly useful for RBAC testing[source]