Skip to content

Commit 6528530

Browse files
committed
Update migrations to reflect generator enhancements
Updated existing migrations with fixes from workfloworchestrator/orchestrator-core#674
1 parent 7b56a38 commit 6528530

5 files changed

+45
-57
lines changed

migrations/versions/schema/2023-10-27_a84ca2e5e4db_add_node.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@
3131
"description": "Network node",
3232
"tag": "NODE",
3333
"status": "active",
34-
"product_blocks": [
35-
"Node",
36-
],
34+
"root_product_block": "Node",
3735
"fixed_inputs": {
3836
"node_type": "Cisco",
3937
},
@@ -44,9 +42,7 @@
4442
"description": "Network node",
4543
"tag": "NODE",
4644
"status": "active",
47-
"product_blocks": [
48-
"Node",
49-
],
45+
"root_product_block": "Node",
5046
"fixed_inputs": {
5147
"node_type": "Nokia",
5248
},

migrations/versions/schema/2023-11-02_c044b0da4126_add_port.py

+5-8
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@
3333
"description": "Network port",
3434
"tag": "PORT",
3535
"status": "active",
36-
"product_blocks": [
37-
"Port",
38-
],
36+
"root_product_block": "Port",
3937
"fixed_inputs": {
4038
"speed": PortSpeed._10000.value,
4139
},
@@ -46,9 +44,7 @@
4644
"description": "Network port",
4745
"tag": "PORT",
4846
"status": "active",
49-
"product_blocks": [
50-
"Port",
51-
],
47+
"root_product_block": "Port",
5248
"fixed_inputs": {
5349
"speed": PortSpeed._100000.value,
5450
},
@@ -68,11 +64,12 @@
6864
"auto_negotiation": "is Ethernet auto negotiation enabled or not",
6965
"lldp": "is Link Llayer Discovery Protocol enabled or not",
7066
"enabled": "is port enabled in inventory management system?",
71-
"node": "link to the Node product block the port is residing on",
7267
"ims_id": "ID of the node in the inventory management system",
7368
"nrm_id": "ID of the node in the network resource manager",
7469
},
75-
"depends_on_block_relations": [],
70+
"depends_on_block_relations": [
71+
"Node",
72+
],
7673
},
7774
},
7875
"workflows": {},

migrations/versions/schema/2023-11-16_1faddadd7aae_add_core_link.py

+20-24
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@
3333
"description": "Core link",
3434
"tag": "CORE_LINK",
3535
"status": "active",
36-
"product_blocks": [
37-
"CoreLink",
38-
"CorePort",
39-
],
36+
"root_product_block": "CoreLink",
4037
"fixed_inputs": {
4138
"speed": CoreLinkSpeed._10000.value,
4239
},
@@ -47,30 +44,13 @@
4744
"description": "Core link",
4845
"tag": "CORE_LINK",
4946
"status": "active",
50-
"product_blocks": [
51-
"CoreLink",
52-
"CorePort",
53-
],
47+
"root_product_block": "CoreLink",
5448
"fixed_inputs": {
5549
"speed": CoreLinkSpeed._100000.value,
5650
},
5751
},
5852
},
5953
"product_blocks": {
60-
"CoreLink": {
61-
"product_block_id": uuid4(),
62-
"description": "core link product block",
63-
"tag": "CORE_LINK",
64-
"status": "active",
65-
"resources": {
66-
"ports": "core ports",
67-
"ims_id": "ID of the core link in the inventory management system",
68-
"ipv6_prefix_ipam_id": "IPAM ID of IP prefix used to number ports of this core link",
69-
"nrm_id": "ID of the core link in the network resource manager",
70-
"under_maintenance": "core link under maintenance?",
71-
},
72-
"depends_on_block_relations": [],
73-
},
7454
"CorePort": {
7555
"product_block_id": uuid4(),
7656
"description": "core port product block",
@@ -81,10 +61,26 @@
8161
"enabled": "is port enabled in inventory management system?",
8262
"ims_id": "ID of the port in the inventory management system",
8363
"nrm_id": "ID of the port in the network resource manager",
84-
"node": "link to the Node product block the port is residing on",
8564
"ipv6_ipam_id": "ID of the port's IPv6 address in IPAM",
8665
},
87-
"depends_on_block_relations": [],
66+
"depends_on_block_relations": [
67+
"Node",
68+
],
69+
},
70+
"CoreLink": {
71+
"product_block_id": uuid4(),
72+
"description": "core link product block",
73+
"tag": "CORE_LINK",
74+
"status": "active",
75+
"resources": {
76+
"ims_id": "ID of the core link in the inventory management system",
77+
"ipv6_prefix_ipam_id": "IPAM ID of IP prefix used to number ports of this core link",
78+
"nrm_id": "ID of the core link in the network resource manager",
79+
"under_maintenance": "core link under maintenance?",
80+
},
81+
"depends_on_block_relations": [
82+
"CorePort",
83+
],
8884
},
8985
},
9086
"workflows": {},

migrations/versions/schema/2023-11-17_e2a0fed2a4c7_add_l2vpn.py

+17-18
Original file line numberDiff line numberDiff line change
@@ -31,39 +31,38 @@
3131
"description": "L2VPN",
3232
"tag": "L2VPN",
3333
"status": "active",
34-
"product_blocks": [
35-
"VirtualCircuit",
36-
"SAP",
37-
],
34+
"root_product_block": "VirtualCircuit",
3835
"fixed_inputs": {},
3936
},
4037
},
4138
"product_blocks": {
39+
"SAP": {
40+
"product_block_id": uuid4(),
41+
"description": "service access point",
42+
"tag": "SAP",
43+
"status": "active",
44+
"resources": {
45+
"vlan": "VLAN ID on port",
46+
"ims_id": "ID of the SAP in the inventory management system",
47+
},
48+
"depends_on_block_relations": [
49+
"Port",
50+
],
51+
},
4252
"VirtualCircuit": {
4353
"product_block_id": uuid4(),
4454
"description": "virtual circuit product block",
4555
"tag": "VC",
4656
"status": "active",
4757
"resources": {
48-
"saps": "Virtual circuit service access points",
4958
"speed": "speed of the L2VPN im Mbit/s",
5059
"speed_policer": "speed policer active?",
5160
"ims_id": "ID of the L2VPN in the inventory management system",
5261
"nrm_id": "ID of the L2VPN in the network resource manager",
5362
},
54-
"depends_on_block_relations": [],
55-
},
56-
"SAP": {
57-
"product_block_id": uuid4(),
58-
"description": "service access point",
59-
"tag": "SAP",
60-
"status": "active",
61-
"resources": {
62-
"port": "Link to Port product block",
63-
"vlan": "VLAN ID on port",
64-
"ims_id": "ID of the SAP in the inventory management system",
65-
},
66-
"depends_on_block_relations": [],
63+
"depends_on_block_relations": [
64+
"SAP",
65+
],
6766
},
6867
},
6968
"workflows": {},

templates/node.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# limitations under the License.
1313
#
1414
#
15-
# This file describes the "Port" product
15+
# This file describes the "Node" product
1616
#
1717
config:
1818
summary_forms: true

0 commit comments

Comments
 (0)