Skip to content
Snippets Groups Projects
structure.txt 4.41 KiB
Newer Older
############################
# Redis internal structure #
############################

Note (1): for containers like topologies, devices, links, etc. two containers are defined:
list    List is a sorted list containing the uuid's of th elements belonging to the parent element. It is used to
        define the order of the elements and enable to iterate them deterministically.

set     Set is an unordered set containing the uuid's of the elements belonging to the parent element. It is used to
        check existence of elements within the parent in O(1).


Context structure
-----------------
context[<context_uuid>]/lock
    String containing the mutex owner key of that user/process/thread that is currently managing the context.
    Example:
        context[ctx-test]/lock
            dc56647a-9539-446e-9a61-cbc67de328e4

context[<context_uuid>]/topologies_<container>
    Containers (see Note 1) with the topology_uuid's belonging to the context.
    Examples:
        context[ctx-test]/topologies_list
            ['base-topo', 'other-topo']
        context[ctx-test]/topologies_set
            {'base-topo', 'other-topo'}


Topology structure:
-------------------
context[<context_uuid>]/topology[<topology_uuid>]
    Hash set containing the attributes for the topology.
    NOTE: Currently not used.
    Example: <none>

context[<context_uuid>]/topology[<topology_uuid>]/devices_<container>
    Containers (see Note 1) with the device_uuid's belonging to the topology.
    Examples:
        context[ctx-test]/topology[base-topo]/device_list
            ['dev1', 'dev2', 'dev3', 'dev4']
        context[ctx-test]/topology[base-topo]/device_set
            {'dev2', 'dev3', 'dev4', 'dev1'}

context[<context_uuid>]/topology[<topology_uuid>]/links_<container>
    Containers (see Note 1) with the link_uuid's belonging to the topology.
    Examples:
        context[ctx-test]/topology[base-topo]/link_list
            ['dev1/to-dev2 ==> dev2/to-dev1', 'dev1/to-dev3 ==> dev3/to-dev1', 'dev2/to-dev1 ==> dev1/to-dev2', ...]
        context[ctx-test]/topology[base-topo]/link_set
            {'dev2/to-dev1 ==> dev1/to-dev2', 'dev1/to-dev2 ==> dev2/to-dev1', 'dev1/to-dev3 ==> dev3/to-dev1', ...}


Device structure:
-----------------
context[<context_uuid>]/topology[<topology_uuid>]/device[<device_uuid>]
    Hash set containing the attributes for the device.
    Defined attributes are:
        device_type              : string
        device_config            : string
        device_operational_status: string "0"/"1"
    Example: {'device_type': 'ROADM', 'device_config': '<config/>', 'device_operational_status': '1'}

context[<context_uuid>]/topology[<topology_uuid>]/device[<device_uuid>]/endpoints_<container>
    Containers (see Note 1) with the endpoints_uuid's belonging to the device.
    Examples:
        context[ctx-test]/topology[base-topo]/device[dev1]/endpoints_list
            ['to-dev2', 'to-dev3', 'to-dev4']
        context[ctx-test]/topology[base-topo]/device[dev1]/endpoints_set
            {'to-dev3', 'to-dev2', 'to-dev4'}


Device Endpoint structure:
--------------------------
context[<context_uuid>]/topology[<topology_uuid>]/device[<device_uuid>]/endpoint[<endpoint_uuid>]
    Hash set containing the attributes for the endpoint.
    Defined attributes are:
        port_type: string
    Example: {'port_type': 'WDM'}


Link structure:
---------------
context[<context_uuid>]/topology[<topology_uuid>]/link[<link_uuid>]
    Hash set containing the attributes for the link.
    NOTE: Currently not used.
    Example: <none>

context[<context_uuid>]/topology[<topology_uuid>]/link[<link_uuid>]/endpoints_<container>
    Containers (see Note 1) with the link_endpoint_uuid's belonging to the link.
    Examples:
        context[ctx-test]/topology[base-topo]/link[dev2/to-dev1 ==> dev1/to-dev2]/endpoints_list
            ['dev2/to-dev1', 'dev1/to-dev2']
        context[ctx-test]/topology[base-topo]/link[dev2/to-dev1 ==> dev1/to-dev2]/endpoints_set
            {'dev2/to-dev1', 'dev1/to-dev2'}


Link Endpoint structure:
------------------------
context[<context_uuid>]/topology[<topology_uuid>]/link[<link_uuid>]/endpoint[<link_endpoint_uuid>]
    Hash set containing the attributes for the link_endpoint.
    Defined attributes are:
        device_uuid: string
        endpoint_uuid: string
    Example:
        context[ctx-test]/topology[base-topo]/link[dev1/to-dev2 ==> dev2/to-dev1]/endpointdev1/to-dev2
            {'device_uuid': 'dev1', 'endpoint_uuid': 'to-dev2'}