File tree 2 files changed +0
-17
lines changed
2 files changed +0
-17
lines changed Original file line number Diff line number Diff line change @@ -1397,14 +1397,6 @@ def config_file_yang_validation(filename):
1397
1397
if not isinstance (config , dict ):
1398
1398
return False
1399
1399
1400
- # If the device is multi-ASIC, check if all required namespaces exist
1401
- if multi_asic .is_multi_asic ():
1402
- required_namespaces = [HOST_NAMESPACE , * multi_asic .get_namespace_list ()]
1403
- for ns in required_namespaces :
1404
- asic_name = HOST_NAMESPACE if ns == DEFAULT_NAMESPACE else ns
1405
- if asic_name not in config :
1406
- return False
1407
-
1408
1400
sy = sonic_yang .SonicYang (YANG_DIR )
1409
1401
sy .loadYangModel ()
1410
1402
asic_list = [HOST_NAMESPACE ]
Original file line number Diff line number Diff line change @@ -1286,15 +1286,6 @@ def test_config_file_yang_validation(self):
1286
1286
mock_read_json_file .assert_called_once_with ('dummy_file.json' )
1287
1287
mock_load_yang_model .assert_not_called ()
1288
1288
1289
- # Test with missing namespaces in multi-ASIC config
1290
- with mock .patch ('config.main.read_json_file' , return_value = {'localhost' : {}}) as mock_read_json_file :
1291
- with mock .patch ('config.main.multi_asic.is_multi_asic' , return_value = True ):
1292
- with mock .patch ('config.main.multi_asic.get_namespace_list' , return_value = ['asic0' , 'asic1' ]):
1293
- with mock .patch ('config.main.sonic_yang.SonicYang.loadYangModel' ) as mock_load_yang_model :
1294
- assert not config_file_yang_validation ('dummy_file.json' )
1295
- mock_read_json_file .assert_called_once_with ('dummy_file.json' )
1296
- mock_load_yang_model .assert_not_called ()
1297
-
1298
1289
# Test with valid config
1299
1290
valid_config = {
1300
1291
'DEVICE_METADATA' : {
You can’t perform that action at this time.
0 commit comments