|
10 | 10 | import binascii
|
11 | 11 | import os
|
12 | 12 | import re
|
| 13 | + import sys |
| 14 | + from collections import OrderedDict |
| 15 | + |
| 16 | + from natsort import natsorted |
| 17 | + from portconfig import get_port_config |
| 18 | + from sonic_py_common import device_info |
| 19 | + |
13 | 20 | from . import bcmshell # Dot module supports both Python 2 and Python 3 using explicit relative import methods
|
14 | 21 | from sonic_eeprom import eeprom_dts
|
15 | 22 | from .sff8472 import sff8472InterfaceId # Dot module supports both Python 2 and Python 3 using explicit relative import methods
|
16 | 23 | from .sff8472 import sff8472Dom # Dot module supports both Python 2 and Python 3 using explicit relative import methods
|
17 | 24 | from .sff8436 import sff8436InterfaceId # Dot module supports both Python 2 and Python 3 using explicit relative import methods
|
18 | 25 | from .sff8436 import sff8436Dom # Dot module supports both Python 2 and Python 3 using explicit relative import methods
|
19 | 26 | from .inf8628 import inf8628InterfaceId # Dot module supports both Python 2 and Python 3 using explicit relative import methods
|
20 |
| - from portconfig import get_port_config |
21 |
| - from collections import OrderedDict |
22 |
| - from natsort import natsorted |
23 |
| - from sonic_daemon_base.daemon_base import DaemonBase |
24 |
| - import sys |
25 | 27 | except ImportError as e:
|
26 | 28 | raise ImportError("%s - required module not found" % str(e))
|
27 | 29 |
|
@@ -384,7 +386,7 @@ def read_porttab_mappings(self, porttabfile):
|
384 | 386 | parse_fmt_port_config_ini = (os.path.basename(porttabfile) == PORT_CONFIG_INI)
|
385 | 387 | parse_fmt_platform_json = (os.path.basename(porttabfile) == PLATFORM_JSON)
|
386 | 388 |
|
387 |
| - (platform, hwsku) = DaemonBase().get_platform_and_hwsku() |
| 389 | + (platform, hwsku) = device_info.get_platform_and_hwsku() |
388 | 390 | if(parse_fmt_platform_json):
|
389 | 391 | ports, _ = get_port_config(hwsku, platform)
|
390 | 392 | if not ports:
|
|
0 commit comments