mirror of
https://github.com/Telecominfraproject/ols-nos.git
synced 2025-11-29 12:43:32 +00:00
sonic-cfggen with sonicv2 dockers (#190)
Add a sonic-config-engine to help generate config file based on minigraph and other data on runtime. Modify fpm, teamd, lldp, snmp, and platform-monitor docker to use sonic-config-engine to generate config in docker upon load.
This commit is contained in:
@@ -1,6 +1,20 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from setuptools import setup
|
||||
import os.path
|
||||
|
||||
def get_platform_file_list():
|
||||
data_files = []
|
||||
repo_path = os.path.abspath(os.path.dirname(__file__))
|
||||
data_path = os.path.join(repo_path, 'platform')
|
||||
platforms = os.listdir(data_path)
|
||||
for platform in platforms:
|
||||
data_files.append( (os.path.join('/usr/share/sonic', platform),
|
||||
['platform/' + platform + '/alias_map.json',
|
||||
'platform/' + platform + '/port_config.ini',
|
||||
'platform/' + platform + '/sensors.conf']
|
||||
))
|
||||
return data_files
|
||||
|
||||
setup(name='sonic-config-engine',
|
||||
version='1.0',
|
||||
@@ -10,5 +24,6 @@ setup(name='sonic-config-engine',
|
||||
url='https://github.com/Azure/sonic-buildimage',
|
||||
py_modules=['minigraph'],
|
||||
scripts=['sonic-cfggen'],
|
||||
install_requires=['lxml', 'jinja2', 'netaddr', 'ipaddr', 'yaml'],
|
||||
data_files=get_platform_file_list(),
|
||||
install_requires=['lxml', 'jinja2', 'netaddr', 'ipaddr', 'pyyaml'],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user