Devices can be assigned to regions with the region-add-devices command:
region-add-devices <region-id> <dev1> <dev2> ... <dev-n>
region-add-devices rUK \ of:0000000000000001 \ of:0000000000000002 \ of:0000000000000003
Note that regions do not have any notion of hierarchy; they are simply "collections of devices". The hierarchy is expressed using Layouts.
A Layout is a "UI construct" that has an associated region "backing" it. Layouts can define a specific layout as a parent, to construct a hierarchy.
(Several "levels" of layouts can be defined, even though not illustrated here).
This could be pictured as follows:
Layouts can be added to the model with the layout-add command.
layout-add <layout-id> <bg-ref> <region-id> <parent-layout-id> <scale> <offset-x> <offset-y>
- <layout-id> is a unique identifier for the layout
- <bg-ref> is a reference to the background to display for this layout
- <region-id> is the identifier of the backing region
- <parent-layout-id> is the identifier of the parent layout
- <scale>, <offset-x>, <offset-y> are custom values to define the initial pan/zoom of the background
layout-add root @europe . . 4.66 -2562.93 -412.56 layout-add lUK @europe rUK root 11.63 -6652.54 -938.04 layout-add lIT @europe rIT root 7.15 -4818.73 -1330.36 layout-add lFR @europe rFR root 8.98 -5378.99 -1334.77 layout-add lMilan +segmentRouting rMilan lIT 0.86 68.58 54.71