Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/sonic-config-engine/tests/test_minigraph_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ def test_minigraph_acl_type_bmcdata(self):
}
# TC1: Minigraph contains acl table type BmcData
sample_mx_graph = os.path.join(self.test_dir,'simple-sample-graph-mx.xml')
result = minigraph.parse_xml(sample_mx_graph)
result = minigraph.parse_xml(sample_mx_graph, port_config_file=self.port_config)
self.assertIn('ACL_TABLE_TYPE', result)
self.assertIn('BMCDATA', result['ACL_TABLE_TYPE'])
self.assertIn('BMCDATAV6', result['ACL_TABLE_TYPE'])
Expand All @@ -537,7 +537,7 @@ def test_minigraph_acl_type_bmcdata(self):
self.assertDictEqual(result['ACL_TABLE']['BMC_ACL_NORTHBOUND'], expected_acl_table_bmc_acl_northbound)
self.assertDictEqual(result['ACL_TABLE']['BMC_ACL_NORTHBOUND_V6'], expected_acl_table_bmc_acl_northbound_v6)
# TC2: Minigraph doesn't contain acl table type BmcData
result = minigraph.parse_xml(self.sample_graph)
result = minigraph.parse_xml(self.sample_graph, port_config_file=self.port_config)
self.assertNotIn('ACL_TABLE_TYPE', result)

def test_parse_device_desc_xml_mgmt_interface(self):
Expand All @@ -564,7 +564,7 @@ def test_mgmt_device_disable_counters(self):
mgmt_graphs = ['simple-sample-graph-mx.xml', 'simple-sample-graph-m0.xml']
for graph in mgmt_graphs:
graph_path = os.path.join(self.test_dir, graph)
result = minigraph.parse_xml(graph_path)
result = minigraph.parse_xml(graph_path, port_config_file=self.port_config)
self.assertIn('FLEX_COUNTER_TABLE', result)
for counter in expected_mgmt_disabled_counters:
self.assertIn(counter, result['FLEX_COUNTER_TABLE'])
Expand All @@ -573,5 +573,5 @@ def test_mgmt_device_disable_counters(self):
if counter in result['FLEX_COUNTER_TABLE']:
self.assertDictEqual(result['FLEX_COUNTER_TABLE'][counter], {'FLEX_COUNTER_STATUS': 'enable'})
# TC2: For other minigraph, result should not contain FLEX_COUNTER_TABLE
result = minigraph.parse_xml(self.sample_graph)
result = minigraph.parse_xml(self.sample_graph, port_config_file=self.port_config)
self.assertNotIn('FLEX_COUNTER_TABLE', result)