Newer
Older

Lluis Gifre Renom
committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
############################
# 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'}