[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:
Kebo Liu 2019-05-16 07:22:56 +08:00 committed by Ying Xie
parent 094f7ed9e0
commit 0ef7e3be18
4 changed files with 12 additions and 8 deletions

View File

@ -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',

View File

@ -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

View File

@ -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 b86abe08fb3ef87be471d101a771ee52705d8838
Subproject commit d12734e74c64e9540483700230d04ba41a39af9f