[sonic-cfggen] fix name conflict between sonic_platform package and sonic_platform.py (#2875)
* fix name conflict between sonic_platfrom package and sonic_platform.py
* update sonic-utility submodule to pickup lastest fix
* Revert "update sonic-utility submodule to pickup lastest fix"
This reverts commit f66aa99738
.
* update sonic-utility sub module
This commit is contained in:
parent
77cde50541
commit
aa90cae1be
@ -16,7 +16,7 @@ setup(name='sonic-config-engine',
|
||||
author='Taoyu Li',
|
||||
author_email='taoyl@microsoft.com',
|
||||
url='https://github.com/Azure/sonic-buildimage',
|
||||
py_modules=['portconfig', 'minigraph', 'openconfig_acl', 'sonic_platform', 'config_samples'],
|
||||
py_modules=['portconfig', 'minigraph', 'openconfig_acl', 'sonic_device_util', 'config_samples'],
|
||||
scripts=['sonic-cfggen'],
|
||||
install_requires=['lxml', 'jinja2>=2.10', 'netaddr', 'ipaddr', 'pyyaml', 'pyangbind==0.6.0'],
|
||||
test_suite='setup.get_test_suite',
|
||||
|
@ -28,9 +28,9 @@ from minigraph import minigraph_encoder
|
||||
from minigraph import parse_xml
|
||||
from minigraph import parse_device_desc_xml
|
||||
from portconfig import get_port_config
|
||||
from sonic_platform import get_machine_info
|
||||
from sonic_platform import get_platform_info
|
||||
from sonic_platform import get_system_mac
|
||||
from sonic_device_util import get_machine_info
|
||||
from sonic_device_util import get_platform_info
|
||||
from sonic_device_util import get_system_mac
|
||||
from config_samples import generate_sample_config
|
||||
from config_samples import get_available_config
|
||||
from swsssdk import ConfigDBConnector
|
||||
|
@ -5,13 +5,17 @@ import subprocess
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: sonic_platform
|
||||
module: sonic_device_util
|
||||
version_added: "1.9"
|
||||
short_description: Retrive platform related facts for a device.
|
||||
short_description: Retrieve device related facts for a device.
|
||||
description:
|
||||
- Retrieve platform related facts from config files.
|
||||
- Retrieve device related facts from config files.
|
||||
'''
|
||||
|
||||
'''
|
||||
TODO: this file shall be renamed and moved to other places in future
|
||||
to have it shared with multiple applications.
|
||||
'''
|
||||
def get_machine_info():
|
||||
if not os.path.isfile('/host/machine.conf'):
|
||||
return None
|
@ -1 +1 @@
|
||||
Subproject commit 8d974001a9dcf51f38091011bc1fecd34ca895ab
|
||||
Subproject commit 09806b861486091d9db5cb75bdd2cc9428e46844
|
Reference in New Issue
Block a user