Skip to content

Commit 70b3609

Browse files
saiarcot895pull[bot]
authored andcommitted
Update sonic-config-engine tests for Bookworm
Update test_cfggen_from_yang.py and test_yang_data.json to the current config_db format, and allow tests for sonic-config-engine to run for Bookworm. Also update pyangbind to 0.8.2 for Bookworm to fix an issue with some classes being moved into a different package. Signed-off-by: Saikrishna Arcot <[email protected]>
1 parent 900c89f commit 70b3609

File tree

3 files changed

+6
-14
lines changed

3 files changed

+6
-14
lines changed

src/sonic-config-engine/setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
if sys.version_info.major == 3:
2121
# Python 3-only dependencies
2222
dependencies += [
23-
# pyangbind v0.8.1 pull down enum43 which causes 're' package to malfunction.
23+
# pyangbind v0.8.2 pull down enum43 which causes 're' package to malfunction.
2424
# Python3 has enum module and so pyangbind should be installed outside
2525
# dependencies section of setuptools followed by uninstall of enum43
26-
# 'pyangbind==0.8.1',
26+
# 'pyangbind==0.8.2',
2727
'Jinja2>=2.10',
2828
'pyyaml==6.0.1',
2929
]

src/sonic-config-engine/tests/test_cfggen_from_yang.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,10 @@ def test_portchannel_table(self):
104104
assert(output == \
105105
{'PortChannel1001': {'admin_status': 'up',
106106
'lacp_key': 'auto',
107-
'members': ['Ethernet0', 'Ethernet4'],
108107
'min_links': '1',
109108
'mtu': '9100'},
110109
'PortChannel1002': {'admin_status': 'up',
111110
'lacp_key': 'auto',
112-
'members': ['Ethernet16', 'Ethernet20'],
113111
'min_links': '1',
114112
'mtu': '9100'}})
115113

@@ -194,7 +192,8 @@ def test_acl_rule(self):
194192
"EVERFLOW|Rule2": {
195193
"DST_IP": "192.169.10.1/32",
196194
"SRC_IP": "10.10.1.1/16",
197-
"IP_TYPE": "IPV4"
195+
"IP_TYPE": "IPV4",
196+
"PRIORITY": "101"
198197
}
199198
})
200199

src/sonic-config-engine/tests/test_yang_data.json

+2-9
Original file line numberDiff line numberDiff line change
@@ -98,21 +98,13 @@
9898
"PORTCHANNEL_LIST": [
9999
{
100100
"admin_status": "up",
101-
"members": [
102-
"Ethernet0",
103-
"Ethernet4"
104-
],
105101
"min_links": "1",
106102
"mtu": "9100",
107103
"lacp_key": "auto",
108104
"name": "PortChannel1001"
109105
},
110106
{
111107
"admin_status": "up",
112-
"members": [
113-
"Ethernet16",
114-
"Ethernet20"
115-
],
116108
"min_links": "1",
117109
"mtu": "9100",
118110
"lacp_key": "auto",
@@ -300,7 +292,8 @@
300292
"DST_IP": "192.169.10.1/32",
301293
"SRC_IP": "10.10.1.1/16",
302294
"IP_TYPE": "IPV4",
303-
"RULE_NAME": "Rule2"
295+
"RULE_NAME": "Rule2",
296+
"PRIORITY": 101
304297
}
305298
]
306299
}

0 commit comments

Comments
 (0)