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:
Taoyu Li
2017-01-19 20:56:26 -08:00
committed by GitHub
parent 0d6b1e86a8
commit 4fe1bdcf87
37 changed files with 733 additions and 61 deletions

View File

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