Update docker-sonic-vs infrastructure in order to run CoPP UT (#10230)
*Changes to run CoPP UT in docker-sonic-vs
This commit is contained in:
parent
1851827d74
commit
4f021c44c2
@ -82,7 +82,7 @@
|
||||
"trap_group": "queue4_group3"
|
||||
},
|
||||
{% if not (DEVICE_METADATA is defined and DEVICE_METADATA['localhost'] is defined and DEVICE_METADATA['localhost']['type'] is defined and DEVICE_METADATA['localhost']['type'] != "ToRRouter") %}
|
||||
"dhcp": {
|
||||
"dhcp_relay": {
|
||||
"trap_ids": "dhcp,dhcpv6",
|
||||
"trap_group": "queue4_group3"
|
||||
},
|
||||
|
@ -154,6 +154,7 @@ COPY ["files/sonic_version.yml", "/etc/sonic/"]
|
||||
COPY ["port_breakout_config_db.json", "/etc/sonic/"]
|
||||
COPY ["database_config.json", "/etc/default/sonic-db/"]
|
||||
COPY ["hostname.j2", "/usr/share/sonic/templates/"]
|
||||
COPY ["init_cfg.json.j2", "/usr/share/sonic/templates/"]
|
||||
COPY ["default_chassis_cfg.json", "/etc/default/sonic-db/"]
|
||||
COPY ["asic_table.json", "/etc/sonic/"]
|
||||
COPY ["zero_profiles.json", "/etc/sonic"]
|
||||
|
16
platform/vs/docker-sonic-vs/init_cfg.json.j2
Normal file
16
platform/vs/docker-sonic-vs/init_cfg.json.j2
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"DEVICE_METADATA": {
|
||||
"localhost": {
|
||||
"mac": "{{ system_mac }}",
|
||||
"buffer_model": "traditional"
|
||||
}
|
||||
},
|
||||
{% set features = ["swss", "bgp", "teamd", "nat", "database", "lldp", "dhcp_relay", "macsec"] %}
|
||||
"FEATURE": {
|
||||
{% for feature in features %}
|
||||
"{{ feature }}": {
|
||||
"state": "enabled"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
}
|
||||
}
|
@ -37,7 +37,7 @@ mkdir -p /var/run/redis/sonic-db
|
||||
cp /etc/default/sonic-db/database_config.json /var/run/redis/sonic-db/
|
||||
|
||||
SYSTEM_MAC_ADDRESS=$(ip link show eth0 | grep ether | awk '{print $2}')
|
||||
sonic-cfggen -a '{"DEVICE_METADATA":{"localhost": {"mac": "'$SYSTEM_MAC_ADDRESS'", "buffer_model": "traditional"}}}' $CHASS_CFG --print-data > /etc/sonic/init_cfg.json
|
||||
sonic-cfggen -t /usr/share/sonic/templates/init_cfg.json.j2 -a "{\"system_mac\": \"$SYSTEM_MAC_ADDRESS\"}" $CHASS_CFG > /etc/sonic/init_cfg.json
|
||||
|
||||
if [ -f /etc/sonic/config_db.json ]; then
|
||||
sonic-cfggen -j /etc/sonic/init_cfg.json -j /etc/sonic/config_db.json --print-data > /tmp/config_db.json
|
||||
|
Reference in New Issue
Block a user