|
6 | 6 | import sys
|
7 | 7 | import traceback
|
8 | 8 | import re
|
9 |
| -import subprocess |
10 | 9 |
|
11 | 10 | from sonic_py_common import device_info, logger
|
12 | 11 | from swsscommon.swsscommon import SonicV2Connector, ConfigDBConnector, SonicDBConfig
|
@@ -1368,34 +1367,6 @@ def migrate(self):
|
1368 | 1367 | version = next_version
|
1369 | 1368 | # Perform common migration ops
|
1370 | 1369 | self.common_migration_ops()
|
1371 |
| - # Perform yang validation |
1372 |
| - self.validate() |
1373 |
| - |
1374 |
| - def validate(self): |
1375 |
| - config = self.configDB.get_config() |
1376 |
| - # Fix table key in tuple |
1377 |
| - for table_name, table in config.items(): |
1378 |
| - new_table = {} |
1379 |
| - hit = False |
1380 |
| - for table_key, table_val in table.items(): |
1381 |
| - if isinstance(table_key, tuple): |
1382 |
| - new_key = "|".join(table_key) |
1383 |
| - new_table[new_key] = table_val |
1384 |
| - hit = True |
1385 |
| - else: |
1386 |
| - new_table[table_key] = table_val |
1387 |
| - if hit: |
1388 |
| - config[table_name] = new_table |
1389 |
| - config_file = "/tmp/validate.json" |
1390 |
| - with open(config_file, 'w') as fp: |
1391 |
| - json.dump(config, fp) |
1392 |
| - process = subprocess.Popen(["config_validator.py", "-c", config_file]) |
1393 |
| - # Check validation result for unit test |
1394 |
| - # Check validation result for end to end test |
1395 |
| - mark_file = "/etc/sonic/mgmt_test_mark" |
1396 |
| - if os.environ.get("UTILITIES_UNIT_TESTING", "0") == "2" or os.path.exists(mark_file): |
1397 |
| - ret = process.wait() |
1398 |
| - assert ret == 0, "Yang validation failed" |
1399 | 1370 |
|
1400 | 1371 | def main():
|
1401 | 1372 | try:
|
|
0 commit comments