diff --git a/.azure-pipelines/azure-pipelines-UpgrateVersion.yml b/.azure-pipelines/azure-pipelines-UpgrateVersion.yml index 03593c551cff..cc6135b045ef 100644 --- a/.azure-pipelines/azure-pipelines-UpgrateVersion.yml +++ b/.azure-pipelines/azure-pipelines-UpgrateVersion.yml @@ -38,15 +38,17 @@ parameters: - centec - centec-arm64 - generic - - innovium - marvell-armhf - mellanox stages: - stage: Build variables: - CACHE_MODE: none - VERSION_CONTROL_OPTIONS: 'SONIC_VERSION_CONTROL_COMPONENTS=' + - name: CACHE_MODE + value: none + - name: VERSION_CONTROL_OPTIONS + value: 'SONIC_VERSION_CONTROL_COMPONENTS=' + - template: .azure-pipelines/template-variables.yml@buildimage jobs: - template: azure-pipelines-build.yml parameters: @@ -77,14 +79,14 @@ stages: default_platform=broadcom artifacts=$(find $(Pipeline.Workspace) -maxdepth 1 -type d -name 'sonic-buildimage.*' | grep -v "sonic-buildimage.${default_platform}") echo "artifacts$artifacts" - cp -r $(Pipeline.Workspace)/sonic-buildimage.${default_platform}/versions target/ + cp -r $(Pipeline.Workspace)/sonic-buildimage.${default_platform}/target/versions target/ make freeze FREEZE_VERSION_OPTIONS=-r find files/build/versions ordered_artifacts=$(echo "$artifacts" | grep -v -E "arm64|armhf" && echo "$artifacts" | grep -E "arm64|armhf") for artifact in $ordered_artifacts do rm -rf target/versions - cp -r $artifact/versions target/ + cp -r $artifact/target/versions target/ OPTIONS="-a -d" [[ "$artifact" == *arm64* || "$artifact" == *armhf* ]] && OPTIONS="-d" make freeze FREEZE_VERSION_OPTIONS="$OPTIONS" diff --git a/.azure-pipelines/azure-pipelines-build.yml b/.azure-pipelines/azure-pipelines-build.yml index 7c312de85931..c84c91441806 100644 --- a/.azure-pipelines/azure-pipelines-build.yml +++ b/.azure-pipelines/azure-pipelines-build.yml @@ -50,6 +50,7 @@ jobs: swi_image: yes - name: broadcom + timeoutInMinutes: 1440 variables: dbg_image: yes swi_image: yes @@ -131,3 +132,4 @@ jobs: make $BUILD_OPTIONS target/sonic-$(GROUP_NAME).bin fi displayName: "Build sonic image" + - template: check-dirty-version.yml diff --git a/.azure-pipelines/check-dirty-version.yml b/.azure-pipelines/check-dirty-version.yml new file mode 100644 index 000000000000..5d3909bd280e --- /dev/null +++ b/.azure-pipelines/check-dirty-version.yml @@ -0,0 +1,16 @@ +steps: +- script: | + . functions.sh + SONIC_VERSION=$(sonic_get_version) + echo "SONIC_VERSION=$SONIC_VERSION" + if [[ "$SONIC_VERSION" == *dirty* ]]; then + # Print the detail dirty info + git status --untracked-files=no -s --ignore-submodules + + # Exit with error, if it is a PR build + if [ "$(Build.Reason)" == "PullRequest" ]; then + echo "Build failed for the dirty version: $SONIC_VERSION" 1>&2 + exit 1 + fi + fi + displayName: "Check the dirty version" diff --git a/.azure-pipelines/docker-sonic-slave-arm64.yml b/.azure-pipelines/docker-sonic-slave-arm64.yml index 6bb9203b49ae..2a9af06c3d01 100644 --- a/.azure-pipelines/docker-sonic-slave-arm64.yml +++ b/.azure-pipelines/docker-sonic-slave-arm64.yml @@ -3,6 +3,13 @@ # Add steps that build, run tests, deploy, and more: # https://aka.ms/yaml # Build and push sonic-slave-[buster|jessie|stretch] images for amd64/armhf/arm64 +resources: + repositories: + - repository: buildimage + type: github + name: Azure/sonic-buildimage + ref: master + endpoint: build schedules: - cron: "0 8 * * *" diff --git a/.azure-pipelines/docker-sonic-slave-armhf.yml b/.azure-pipelines/docker-sonic-slave-armhf.yml index 250bf7400a69..69e73479f342 100644 --- a/.azure-pipelines/docker-sonic-slave-armhf.yml +++ b/.azure-pipelines/docker-sonic-slave-armhf.yml @@ -3,6 +3,13 @@ # Add steps that build, run tests, deploy, and more: # https://aka.ms/yaml # Build and push sonic-slave-[buster|jessie|stretch] images for amd64/armhf/arm64 +resources: + repositories: + - repository: buildimage + type: github + name: Azure/sonic-buildimage + ref: master + endpoint: build schedules: - cron: "0 8 * * *" diff --git a/.azure-pipelines/docker-sonic-slave-template.yml b/.azure-pipelines/docker-sonic-slave-template.yml index 40a937a8c89a..2cf06638a4cc 100644 --- a/.azure-pipelines/docker-sonic-slave-template.yml +++ b/.azure-pipelines/docker-sonic-slave-template.yml @@ -3,14 +3,6 @@ # Add steps that build, run tests, deploy, and more: # https://aka.ms/yaml # Build and push sonic-slave-[buster|jessie|stretch] images for amd64/armhf/arm64 -resources: - repositories: - - repository: buildimage - type: github - name: Azure/sonic-buildimage - ref: master - endpoint: build - parameters: - name: arch type: string @@ -45,7 +37,10 @@ jobs: pool: ${{ parameters.pool }} steps: - template: cleanup.yml - - template: .azure-pipelines/template-clean-sonic-slave.yml@buildimage + - ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: + - template: template-clean-sonic-slave.yml + - ${{ else }}: + - template: '/.azure-pipelines/template-clean-sonic-slave.yml@buildimage' - checkout: self clean: true submodules: recursive @@ -106,9 +101,13 @@ jobs: containerRegistry: ${{ parameters.registry_conn }} repository: $(VARIABLE_SLAVE_BASE_IMAGE) command: push - tags: | - $(VARIABLE_SLAVE_BASE_TAG) - latest + ${{ if eq(variables['Build.SourceBranchName'], 'master') }}: + tags: | + $(VARIABLE_SLAVE_BASE_TAG) + latest + ${{ else }}: + tags: | + $(VARIABLE_SLAVE_BASE_TAG) - ${{ if ne(parameters.arch, 'amd64') }}: - task: Docker@2 condition: ne(variables['Build.Reason'], 'PullRequest') diff --git a/.azure-pipelines/docker-sonic-slave.yml b/.azure-pipelines/docker-sonic-slave.yml index bf5fce77a722..3ae3f88f0154 100644 --- a/.azure-pipelines/docker-sonic-slave.yml +++ b/.azure-pipelines/docker-sonic-slave.yml @@ -3,6 +3,13 @@ # Add steps that build, run tests, deploy, and more: # https://aka.ms/yaml # Build and push sonic-slave-[buster|jessie|stretch] images for amd64/armhf/arm64 +resources: + repositories: + - repository: buildimage + type: github + name: Azure/sonic-buildimage + ref: master + endpoint: build schedules: - cron: "0 8 * * *" @@ -53,8 +60,15 @@ stages: - ${{ each dist in parameters.dists }}: - ${{ if endswith(variables['Build.DefinitionName'], dist) }}: - ${{ each arch in parameters.arches }}: - - template: docker-sonic-slave-template.yml - parameters: - pool: sonicbld - arch: ${{ arch }} - dist: ${{ dist }} + - ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: + - template: docker-sonic-slave-template.yml + parameters: + pool: sonicbld + arch: ${{ arch }} + dist: ${{ dist }} + - ${{ else }}: + - template: '/.azure-pipelines/docker-sonic-slave-template.yml@buildimage' + parameters: + pool: sonicbld + arch: ${{ arch }} + dist: ${{ dist }} diff --git a/.azure-pipelines/official-build.yml b/.azure-pipelines/official-build.yml index f43c6521fc50..fb986cf67039 100644 --- a/.azure-pipelines/official-build.yml +++ b/.azure-pipelines/official-build.yml @@ -18,9 +18,20 @@ schedules: - 201911 - 201811 +resources: + repositories: + - repository: buildimage + type: github + name: Azure/sonic-buildimage + ref: master + endpoint: build + trigger: none pr: none +variables: +- template: .azure-pipelines/template-variables.yml@buildimage + stages: - stage: Build pool: sonicbld diff --git a/.azure-pipelines/template-clean-sonic-slave.yml b/.azure-pipelines/template-clean-sonic-slave.yml index cc995e9c2621..ddb8c8e48f6a 100644 --- a/.azure-pipelines/template-clean-sonic-slave.yml +++ b/.azure-pipelines/template-clean-sonic-slave.yml @@ -1,8 +1,10 @@ steps: - script: | - containers=$(docker container ls -a | grep "sonic-slave" | awk '{ print $1 }') - [ -n "$containers" ] && docker container rm -f containers + set -x + containers=$(docker container ls -aq) + [ -n "$containers" ] && docker container rm -f $containers docker images | grep "^" | awk '{print$3}' | xargs -i docker rmi {} images=$(docker images 'sonic-slave-*' -a -q) [ -n "$images" ] && docker rmi -f $images + exit 0 displayName: 'Cleanup sonic slave' diff --git a/.azure-pipelines/template-variables.yml b/.azure-pipelines/template-variables.yml new file mode 100644 index 000000000000..f28768e39efe --- /dev/null +++ b/.azure-pipelines/template-variables.yml @@ -0,0 +1,2 @@ +variables: + DEFAULT_CONTAINER_REGISTRY: 'publicmirror.azurecr.io' diff --git a/.gitmodules b/.gitmodules index f79031a7d22c..b2d76bd66b20 100644 --- a/.gitmodules +++ b/.gitmodules @@ -62,6 +62,9 @@ [submodule "src/redis-dump-load"] path = src/redis-dump-load url = https://github.com/p/redis-dump-load.git +[submodule "src/scapy"] + path = src/scapy + url = https://github.com/secdev/scapy.git [submodule "platform/mellanox/mlnx-sai/SAI-Implementation"] path = platform/mellanox/mlnx-sai/SAI-Implementation url = https://github.com/Mellanox/SAI-Implementation diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 557ce3beff82..27836a49b1ab 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -30,9 +30,18 @@ resources: type: github name: Azure/sonic-mgmt endpoint: build + - repository: buildimage + type: github + name: Azure/sonic-buildimage + endpoint: build + ref: master variables: - template: .azure-pipelines/azure-pipelines-repd-build-variables.yml +- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: + - template: .azure-pipelines/template-variables.yml +- ${{ else }}: + - template: .azure-pipelines/template-variables.yml@buildimage - name: CACHE_MODE value: rcache diff --git a/build_debian.sh b/build_debian.sh index c509b7097151..6dbbaa8cf770 100755 --- a/build_debian.sh +++ b/build_debian.sh @@ -447,7 +447,7 @@ sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install 'setup sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install 'wheel==0.35.1' # docker Python API package is needed by Ansible docker module as well as some SONiC applications -sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install 'docker==4.3.1' +sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install 'docker==5.0.3' # Install scapy sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install 'scapy==2.4.4' diff --git a/device/accton/x86_64-accton_as4630_54pe-r0/pddf/pd-plugin.json b/device/accton/x86_64-accton_as4630_54pe-r0/pddf/pd-plugin.json new file mode 100644 index 000000000000..0abf66aab7a5 --- /dev/null +++ b/device/accton/x86_64-accton_as4630_54pe-r0/pddf/pd-plugin.json @@ -0,0 +1,66 @@ +{ + "XCVR": + { + "xcvr_present": + { + "i2c": + { + "valmap-SFP28": {"1":true, "0":false }, + "valmap-QSFP28": {"1":true, "0":false} + } + } + }, + + "PSU": + { + "psu_present": + { + "i2c": + { + "valmap": { "1":true, "0":false } + } + }, + + "psu_power_good": + { + "i2c": + { + "valmap": { "1": true, "0":false } + } + }, + + "psu_fan_dir": + { + "i2c": + { + "valmap": { "F2B":"EXHAUST", "B2F":"INTAKE" } + } + }, + + "PSU_FAN_MAX_SPEED":"18000" + }, + + "FAN": + { + "direction": + { + "i2c": + { + "valmap": {"1":"EXHAUST", "0":"INTAKE"} + } + }, + + "present": + { + "i2c": + { + "valmap": {"1":true, "0":false} + } + }, + + "duty_cycle_to_pwm": "lambda dc: ((dc*100.0)/625)", + + "pwm_to_duty_cycle": "lambda pwm: ((pwm*625.0)/100)" + } + +} diff --git a/device/accton/x86_64-accton_as4630_54pe-r0/pddf_support b/device/accton/x86_64-accton_as4630_54pe-r0/pddf_support new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/device/accton/x86_64-accton_as7326_56x-r0/pddf/pd-plugin.json b/device/accton/x86_64-accton_as7326_56x-r0/pddf/pd-plugin.json new file mode 100644 index 000000000000..317cf23b7362 --- /dev/null +++ b/device/accton/x86_64-accton_as7326_56x-r0/pddf/pd-plugin.json @@ -0,0 +1,67 @@ +{ + + "XCVR": + { + "xcvr_present": + { + "i2c": + { + "valmap-SFP": {"1":true, "0":false }, + "valmap-SFP28": {"1":true, "0":false }, + "valmap-QSFP28": {"1":true, "0":false} + } + } + }, + "PSU": + { + "psu_present": + { + "i2c": + { + "valmap": { "1":true, "0":false } + } + }, + + "psu_power_good": + { + "i2c": + { + "valmap": { "1": true, "0":false } + } + }, + + "psu_fan_dir": + { + "i2c": + { + "valmap": { "F2B":"EXHAUST", "B2F":"INTAKE" } + } + }, + + "PSU_FAN_MAX_SPEED":"18000" + }, + + "FAN": + { + "direction": + { + "i2c": + { + "valmap": {"1":"INTAKE", "0":"EXHAUST"} + } + }, + + "present": + { + "i2c": + { + "valmap": {"1":true, "0":false} + } + }, + + "duty_cycle_to_pwm": "lambda dc: ((dc*100)/625 -1)", + + "pwm_to_duty_cycle": "lambda pwm: (((pwm+1)*625+75)/100)" + } + +} diff --git a/device/accton/x86_64-accton_as7326_56x-r0/pddf/pddf-device.json b/device/accton/x86_64-accton_as7326_56x-r0/pddf/pddf-device.json new file mode 100644 index 000000000000..a8bd6d0c4043 --- /dev/null +++ b/device/accton/x86_64-accton_as7326_56x-r0/pddf/pddf-device.json @@ -0,0 +1,2944 @@ +{ + "PLATFORM": + { + "num_psus":2, + "num_fantrays":6, + "num_fans_pertray":2, + "num_ports":58, + "num_temps": 4, + "pddf_dev_types": + { + "description":"AS7326-56X - Below is the list of supported PDDF device types (chip names) for various components. If any component uses some other driver, we will create the client using 'echo > /new_device' method", + "CPLD": + [ + "i2c_cpld" + ], + "PSU": + [ + "psu_eeprom", + "psu_pmbus" + ], + "FAN": + [ + "fan_ctrl", + "fan_eeprom" + ], + "PORT_MODULE": + [ + "pddf_xcvr" + ] + }, + "std_kos": + [ + "i2c-i801", + "i2c_dev", + "i2c_mux_pca954x", + "optoe" + ], + "pddf_kos": + [ + "pddf_client_module", + "pddf_cpld_module", + "pddf_cpld_driver", + "pddf_mux_module", + "pddf_xcvr_module", + "pddf_xcvr_driver_module", + "pddf_psu_driver_module", + "pddf_psu_module", + "pddf_fan_driver_module", + "pddf_fan_module", + "pddf_led_module", + "pddf_sysstatus_module" + ], + "custom_kos": + [ + "pddf_custom_psu" + ] + }, + + "SYSTEM": + { + "dev_info": {"device_type":"CPU", "device_name":"ROOT_COMPLEX", "device_parent":null}, + "i2c": + { + "CONTROLLERS": + [ + { "dev_name":"i2c-0", "dev":"SMBUS0" } + ] + } + }, + + "SMBUS0": + { + "dev_info": {"device_type": "SMBUS", "device_name": "SMBUS0", "device_parent": "SYSTEM"}, + "i2c": + { + "topo_info": {"dev_addr": "0x0"}, + "DEVICES": + [ + {"dev": "EEPROM1"}, + {"dev": "CPU_CPLD"}, + {"dev": "MUX1"} + ] + } + }, + + "EEPROM1": + { + "dev_info": {"device_type": "EEPROM", "device_name": "EEPROM1", "device_parent": "SMBUS0"}, + "i2c": + { + "topo_info": {"parent_bus": "0x0", "dev_addr": "0x56", "dev_type": "24c04"}, + "dev_attr": {"access_mode": "BLOCK"}, + "attr_list": [ + {"attr_name": "eeprom"} + ] + } + }, + + "CPU_CPLD": + { + "dev_info": { "device_type":"CPLD", "device_name":"CPU_CPLD", "device_parent":"SMBUS0"}, + "i2c": + { + "topo_info": { "parent_bus":"0x0", "dev_addr":"0x65", "dev_type":"i2c_cpld"}, + "dev_attr": { } + } + }, + + "MUX1": + { + "dev_info": { "device_type":"MUX", "device_name":"MUX1", "device_parent":"SMBUS0"}, + "i2c": + { + "topo_info": { "parent_bus":"0x0", "dev_addr":"0x77", "dev_type":"pca9548"}, + "dev_attr": { "virt_bus":"0x1", "idle_state":"-2"}, + "channel": + [ + { "chn":"0", "dev":"MUX2" }, + { "chn":"0", "dev":"MUX3" }, + { "chn":"1", "dev":"MUX4" } + + ] + } + }, + "MUX2": + { + "dev_info": { "device_type":"MUX", "device_name":"MUX2", "device_parent":"MUX1"}, + "i2c": + { + "topo_info": { "parent_bus":"0x1", "dev_addr":"0x70", "dev_type":"pca9548"}, + "dev_attr": { "virt_bus":"0x9", "idle_state":"-2"}, + "channel": + [ + { "chn":"2", "dev":"FAN-CTRL" }, + { "chn":"3", "dev":"CPLD2" }, + { "chn":"4", "dev":"PSU2" } , + { "chn":"6", "dev":"TEMP1" }, + { "chn":"6", "dev":"TEMP2" }, + { "chn":"6", "dev":"TEMP3" }, + { "chn":"6", "dev":"TEMP4" } + ] + } + }, + "MUX3": + { + "dev_info": { "device_type":"MUX", "device_name":"MUX3", "device_parent":"MUX1"}, + "i2c": + { + "topo_info": { "parent_bus":"0x1", "dev_addr":"0x71", "dev_type":"pca9548"}, + "dev_attr": { "virt_bus":"0x11", "idle_state":"-2"}, + "channel": + [ + { "chn":"0", "dev":"PSU1" }, + { "chn":"1", "dev":"CPLD1" }, + { "chn":"2", "dev":"CPLD3" }, + { "chn":"5", "dev":"PORT57" }, + { "chn":"6", "dev":"PORT58" }, + { "chn":"7", "dev":"MUX11" } + ] + } + }, + "MUX4": + { + "dev_info": { "device_type":"MUX", "device_name":"MUX4", "device_parent":"MUX1"}, + "i2c": + { + "topo_info": { "parent_bus":"0x2", "dev_addr":"0x70", "dev_type":"pca9548"}, + "dev_attr": { "virt_bus":"0x21", "idle_state":"-2"}, + "channel": + [ + { "chn":"0", "dev":"MUX5" }, + { "chn":"1", "dev":"MUX6" }, + { "chn":"2", "dev":"MUX7" }, + { "chn":"3", "dev":"MUX8" }, + { "chn":"4", "dev":"MUX9" }, + { "chn":"5", "dev":"MUX10" } + ] + } + }, + "PSU2": + { + "dev_info": { "device_type":"PSU", "device_name":"PSU2", "device_parent":"MUX2" }, + "dev_attr": { "dev_idx":"2", "num_psu_fans":"1"}, + "i2c": + { + "interface": + [ + { "itf":"pmbus", "dev":"PSU2-PMBUS"}, + { "itf":"eeprom", "dev":"PSU2-EEPROM" } + ] + } + }, + + "PSU2-PMBUS": + { + "dev_info": {"device_type":"PSU-PMBUS", "device_name":"PSU2-PMBUS", "device_parent":"MUX2", "virt_parent":"PSU2"}, + "i2c": + { + "topo_info": { "parent_bus":"0xd", "dev_addr":"0x5b", "dev_type":"psu_pmbus"}, + "attr_list": + [ + { "attr_name":"psu_present", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_offset":"0x2", "attr_mask":"0x1", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"psu_power_good", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_offset":"0x2", "attr_mask":"0x4", "attr_cmpval":"0x4", "attr_len":"1"}, + { "attr_name":"psu_mfr_id", "attr_devaddr":"0x5b", "attr_devtype":"pmbus", "attr_offset":"0X99", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"10" }, + { "attr_name":"psu_fan_dir", "attr_devaddr":"0x5b", "attr_devtype":"pmbus", "attr_offset":"0xc3", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"5"}, + { "attr_name":"psu_v_out", "attr_devaddr":"0x5b", "attr_devtype":"pmbus", "attr_offset":"0x8b", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"}, + { "attr_name":"psu_i_out", "attr_devaddr":"0x5b", "attr_devtype":"pmbus", "attr_offset":"0x8c", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"}, + { "attr_name":"psu_p_out", "attr_devaddr":"0x5b", "attr_devtype":"pmbus", "attr_offset":"0x96", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"}, + { "attr_name":"psu_fan1_speed_rpm", "attr_devaddr":"0x5b", "attr_devtype":"pmbus", "attr_offset":"0x90", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"}, + { "attr_name":"psu_temp1_input", "attr_devaddr":"0x5b", "attr_devtype":"pmbus", "attr_offset":"0x8d", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"} + ] + } + }, + + "PSU2-EEPROM": + { + "dev_info": { "device_type":"PSU-EEPROM", "device_name":"PSU2-EEPROM", "device_parent":"MUX2", "virt_parent":"PSU2"}, + "i2c": + { + "topo_info":{ "parent_bus":"0xd", "dev_addr":"0x53", "dev_type":"psu_eeprom"}, + "attr_list": + [ + { "attr_name":"psu_model_name", "attr_devaddr":"0x53", "attr_devtype":"eeprom", "attr_offset":"0x15", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"11" }, + { "attr_name":"psu_serial_num", "attr_devaddr":"0x53", "attr_devtype":"eeprom", "attr_offset":"0x2e", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"17" } + + ] + } + }, + "PSU1": + { + "dev_info": { "device_type":"PSU", "device_name":"PSU1", "device_parent":"MUX3" }, + "dev_attr": { "dev_idx":"1", "num_psu_fans":"1"}, + "i2c": + { + "interface": + [ + { "itf":"pmbus", "dev":"PSU1-PMBUS"}, + { "itf":"eeprom", "dev":"PSU1-EEPROM" } + ] + } + }, + + "PSU1-PMBUS": + { + "dev_info": {"device_type":"PSU-PMBUS", "device_name":"PSU1-PMBUS", "device_parent":"MUX3", "virt_parent":"PSU1"}, + "i2c": + { + "topo_info": { "parent_bus":"0x11", "dev_addr":"0x59", "dev_type":"psu_pmbus"}, + "attr_list": + [ + { "attr_name":"psu_present", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_offset":"0x2", "attr_mask":"0x2", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"psu_power_good", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_offset":"0x2", "attr_mask":"0x8", "attr_cmpval":"0x8", "attr_len":"1"}, + { "attr_name":"psu_mfr_id", "attr_devaddr":"0x59", "attr_devtype":"pmbus", "attr_offset":"0X99", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"10" }, + { "attr_name":"psu_fan_dir", "attr_devaddr":"0x59", "attr_devtype":"pmbus", "attr_offset":"0xc3", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"5"}, + { "attr_name":"psu_v_out", "attr_devaddr":"0x59", "attr_devtype":"pmbus", "attr_offset":"0x8b", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"}, + { "attr_name":"psu_i_out", "attr_devaddr":"0x59", "attr_devtype":"pmbus", "attr_offset":"0x8c", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"}, + { "attr_name":"psu_p_out", "attr_devaddr":"0x59", "attr_devtype":"pmbus", "attr_offset":"0x96", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"}, + { "attr_name":"psu_fan1_speed_rpm", "attr_devaddr":"0x59", "attr_devtype":"pmbus", "attr_offset":"0x90", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"}, + { "attr_name":"psu_temp1_input", "attr_devaddr":"0x59", "attr_devtype":"pmbus", "attr_offset":"0x8d", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"2"} + ] + } + }, + "PSU1-EEPROM": + { + "dev_info": { "device_type":"PSU-EEPROM", "device_name":"PSU1-EEPROM", "device_parent":"MUX2", "virt_parent":"PSU1"}, + "i2c": + { + "topo_info":{ "parent_bus":"0x11", "dev_addr":"0x51", "dev_type":"psu_eeprom"}, + "attr_list": + [ + { "attr_name":"psu_model_name", "attr_devaddr":"0x51", "attr_devtype":"eeprom", "attr_offset":"0x15", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"11" }, + { "attr_name":"psu_serial_num", "attr_devaddr":"0x51", "attr_devtype":"eeprom", "attr_offset":"0x2e", "attr_mask":"0x0", "attr_cmpval":"0xff", "attr_len":"17" } + ] + } + }, + "CPLD1": + { + "dev_info": { "device_type":"CPLD", "device_name":"CPLD1", "device_parent":"MUX3"}, + "i2c": + { + "topo_info": { "parent_bus":"0x12", "dev_addr":"0x60", "dev_type":"i2c_cpld"}, + "dev_attr":{} + } + }, + "CPLD2": + { + "dev_info": { "device_type":"CPLD", "device_name":"CPLD2", "device_parent":"MUX2"}, + "i2c": + { + "topo_info": { "parent_bus":"0xc", "dev_addr":"0x62", "dev_type":"i2c_cpld"}, + "dev_attr":{} + } + }, + "CPLD3": + { + "dev_info": { "device_type":"CPLD", "device_name":"CPLD3", "device_parent":"MUX3"}, + "i2c": + { + "topo_info": { "parent_bus":"0x13", "dev_addr":"0x64", "dev_type":"i2c_cpld"}, + "dev_attr":{} + } + }, + "TEMP1" : + { + "dev_info": { "device_type":"TEMP_SENSOR", "device_name":"TEMP1", "device_parent":"MUX2"}, + "i2c": + { + "topo_info": { "parent_bus":"0xf", "dev_addr":"0x48", "dev_type":"lm75"}, + "attr_list": + [ + { "attr_name": "temp1_high_threshold", "drv_attr_name":"temp1_max"}, + { "attr_name": "temp1_max_hyst"}, + { "attr_name": "temp1_input"} + ] + } + }, + "TEMP2" : + { + "dev_info": { "device_type":"TEMP_SENSOR", "device_name":"TEMP1", "device_parent":"MUX2"}, + "i2c": + { + "topo_info": { "parent_bus":"0xf", "dev_addr":"0x49", "dev_type":"lm75"}, + "attr_list": + [ + { "attr_name": "temp1_high_threshold", "drv_attr_name":"temp1_max"}, + { "attr_name": "temp1_max_hyst"}, + { "attr_name": "temp1_input"} + ] + } + }, + "TEMP3" : + { + "dev_info": { "device_type":"TEMP_SENSOR", "device_name":"TEMP1", "device_parent":"MUX2"}, + "i2c": + { + "topo_info": { "parent_bus":"0xf", "dev_addr":"0x4A", "dev_type":"lm75"}, + "attr_list": + [ + { "attr_name": "temp1_high_threshold", "drv_attr_name":"temp1_max"}, + { "attr_name": "temp1_max_hyst"}, + { "attr_name": "temp1_input"} + ] + } + }, + "TEMP4" : + { + "dev_info": { "device_type":"TEMP_SENSOR", "device_name":"TEMP1", "device_parent":"MUX2"}, + "i2c": + { + "topo_info": { "parent_bus":"0xf", "dev_addr":"0x4B", "dev_type":"lm75"}, + "attr_list": + [ + { "attr_name": "temp1_high_threshold", "drv_attr_name":"temp1_max"}, + { "attr_name": "temp1_max_hyst"}, + { "attr_name": "temp1_input"} + ] + } + }, + "FAN-CTRL": + { + "dev_info": { "device_type":"FAN", "device_name":"FAN-CTRL", "device_parent":"MUX2"}, + "i2c": + { + "topo_info": { "parent_bus":"0xb", "dev_addr":"0x66", "dev_type":"fan_ctrl"}, + "dev_attr": { "num_fantrays":"5"}, + "attr_list": + [ + { "attr_name":"fan1_present", "attr_devtype":"FAN-CTRL", "attr_offset":"0x0f", "attr_mask":"0x1", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"fan2_present", "attr_devtype":"FAN-CTRL", "attr_offset":"0x0f", "attr_mask":"0x1", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"fan3_present", "attr_devtype":"FAN-CTRL", "attr_offset":"0x0f", "attr_mask":"0x2", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"fan4_present", "attr_devtype":"FAN-CTRL", "attr_offset":"0x0f", "attr_mask":"0x2", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"fan5_present", "attr_devtype":"FAN-CTRL", "attr_offset":"0x0f", "attr_mask":"0x4", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"fan6_present", "attr_devtype":"FAN-CTRL", "attr_offset":"0x0f", "attr_mask":"0x4", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"fan7_present", "attr_devtype":"FAN-CTRL", "attr_offset":"0x0f", "attr_mask":"0x8", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"fan8_present", "attr_devtype":"FAN-CTRL", "attr_offset":"0x0f", "attr_mask":"0x8", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"fan9_present", "attr_devtype":"FAN-CTRL", "attr_offset":"0x0f", "attr_mask":"0x10", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"fan10_present", "attr_devtype":"FAN-CTRL", "attr_offset":"0x0f", "attr_mask":"0x10", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"fan11_present", "attr_devtype":"FAN-CTRL", "attr_offset":"0x0f", "attr_mask":"0x20", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"fan12_present", "attr_devtype":"FAN-CTRL", "attr_offset":"0x0f", "attr_mask":"0x20", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"fan1_direction", "attr_devtype":"FAN-CTRL", "attr_offset":"0x10", "attr_mask":"0x1", "attr_cmpval":"0x1", "attr_len":"1"}, + { "attr_name":"fan2_direction", "attr_devtype":"FAN-CTRL", "attr_offset":"0x10", "attr_mask":"0x1", "attr_cmpval":"0x1", "attr_len":"1"}, + { "attr_name":"fan3_direction", "attr_devtype":"FAN-CTRL", "attr_offset":"0x10", "attr_mask":"0x2", "attr_cmpval":"0x2", "attr_len":"1"}, + { "attr_name":"fan4_direction", "attr_devtype":"FAN-CTRL", "attr_offset":"0x10", "attr_mask":"0x2", "attr_cmpval":"0x2", "attr_len":"1"}, + { "attr_name":"fan5_direction", "attr_devtype":"FAN-CTRL", "attr_offset":"0x10", "attr_mask":"0x4", "attr_cmpval":"0x4", "attr_len":"1"}, + { "attr_name":"fan6_direction", "attr_devtype":"FAN-CTRL", "attr_offset":"0x10", "attr_mask":"0x4", "attr_cmpval":"0x4", "attr_len":"1"}, + { "attr_name":"fan7_direction", "attr_devtype":"FAN-CTRL", "attr_offset":"0x10", "attr_mask":"0x8", "attr_cmpval":"0x8", "attr_len":"1"}, + { "attr_name":"fan8_direction", "attr_devtype":"FAN-CTRL", "attr_offset":"0x10", "attr_mask":"0x8", "attr_cmpval":"0x8", "attr_len":"1"}, + { "attr_name":"fan9_direction", "attr_devtype":"FAN-CTRL", "attr_offset":"0x10", "attr_mask":"0x10", "attr_cmpval":"0x10", "attr_len":"1"}, + { "attr_name":"fan10_direction", "attr_devtype":"FAN-CTRL", "attr_offset":"0x10", "attr_mask":"0x10", "attr_cmpval":"0x10", "attr_len":"1"}, + { "attr_name":"fan11_direction", "attr_devtype":"FAN-CTRL", "attr_offset":"0x10", "attr_mask":"0x20", "attr_cmpval":"0x20", "attr_len":"1"}, + { "attr_name":"fan12_direction", "attr_devtype":"FAN-CTRL", "attr_offset":"0x10", "attr_mask":"0x20", "attr_cmpval":"0x20", "attr_len":"1"}, + { "attr_name":"fan1_input", "attr_devtype":"FAN-CTRL", "attr_offset":"0x12", "attr_mask":"0xFF", "attr_len":"1", "attr_mult":"100", "attr_is_divisor":0}, + { "attr_name":"fan2_input", "attr_devtype":"FAN-CTRL", "attr_offset":"0x22", "attr_mask":"0xFF", "attr_len":"1", "attr_mult":"100", "attr_is_divisor":0}, + { "attr_name":"fan3_input", "attr_devtype":"FAN-CTRL", "attr_offset":"0x13", "attr_mask":"0xFF", "attr_len":"1", "attr_mult":"100", "attr_is_divisor":0}, + { "attr_name":"fan4_input", "attr_devtype":"FAN-CTRL", "attr_offset":"0x23", "attr_mask":"0xFF", "attr_len":"1", "attr_mult":"100", "attr_is_divisor":0}, + { "attr_name":"fan5_input", "attr_devtype":"FAN-CTRL", "attr_offset":"0x14", "attr_mask":"0xFF", "attr_len":"1", "attr_mult":"100", "attr_is_divisor":0}, + { "attr_name":"fan6_input", "attr_devtype":"FAN-CTRL", "attr_offset":"0x24", "attr_mask":"0xFF", "attr_len":"1", "attr_mult":"100", "attr_is_divisor":0}, + { "attr_name":"fan7_input", "attr_devtype":"FAN-CTRL", "attr_offset":"0x15", "attr_mask":"0xFF", "attr_len":"1", "attr_mult":"100" , "attr_is_divisor":0}, + { "attr_name":"fan8_input", "attr_devtype":"FAN-CTRL", "attr_offset":"0x25", "attr_mask":"0xFF", "attr_len":"1", "attr_mult":"100" , "attr_is_divisor":0}, + { "attr_name":"fan9_input", "attr_devtype":"FAN-CTRL", "attr_offset":"0x16", "attr_mask":"0xFF", "attr_len":"1", "attr_mult":"100" , "attr_is_divisor":0}, + { "attr_name":"fan10_input", "attr_devtype":"FAN-CTRL", "attr_offset":"0x26", "attr_mask":"0xFF", "attr_len":"1", "attr_mult":"100" , "attr_is_divisor":0}, + { "attr_name":"fan11_input", "attr_devtype":"FAN-CTRL", "attr_offset":"0x17", "attr_mask":"0xFF", "attr_len":"1", "attr_mult":"100" , "attr_is_divisor":0}, + { "attr_name":"fan12_input", "attr_devtype":"FAN-CTRL", "attr_offset":"0x27", "attr_mask":"0xFF", "attr_len":"1", "attr_mult":"100" , "attr_is_divisor":0}, + { "attr_name":"fan1_pwm", "attr_devtype":"FAN-CTRL", "attr_offset":"0x11", "attr_mask":"0xF", "attr_len":"1" }, + { "attr_name":"fan2_pwm", "attr_devtype":"FAN-CTRL", "attr_offset":"0x11", "attr_mask":"0xF", "attr_len":"1" }, + { "attr_name":"fan3_pwm", "attr_devtype":"FAN-CTRL", "attr_offset":"0x11", "attr_mask":"0xF", "attr_len":"1" }, + { "attr_name":"fan4_pwm", "attr_devtype":"FAN-CTRL", "attr_offset":"0x11", "attr_mask":"0xF", "attr_len":"1" }, + { "attr_name":"fan5_pwm", "attr_devtype":"FAN-CTRL", "attr_offset":"0x11", "attr_mask":"0xF", "attr_len":"1" }, + { "attr_name":"fan6_pwm", "attr_devtype":"FAN-CTRL", "attr_offset":"0x11", "attr_mask":"0xF", "attr_len":"1" }, + { "attr_name":"fan7_pwm", "attr_devtype":"FAN-CTRL", "attr_offset":"0x11", "attr_mask":"0xF", "attr_len":"1" }, + { "attr_name":"fan8_pwm", "attr_devtype":"FAN-CTRL", "attr_offset":"0x11", "attr_mask":"0xF", "attr_len":"1" }, + { "attr_name":"fan9_pwm", "attr_devtype":"FAN-CTRL", "attr_offset":"0x11", "attr_mask":"0xF", "attr_len":"1" }, + { "attr_name":"fan10_pwm", "attr_devtype":"FAN-CTRL", "attr_offset":"0x11", "attr_mask":"0xF", "attr_len":"1" }, + { "attr_name":"fan11_pwm", "attr_devtype":"FAN-CTRL", "attr_offset":"0x11", "attr_mask":"0xF", "attr_len":"1" }, + { "attr_name":"fan12_pwm", "attr_devtype":"FAN-CTRL", "attr_offset":"0x11", "attr_mask":"0xF", "attr_len":"1" } + ] + } + }, + "PORT57": + { + "dev_info": { "device_type":"SFP", "device_name":"PORT57", "device_parent":"MUX3"}, + "dev_attr": { "dev_idx":"57"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT57-EEPROM" }, + { "itf":"control", "dev":"PORT57-CTRL" } + ] + } + }, + "PORT57-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT57-EEPROM", "device_parent":"MUX3", "virt_parent":"PORT57"}, + "i2c": + { + "topo_info": { "parent_bus":"0x16", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT57-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT57-CTRL", "device_parent":"MUX3", "virt_parent":"PORT57"}, + "i2c": + { + "topo_info": { "parent_bus":"0x16", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x12", "attr_mask":"0x2", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x1c", "attr_mask":"0x2", "attr_cmpval":"0x4", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x16", "attr_mask":"0x2", "attr_cmpval":"0x4", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x19", "attr_mask":"0x2", "attr_cmpval":"0x4", "attr_len":"1"} + ] + } + }, + "PORT58": + { + "dev_info": { "device_type":"SFP", "device_name":"PORT58", "device_parent":"MUX3"}, + "dev_attr": { "dev_idx":"58"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT58-EEPROM" }, + { "itf":"control", "dev":"PORT58-CTRL" } + ] + } + }, + "PORT58-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT58-EEPROM", "device_parent":"MUX3", "virt_parent":"PORT58"}, + "i2c": + { + "topo_info": { "parent_bus":"0x17", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT58-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT58-CTRL", "device_parent":"MUX3", "virt_parent":"PORT58"}, + "i2c": + { + "topo_info": { "parent_bus":"0x17", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x12", "attr_mask":"0x3", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x1c", "attr_mask":"0x3", "attr_cmpval":"0x8", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x16", "attr_mask":"0x3", "attr_cmpval":"0x8", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x19", "attr_mask":"0x3", "attr_cmpval":"0x8", "attr_len":"1"} + ] + } + }, + "MUX5": + { + "dev_info": { "device_type":"MUX", "device_name":"MUX5", "device_parent":"MUX4"}, + "i2c": + { + "topo_info": { "parent_bus":"0x21", "dev_addr":"0x71", "dev_type":"pca9548"}, + "dev_attr": { "virt_bus":"0x29", "idle_state":"-2"}, + "channel": + [ + { "chn":"0", "dev":"PORT2" }, + { "chn":"1", "dev":"PORT1" }, + { "chn":"2", "dev":"PORT4" }, + { "chn":"3", "dev":"PORT3" }, + { "chn":"4", "dev":"PORT6" }, + { "chn":"5", "dev":"PORT7" }, + { "chn":"6", "dev":"PORT5" }, + { "chn":"7", "dev":"PORT9" } + ] + } + }, + "MUX6": + { + "dev_info": { "device_type":"MUX", "device_name":"MUX6", "device_parent":"MUX4"}, + "i2c": + { + "topo_info": { "parent_bus":"0x22", "dev_addr":"0x72", "dev_type":"pca9548"}, + "dev_attr": { "virt_bus":"0x31", "idle_state":"-2"}, + "channel": + [ + { "chn":"0", "dev":"PORT10" }, + { "chn":"1", "dev":"PORT8" }, + { "chn":"2", "dev":"PORT12" }, + { "chn":"3", "dev":"PORT11" }, + { "chn":"4", "dev":"PORT13" }, + { "chn":"5", "dev":"PORT16" }, + { "chn":"6", "dev":"PORT15" }, + { "chn":"7", "dev":"PORT14" } + ] + } + }, + "MUX7": + { + "dev_info": { "device_type":"MUX", "device_name":"MUX7", "device_parent":"MUX4"}, + "i2c": + { + "topo_info": { "parent_bus":"0x23", "dev_addr":"0x73", "dev_type":"pca9548"}, + "dev_attr": { "virt_bus":"0x39", "idle_state":"-2"}, + "channel": + [ + { "chn":"0", "dev":"PORT18" }, + { "chn":"1", "dev":"PORT17" }, + { "chn":"2", "dev":"PORT20" }, + { "chn":"3", "dev":"PORT19" }, + { "chn":"4", "dev":"PORT21" }, + { "chn":"5", "dev":"PORT23" }, + { "chn":"6", "dev":"PORT22" }, + { "chn":"7", "dev":"PORT24" } + ] + } + }, + "MUX8": + { + "dev_info": { "device_type":"MUX", "device_name":"MUX8", "device_parent":"MUX4"}, + "i2c": + { + "topo_info": { "parent_bus":"0x24", "dev_addr":"0x74", "dev_type":"pca9548"}, + "dev_attr": { "virt_bus":"0x41", "idle_state":"-2"}, + "channel": + [ + { "chn":"0", "dev":"PORT27" }, + { "chn":"1", "dev":"PORT25" }, + { "chn":"2", "dev":"PORT28" }, + { "chn":"3", "dev":"PORT26" }, + { "chn":"4", "dev":"PORT29" }, + { "chn":"5", "dev":"PORT32" }, + { "chn":"6", "dev":"PORT30" }, + { "chn":"7", "dev":"PORT31" } + ] + } + }, + "MUX9": + { + "dev_info": { "device_type":"MUX", "device_name":"MUX9", "device_parent":"MUX4"}, + "i2c": + { + "topo_info": { "parent_bus":"0x25", "dev_addr":"0x75", "dev_type":"pca9548"}, + "dev_attr": { "virt_bus":"0x49", "idle_state":"-2"}, + "channel": + [ + { "chn":"0", "dev":"PORT34" }, + { "chn":"1", "dev":"PORT33" }, + { "chn":"2", "dev":"PORT36" }, + { "chn":"3", "dev":"PORT35" }, + { "chn":"4", "dev":"PORT37" }, + { "chn":"5", "dev":"PORT39" }, + { "chn":"6", "dev":"PORT38" }, + { "chn":"7", "dev":"PORT40" } + ] + } + }, + "MUX10": + { + "dev_info": { "device_type":"MUX", "device_name":"MUX10", "device_parent":"MUX4"}, + "i2c": + { + "topo_info": { "parent_bus":"0x26", "dev_addr":"0x76", "dev_type":"pca9548"}, + "dev_attr": { "virt_bus":"0x51", "idle_state":"-2"}, + "channel": + [ + { "chn":"0", "dev":"PORT41" }, + { "chn":"1", "dev":"PORT42" }, + { "chn":"2", "dev":"PORT45" }, + { "chn":"3", "dev":"PORT43" }, + { "chn":"4", "dev":"PORT44" }, + { "chn":"5", "dev":"PORT48" }, + { "chn":"6", "dev":"PORT46" }, + { "chn":"7", "dev":"PORT47" } + ] + } + }, + "MUX11": + { + "dev_info": { "device_type":"MUX", "device_name":"MUX11", "device_parent":"MUX3"}, + "i2c": + { + "topo_info": { "parent_bus":"0x18", "dev_addr":"0x72", "dev_type":"pca9548"}, + "dev_attr": { "virt_bus":"0x19", "idle_state":"-2"}, + "channel": + [ + { "chn":"0", "dev":"PORT49" }, + { "chn":"1", "dev":"PORT50" }, + { "chn":"2", "dev":"PORT51" }, + { "chn":"3", "dev":"PORT52" }, + { "chn":"4", "dev":"PORT53" }, + { "chn":"5", "dev":"PORT54" }, + { "chn":"6", "dev":"PORT55" }, + { "chn":"7", "dev":"PORT56" } + ] + } + }, + + + + "PORT2": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT2", "device_parent":"MUX5"}, + "dev_attr": { "dev_idx":"2"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT2-EEPROM" }, + { "itf":"control", "dev":"PORT2-CTRL" } + ] + } + }, + "PORT2-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT2-EEPROM", "device_parent":"MUX5", "virt_parent":"PORT2"}, + "i2c": + { + "topo_info": { "parent_bus":"0x29", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT2-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT2-CTRL", "device_parent":"MUX5", "virt_parent":"PORT2"}, + "i2c": + { + "topo_info": { "parent_bus":"0x29", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xF", "attr_mask":"0x1", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x3", "attr_mask":"0x1", "attr_cmpval":"0x2", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x62", "attr_devtype":"cpld","attr_devname":"CPLD2", "attr_offset":"0x7", "attr_mask":"0x1", "attr_cmpval":"0x2", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xb", "attr_mask":"0x1", "attr_cmpval":"0x2", "attr_len":"1"} + ] + } + }, + "PORT1": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT1", "device_parent":"MUX5"}, + "dev_attr": { "dev_idx":"1"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT1-EEPROM" }, + { "itf":"control", "dev":"PORT1-CTRL" } + ] + } + }, + "PORT1-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT1-EEPROM", "device_parent":"MUX5", "virt_parent":"PORT1"}, + "i2c": + { + "topo_info": { "parent_bus":"0x2a", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT1-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT1-CTRL", "device_parent":"MUX5", "virt_parent":"PORT1"}, + "i2c": + { + "topo_info": { "parent_bus":"0x2a", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xF", "attr_mask":"0x0", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x3", "attr_mask":"0x0", "attr_cmpval":"0x1", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x7", "attr_mask":"0x0", "attr_cmpval":"0x1", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xb", "attr_mask":"0x0", "attr_cmpval":"0x1", "attr_len":"1"} + ] + } + }, + "PORT4": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT4", "device_parent":"MUX5"}, + "dev_attr": { "dev_idx":"4"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT4-EEPROM" }, + { "itf":"control", "dev":"PORT4-CTRL" } + ] + } + }, + "PORT4-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT4-EEPROM", "device_parent":"MUX5", "virt_parent":"PORT4"}, + "i2c": + { + "topo_info": { "parent_bus":"0x2b", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT4-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT4-CTRL", "device_parent":"MUX5", "virt_parent":"PORT4"}, + "i2c": + { + "topo_info": { "parent_bus":"0x2b", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xF", "attr_mask":"0x3", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x3", "attr_mask":"0x3", "attr_cmpval":"0x8", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x7", "attr_mask":"0x3", "attr_cmpval":"0x8", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xB", "attr_mask":"0x3", "attr_cmpval":"0x8", "attr_len":"1"} + ] + } + }, + "PORT3": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT3", "device_parent":"MUX5"}, + "dev_attr": { "dev_idx":"3"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT3-EEPROM" }, + { "itf":"control", "dev":"PORT3-CTRL" } + ] + } + }, + "PORT3-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT3-EEPROM", "device_parent":"MUX5", "virt_parent":"PORT3"}, + "i2c": + { + "topo_info": { "parent_bus":"0x2c", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT3-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT3-CTRL", "device_parent":"MUX5", "virt_parent":"PORT3"}, + "i2c": + { + "topo_info": { "parent_bus":"0x2c", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xF", "attr_mask":"0x2", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x3", "attr_mask":"0x2", "attr_cmpval":"0x4", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x7", "attr_mask":"0x2", "attr_cmpval":"0x4", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xB", "attr_mask":"0x2", "attr_cmpval":"0x4", "attr_len":"1"} + ] + } + }, + "PORT6": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT6", "device_parent":"MUX5"}, + "dev_attr": { "dev_idx":"6"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT6-EEPROM" }, + { "itf":"control", "dev":"PORT6-CTRL" } + ] + } + }, + "PORT6-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT6-EEPROM", "device_parent":"MUX5", "virt_parent":"PORT6"}, + "i2c": + { + "topo_info": { "parent_bus":"0x2d", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT6-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT6-CTRL", "device_parent":"MUX5", "virt_parent":"PORT6"}, + "i2c": + { + "topo_info": { "parent_bus":"0x2d", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xF", "attr_mask":"0x5", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x3", "attr_mask":"0x5", "attr_cmpval":"0x20", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x62", "attr_devtype":"cpld","attr_devname":"CPLD2", "attr_offset":"0x7", "attr_mask":"0x5", "attr_cmpval":"0x20", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xB", "attr_mask":"0x5", "attr_cmpval":"0x20", "attr_len":"1"} + ] + } + }, + "PORT7": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT7", "device_parent":"MUX5"}, + "dev_attr": { "dev_idx":"7"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT7-EEPROM" }, + { "itf":"control", "dev":"PORT7-CTRL" } + ] + } + }, + "PORT7-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT7-EEPROM", "device_parent":"MUX5", "virt_parent":"PORT7"}, + "i2c": + { + "topo_info": { "parent_bus":"0x2e", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT7-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT7-CTRL", "device_parent":"MUX5", "virt_parent":"PORT7"}, + "i2c": + { + "topo_info": { "parent_bus":"0x2e", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xF", "attr_mask":"0x6", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x3", "attr_mask":"0x6", "attr_cmpval":"0x40", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x62", "attr_devtype":"cpld","attr_devname":"CPLD2", "attr_offset":"0x7", "attr_mask":"0x6", "attr_cmpval":"0x40", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xB", "attr_mask":"0x6", "attr_cmpval":"0x40", "attr_len":"1"} + ] + } + }, + "PORT5": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT5", "device_parent":"MUX5"}, + "dev_attr": { "dev_idx":"5"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT5-EEPROM" }, + { "itf":"control", "dev":"PORT5-CTRL" } + ] + } + }, + "PORT5-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT5-EEPROM", "device_parent":"MUX5", "virt_parent":"PORT5"}, + "i2c": + { + "topo_info": { "parent_bus":"0x2f", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT5-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT5-CTRL", "device_parent":"MUX5", "virt_parent":"PORT5"}, + "i2c": + { + "topo_info": { "parent_bus":"0x2f", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xF", "attr_mask":"0x4", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x3", "attr_mask":"0x4", "attr_cmpval":"0x10", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x7", "attr_mask":"0x4", "attr_cmpval":"0x10", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2","attr_offset":"0xB", "attr_mask":"0x4", "attr_cmpval":"0x10", "attr_len":"1"} + ] + } + }, + "PORT9": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT9", "device_parent":"MUX5"}, + "dev_attr": { "dev_idx":"9"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT9-EEPROM" }, + { "itf":"control", "dev":"PORT9-CTRL" } + ] + } + }, + "PORT9-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT9-EEPROM", "device_parent":"MUX5", "virt_parent":"PORT9"}, + "i2c": + { + "topo_info": { "parent_bus":"0x30", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT9-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT9-CTRL", "device_parent":"MUX5", "virt_parent":"PORT9"}, + "i2c": + { + "topo_info": { "parent_bus":"0x30", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x10", "attr_mask":"0x0", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x4", "attr_mask":"0x0", "attr_cmpval":"0x1", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x62", "attr_devtype":"cpld","attr_devname":"CPLD2", "attr_offset":"0x8", "attr_mask":"0x0", "attr_cmpval":"0x1", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xC", "attr_mask":"0x0", "attr_cmpval":"0x1", "attr_len":"1"} + ] + } + }, + "PORT10": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT10", "device_parent":"MUX6"}, + "dev_attr": { "dev_idx":"10"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT10-EEPROM" }, + { "itf":"control", "dev":"PORT10-CTRL" } + ] + } + }, + "PORT10-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT10-EEPROM", "device_parent":"MUX6", "virt_parent":"PORT10"}, + "i2c": + { + "topo_info": { "parent_bus":"0x31", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT10-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT10-CTRL", "device_parent":"MUX6", "virt_parent":"PORT10"}, + "i2c": + { + "topo_info": { "parent_bus":"0x31", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x10", "attr_mask":"0x1", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x4", "attr_mask":"0x1", "attr_cmpval":"0x2", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x62", "attr_devtype":"cpld","attr_devname":"CPLD2", "attr_offset":"0x8", "attr_mask":"0x1", "attr_cmpval":"0x2", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xC", "attr_mask":"0x1", "attr_cmpval":"0x2", "attr_len":"1"} + ] + } + }, + "PORT8": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT8", "device_parent":"MUX6"}, + "dev_attr": { "dev_idx":"8"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT8-EEPROM" }, + { "itf":"control", "dev":"PORT8-CTRL" } + ] + } + }, + "PORT8-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT8-EEPROM", "device_parent":"MUX6", "virt_parent":"PORT8"}, + "i2c": + { + "topo_info": { "parent_bus":"0x32", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT8-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT8-CTRL", "device_parent":"MUX6", "virt_parent":"PORT8"}, + "i2c": + { + "topo_info": { "parent_bus":"0x32", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xF", "attr_mask":"0x7", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x3", "attr_mask":"0x7", "attr_cmpval":"0x80", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x7", "attr_mask":"0x7", "attr_cmpval":"0x80", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xB", "attr_mask":"0x7", "attr_cmpval":"0x80", "attr_len":"1"} + ] + } + }, + "PORT12": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT12", "device_parent":"MUX6"}, + "dev_attr": { "dev_idx":"12"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT12-EEPROM" }, + { "itf":"control", "dev":"PORT12-CTRL" } + ] + } + }, + "PORT12-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT12-EEPROM", "device_parent":"MUX6", "virt_parent":"PORT12"}, + "i2c": + { + "topo_info": { "parent_bus":"0x33", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT12-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT12-CTRL", "device_parent":"MUX6", "virt_parent":"PORT12"}, + "i2c": + { + "topo_info": { "parent_bus":"0x33", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x10", "attr_mask":"0x3", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x4", "attr_mask":"0x3", "attr_cmpval":"0x8", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x8", "attr_mask":"0x3", "attr_cmpval":"0x8", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xC", "attr_mask":"0x3", "attr_cmpval":"0x8", "attr_len":"1"} + ] + } + }, + "PORT11": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT11", "device_parent":"MUX6"}, + "dev_attr": { "dev_idx":"11"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT11-EEPROM" }, + { "itf":"control", "dev":"PORT11-CTRL" } + ] + } + }, + "PORT11-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT11-EEPROM", "device_parent":"MUX6", "virt_parent":"PORT11"}, + "i2c": + { + "topo_info": { "parent_bus":"0x34", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT11-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT11-CTRL", "device_parent":"MUX6", "virt_parent":"PORT11"}, + "i2c": + { + "topo_info": { "parent_bus":"0x34", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x10", "attr_mask":"0x2", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x4", "attr_mask":"0x2", "attr_cmpval":"0x4", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x8", "attr_mask":"0x2", "attr_cmpval":"0x4", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xC", "attr_mask":"0x2", "attr_cmpval":"0x4", "attr_len":"1"} + ] + } + }, + "PORT13": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT13", "device_parent":"MUX6"}, + "dev_attr": { "dev_idx":"13"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT13-EEPROM" }, + { "itf":"control", "dev":"PORT13-CTRL" } + ] + } + }, + "PORT13-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT13-EEPROM", "device_parent":"MUX6", "virt_parent":"PORT13"}, + "i2c": + { + "topo_info": { "parent_bus":"0x35", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT13-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT13-CTRL", "device_parent":"MUX6", "virt_parent":"PORT13"}, + "i2c": + { + "topo_info": { "parent_bus":"0x35", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x10", "attr_mask":"0x4", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x4", "attr_mask":"0x4", "attr_cmpval":"0x10", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x8", "attr_mask":"0x4", "attr_cmpval":"0x10", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xC", "attr_mask":"0x4", "attr_cmpval":"0x10", "attr_len":"1"} + ] + } + }, + "PORT16": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT16", "device_parent":"MUX6"}, + "dev_attr": { "dev_idx":"16"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT16-EEPROM" }, + { "itf":"control", "dev":"PORT16-CTRL" } + ] + } + }, + "PORT16-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT16-EEPROM", "device_parent":"MUX6", "virt_parent":"PORT16"}, + "i2c": + { + "topo_info": { "parent_bus":"0x36", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT16-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT16-CTRL", "device_parent":"MUX6", "virt_parent":"PORT16"}, + "i2c": + { + "topo_info": { "parent_bus":"0x36", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x10", "attr_mask":"0x7", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x4", "attr_mask":"0x7", "attr_cmpval":"0x80", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x8", "attr_mask":"0x7", "attr_cmpval":"0x80", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xC", "attr_mask":"0x7", "attr_cmpval":"0x80", "attr_len":"1"} + ] + } + }, + "PORT15": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT15", "device_parent":"MUX6"}, + "dev_attr": { "dev_idx":"15"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT15-EEPROM" }, + { "itf":"control", "dev":"PORT15-CTRL" } + ] + } + }, + "PORT15-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT15-EEPROM", "device_parent":"MUX6", "virt_parent":"PORT15"}, + "i2c": + { + "topo_info": { "parent_bus":"0x37", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT15-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT15-CTRL", "device_parent":"MUX6", "virt_parent":"PORT15"}, + "i2c": + { + "topo_info": { "parent_bus":"0x37", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x10", "attr_mask":"0x6", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x4", "attr_mask":"0x6", "attr_cmpval":"0x40", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x8", "attr_mask":"0x6", "attr_cmpval":"0x40", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xC", "attr_mask":"0x6", "attr_cmpval":"0x40", "attr_len":"1"} + ] + } + }, + "PORT14": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT14", "device_parent":"MUX6"}, + "dev_attr": { "dev_idx":"14"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT14-EEPROM" }, + { "itf":"control", "dev":"PORT14-CTRL" } + ] + } + }, + "PORT14-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT14-EEPROM", "device_parent":"MUX6", "virt_parent":"PORT14"}, + "i2c": + { + "topo_info": { "parent_bus":"0x38", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT14-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT14-CTRL", "device_parent":"MUX6", "virt_parent":"PORT14"}, + "i2c": + { + "topo_info": { "parent_bus":"0x38", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x10", "attr_mask":"0x5", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x4", "attr_mask":"0x5", "attr_cmpval":"0x20", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x8", "attr_mask":"0x5", "attr_cmpval":"0x20", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xC", "attr_mask":"0x5", "attr_cmpval":"0x20", "attr_len":"1"} + ] + } + }, + "PORT18": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT18", "device_parent":"MUX7"}, + "dev_attr": { "dev_idx":"18"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT18-EEPROM" }, + { "itf":"control", "dev":"PORT18-CTRL" } + ] + } + }, + "PORT18-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT18-EEPROM", "device_parent":"MUX7", "virt_parent":"PORT18"}, + "i2c": + { + "topo_info": { "parent_bus":"0x39", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT18-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT18-CTRL", "device_parent":"MUX7", "virt_parent":"PORT18"}, + "i2c": + { + "topo_info": { "parent_bus":"0x39", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x11", "attr_mask":"0x1", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x5", "attr_mask":"0x1", "attr_cmpval":"0x2", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x9", "attr_mask":"0x1", "attr_cmpval":"0x2", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xD", "attr_mask":"0x1", "attr_cmpval":"0x2", "attr_len":"1"} + ] + } + }, + + "PORT17": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT17", "device_parent":"MUX7"}, + "dev_attr": { "dev_idx":"17"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT17-EEPROM" }, + { "itf":"control", "dev":"PORT17-CTRL" } + ] + } + }, + "PORT17-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT17-EEPROM", "device_parent":"MUX7", "virt_parent":"PORT17"}, + "i2c": + { + "topo_info": { "parent_bus":"0x3a", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT17-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT17-CTRL", "device_parent":"MUX7", "virt_parent":"PORT17"}, + "i2c": + { + "topo_info": { "parent_bus":"0x3a", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x11", "attr_mask":"0x0", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x5", "attr_mask":"0x0", "attr_cmpval":"0x1", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x9", "attr_mask":"0x0", "attr_cmpval":"0x1", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xD", "attr_mask":"0x0", "attr_cmpval":"0x1", "attr_len":"1"} + ] + } + }, + + "PORT20": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT20", "device_parent":"MUX7"}, + "dev_attr": { "dev_idx":"20"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT20-EEPROM" }, + { "itf":"control", "dev":"PORT20-CTRL" } + ] + } + }, + "PORT20-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT20-EEPROM", "device_parent":"MUX7", "virt_parent":"PORT20"}, + "i2c": + { + "topo_info": { "parent_bus":"0x3b", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT20-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT20-CTRL", "device_parent":"MUX7", "virt_parent":"PORT20"}, + "i2c": + { + "topo_info": { "parent_bus":"0x3b", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x11", "attr_mask":"0x3", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x5", "attr_mask":"0x3", "attr_cmpval":"0x8", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x9", "attr_mask":"0x3", "attr_cmpval":"0x8", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xD", "attr_mask":"0x3", "attr_cmpval":"0x8", "attr_len":"1"} + ] + } + }, + + "PORT19": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT19", "device_parent":"MUX7"}, + "dev_attr": { "dev_idx":"19"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT19-EEPROM" }, + { "itf":"control", "dev":"PORT19-CTRL" } + ] + } + }, + "PORT19-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT19-EEPROM", "device_parent":"MUX7", "virt_parent":"PORT19"}, + "i2c": + { + "topo_info": { "parent_bus":"0x3c", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT19-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT19-CTRL", "device_parent":"MUX7", "virt_parent":"PORT19"}, + "i2c": + { + "topo_info": { "parent_bus":"0x3c", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x11", "attr_mask":"0x2", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x5", "attr_mask":"0x2", "attr_cmpval":"0x4", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x9", "attr_mask":"0x2", "attr_cmpval":"0x4", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xD", "attr_mask":"0x2", "attr_cmpval":"0x4", "attr_len":"1"} + ] + } + }, + + "PORT21": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT21", "device_parent":"MUX7"}, + "dev_attr": { "dev_idx":"21"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT21-EEPROM" }, + { "itf":"control", "dev":"PORT21-CTRL" } + ] + } + }, + "PORT21-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT21-EEPROM", "device_parent":"MUX7", "virt_parent":"PORT21"}, + "i2c": + { + "topo_info": { "parent_bus":"0x3d", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT21-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT21-CTRL", "device_parent":"MUX7", "virt_parent":"PORT21"}, + "i2c": + { + "topo_info": { "parent_bus":"0x3d", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x11", "attr_mask":"0x4", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x5", "attr_mask":"0x4", "attr_cmpval":"0x10", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x9", "attr_mask":"0x4", "attr_cmpval":"0x10", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xD", "attr_mask":"0x4", "attr_cmpval":"0x10", "attr_len":"1"} + ] + } + }, + + "PORT23": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT23", "device_parent":"MUX7"}, + "dev_attr": { "dev_idx":"23"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT23-EEPROM" }, + { "itf":"control", "dev":"PORT23-CTRL" } + ] + } + }, + "PORT23-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT23-EEPROM", "device_parent":"MUX7", "virt_parent":"PORT23"}, + "i2c": + { + "topo_info": { "parent_bus":"0x3e", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT23-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT23-CTRL", "device_parent":"MUX7", "virt_parent":"PORT23"}, + "i2c": + { + "topo_info": { "parent_bus":"0x3e", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x11", "attr_mask":"0x6", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x5", "attr_mask":"0x6", "attr_cmpval":"0x40", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x9", "attr_mask":"0x6", "attr_cmpval":"0x40", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xD", "attr_mask":"0x6", "attr_cmpval":"0x40", "attr_len":"1"} + ] + } + }, + + "PORT22": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT22", "device_parent":"MUX7"}, + "dev_attr": { "dev_idx":"22"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT22-EEPROM" }, + { "itf":"control", "dev":"PORT22-CTRL" } + ] + } + }, + "PORT22-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT22-EEPROM", "device_parent":"MUX7", "virt_parent":"PORT22"}, + "i2c": + { + "topo_info": { "parent_bus":"0x3f", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT22-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT22-CTRL", "device_parent":"MUX7", "virt_parent":"PORT22"}, + "i2c": + { + "topo_info": { "parent_bus":"0x3f", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x11", "attr_mask":"0x5", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x5", "attr_mask":"0x5", "attr_cmpval":"0x20", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x9", "attr_mask":"0x5", "attr_cmpval":"0x20", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xD", "attr_mask":"0x5", "attr_cmpval":"0x20", "attr_len":"1"} + ] + } + }, + "PORT24": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT24", "device_parent":"MUX7"}, + "dev_attr": { "dev_idx":"24"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT24-EEPROM" }, + { "itf":"control", "dev":"PORT24-CTRL" } + ] + } + }, + "PORT24-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT24-EEPROM", "device_parent":"MUX7", "virt_parent":"PORT24"}, + "i2c": + { + "topo_info": { "parent_bus":"0x40", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT24-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT24-CTRL", "device_parent":"MUX7", "virt_parent":"PORT24"}, + "i2c": + { + "topo_info": { "parent_bus":"0x40", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x11", "attr_mask":"0x7", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x5", "attr_mask":"0x7", "attr_cmpval":"0x80", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x9", "attr_mask":"0x7", "attr_cmpval":"0x80", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xD", "attr_mask":"0x7", "attr_cmpval":"0x80", "attr_len":"1"} + ] + } + }, + "PORT27": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT27", "device_parent":"MUX8"}, + "dev_attr": { "dev_idx":"27"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT27-EEPROM" }, + { "itf":"control", "dev":"PORT27-CTRL" } + ] + } + }, + "PORT27-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT27-EEPROM", "device_parent":"MUX8", "virt_parent":"PORT27"}, + "i2c": + { + "topo_info": { "parent_bus":"0x41", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT27-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT27-CTRL", "device_parent":"MUX8", "virt_parent":"PORT27"}, + "i2c": + { + "topo_info": { "parent_bus":"0x41", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x12", "attr_mask":"0x2", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x6", "attr_mask":"0x2", "attr_cmpval":"0x4", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xA", "attr_mask":"0x2", "attr_cmpval":"0x4", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xE", "attr_mask":"0x2", "attr_cmpval":"0x4", "attr_len":"1"} + ] + } + }, + "PORT25": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT25", "device_parent":"MUX8"}, + "dev_attr": { "dev_idx":"25"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT25-EEPROM" }, + { "itf":"control", "dev":"PORT25-CTRL" } + ] + } + }, + "PORT25-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT25-EEPROM", "device_parent":"MUX8", "virt_parent":"PORT25"}, + "i2c": + { + "topo_info": { "parent_bus":"0x42", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT25-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT25-CTRL", "device_parent":"MUX8", "virt_parent":"PORT25"}, + "i2c": + { + "topo_info": { "parent_bus":"0x42", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x12", "attr_mask":"0x0", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x6", "attr_mask":"0x0", "attr_cmpval":"0x1", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xA", "attr_mask":"0x0", "attr_cmpval":"0x1", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xE", "attr_mask":"0x0", "attr_cmpval":"0x1", "attr_len":"1"} + ] + } + }, + + "PORT28": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT28", "device_parent":"MUX8"}, + "dev_attr": { "dev_idx":"28"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT28-EEPROM" }, + { "itf":"control", "dev":"PORT28-CTRL" } + ] + } + }, + "PORT28-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT28-EEPROM", "device_parent":"MUX8", "virt_parent":"PORT28"}, + "i2c": + { + "topo_info": { "parent_bus":"0x43", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT28-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT28-CTRL", "device_parent":"MUX8", "virt_parent":"PORT28"}, + "i2c": + { + "topo_info": { "parent_bus":"0x43", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x12", "attr_mask":"0x3", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x6", "attr_mask":"0x3", "attr_cmpval":"0x8", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xA", "attr_mask":"0x3", "attr_cmpval":"0x8", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xE", "attr_mask":"0x3", "attr_cmpval":"0x8", "attr_len":"1"} + ] + } + }, + "PORT26": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT26", "device_parent":"MUX8"}, + "dev_attr": { "dev_idx":"26"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT26-EEPROM" }, + { "itf":"control", "dev":"PORT26-CTRL" } + ] + } + }, + "PORT26-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT26-EEPROM", "device_parent":"MUX8", "virt_parent":"PORT26"}, + "i2c": + { + "topo_info": { "parent_bus":"0x44", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT26-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT26-CTRL", "device_parent":"MUX8", "virt_parent":"PORT26"}, + "i2c": + { + "topo_info": { "parent_bus":"0x44", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x12", "attr_mask":"0x1", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x6", "attr_mask":"0x1", "attr_cmpval":"0x2", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xA", "attr_mask":"0x1", "attr_cmpval":"0x2", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xE", "attr_mask":"0x1", "attr_cmpval":"0x2", "attr_len":"1"} + ] + } + }, + "PORT29": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT29", "device_parent":"MUX8"}, + "dev_attr": { "dev_idx":"29"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT29-EEPROM" }, + { "itf":"control", "dev":"PORT29-CTRL" } + ] + } + }, + "PORT29-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT29-EEPROM", "device_parent":"MUX8", "virt_parent":"PORT29"}, + "i2c": + { + "topo_info": { "parent_bus":"0x45", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT29-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT29-CTRL", "device_parent":"MUX8", "virt_parent":"PORT29"}, + "i2c": + { + "topo_info": { "parent_bus":"0x45", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x12", "attr_mask":"0x4", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x6", "attr_mask":"0x4", "attr_cmpval":"0x10", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xA", "attr_mask":"0x4", "attr_cmpval":"0x10", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xE", "attr_mask":"0x4", "attr_cmpval":"0x10", "attr_len":"1"} + ] + } + }, + + "PORT32": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT32", "device_parent":"MUX8"}, + "dev_attr": { "dev_idx":"32"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT32-EEPROM" }, + { "itf":"control", "dev":"PORT32-CTRL" } + ] + } + }, + "PORT32-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT32-EEPROM", "device_parent":"MUX8", "virt_parent":"PORT32"}, + "i2c": + { + "topo_info": { "parent_bus":"0x46", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT32-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT32-CTRL", "device_parent":"MUX8", "virt_parent":"PORT32"}, + "i2c": + { + "topo_info": { "parent_bus":"0x46", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x10", "attr_mask":"0x1", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x1A", "attr_mask":"0x1", "attr_cmpval":"0x2", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x14", "attr_mask":"0x1", "attr_cmpval":"0x2", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x17", "attr_mask":"0x1", "attr_cmpval":"0x2", "attr_len":"1"} + ] + } + }, + "PORT30": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT30", "device_parent":"MUX8"}, + "dev_attr": { "dev_idx":"30"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT30-EEPROM" }, + { "itf":"control", "dev":"PORT30-CTRL" } + ] + } + }, + "PORT30-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT30-EEPROM", "device_parent":"MUX8", "virt_parent":"PORT30"}, + "i2c": + { + "topo_info": { "parent_bus":"0x47", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT30-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT30-CTRL", "device_parent":"MUX8", "virt_parent":"PORT30"}, + "i2c": + { + "topo_info": { "parent_bus":"0x47", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x12", "attr_mask":"0x5", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0x6", "attr_mask":"0x5", "attr_cmpval":"0x20", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xA", "attr_mask":"0x5", "attr_cmpval":"0x20", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x62", "attr_devtype":"cpld", "attr_devname":"CPLD2", "attr_offset":"0xE", "attr_mask":"0x5", "attr_cmpval":"0x20", "attr_len":"1"} + ] + } + }, + + "PORT31": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT31", "device_parent":"MUX8"}, + "dev_attr": { "dev_idx":"31"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT31-EEPROM" }, + { "itf":"control", "dev":"PORT31-CTRL" } + ] + } + }, + "PORT31-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT31-EEPROM", "device_parent":"MUX8", "virt_parent":"PORT31"}, + "i2c": + { + "topo_info": { "parent_bus":"0x48", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT31-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT31-CTRL", "device_parent":"MUX8", "virt_parent":"PORT31"}, + "i2c": + { + "topo_info": { "parent_bus":"0x48", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x10", "attr_mask":"0x0", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x1A", "attr_mask":"0x0", "attr_cmpval":"0x1", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x14", "attr_mask":"0x0", "attr_cmpval":"0x1", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x17", "attr_mask":"0x0", "attr_cmpval":"0x1", "attr_len":"1"} + ] + } + }, + + "PORT34": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT34", "device_parent":"MUX9"}, + "dev_attr": { "dev_idx":"34"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT34-EEPROM" }, + { "itf":"control", "dev":"PORT34-CTRL" } + ] + } + }, + "PORT34-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT34-EEPROM", "device_parent":"MUX9", "virt_parent":"PORT34"}, + "i2c": + { + "topo_info": { "parent_bus":"0x49", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT34-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT34-CTRL", "device_parent":"MUX9", "virt_parent":"PORT34"}, + "i2c": + { + "topo_info": { "parent_bus":"0x49", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x10", "attr_mask":"0x3", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x1A", "attr_mask":"0x3", "attr_cmpval":"0x8", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x14", "attr_mask":"0x3", "attr_cmpval":"0x8", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x17", "attr_mask":"0x3", "attr_cmpval":"0x8", "attr_len":"1"} + ] + } + }, + + "PORT33": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT33", "device_parent":"MUX9"}, + "dev_attr": { "dev_idx":"33"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT33-EEPROM" }, + { "itf":"control", "dev":"PORT33-CTRL" } + ] + } + }, + "PORT33-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT33-EEPROM", "device_parent":"MUX9", "virt_parent":"PORT33"}, + "i2c": + { + "topo_info": { "parent_bus":"0x4a", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT33-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT33-CTRL", "device_parent":"MUX9", "virt_parent":"PORT33"}, + "i2c": + { + "topo_info": { "parent_bus":"0x4a", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x10", "attr_mask":"0x2", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x1A", "attr_mask":"0x2", "attr_cmpval":"0x4", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x14", "attr_mask":"0x2", "attr_cmpval":"0x4", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x17", "attr_mask":"0x2", "attr_cmpval":"0x4", "attr_len":"1"} + ] + } + }, + + "PORT36": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT36", "device_parent":"MUX9"}, + "dev_attr": { "dev_idx":"36"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT36-EEPROM" }, + { "itf":"control", "dev":"PORT36-CTRL" } + ] + } + }, + "PORT36-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT36-EEPROM", "device_parent":"MUX9", "virt_parent":"PORT36"}, + "i2c": + { + "topo_info": { "parent_bus":"0x4b", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT36-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT36-CTRL", "device_parent":"MUX9", "virt_parent":"PORT36"}, + "i2c": + { + "topo_info": { "parent_bus":"0x4b", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x10", "attr_mask":"0x5", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x1A", "attr_mask":"0x5", "attr_cmpval":"0x20", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x14", "attr_mask":"0x5", "attr_cmpval":"0x20", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x17", "attr_mask":"0x5", "attr_cmpval":"0x20", "attr_len":"1"} + ] + } + }, + + "PORT35": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT35", "device_parent":"MUX9"}, + "dev_attr": { "dev_idx":"35"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT35-EEPROM" }, + { "itf":"control", "dev":"PORT35-CTRL" } + ] + } + }, + "PORT35-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT35-EEPROM", "device_parent":"MUX9", "virt_parent":"PORT35"}, + "i2c": + { + "topo_info": { "parent_bus":"0x4c", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT35-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT35-CTRL", "device_parent":"MUX9", "virt_parent":"PORT35"}, + "i2c": + { + "topo_info": { "parent_bus":"0x4c", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x10", "attr_mask":"0x4", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x1A", "attr_mask":"0x4", "attr_cmpval":"0x10", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x14", "attr_mask":"0x4", "attr_cmpval":"0x10", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x17", "attr_mask":"0x4", "attr_cmpval":"0x10", "attr_len":"1"} + ] + } + }, + + "PORT37": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT37", "device_parent":"MUX9"}, + "dev_attr": { "dev_idx":"37"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT37-EEPROM" }, + { "itf":"control", "dev":"PORT37-CTRL" } + ] + } + }, + "PORT37-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT37-EEPROM", "device_parent":"MUX9", "virt_parent":"PORT37"}, + "i2c": + { + "topo_info": { "parent_bus":"0x4d", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT37-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT37-CTRL", "device_parent":"MUX9", "virt_parent":"PORT37"}, + "i2c": + { + "topo_info": { "parent_bus":"0x4d", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x10", "attr_mask":"0x6", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x1A", "attr_mask":"0x6", "attr_cmpval":"0x40", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x14", "attr_mask":"0x6", "attr_cmpval":"0x40", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x17", "attr_mask":"0x6", "attr_cmpval":"0x40", "attr_len":"1"} + ] + } + }, + + "PORT39": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT39", "device_parent":"MUX9"}, + "dev_attr": { "dev_idx":"39"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT39-EEPROM" }, + { "itf":"control", "dev":"PORT39-CTRL" } + ] + } + }, + "PORT39-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT39-EEPROM", "device_parent":"MUX9", "virt_parent":"PORT39"}, + "i2c": + { + "topo_info": { "parent_bus":"0x4e", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT39-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT39-CTRL", "device_parent":"MUX9", "virt_parent":"PORT39"}, + "i2c": + { + "topo_info": { "parent_bus":"0x4e", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x11", "attr_mask":"0x0", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x1B", "attr_mask":"0x0", "attr_cmpval":"0x1", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x15", "attr_mask":"0x0", "attr_cmpval":"0x1", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x18", "attr_mask":"0x0", "attr_cmpval":"0x1", "attr_len":"1"} + ] + } + }, + + "PORT38": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT38", "device_parent":"MUX9"}, + "dev_attr": { "dev_idx":"38"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT38-EEPROM" }, + { "itf":"control", "dev":"PORT38-CTRL" } + ] + } + }, + "PORT38-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT38-EEPROM", "device_parent":"MUX9", "virt_parent":"PORT38"}, + "i2c": + { + "topo_info": { "parent_bus":"0x4f", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT38-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT38-CTRL", "device_parent":"MUX9", "virt_parent":"PORT38"}, + "i2c": + { + "topo_info": { "parent_bus":"0x4f", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x10", "attr_mask":"0x7", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x1A", "attr_mask":"0x7", "attr_cmpval":"0x80", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x14", "attr_mask":"0x7", "attr_cmpval":"0x80", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x17", "attr_mask":"0x7", "attr_cmpval":"0x80", "attr_len":"1"} + ] + } + }, + + "PORT40": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT40", "device_parent":"MUX9"}, + "dev_attr": { "dev_idx":"40"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT40-EEPROM" }, + { "itf":"control", "dev":"PORT40-CTRL" } + ] + } + }, + "PORT40-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT40-EEPROM", "device_parent":"MUX9", "virt_parent":"PORT40"}, + "i2c": + { + "topo_info": { "parent_bus":"0x50", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT40-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT40-CTRL", "device_parent":"MUX9", "virt_parent":"PORT40"}, + "i2c": + { + "topo_info": { "parent_bus":"0x50", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x11", "attr_mask":"0x1", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x1B", "attr_mask":"0x1", "attr_cmpval":"0x2", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x15", "attr_mask":"0x1", "attr_cmpval":"0x2", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x18", "attr_mask":"0x1", "attr_cmpval":"0x2", "attr_len":"1"} + ] + } + }, + "PORT41": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT41", "device_parent":"MUX10"}, + "dev_attr": { "dev_idx":"41"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT41-EEPROM" }, + { "itf":"control", "dev":"PORT41-CTRL" } + ] + } + }, + "PORT41-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT41-EEPROM", "device_parent":"MUX10", "virt_parent":"PORT41"}, + "i2c": + { + "topo_info": { "parent_bus":"0x51", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT41-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT41-CTRL", "device_parent":"MUX10", "virt_parent":"PORT41"}, + "i2c": + { + "topo_info": { "parent_bus":"0x51", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x11", "attr_mask":"0x2", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x1B", "attr_mask":"0x2", "attr_cmpval":"0x4", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x15", "attr_mask":"0x2", "attr_cmpval":"0x4", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x18", "attr_mask":"0x2", "attr_cmpval":"0x4", "attr_len":"1"} + ] + } + }, + "PORT42": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT42", "device_parent":"MUX10"}, + "dev_attr": { "dev_idx":"42"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT42-EEPROM" }, + { "itf":"control", "dev":"PORT42-CTRL" } + ] + } + }, + "PORT42-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT42-EEPROM", "device_parent":"MUX10", "virt_parent":"PORT42"}, + "i2c": + { + "topo_info": { "parent_bus":"0x52", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT42-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT42-CTRL", "device_parent":"MUX10", "virt_parent":"PORT42"}, + "i2c": + { + "topo_info": { "parent_bus":"0x52", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x11", "attr_mask":"0x3", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x1B", "attr_mask":"0x3", "attr_cmpval":"0x8", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x15", "attr_mask":"0x3", "attr_cmpval":"0x8", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x18", "attr_mask":"0x3", "attr_cmpval":"0x8", "attr_len":"1"} + ] + } + }, + "PORT45": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT45", "device_parent":"MUX10"}, + "dev_attr": { "dev_idx":"45"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT45-EEPROM" }, + { "itf":"control", "dev":"PORT45-CTRL" } + ] + } + }, + "PORT45-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT45-EEPROM", "device_parent":"MUX10", "virt_parent":"PORT45"}, + "i2c": + { + "topo_info": { "parent_bus":"0x53", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT45-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT45-CTRL", "device_parent":"MUX10", "virt_parent":"PORT45"}, + "i2c": + { + "topo_info": { "parent_bus":"0x53", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x11", "attr_mask":"0x6", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x1B", "attr_mask":"0x6", "attr_cmpval":"0x40", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x15", "attr_mask":"0x6", "attr_cmpval":"0x40", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x18", "attr_mask":"0x6", "attr_cmpval":"0x40", "attr_len":"1"} + ] + } + }, + "PORT43": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT43", "device_parent":"MUX10"}, + "dev_attr": { "dev_idx":"43"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT43-EEPROM" }, + { "itf":"control", "dev":"PORT43-CTRL" } + ] + } + }, + "PORT43-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT43-EEPROM", "device_parent":"MUX10", "virt_parent":"PORT43"}, + "i2c": + { + "topo_info": { "parent_bus":"0x54", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT43-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT43-CTRL", "device_parent":"MUX10", "virt_parent":"PORT43"}, + "i2c": + { + "topo_info": { "parent_bus":"0x54", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x11", "attr_mask":"0x4", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x1B", "attr_mask":"0x4", "attr_cmpval":"0x10", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x15", "attr_mask":"0x4", "attr_cmpval":"0x10", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x18", "attr_mask":"0x4", "attr_cmpval":"0x10", "attr_len":"1"} + ] + } + }, + "PORT44": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT44", "device_parent":"MUX10"}, + "dev_attr": { "dev_idx":"44"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT44-EEPROM" }, + { "itf":"control", "dev":"PORT44-CTRL" } + ] + } + }, + "PORT44-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT44-EEPROM", "device_parent":"MUX10", "virt_parent":"PORT44"}, + "i2c": + { + "topo_info": { "parent_bus":"0x55", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT44-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT44-CTRL", "device_parent":"MUX10", "virt_parent":"PORT44"}, + "i2c": + { + "topo_info": { "parent_bus":"0x55", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x11", "attr_mask":"0x5", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x1B", "attr_mask":"0x5", "attr_cmpval":"0x20", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x60", "attr_devtype":"cpld","attr_devname":"CPLD1","attr_offset":"0x15", "attr_mask":"0x5", "attr_cmpval":"0x20", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x18", "attr_mask":"0x5", "attr_cmpval":"0x20", "attr_len":"1"} + ] + } + }, + "PORT48": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT48", "device_parent":"MUX10"}, + "dev_attr": { "dev_idx":"48"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT48-EEPROM" }, + { "itf":"control", "dev":"PORT48-CTRL" } + ] + } + }, + "PORT48-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT48-EEPROM", "device_parent":"MUX10", "virt_parent":"PORT48"}, + "i2c": + { + "topo_info": { "parent_bus":"0x56", "dev_addr":"0x50", "dev_type":"optoe1"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT48-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT48-CTRL", "device_parent":"MUX10", "virt_parent":"PORT48"}, + "i2c": + { + "topo_info": { "parent_bus":"0x56", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x60", "attr_devtype":"cpld","attr_devname":"CPLD1", "attr_offset":"0x12", "attr_mask":"0x1", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x1C", "attr_mask":"0x1", "attr_cmpval":"0x2", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x60", "attr_devtype":"cpld","attr_devname":"CPLD1", "attr_offset":"0x16", "attr_mask":"0x1", "attr_cmpval":"0x2", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x19", "attr_mask":"0x1", "attr_cmpval":"0x2", "attr_len":"1"} + ] + } + }, + "PORT46": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT46", "device_parent":"MUX10"}, + "dev_attr": { "dev_idx":"46"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT46-EEPROM" }, + { "itf":"control", "dev":"PORT46-CTRL" } + ] + } + }, + "PORT46-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT46-EEPROM", "device_parent":"MUX10", "virt_parent":"PORT46"}, + "i2c": + { + "topo_info": { "parent_bus":"0x57", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT46-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT46-CTRL", "device_parent":"MUX10", "virt_parent":"PORT46"}, + "i2c": + { + "topo_info": { "parent_bus":"0x57", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x60", "attr_devtype":"cpld","attr_devname":"CPLD1", "attr_offset":"0x11", "attr_mask":"0x7", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1","attr_offset":"0x1B", "attr_mask":"0x7", "attr_cmpval":"0x80", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x60", "attr_devtype":"cpld","attr_devname":"CPLD1", "attr_offset":"0x15", "attr_mask":"0x7", "attr_cmpval":"0x80", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1","attr_offset":"0x18", "attr_mask":"0x7", "attr_cmpval":"0x80", "attr_len":"1"} + ] + } + }, + "PORT47": + { + "dev_info": { "device_type":"SFP28", "device_name":"PORT47", "device_parent":"MUX10"}, + "dev_attr": { "dev_idx":"47"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT47-EEPROM" }, + { "itf":"control", "dev":"PORT47-CTRL" } + ] + } + }, + "PORT47-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT47-EEPROM", "device_parent":"MUX10", "virt_parent":"PORT47"}, + "i2c": + { + "topo_info": { "parent_bus":"0x58", "dev_addr":"0x50", "dev_type":"optoe2"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT47-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT47-CTRL", "device_parent":"MUX10", "virt_parent":"PORT47"}, + "i2c": + { + "topo_info": { "parent_bus":"0x58", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x12", "attr_mask":"0x0", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_txfault", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x1C", "attr_mask":"0x0", "attr_cmpval":"0x1", "attr_len":"1"}, + { "attr_name":"xcvr_txdisable", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x16", "attr_mask":"0x0", "attr_cmpval":"0x1", "attr_len":"1"}, + { "attr_name":"xcvr_rxlos", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x19", "attr_mask":"0x0", "attr_cmpval":"0x1", "attr_len":"1"} + ] + } + }, + + "PORT49": + { + "dev_info": { "device_type":"QSFP28", "device_name":"PORT49", "device_parent":"MUX11"}, + "dev_attr": { "dev_idx":"49"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT49-EEPROM" }, + { "itf":"control", "dev":"PORT49-CTRL" } + ] + } + }, + "PORT49-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT49-EEPROM", "device_parent":"MUX11", "virt_parent":"PORT49"}, + "i2c": + { + "topo_info": { "parent_bus":"0x19", "dev_addr":"0x50", "dev_type":"optoe1"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT49-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT49-CTRL", "device_parent":"MUX11", "virt_parent":"PORT49"}, + "i2c": + { + "topo_info": { "parent_bus":"0x19", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x13", "attr_mask":"0x0", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_reset", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x4", "attr_mask":"0x0", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_intr_status", "attr_devaddr":"0x60", "attr_devtype":"cpld","attr_devname":"CPLD1", "attr_offset":"0xA", "attr_mask":"0x0", "attr_cmpval":"0x0", "attr_len":"1"} + + ] + } + }, + + "PORT50": + { + "dev_info": { "device_type":"QSFP28", "device_name":"PORT50", "device_parent":"MUX11"}, + "dev_attr": { "dev_idx":"50"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT50-EEPROM" }, + { "itf":"control", "dev":"PORT50-CTRL" } + ] + } + }, + "PORT50-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT50-EEPROM", "device_parent":"MUX11", "virt_parent":"PORT50"}, + "i2c": + { + "topo_info": { "parent_bus":"0x1a", "dev_addr":"0x50", "dev_type":"optoe1"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT50-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT50-CTRL", "device_parent":"MUX11", "virt_parent":"PORT50"}, + "i2c": + { + "topo_info": { "parent_bus":"0x1a", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x13", "attr_mask":"0x1", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_reset", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x4", "attr_mask":"0x1", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_intr_status", "attr_devaddr":"0x60", "attr_devtype":"cpld","attr_devname":"CPLD1", "attr_offset":"0xA", "attr_mask":"0x1", "attr_cmpval":"0x0", "attr_len":"1"} + + ] + } + }, + + "PORT51": + { + "dev_info": { "device_type":"QSFP28", "device_name":"PORT51", "device_parent":"MUX11"}, + "dev_attr": { "dev_idx":"51"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT51-EEPROM" }, + { "itf":"control", "dev":"PORT51-CTRL" } + ] + } + }, + "PORT51-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT51-EEPROM", "device_parent":"MUX11", "virt_parent":"PORT51"}, + "i2c": + { + "topo_info": { "parent_bus":"0x1b", "dev_addr":"0x50", "dev_type":"optoe1"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT51-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT51-CTRL", "device_parent":"MUX11", "virt_parent":"PORT51"}, + "i2c": + { + "topo_info": { "parent_bus":"0x1b", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x13", "attr_mask":"0x2", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_reset", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x4", "attr_mask":"0x2", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_intr_status", "attr_devaddr":"0x60", "attr_devtype":"cpld","attr_devname":"CPLD1", "attr_offset":"0xA", "attr_mask":"0x2", "attr_cmpval":"0x0", "attr_len":"1"} + + ] + } + }, + + "PORT52": + { + "dev_info": { "device_type":"QSFP28", "device_name":"PORT52", "device_parent":"MUX11"}, + "dev_attr": { "dev_idx":"52"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT52-EEPROM" }, + { "itf":"control", "dev":"PORT52-CTRL" } + ] + } + }, + "PORT52-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT52-EEPROM", "device_parent":"MUX11", "virt_parent":"PORT52"}, + "i2c": + { + "topo_info": { "parent_bus":"0x1c", "dev_addr":"0x50", "dev_type":"optoe1"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT52-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT52-CTRL", "device_parent":"MUX11", "virt_parent":"PORT52"}, + "i2c": + { + "topo_info": { "parent_bus":"0x1c", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x13", "attr_mask":"0x3", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_reset", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x4", "attr_mask":"0x3", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_intr_status", "attr_devaddr":"0x60", "attr_devtype":"cpld","attr_devname":"CPLD1", "attr_offset":"0xA", "attr_mask":"0x3", "attr_cmpval":"0x0", "attr_len":"1"} + + ] + } + }, + + "PORT53": + { + "dev_info": { "device_type":"QSFP28", "device_name":"PORT53", "device_parent":"MUX11"}, + "dev_attr": { "dev_idx":"53"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT53-EEPROM" }, + { "itf":"control", "dev":"PORT53-CTRL" } + ] + } + }, + "PORT53-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT53-EEPROM", "device_parent":"MUX11", "virt_parent":"PORT53"}, + "i2c": + { + "topo_info": { "parent_bus":"0x1d", "dev_addr":"0x50", "dev_type":"optoe1"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT53-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT53-CTRL", "device_parent":"MUX11", "virt_parent":"PORT53"}, + "i2c": + { + "topo_info": { "parent_bus":"0x1d", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x13", "attr_mask":"0x4", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_reset", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x4", "attr_mask":"0x4", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_intr_status", "attr_devaddr":"0x60", "attr_devtype":"cpld","attr_devname":"CPLD1", "attr_offset":"0xA", "attr_mask":"0x4", "attr_cmpval":"0x0", "attr_len":"1"} + + ] + } + }, + + "PORT54": + { + "dev_info": { "device_type":"QSFP28", "device_name":"PORT54", "device_parent":"MUX11"}, + "dev_attr": { "dev_idx":"54"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT54-EEPROM" }, + { "itf":"control", "dev":"PORT54-CTRL" } + ] + } + }, + "PORT54-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT54-EEPROM", "device_parent":"MUX11", "virt_parent":"PORT54"}, + "i2c": + { + "topo_info": { "parent_bus":"0x1e", "dev_addr":"0x50", "dev_type":"optoe1"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT54-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT54-CTRL", "device_parent":"MUX11", "virt_parent":"PORT54"}, + "i2c": + { + "topo_info": { "parent_bus":"0x1e", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x13", "attr_mask":"0x5", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_reset", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x4", "attr_mask":"0x5", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_intr_status", "attr_devaddr":"0x60", "attr_devtype":"cpld","attr_devname":"CPLD1", "attr_offset":"0xA", "attr_mask":"0x5", "attr_cmpval":"0x0", "attr_len":"1"} + + ] + } + }, + + "PORT55": + { + "dev_info": { "device_type":"QSFP28", "device_name":"PORT55", "device_parent":"MUX11"}, + "dev_attr": { "dev_idx":"55"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT55-EEPROM" }, + { "itf":"control", "dev":"PORT55-CTRL" } + ] + } + }, + "PORT55-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT55-EEPROM", "device_parent":"MUX11", "virt_parent":"PORT55"}, + "i2c": + { + "topo_info": { "parent_bus":"0x1f", "dev_addr":"0x50", "dev_type":"optoe1"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT55-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT55-CTRL", "device_parent":"MUX11", "virt_parent":"PORT55"}, + "i2c": + { + "topo_info": { "parent_bus":"0x1f", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x13", "attr_mask":"0x6", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_reset", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x4", "attr_mask":"0x6", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_intr_status", "attr_devaddr":"0x60", "attr_devtype":"cpld","attr_devname":"CPLD1", "attr_offset":"0xA", "attr_mask":"0x6", "attr_cmpval":"0x0", "attr_len":"1"} + + ] + } + }, + + "PORT56": + { + "dev_info": { "device_type":"QSFP28", "device_name":"PORT56", "device_parent":"MUX11"}, + "dev_attr": { "dev_idx":"56"}, + "i2c": + { + "interface": + [ + { "itf":"eeprom", "dev":"PORT56-EEPROM" }, + { "itf":"control", "dev":"PORT56-CTRL" } + ] + } + }, + "PORT56-EEPROM": + { + "dev_info": { "device_type":"", "device_name":"PORT56-EEPROM", "device_parent":"MUX11", "virt_parent":"PORT56"}, + "i2c": + { + "topo_info": { "parent_bus":"0x20", "dev_addr":"0x50", "dev_type":"optoe1"}, + "attr_list": + [ + { "attr_name":"eeprom"} + ] + } + }, + "PORT56-CTRL": + { + "dev_info": { "device_type":"", "device_name":"PORT56-CTRL", "device_parent":"MUX11", "virt_parent":"PORT56"}, + "i2c": + { + "topo_info": { "parent_bus":"0x20", "dev_addr":"0x53", "dev_type":"pddf_xcvr"}, + "attr_list": + [ + { "attr_name":"xcvr_present", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x13", "attr_mask":"0x7", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_reset", "attr_devaddr":"0x60", "attr_devtype":"cpld", "attr_devname":"CPLD1", "attr_offset":"0x4", "attr_mask":"0x7", "attr_cmpval":"0x0", "attr_len":"1"}, + { "attr_name":"xcvr_intr_status", "attr_devaddr":"0x60", "attr_devtype":"cpld","attr_devname":"CPLD1", "attr_offset":"0xA", "attr_mask":"0x7", "attr_cmpval":"0x0", "attr_len":"1"} + + ] + } + }, + "LOC_LED": + { + "dev_info": { "device_type":"LED", "device_name":"LOC_LED"}, + "dev_attr": { "index":"0"}, + "i2c" : + { + "attr_list": + [ + {"attr_name":"STATUS_LED_COLOR_BLUE_BLINK", "descr": "" , "bits" : "5:0", "value" : "0x27", "swpld_addr" : "0x60", "swpld_addr_offset" : "0x25"}, + {"attr_name":"STATUS_LED_COLOR_GREEN_BLINK", "descr": "" , "bits" : "5:0", "value" : "0x17", "swpld_addr" : "0x60", "swpld_addr_offset" : "0x25"}, + {"attr_name":"STATUS_LED_COLOR_AMBER_BLINK", "descr": "" , "bits" : "5:0", "value" : "0xf", "swpld_addr" : "0x60", "swpld_addr_offset" : "0x25"}, + {"attr_name":"STATUS_LED_COLOR_BLUE", "descr": "" , "bits" : "5:0", "value" : "0x3", "swpld_addr" : "0x60", "swpld_addr_offset" : "0x25"}, + {"attr_name":"STATUS_LED_COLOR_GREEN", "descr": "" , "bits" : "5:0", "value" : "0x5", "swpld_addr" : "0x60", "swpld_addr_offset" : "0x25"}, + {"attr_name":"STATUS_LED_COLOR_AMBER", "descr": "" , "bits" : "5:0", "value" : "0x6", "swpld_addr" : "0x60", "swpld_addr_offset" : "0x25"}, + {"attr_name":"STATUS_LED_COLOR_OFF", "descr": "" , "bits" : "5:0", "value" : "0xf", "swpld_addr" : "0x60", "swpld_addr_offset" : "0x25"} + ] + } + }, + "DIAG_LED": + { + "dev_info": { "device_type":"LED", "device_name":"DIAG_LED"}, + "dev_attr": { "index":"0"}, + "i2c" : + { + "attr_list": + [ + {"attr_name":"STATUS_LED_COLOR_BLUE_BLINK", "descr": "" , "bits" : "5:0", "value" : "0x27", "swpld_addr" : "0x60", "swpld_addr_offset" : "0x24"}, + {"attr_name":"STATUS_LED_COLOR_GREEN_BLINK", "descr": "" , "bits" : "5:0", "value" : "0x17", "swpld_addr" : "0x60", "swpld_addr_offset" : "0x24"}, + {"attr_name":"STATUS_LED_COLOR_AMBER_BLINK", "descr": "" , "bits" : "5:0", "value" : "0xf", "swpld_addr" : "0x60", "swpld_addr_offset" : "0x24"}, + {"attr_name":"STATUS_LED_COLOR_BLUE", "descr": "" , "bits" : "5:0", "value" : "0x3", "swpld_addr" : "0x60", "swpld_addr_offset" : "0x24"}, + {"attr_name":"STATUS_LED_COLOR_GREEN", "descr": "" , "bits" : "5:0", "value" : "0x5", "swpld_addr" : "0x60", "swpld_addr_offset" : "0x24"}, + {"attr_name":"STATUS_LED_COLOR_AMBER", "descr": "" , "bits" : "5:0", "value" : "0x6", "swpld_addr" : "0x60", "swpld_addr_offset" : "0x24"}, + {"attr_name":"STATUS_LED_COLOR_OFF", "descr": "" , "bits" : "5:0", "value" : "0x7", "swpld_addr" : "0x60", "swpld_addr_offset" : "0x24"} + + ] + } + } +} diff --git a/device/accton/x86_64-accton_as7326_56x-r0/pddf_support b/device/accton/x86_64-accton_as7326_56x-r0/pddf_support new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/device/accton/x86_64-accton_as7712_32x-r0/pddf/pd-plugin.json b/device/accton/x86_64-accton_as7712_32x-r0/pddf/pd-plugin.json index 4d253635cc95..7df46b922ec3 100644 --- a/device/accton/x86_64-accton_as7712_32x-r0/pddf/pd-plugin.json +++ b/device/accton/x86_64-accton_as7712_32x-r0/pddf/pd-plugin.json @@ -48,7 +48,7 @@ "duty_cycle_to_pwm": "lambda dc: ((dc*100.0)/625 - 1)", - "pwm_to_duty_cycle": "lambda pwm: math.ceil(((pwm+1)*625.0)/100)" + "pwm_to_duty_cycle": "lambda pwm: (((pwm+1)*625.0)/100)" } } diff --git a/device/accton/x86_64-accton_as7816_64x-r0/pddf/pd-plugin.json b/device/accton/x86_64-accton_as7816_64x-r0/pddf/pd-plugin.json new file mode 100644 index 000000000000..eae22f99e394 --- /dev/null +++ b/device/accton/x86_64-accton_as7816_64x-r0/pddf/pd-plugin.json @@ -0,0 +1,64 @@ +{ + + "XCVR": + { + "xcvr_present": + { + "i2c": + { + "valmap-QSFP28": {"1":true, "0":false} + } + } + }, + "PSU": + { + "psu_present": + { + "i2c": + { + "valmap": { "1":true, "0":false } + } + }, + + "psu_power_good": + { + "i2c": + { + "valmap": { "1": true, "0":false } + } + }, + + "psu_fan_dir": + { + "i2c": + { + "valmap": { "F2B":"EXHAUST", "B2F":"INTAKE" } + } + }, + + "PSU_FAN_MAX_SPEED":"18000" + }, + + "FAN": + { + "direction": + { + "i2c": + { + "valmap": {"1":"INTAKE", "0":"EXHAUST"} + } + }, + + "present": + { + "i2c": + { + "valmap": {"1":true, "0":false} + } + }, + + "duty_cycle_to_pwm": "lambda dc: ((dc - 10) / 6)", + "pwm_to_duty_cycle": "lambda pwm: ( (pwm * 6) + 10)" + } + +} diff --git a/device/accton/x86_64-accton_as7816_64x-r0/pddf/pddf-device.json b/device/accton/x86_64-accton_as7816_64x-r0/pddf/pddf-device.json index 12d6c3a115e2..27d181da1829 100644 --- a/device/accton/x86_64-accton_as7816_64x-r0/pddf/pddf-device.json +++ b/device/accton/x86_64-accton_as7816_64x-r0/pddf/pddf-device.json @@ -114,7 +114,7 @@ "i2c": { "topo_info": { "parent_bus":"0x0", "dev_addr":"0x77", "dev_type":"pca9548"}, - "dev_attr": { "virt_bus":"0x1"}, + "dev_attr": { "virt_bus":"0x1", "idle_state":"-2"}, "channel": [ { "chn":"0", "dev":"MUX2" }, @@ -137,7 +137,7 @@ "i2c": { "topo_info": { "parent_bus":"0x1", "dev_addr":"0x71", "dev_type":"pca9548"}, - "dev_attr": { "virt_bus":"0x9"}, + "dev_attr": { "virt_bus":"0x9", "idle_state":"-2"}, "channel": [ { "chn":"0", "dev":"PSU2"}, @@ -249,7 +249,7 @@ "i2c": { "topo_info": { "parent_bus":"0x1", "dev_addr":"0x76", "dev_type":"pca9548"}, - "dev_attr": { "virt_bus":"0x11"}, + "dev_attr": { "virt_bus":"0x11", "idle_state":"-2"}, "channel": [ { "chn":"0", "dev":"TEMP1" }, @@ -464,7 +464,7 @@ "i2c": { "topo_info": { "parent_bus":"0x1", "dev_addr":"0x73", "dev_type":"pca9548"}, - "dev_attr": { "virt_bus":"0x19"}, + "dev_attr": { "virt_bus":"0x19", "idle_state":"-2"}, "channel": [ { "chn":"0", "dev":"PORT61" }, @@ -484,7 +484,7 @@ "i2c": { "topo_info": { "parent_bus":"0x2", "dev_addr":"0x70", "dev_type":"pca9548"}, - "dev_attr": { "virt_bus":"0x21"}, + "dev_attr": { "virt_bus":"0x21", "idle_state":"-2"}, "channel": [ { "chn":"0", "dev":"PORT9" }, @@ -504,7 +504,7 @@ "i2c": { "topo_info": { "parent_bus":"0x2", "dev_addr":"0x71", "dev_type":"pca9548"}, - "dev_attr": { "virt_bus":"0x29"}, + "dev_attr": { "virt_bus":"0x29", "idle_state":"-2"}, "channel": [ { "chn":"0", "dev":"PORT6" }, @@ -524,7 +524,7 @@ "i2c": { "topo_info": { "parent_bus":"0x2", "dev_addr":"0x72", "dev_type":"pca9548"}, - "dev_attr": { "virt_bus":"0x31"}, + "dev_attr": { "virt_bus":"0x31", "idle_state":"-2"}, "channel": [ { "chn":"0", "dev":"PORT17" }, @@ -544,7 +544,7 @@ "i2c": { "topo_info": { "parent_bus":"0x2", "dev_addr":"0x73", "dev_type":"pca9548"}, - "dev_attr": { "virt_bus":"0x39"}, + "dev_attr": { "virt_bus":"0x39", "idle_state":"-2"}, "channel": [ { "chn":"0", "dev":"PORT29" }, @@ -564,7 +564,7 @@ "i2c": { "topo_info": { "parent_bus":"0x2", "dev_addr":"0x74", "dev_type":"pca9548"}, - "dev_attr": { "virt_bus":"0x41"}, + "dev_attr": { "virt_bus":"0x41", "idle_state":"-2"}, "channel": [ { "chn":"0", "dev":"PORT41" }, @@ -584,7 +584,7 @@ "i2c": { "topo_info": { "parent_bus":"0x2", "dev_addr":"0x75", "dev_type":"pca9548"}, - "dev_attr": { "virt_bus":"0x49"}, + "dev_attr": { "virt_bus":"0x49", "idle_state":"-2"}, "channel": [ { "chn":"0", "dev":"PORT45" }, @@ -604,7 +604,7 @@ "i2c": { "topo_info": { "parent_bus":"0x2", "dev_addr":"0x76", "dev_type":"pca9548"}, - "dev_attr": { "virt_bus":"0x51"}, + "dev_attr": { "virt_bus":"0x51", "idle_state":"-2"}, "channel": [ { "chn":"0", "dev":"PORT57" }, diff --git a/device/accton/x86_64-accton_as7816_64x-r0/pddf_support b/device/accton/x86_64-accton_as7816_64x-r0/pddf_support new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/device/accton/x86_64-accton_as9716_32d-r0/pddf/pddf-device.json b/device/accton/x86_64-accton_as9716_32d-r0/pddf/pddf-device.json index ce592286078c..6bde8eab7648 100644 --- a/device/accton/x86_64-accton_as9716_32d-r0/pddf/pddf-device.json +++ b/device/accton/x86_64-accton_as9716_32d-r0/pddf/pddf-device.json @@ -53,7 +53,8 @@ ], "custom_kos": [ - "pddf_custom_psu" + "pddf_custom_psu", + "accton_as9716_32d_ioport" ] }, diff --git a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/qos.json.j2 b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/qos.json.j2 deleted file mode 100644 index 3e548325ea30..000000000000 --- a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/qos.json.j2 +++ /dev/null @@ -1 +0,0 @@ -{%- include 'qos_config.j2' %} diff --git a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/qos.json.j2 b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/qos.json.j2 new file mode 120000 index 000000000000..5ea713ce7f4c --- /dev/null +++ b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/qos.json.j2 @@ -0,0 +1 @@ +../Arista-7050CX3-32S-D48C8/qos.json.j2 \ No newline at end of file diff --git a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/td3-a7050cx3-32s-32x100G.config.bcm b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/td3-a7050cx3-32s-32x100G.config.bcm index a575049dc06b..22088621cef1 100644 --- a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/td3-a7050cx3-32s-32x100G.config.bcm +++ b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/td3-a7050cx3-32s-32x100G.config.bcm @@ -5,6 +5,7 @@ host_as_route_disable=1 use_all_splithorizon_groups=1 riot_enable=1 sai_tunnel_support=1 +sai_tunnel_underlay_route_mode=1 riot_overlay_l3_intf_mem_size=4096 riot_overlay_l3_egress_mem_size=32768 l3_ecmp_levels=2 diff --git a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/qos.json.j2 b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/qos.json.j2 index 3e548325ea30..04fddf486ace 100644 --- a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/qos.json.j2 +++ b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/qos.json.j2 @@ -1 +1,102 @@ +{% if 'subtype' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['subtype'] == 'DualToR' %} +{%- macro generate_dscp_to_tc_map() %} + "DSCP_TO_TC_MAP": { + "AZURE": { + "0" : "1", + "1" : "1", + "2" : "1", + "3" : "3", + "4" : "4", + "5" : "1", + "6" : "1", + "7" : "1", + "8" : "0", + "9" : "1", + "10": "1", + "11": "1", + "12": "1", + "13": "1", + "14": "1", + "15": "1", + "16": "1", + "17": "1", + "18": "1", + "19": "1", + "20": "1", + "21": "1", + "22": "1", + "23": "1", + "24": "1", + "25": "1", + "26": "1", + "27": "1", + "28": "1", + "29": "1", + "30": "1", + "31": "1", + "32": "1", + "33": "2", + "34": "1", + "35": "1", + "36": "1", + "37": "1", + "38": "1", + "39": "1", + "40": "1", + "41": "1", + "42": "1", + "43": "1", + "44": "1", + "45": "1", + "46": "5", + "47": "1", + "48": "7", + "49": "1", + "50": "1", + "51": "1", + "52": "1", + "53": "1", + "54": "1", + "55": "1", + "56": "1", + "57": "1", + "58": "1", + "59": "1", + "60": "1", + "61": "1", + "62": "1", + "63": "1" + } + }, +{%- endmacro %} +{%- macro generate_tc_to_pg_map() %} + "TC_TO_PRIORITY_GROUP_MAP": { + "AZURE": { + "0": "0", + "1": "0", + "2": "0", + "3": "3", + "4": "4", + "5": "0", + "6": "0", + "7": "7" + } + }, +{%- endmacro %} +{%- macro generate_tc_to_queue_map() %} + "TC_TO_QUEUE_MAP": { + "AZURE": { + "0": "0", + "1": "1", + "2": "1", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7" + } + }, +{%- endmacro %} +{% endif %} + {%- include 'qos_config.j2' %} diff --git a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/td3-a7050cx3-32s-48x50G+8x100G.config.bcm b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/td3-a7050cx3-32s-48x50G+8x100G.config.bcm index 68ae982800c8..aaad28895942 100644 --- a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/td3-a7050cx3-32s-48x50G+8x100G.config.bcm +++ b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/td3-a7050cx3-32s-48x50G+8x100G.config.bcm @@ -5,6 +5,7 @@ host_as_route_disable=1 use_all_splithorizon_groups=1 riot_enable=1 sai_tunnel_support=1 +sai_tunnel_underlay_route_mode=1 riot_overlay_l3_intf_mem_size=4096 riot_overlay_l3_egress_mem_size=32768 l3_ecmp_levels=2 diff --git a/device/arista/x86_64-arista_7050cx3_32s/td3-a7050cx3-32s-flex.config.bcm b/device/arista/x86_64-arista_7050cx3_32s/td3-a7050cx3-32s-flex.config.bcm index fef962c852b7..70a579e01eeb 100644 --- a/device/arista/x86_64-arista_7050cx3_32s/td3-a7050cx3-32s-flex.config.bcm +++ b/device/arista/x86_64-arista_7050cx3_32s/td3-a7050cx3-32s-flex.config.bcm @@ -397,6 +397,7 @@ robust_hash_disable_mpls=1 robust_hash_disable_vlan=1 sai_load_hw_config=/etc/bcm/flex/bcm56870_a0_premium_issu/b870.6.4.1/ sai_tunnel_support=1 +sai_tunnel_underlay_route_mode=1 serdes_core_rx_polarity_flip_physical{1}=0x8 serdes_core_rx_polarity_flip_physical{5}=0x2 serdes_core_rx_polarity_flip_physical{9}=0xc diff --git a/device/arista/x86_64-arista_7170_64c/Arista-7170-64C/buffers_defaults_t0.j2 b/device/arista/x86_64-arista_7170_64c/Arista-7170-64C/buffers_defaults_t0.j2 index 568b74b34a41..a6eefe8d36b0 100644 --- a/device/arista/x86_64-arista_7170_64c/Arista-7170-64C/buffers_defaults_t0.j2 +++ b/device/arista/x86_64-arista_7170_64c/Arista-7170-64C/buffers_defaults_t0.j2 @@ -61,11 +61,15 @@ {%- macro generate_queue_buffers(port_names) %} "BUFFER_QUEUE": { - "{{ port_names }}|3-4": { - "profile" : "egress_lossless_profile" - }, - "{{ port_names }}|0-1": { +{% for port in port_names.split(',') %} + "{{ port }}|0-2": { "profile" : "q_lossy_profile" - } + }, +{% endfor %} +{% for port in port_names.split(',') %} + "{{ port }}|3-4": { + "profile" : "egress_lossless_profile" + }{% if not loop.last %},{% endif %} +{% endfor %} } {%- endmacro %} diff --git a/device/arista/x86_64-arista_7170_64c/Arista-7170-64C/buffers_defaults_t1.j2 b/device/arista/x86_64-arista_7170_64c/Arista-7170-64C/buffers_defaults_t1.j2 index 161afd10cea3..563137d90b90 100644 --- a/device/arista/x86_64-arista_7170_64c/Arista-7170-64C/buffers_defaults_t1.j2 +++ b/device/arista/x86_64-arista_7170_64c/Arista-7170-64C/buffers_defaults_t1.j2 @@ -61,11 +61,15 @@ {%- macro generate_queue_buffers(port_names) %} "BUFFER_QUEUE": { - "{{ port_names }}|3-4": { - "profile" : "egress_lossless_profile" - }, - "{{ port_names }}|0-1": { +{% for port in port_names.split(',') %} + "{{ port }}|0-2": { "profile" : "q_lossy_profile" - } + }, +{% endfor %} +{% for port in port_names.split(',') %} + "{{ port }}|3-4": { + "profile" : "egress_lossless_profile" + }{% if not loop.last %},{% endif %} +{% endfor %} } {%- endmacro %} diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/config.bcm.j2 b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/config.bcm.j2 index 9410a83b6716..db5b2562cca2 100644 --- a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/config.bcm.j2 +++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/config.bcm.j2 @@ -12,6 +12,7 @@ {%- set switch_subtype = DEVICE_METADATA['localhost']['subtype'] -%} {%- if 'dualtor' in switch_subtype.lower() %} {%- set IPinIP_sock = 'sai_tunnel_support=1 + sai_tunnel_underlay_route_mode=1 host_as_route_disable=1 l3_ecmp_levels=2' -%} {%- endif %} diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/qos.json.j2 b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/qos.json.j2 index 3e548325ea30..4178efbcb7aa 100644 --- a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/qos.json.j2 +++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/qos.json.j2 @@ -1 +1,187 @@ +{% if ('type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] == 'LeafRouter') %} +{%- macro generate_dscp_to_tc_map() %} + "DSCP_TO_TC_MAP": { + "AZURE": { + "0" : "1", + "1" : "1", + "2" : "2", + "3" : "3", + "4" : "4", + "5" : "1", + "6" : "6", + "7" : "1", + "8" : "0", + "9" : "1", + "10": "1", + "11": "1", + "12": "1", + "13": "1", + "14": "1", + "15": "1", + "16": "1", + "17": "1", + "18": "1", + "19": "1", + "20": "1", + "21": "1", + "22": "1", + "23": "1", + "24": "1", + "25": "1", + "26": "1", + "27": "1", + "28": "1", + "29": "1", + "30": "1", + "31": "1", + "32": "1", + "33": "1", + "34": "1", + "35": "1", + "36": "1", + "37": "1", + "38": "1", + "39": "1", + "40": "1", + "41": "1", + "42": "1", + "43": "1", + "44": "1", + "45": "1", + "46": "5", + "47": "1", + "48": "7", + "49": "1", + "50": "1", + "51": "1", + "52": "1", + "53": "1", + "54": "1", + "55": "1", + "56": "1", + "57": "1", + "58": "1", + "59": "1", + "60": "1", + "61": "1", + "62": "1", + "63": "1" + } + }, +{%- endmacro %} +{%- macro generate_tc_to_pg_map() %} + "TC_TO_PRIORITY_GROUP_MAP": { + "AZURE": { + "0": "0", + "1": "0", + "2": "2", + "3": "3", + "4": "4", + "5": "0", + "6": "6", + "7": "7" + } + }, +{%- endmacro %} +{% elif ('subtype' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['subtype'] == 'DualToR') %} +{%- macro generate_dscp_to_tc_map() %} + "DSCP_TO_TC_MAP": { + "AZURE": { + "0" : "1", + "1" : "1", + "2" : "1", + "3" : "3", + "4" : "4", + "5" : "1", + "6" : "1", + "7" : "1", + "8" : "0", + "9" : "1", + "10": "1", + "11": "1", + "12": "1", + "13": "1", + "14": "1", + "15": "1", + "16": "1", + "17": "1", + "18": "1", + "19": "1", + "20": "1", + "21": "1", + "22": "1", + "23": "1", + "24": "1", + "25": "1", + "26": "1", + "27": "1", + "28": "1", + "29": "1", + "30": "1", + "31": "1", + "32": "1", + "33": "2", + "34": "1", + "35": "1", + "36": "1", + "37": "1", + "38": "1", + "39": "1", + "40": "1", + "41": "1", + "42": "1", + "43": "1", + "44": "1", + "45": "1", + "46": "5", + "47": "1", + "48": "7", + "49": "1", + "50": "1", + "51": "1", + "52": "1", + "53": "1", + "54": "1", + "55": "1", + "56": "1", + "57": "1", + "58": "1", + "59": "1", + "60": "1", + "61": "1", + "62": "1", + "63": "1" + } + }, +{%- endmacro %} +{%- macro generate_tc_to_pg_map() %} + "TC_TO_PRIORITY_GROUP_MAP": { + "AZURE": { + "0": "0", + "1": "0", + "2": "0", + "3": "3", + "4": "4", + "5": "0", + "6": "0", + "7": "7" + } + }, +{%- endmacro %} +{%- macro generate_tc_to_queue_map() %} + "TC_TO_QUEUE_MAP": { + "AZURE": { + "0": "0", + "1": "1", + "2": "1", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7" + } + }, +{%- endmacro %} +{% endif %} + {%- include 'qos_config.j2' %} diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/config.bcm.j2 b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/config.bcm.j2 index d9d8347b50ae..70512203f206 100644 --- a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/config.bcm.j2 +++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/config.bcm.j2 @@ -4,6 +4,7 @@ {%- set switch_subtype = DEVICE_METADATA['localhost']['subtype'] -%} {%- if 'dualtor' in switch_subtype.lower() %} {%- set IPinIP_sock = 'sai_tunnel_support=1 + sai_tunnel_underlay_route_mode=1 host_as_route_disable=1 l3_ecmp_levels=2' -%} {%- endif %} diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/qos.json.j2 b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/qos.json.j2 deleted file mode 100644 index 3e548325ea30..000000000000 --- a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/qos.json.j2 +++ /dev/null @@ -1 +0,0 @@ -{%- include 'qos_config.j2' %} diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/qos.json.j2 b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/qos.json.j2 new file mode 120000 index 000000000000..f0ee02749724 --- /dev/null +++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/qos.json.j2 @@ -0,0 +1 @@ +../Arista-7260CX3-C64/qos.json.j2 \ No newline at end of file diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/config.bcm.j2 b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/config.bcm.j2 index de65d73d40a1..ce8efa8572b5 100644 --- a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/config.bcm.j2 +++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/config.bcm.j2 @@ -12,6 +12,7 @@ {%- set switch_subtype = DEVICE_METADATA['localhost']['subtype'] -%} {%- if 'dualtor' in switch_subtype.lower() %} {%- set IPinIP_sock = 'sai_tunnel_support=1 + sai_tunnel_underlay_route_mode=1 host_as_route_disable=1 l3_ecmp_levels=2' -%} {%- endif %} diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/qos.json.j2 b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/qos.json.j2 deleted file mode 100644 index 3e548325ea30..000000000000 --- a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/qos.json.j2 +++ /dev/null @@ -1 +0,0 @@ -{%- include 'qos_config.j2' %} diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/qos.json.j2 b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/qos.json.j2 new file mode 120000 index 000000000000..f0ee02749724 --- /dev/null +++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/qos.json.j2 @@ -0,0 +1 @@ +../Arista-7260CX3-C64/qos.json.j2 \ No newline at end of file diff --git a/device/arista/x86_64-arista_7280cr3mk_32p4/Arista-7280CR3-C40/gearbox_100G_PAM4.xml b/device/arista/x86_64-arista_7280cr3mk_32p4/Arista-7280CR3-C40/gearbox_100G_PAM4.xml index 95e20b91787e..0ac9ff7b7846 100644 --- a/device/arista/x86_64-arista_7280cr3mk_32p4/Arista-7280CR3-C40/gearbox_100G_PAM4.xml +++ b/device/arista/x86_64-arista_7280cr3mk_32p4/Arista-7280CR3-C40/gearbox_100G_PAM4.xml @@ -4,11 +4,6 @@ 0 gearbox 2 - - 2,-8,17,0,0 - 0,-8,17,0,0 - - 0,0,1,0,0 @@ -34,4 +29,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/device/arista/x86_64-arista_7800r3_48cq2_lc/Arista-7800R3-48CQ2-C48/jr2-a7280cr3-32d4-40x100G.config.bcm b/device/arista/x86_64-arista_7800r3_48cq2_lc/Arista-7800R3-48CQ2-C48/jr2-a7280cr3-32d4-40x100G.config.bcm index 61026aad524e..f6f1774d8ee2 100644 --- a/device/arista/x86_64-arista_7800r3_48cq2_lc/Arista-7800R3-48CQ2-C48/jr2-a7280cr3-32d4-40x100G.config.bcm +++ b/device/arista/x86_64-arista_7800r3_48cq2_lc/Arista-7800R3-48CQ2-C48/jr2-a7280cr3-32d4-40x100G.config.bcm @@ -362,6 +362,55 @@ ucode_port_46=CGE2_25:core_1.46 ucode_port_47=CGE2_26:core_1.47 ucode_port_48=CGE2_24:core_1.48 +serdes_tx_taps_1=pam4:-18:86:0:4:0:0 +serdes_tx_taps_2=pam4:-18:86:0:4:0:0 +serdes_tx_taps_3=pam4:-18:86:0:4:0:0 +serdes_tx_taps_4=pam4:-18:86:0:4:0:0 +serdes_tx_taps_5=pam4:-18:86:0:4:0:0 +serdes_tx_taps_6=pam4:-18:86:0:4:0:0 +serdes_tx_taps_7=pam4:-18:86:0:4:0:0 +serdes_tx_taps_8=pam4:-18:86:0:4:0:0 +serdes_tx_taps_9=pam4:-18:86:0:4:0:0 +serdes_tx_taps_10=pam4:-18:86:0:4:0:0 +serdes_tx_taps_11=pam4:-18:86:0:4:0:0 +serdes_tx_taps_12=pam4:-18:86:0:4:0:0 +serdes_tx_taps_13=pam4:-18:86:0:4:0:0 +serdes_tx_taps_14=pam4:-18:86:0:4:0:0 +serdes_tx_taps_15=pam4:-18:86:0:4:0:0 +serdes_tx_taps_16=pam4:-18:86:0:4:0:0 +serdes_tx_taps_17=pam4:-18:86:0:4:0:0 +serdes_tx_taps_18=pam4:-18:86:0:4:0:0 +serdes_tx_taps_19=pam4:-18:86:0:4:0:0 +serdes_tx_taps_20=pam4:-18:86:0:4:0:0 +serdes_tx_taps_21=pam4:-18:86:0:4:0:0 +serdes_tx_taps_22=pam4:-18:86:0:4:0:0 +serdes_tx_taps_23=pam4:-18:86:0:4:0:0 +serdes_tx_taps_24=pam4:-18:86:0:4:0:0 +serdes_tx_taps_25=pam4:-18:86:0:4:0:0 +serdes_tx_taps_26=pam4:-18:86:0:4:0:0 +serdes_tx_taps_27=pam4:-18:86:0:4:0:0 +serdes_tx_taps_28=pam4:-18:86:0:4:0:0 +serdes_tx_taps_29=pam4:-18:86:0:4:0:0 +serdes_tx_taps_30=pam4:-18:86:0:4:0:0 +serdes_tx_taps_31=pam4:-18:86:0:4:0:0 +serdes_tx_taps_32=pam4:-18:86:0:4:0:0 +serdes_tx_taps_33=pam4:-18:86:0:4:0:0 +serdes_tx_taps_34=pam4:-18:86:0:4:0:0 +serdes_tx_taps_35=pam4:-18:86:0:4:0:0 +serdes_tx_taps_36=pam4:-18:86:0:4:0:0 +serdes_tx_taps_37=pam4:-18:86:0:4:0:0 +serdes_tx_taps_38=pam4:-18:86:0:4:0:0 +serdes_tx_taps_39=pam4:-18:86:0:4:0:0 +serdes_tx_taps_40=pam4:-18:86:0:4:0:0 +serdes_tx_taps_41=pam4:-18:86:0:4:0:0 +serdes_tx_taps_42=pam4:-18:86:0:4:0:0 +serdes_tx_taps_43=pam4:-18:86:0:4:0:0 +serdes_tx_taps_44=pam4:-18:86:0:4:0:0 +serdes_tx_taps_45=pam4:-18:86:0:4:0:0 +serdes_tx_taps_46=pam4:-18:86:0:4:0:0 +serdes_tx_taps_47=pam4:-18:86:0:4:0:0 +serdes_tx_taps_48=pam4:-18:86:0:4:0:0 + ucode_port_0.BCM8869X=CPU.0:core_0.0 ucode_port_200.BCM8869X=CPU.8:core_1.200 ucode_port_201.BCM8869X=CPU.16:core_0.201 diff --git a/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/gearbox_100G_PAM4.xml b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/gearbox_100G_PAM4.xml index 95e20b91787e..044ef034a52d 100644 --- a/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/gearbox_100G_PAM4.xml +++ b/device/arista/x86_64-arista_7800r3_48cqm2_lc/Arista-7800R3-48CQM2-C48/gearbox_100G_PAM4.xml @@ -4,11 +4,6 @@ 0 gearbox 2 - - 2,-8,17,0,0 - 0,-8,17,0,0 - - 0,0,1,0,0 @@ -34,4 +29,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/device/barefoot/x86_64-accton_as9516_32d-r0/newport/buffers_defaults_t0.j2 b/device/barefoot/x86_64-accton_as9516_32d-r0/newport/buffers_defaults_t0.j2 index 34c5db2ef708..a06f62f733ae 100644 --- a/device/barefoot/x86_64-accton_as9516_32d-r0/newport/buffers_defaults_t0.j2 +++ b/device/barefoot/x86_64-accton_as9516_32d-r0/newport/buffers_defaults_t0.j2 @@ -16,8 +16,7 @@ "ingress_lossless_pool": { "size": "{{ ingress_lossless_pool_size }}", "type": "ingress", - "mode": "dynamic", - "xoff": "36222208" + "mode": "dynamic" }, "ingress_lossy_pool": { "size": "{{ ingress_lossy_pool_size }}", @@ -61,11 +60,15 @@ {%- macro generate_queue_buffers(port_names) %} "BUFFER_QUEUE": { - "{{ port_names }}|3-4": { - "profile" : "egress_lossless_profile" - }, - "{{ port_names }}|0-1": { +{% for port in port_names.split(',') %} + "{{ port }}|0-2": { "profile" : "q_lossy_profile" - } + }, +{% endfor %} +{% for port in port_names.split(',') %} + "{{ port }}|3-4": { + "profile" : "egress_lossless_profile" + }{% if not loop.last %},{% endif %} +{% endfor %} } {%- endmacro %} diff --git a/device/barefoot/x86_64-accton_as9516_32d-r0/newport/buffers_defaults_t1.j2 b/device/barefoot/x86_64-accton_as9516_32d-r0/newport/buffers_defaults_t1.j2 index 34c5db2ef708..a06f62f733ae 100644 --- a/device/barefoot/x86_64-accton_as9516_32d-r0/newport/buffers_defaults_t1.j2 +++ b/device/barefoot/x86_64-accton_as9516_32d-r0/newport/buffers_defaults_t1.j2 @@ -16,8 +16,7 @@ "ingress_lossless_pool": { "size": "{{ ingress_lossless_pool_size }}", "type": "ingress", - "mode": "dynamic", - "xoff": "36222208" + "mode": "dynamic" }, "ingress_lossy_pool": { "size": "{{ ingress_lossy_pool_size }}", @@ -61,11 +60,15 @@ {%- macro generate_queue_buffers(port_names) %} "BUFFER_QUEUE": { - "{{ port_names }}|3-4": { - "profile" : "egress_lossless_profile" - }, - "{{ port_names }}|0-1": { +{% for port in port_names.split(',') %} + "{{ port }}|0-2": { "profile" : "q_lossy_profile" - } + }, +{% endfor %} +{% for port in port_names.split(',') %} + "{{ port }}|3-4": { + "profile" : "egress_lossless_profile" + }{% if not loop.last %},{% endif %} +{% endfor %} } {%- endmacro %} diff --git a/device/barefoot/x86_64-accton_as9516_32d-r0/platform.json b/device/barefoot/x86_64-accton_as9516_32d-r0/platform.json index 115dd194b725..abd2fec0a303 100644 --- a/device/barefoot/x86_64-accton_as9516_32d-r0/platform.json +++ b/device/barefoot/x86_64-accton_as9516_32d-r0/platform.json @@ -9,57 +9,135 @@ "name": "BMC" } ], + "thermal_manager": false, "fans": [ { - "name": "counter-rotating-fan-1" - }, - { - "name": "counter-rotating-fan-2" - }, - { - "name": "counter-rotating-fan-3" - }, - { - "name": "counter-rotating-fan-4" - }, - { - "name": "counter-rotating-fan-5" - }, - { - "name": "counter-rotating-fan-6" + "name": "counter-rotating-fan-1", + "status_led": { + "controllable": false + }, + "speed": { + "controllable": false + } + }, + { + "name": "counter-rotating-fan-2", + "status_led": { + "controllable": false + }, + "speed": { + "controllable": false + } + }, + { + "name": "counter-rotating-fan-3", + "status_led": { + "controllable": false + }, + "speed": { + "controllable": false + } + }, + { + "name": "counter-rotating-fan-4", + "status_led": { + "controllable": false + }, + "speed": { + "controllable": false + } + }, + { + "name": "counter-rotating-fan-5", + "status_led": { + "controllable": false + }, + "speed": { + "controllable": false + } + }, + { + "name": "counter-rotating-fan-6", + "status_led": { + "controllable": false + }, + "speed": { + "controllable": false + } } ], "fan_drawers": [ { "name": "fantray-1", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "counter-rotating-fan-1" + "name": "counter-rotating-fan-1", + "status_led": { + "controllable": false + }, + "speed": { + "controllable": false + } }, { - "name": "counter-rotating-fan-2" + "name": "counter-rotating-fan-2", + "status_led": { + "controllable": false + }, + "speed": { + "controllable": false + } }, { - "name": "counter-rotating-fan-3" + "name": "counter-rotating-fan-3", + "status_led": { + "controllable": false + }, + "speed": { + "controllable": false + } }, { - "name": "counter-rotating-fan-4" + "name": "counter-rotating-fan-4", + "status_led": { + "controllable": false + }, + "speed": { + "controllable": false + } }, { - "name": "counter-rotating-fan-5" + "name": "counter-rotating-fan-5", + "status_led": { + "controllable": false + }, + "speed": { + "controllable": false + } }, { - "name": "counter-rotating-fan-6" + "name": "counter-rotating-fan-6", + "status_led": { + "controllable": false + }, + "speed": { + "controllable": false + } } ] } ], "psus": [ { - "name": "psu-1" + "name": "psu-1", + "temperature": false }, { - "name": "psu-2" + "name": "psu-2", + "temperature": false } ], "thermals": [ diff --git a/device/barefoot/x86_64-accton_as9516_32d-r0/thermal_thresholds.json b/device/barefoot/x86_64-accton_as9516_32d-r0/thermal_thresholds.json new file mode 100644 index 000000000000..451067eb603c --- /dev/null +++ b/device/barefoot/x86_64-accton_as9516_32d-r0/thermal_thresholds.json @@ -0,0 +1,61 @@ +{ + "thermals": [ + { + "com_e_driver-i2c-4-33:cpu-temp" : [99.0, 89.0, 11.0, 1.0] + }, + { + "com_e_driver-i2c-4-33:memory-temp" : [85.0, 75.0, 11.0, 1.0] + }, + { + "tmp75-i2c-3-48:chip-temp" : [90.0, 80.0, 11.0, 1.0] + }, + { + "tmp75-i2c-3-49:exhaust2-temp" : [80.0, 70.0, 11.0, 1.0] + }, + { + "tmp75-i2c-3-4a:exhaust-temp" : [60.0, 50.0, 11.0, 1.0] + }, + { + "tmp75-i2c-3-4b:intake-temp" : [60.0, 50.0, 11.0, 1.0] + }, + { + "tmp75-i2c-3-4c:tofino-temp" : [99.0, 89.0, 11.0, 1.0] + }, + { + "tmp75-i2c-3-4d:intake2-temp" : [60.0, 50.0, 11.0, 1.0] + }, + { + "coretemp-isa-0000:package-id-0" : [80.0, 70.0, 11.0, 1.0] + }, + { + "coretemp-isa-0000:core-0" : [99.0, 89.0, 11.0, 1.0] + }, + { + "coretemp-isa-0000:core-1" : [99.0, 89.0, 11.0, 1.0] + }, + { + "coretemp-isa-0000:core-2" : [99.0, 89.0, 11.0, 1.0] + }, + { + "coretemp-isa-0000:core-3" : [99.0, 89.0, 11.0, 1.0] + }, + { + "psu_driver-i2c-7-59:psu2-temp1" : [60.0, 50.0, 11.0, 1.0] + }, + { + "psu_driver-i2c-7-59:psu2-temp2" : [60.0, 50.0, 11.0, 1.0] + }, + { + "psu_driver-i2c-7-59:psu2-temp3" : [60.0, 50.0, 11.0, 1.0] + }, + { + "psu_driver-i2c-7-5a:psu1-temp1" : [60.0, 50.0, 11.0, 1.0] + }, + { + "psu_driver-i2c-7-5a:psu1-temp2" : [60.0, 50.0, 11.0, 1.0] + }, + { + "psu_driver-i2c-7-5a:psu1-temp3" : [60.0, 50.0, 11.0, 1.0] + } + ] +} \ No newline at end of file diff --git a/device/barefoot/x86_64-accton_wedge100bf_32x-r0/montara/buffers_defaults_t0.j2 b/device/barefoot/x86_64-accton_wedge100bf_32x-r0/montara/buffers_defaults_t0.j2 index 3e18b6dbad08..0e096c39d4dd 100644 --- a/device/barefoot/x86_64-accton_wedge100bf_32x-r0/montara/buffers_defaults_t0.j2 +++ b/device/barefoot/x86_64-accton_wedge100bf_32x-r0/montara/buffers_defaults_t0.j2 @@ -63,21 +63,17 @@ }, {%- endmacro %} -{%- macro generate_pg_profils(port_names) %} - "BUFFER_PG": { - "{{ port_names }}|3-4": { - "profile" : "ingress_lossless_profile" - } - }, -{%- endmacro %} - {%- macro generate_queue_buffers(port_names) %} "BUFFER_QUEUE": { - "{{ port_names }}|3-4": { - "profile" : "egress_lossless_profile" - }, - "{{ port_names }}|0-1": { +{% for port in port_names.split(',') %} + "{{ port }}|0-2": { "profile" : "q_lossy_profile" - } + }, +{% endfor %} +{% for port in port_names.split(',') %} + "{{ port }}|3-4": { + "profile" : "egress_lossless_profile" + }{% if not loop.last %},{% endif %} +{% endfor %} } {%- endmacro %} diff --git a/device/barefoot/x86_64-accton_wedge100bf_32x-r0/montara/buffers_defaults_t1.j2 b/device/barefoot/x86_64-accton_wedge100bf_32x-r0/montara/buffers_defaults_t1.j2 index 923e5a102836..0067d92c926c 100644 --- a/device/barefoot/x86_64-accton_wedge100bf_32x-r0/montara/buffers_defaults_t1.j2 +++ b/device/barefoot/x86_64-accton_wedge100bf_32x-r0/montara/buffers_defaults_t1.j2 @@ -63,21 +63,17 @@ }, {%- endmacro %} -{%- macro generate_pg_profils(port_names) %} - "BUFFER_PG": { - "{{ port_names }}|3-4": { - "profile" : "ingress_lossless_profile" - } - }, -{%- endmacro %} - {%- macro generate_queue_buffers(port_names) %} "BUFFER_QUEUE": { - "{{ port_names }}|3-4": { - "profile" : "egress_lossless_profile" - }, - "{{ port_names }}|0-1": { +{% for port in port_names.split(',') %} + "{{ port }}|0-2": { "profile" : "q_lossy_profile" - } + }, +{% endfor %} +{% for port in port_names.split(',') %} + "{{ port }}|3-4": { + "profile" : "egress_lossless_profile" + }{% if not loop.last %},{% endif %} +{% endfor %} } {%- endmacro %} diff --git a/device/barefoot/x86_64-accton_wedge100bf_32x-r0/platform.json b/device/barefoot/x86_64-accton_wedge100bf_32x-r0/platform.json index ea18a031344e..5fee4f0eebaf 100644 --- a/device/barefoot/x86_64-accton_wedge100bf_32x-r0/platform.json +++ b/device/barefoot/x86_64-accton_wedge100bf_32x-r0/platform.json @@ -57,38 +57,41 @@ } ], "thermals": [ + { + "name": "com_e_driver-i2c-4-33:cpu-temp" + }, { "name": "com_e_driver-i2c-4-33:memory-temp" }, { - "name": "com_e_driver-i2c-4-33:cpu-temp" + "name": "psu_driver-i2c-7-59:psu2-temp1" }, { - "name": "pfe1100-i2c-7-59:temp1" + "name": "psu_driver-i2c-7-59:psu2-temp2" }, { - "name": "pfe1100-i2c-7-59:temp2" + "name": "psu_driver-i2c-7-5a:psu1-temp1" }, { - "name": "pfe1100-i2c-7-5a:temp1" + "name": "psu_driver-i2c-7-5a:psu1-temp2" }, { - "name": "pfe1100-i2c-7-5a:temp2" + "name": "tmp75-i2c-3-48:chip-temp" }, { - "name": "tmp75-i2c-3-48:outlet-middle-temp" + "name": "tmp75-i2c-3-49:exhaust2-temp" }, { - "name": "tmp75-i2c-3-49:inlet-middle-temp" + "name": "tmp75-i2c-3-4a:exhaust-temp" }, { - "name": "tmp75-i2c-3-4a:inlet-left-temp" + "name": "tmp75-i2c-3-4b:intake-temp" }, { - "name": "tmp75-i2c-3-4b:switch-temp" + "name": "tmp75-i2c-3-4c:tofino-temp" }, { - "name": "tmp75-i2c-3-4c:inlet-right-temp" + "name": "tmp75-i2c-3-4d:intake2-temp" }, { "name": "tmp75-i2c-8-48:outlet-right-temp" @@ -96,6 +99,9 @@ { "name": "tmp75-i2c-8-49:outlet-left-temp" }, + { + "name": "pch_haswell-virtual-0:temp1" + }, { "name": "coretemp-isa-0000:package-id-0" }, @@ -110,9 +116,6 @@ }, { "name": "coretemp-isa-0000:core-3" - }, - { - "name": "pch_haswell-virtual-0:temp1" } ], "sfps": [ diff --git a/device/barefoot/x86_64-accton_wedge100bf_32x-r0/thermal_thresholds.json b/device/barefoot/x86_64-accton_wedge100bf_32x-r0/thermal_thresholds.json new file mode 100644 index 000000000000..bee961a84411 --- /dev/null +++ b/device/barefoot/x86_64-accton_wedge100bf_32x-r0/thermal_thresholds.json @@ -0,0 +1,64 @@ +{ + "thermals": [ + { + "com_e_driver-i2c-4-33:cpu-temp" : [99.0, 89.0, 11.0, 1.0] + }, + { + "com_e_driver-i2c-4-33:memory-temp" : [85.0, 75.0, 11.0, 1.0] + }, + { + "psu_driver-i2c-7-59:psu2-temp1" : [50.0, 40.0, 11.0, 1.0] + }, + { + "psu_driver-i2c-7-59:psu2-temp2" : [90.0, 80.0, 11.0, 1.0] + }, + { + "psu_driver-i2c-7-5a:psu1-temp1" : [50.0, 40.0, 11.0, 1.0] + }, + { + "psu_driver-i2c-7-5a:psu1-temp2" : [90.0, 80.0, 11.0, 1.0] + }, + { + "tmp75-i2c-3-48:chip-temp" : [90.0, 80.0, 11.0, 1.0] + }, + { + "tmp75-i2c-3-49:exhaust2-temp" : [80.0, 70.0, 11.0, 1.0] + }, + { + "tmp75-i2c-3-4a:exhaust-temp" : [60.0, 50.0, 11.0, 1.0] + }, + { + "tmp75-i2c-3-4b:intake-temp" : [60.0, 50.0, 11.0, 1.0] + }, + { + "tmp75-i2c-3-4c:tofino-temp" : [99.0, 89.0, 11.0, 1.0] + }, + { + "tmp75-i2c-3-4d:intake2-temp" : [60.0, 50.0, 11.0, 1.0] + }, + { + "tmp75-i2c-8-48:outlet-right-temp" : [60.0, 50.0, 11.0, 1.0] + }, + { + "tmp75-i2c-8-49:outlet-left-temp" : [60.0, 50.0, 11.0, 1.0] + }, + { + "pch_haswell-virtual-0:temp1" : [60.0, 50.0, 11.0, 1.0] + }, + { + "coretemp-isa-0000:package-id-0" : [80.0, 70.0, 11.0, 1.0] + }, + { + "coretemp-isa-0000:core-0" : [99.0, 89.0, 11.0, 1.0] + }, + { + "coretemp-isa-0000:core-1" : [99.0, 89.0, 11.0, 1.0] + }, + { + "coretemp-isa-0000:core-2" : [99.0, 89.0, 11.0, 1.0] + }, + { + "coretemp-isa-0000:core-3" : [99.0, 89.0, 11.0, 1.0] + } + ] +} \ No newline at end of file diff --git a/device/dell/x86_64-dellemc_n3248te_c3338-r0/platform.json b/device/dell/x86_64-dellemc_n3248te_c3338-r0/platform.json new file mode 100644 index 000000000000..0bb2391ca3df --- /dev/null +++ b/device/dell/x86_64-dellemc_n3248te_c3338-r0/platform.json @@ -0,0 +1,350 @@ +{ + "chassis": { + "name": "N3248TE-ON", + "status_led": { + "controllable": true, + "colors": ["green", "blink_green", "yellow", "blink_yellow"] + }, + "thermal_manager" : false, + "components": [ + { + "name": "BIOS" + }, + { + "name": "CPU CPLD" + }, + { + "name": "SYS CPLD" + } + ], + "fans": [ + { + "name": "FanTray1-Fan1", + "speed": { + "controllable":false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray2-Fan1", + "speed": { + "controllable":false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray3-Fan1", + "speed": { + "controllable":false + }, + "status_led": { + "available": false + } + } + ], + "fan_drawers":[ + { + "name": "FanTray1", + "status_led": { + "controllable": true, + "colors": ["off", "green", "yellow"] + }, + "fans": [ + { + "name": "FanTray1-Fan1", + "speed": { + "controllable":false + }, + "status_led": { + "available": false + } + } + ] + }, + { + "name": "FanTray2", + "status_led": { + "controllable": true, + "colors": ["off", "green", "yellow"] + }, + "fans": [ + { + "name": "FanTray2-Fan1", + "speed": { + "controllable":false + }, + "status_led": { + "available": false + } + } + ] + }, + { + "name": "FanTray3", + "status_led": { + "controllable": true, + "colors": ["off", "green", "yellow"] + }, + "fans": [ + { + "name": "FanTray3-Fan1", + "speed": { + "controllable":false + }, + "status_led": { + "available": false + } + } + ] + } + ], + "psus": [ + { + "name": "PSU1", + "status_led": { + "controllable": false + }, + "fans": [ + { + "name": "PSU1 Fan", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + } + ] + }, + { + "name": "PSU2", + "status_led": { + "controllable": false + }, + "fans": [ + { + "name": "PSU2 Fan", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + } + ] + } + ], + "thermals": [ + { + "name": "Front Panel PHY Temperature", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false + }, + { + "name": "Middle Fan Tray Temperature", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false + }, + { + "name": "Near Front Panel Temperature", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false + }, + { + "name": "Switch Near Temperature", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false + }, + { + "name": "Switch Rear Temperature", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false + } + ], + "modules": [], + "sfps": [ + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "1GSFPCu" + }, + { + "name": "SFP/SFP+/SFP28" + }, + { + "name": "SFP/SFP+/SFP28" + }, + { + "name": "SFP/SFP+/SFP28" + }, + { + "name": "SFP/SFP+/SFP28" + }, + { + "name": "QSFP+ or later" + }, + { + "name": "QSFP+ or later" + } + ] + }, + "interfaces": {} +} diff --git a/device/dell/x86_64-dellemc_n3248te_c3338-r0/system_health_monitoring_config.json b/device/dell/x86_64-dellemc_n3248te_c3338-r0/system_health_monitoring_config.json new file mode 100644 index 000000000000..dc20d412147f --- /dev/null +++ b/device/dell/x86_64-dellemc_n3248te_c3338-r0/system_health_monitoring_config.json @@ -0,0 +1,11 @@ +{ + "services_to_ignore": [], + "devices_to_ignore": ["fan.speed","psu.temperature","psu.voltage","asic"], + "user_defined_checkers": [], + "polling_interval": 60, + "led_color": { + "fault" : "blink_yellow", + "normal" : "green", + "booting": "blink_green" + } +} diff --git a/device/mellanox/x86_64-mlnx_msn3700-r0/sensors.conf b/device/mellanox/x86_64-mlnx_msn3700-r0/sensors.conf index 281f0a54dfa3..59c99ac98e39 100644 --- a/device/mellanox/x86_64-mlnx_msn3700-r0/sensors.conf +++ b/device/mellanox/x86_64-mlnx_msn3700-r0/sensors.conf @@ -85,6 +85,9 @@ bus "i2c-4" "i2c-1-mux (chan_id 3)" label power2 "PSU-2 12V Rail Pwr (out)" label curr1 "PSU-2 220V Rail Curr (in)" label curr2 "PSU-2 12V Rail Curr (out)" + set in3_lcrit in3_crit * 0.662 + set in3_min in3_crit * 0.745 + set in3_max in3_crit * 0.952 chip "dps460-i2c-*-59" label in1 "PSU-1 220V Rail (in)" ignore in2 @@ -99,6 +102,9 @@ bus "i2c-4" "i2c-1-mux (chan_id 3)" label power2 "PSU-1 12V Rail Pwr (out)" label curr1 "PSU-1 220V Rail Curr (in)" label curr2 "PSU-1 12V Rail Curr (out)" + set in3_lcrit in3_crit * 0.662 + set in3_min in3_crit * 0.745 + set in3_max in3_crit * 0.952 # Chassis fans chip "mlxreg_fan-isa-*" diff --git a/device/mellanox/x86_64-mlnx_msn3700c-r0/sensors.conf b/device/mellanox/x86_64-mlnx_msn3700c-r0/sensors.conf index 094cd78cde57..343385fcd4de 100644 --- a/device/mellanox/x86_64-mlnx_msn3700c-r0/sensors.conf +++ b/device/mellanox/x86_64-mlnx_msn3700c-r0/sensors.conf @@ -85,6 +85,9 @@ bus "i2c-4" "i2c-1-mux (chan_id 3)" label power2 "PSU-2 12V Rail Pwr (out)" label curr1 "PSU-2 220V Rail Curr (in)" label curr2 "PSU-2 12V Rail Curr (out)" + set in3_lcrit in3_crit * 0.662 + set in3_min in3_crit * 0.745 + set in3_max in3_crit * 0.952 chip "dps460-i2c-*-59" label in1 "PSU-1 220V Rail (in)" ignore in2 @@ -99,6 +102,9 @@ bus "i2c-4" "i2c-1-mux (chan_id 3)" label power2 "PSU-1 12V Rail Pwr (out)" label curr1 "PSU-1 220V Rail Curr (in)" label curr2 "PSU-1 12V Rail Curr (out)" + set in3_lcrit in3_crit * 0.662 + set in3_min in3_crit * 0.745 + set in3_max in3_crit * 0.952 # Chassis fans chip "mlxreg_fan-isa-*" diff --git a/device/mellanox/x86_64-mlnx_msn3800-r0/sensors.conf b/device/mellanox/x86_64-mlnx_msn3800-r0/sensors.conf index 7ba5f9c8c050..0b1cfc75548a 100644 --- a/device/mellanox/x86_64-mlnx_msn3800-r0/sensors.conf +++ b/device/mellanox/x86_64-mlnx_msn3800-r0/sensors.conf @@ -106,6 +106,9 @@ bus "i2c-4" "i2c-1-mux (chan_id 3)" label power2 "PSU-2 12V Rail Pwr (out)" label curr1 "PSU-2 220V Rail Curr (in)" label curr2 "PSU-2 12V Rail Curr (out)" + set in3_lcrit in3_crit * 0.662 + set in3_min in3_crit * 0.745 + set in3_max in3_crit * 0.952 chip "dps460-i2c-*-59" label in1 "PSU-1 220V Rail (in)" ignore in2 @@ -120,6 +123,9 @@ bus "i2c-4" "i2c-1-mux (chan_id 3)" label power2 "PSU-1 12V Rail Pwr (out)" label curr1 "PSU-1 220V Rail Curr (in)" label curr2 "PSU-1 12V Rail Curr (out)" + set in3_lcrit in3_crit * 0.662 + set in3_min in3_crit * 0.745 + set in3_max in3_crit * 0.952 # Chassis fans chip "mlxreg_fan-isa-*" diff --git a/device/mellanox/x86_64-mlnx_msn4600c-r0/sensors.conf b/device/mellanox/x86_64-mlnx_msn4600c-r0/sensors.conf index 9c80350e19ad..3ff78f15023f 100644 --- a/device/mellanox/x86_64-mlnx_msn4600c-r0/sensors.conf +++ b/device/mellanox/x86_64-mlnx_msn4600c-r0/sensors.conf @@ -167,6 +167,9 @@ bus "i2c-4" "i2c-1-mux (chan_id 3)" label power2 "PSU-1(L) 12V Rail Pwr (out)" label curr1 "PSU-1(L) 220V Rail Curr (in)" label curr2 "PSU-1(L) 12V Rail Curr (out)" + set in3_lcrit in3_crit * 0.662 + set in3_min in3_crit * 0.745 + set in3_max in3_crit * 0.952 chip "dps460-i2c-*-59" label in1 "PSU-2(R) 220V Rail (in)" ignore in2 @@ -181,6 +184,9 @@ bus "i2c-4" "i2c-1-mux (chan_id 3)" label power2 "PSU-2(R) 12V Rail Pwr (out)" label curr1 "PSU-2(R) 220V Rail Curr (in)" label curr2 "PSU-2(R) 12V Rail Curr (out)" + set in3_lcrit in3_crit * 0.662 + set in3_min in3_crit * 0.745 + set in3_max in3_crit * 0.952 # Chassis fans chip "mlxreg_fan-isa-*" diff --git a/device/mellanox/x86_64-mlnx_msn4600c-r0/sensors.conf.a1 b/device/mellanox/x86_64-mlnx_msn4600c-r0/sensors.conf.a1 index 44fff272e544..a0ebc677ad56 100644 --- a/device/mellanox/x86_64-mlnx_msn4600c-r0/sensors.conf.a1 +++ b/device/mellanox/x86_64-mlnx_msn4600c-r0/sensors.conf.a1 @@ -123,6 +123,9 @@ bus "i2c-4" "i2c-1-mux (chan_id 3)" label power2 "PSU-1(L) 12V Rail Pwr (out)" label curr1 "PSU-1(L) 220V Rail Curr (in)" label curr2 "PSU-1(L) 12V Rail Curr (out)" + set in3_lcrit in3_crit * 0.662 + set in3_min in3_crit * 0.745 + set in3_max in3_crit * 0.952 chip "dps460-i2c-*-59" label in1 "PSU-2(R) 220V Rail (in)" ignore in2 @@ -137,6 +140,9 @@ bus "i2c-4" "i2c-1-mux (chan_id 3)" label power2 "PSU-2(R) 12V Rail Pwr (out)" label curr1 "PSU-2(R) 220V Rail Curr (in)" label curr2 "PSU-2(R) 12V Rail Curr (out)" + set in3_lcrit in3_crit * 0.662 + set in3_min in3_crit * 0.745 + set in3_max in3_crit * 0.952 # Chassis fans chip "mlxreg_fan-isa-*" diff --git a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/0/jr2cp-nokia-18x400g-config.bcm b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/0/jr2cp-nokia-18x400g-config.bcm index ecaae10276a4..bbafccdc377e 100644 --- a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/0/jr2cp-nokia-18x400g-config.bcm +++ b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/0/jr2cp-nokia-18x400g-config.bcm @@ -1263,8 +1263,9 @@ phy_tx_polarity_flip_phy143.BCM8885X=0 polled_irq_delay.BCM8885X=5 -polled_irq_mode.BCM8885X=1 +polled_irq_mode.BCM8885X=0 port_fec_fabric.BCM8885X=7 +bcm_stat_interval.BCM8885X=1000000 port_init_cl72_1=0 @@ -1553,7 +1554,9 @@ ucode_port_18.BCM8885X=CDGE0:core_0.18 ucode_port_19.BCM8885X=RCY0:core_0.19 -ucode_port_20.BCM8885X=OLP:core_1.20 +ucode_port_20.BCM8885X=RCY1:core_1.20 +ucode_port_21.BCM8885X=OLP:core_1.21 + serdes_lane_config_dfe_1.BCM8885X=on diff --git a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/1/jr2cp-nokia-18x400g-config.bcm b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/1/jr2cp-nokia-18x400g-config.bcm index 142a718e080f..ce7f77de5bb2 100644 --- a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/1/jr2cp-nokia-18x400g-config.bcm +++ b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/Nokia-IXR7250E-36x400G/1/jr2cp-nokia-18x400g-config.bcm @@ -1263,8 +1263,9 @@ phy_tx_polarity_flip_phy143.BCM8885X=0 polled_irq_delay.BCM8885X=5 -polled_irq_mode.BCM8885X=1 +polled_irq_mode.BCM8885X=0 port_fec_fabric.BCM8885X=7 +bcm_stat_interval.BCM8885X=1000000 port_init_cl72_1=0 @@ -1553,7 +1554,9 @@ ucode_port_18.BCM8885X=CDGE0:core_0.18 ucode_port_19.BCM8885X=RCY0:core_0.19 -ucode_port_20.BCM8885X=OLP:core_1.20 +ucode_port_20.BCM8885X=RCY1:core_1.20 +ucode_port_21.BCM8885X=OLP:core_1.21 + serdes_lane_config_dfe_1.BCM8885X=on diff --git a/dockers/docker-dhcp-relay/Dockerfile.j2 b/dockers/docker-dhcp-relay/Dockerfile.j2 index 2d2afd922471..f214edc8516c 100644 --- a/dockers/docker-dhcp-relay/Dockerfile.j2 +++ b/dockers/docker-dhcp-relay/Dockerfile.j2 @@ -30,7 +30,7 @@ RUN apt-get clean -y && \ COPY ["docker_init.sh", "start.sh", "/usr/bin/"] COPY ["docker-dhcp-relay.supervisord.conf.j2", "port-name-alias-map.txt.j2", "wait_for_intf.sh.j2", "/usr/share/sonic/templates/"] -COPY ["dhcp-relay.programs.j2", "dhcpv4-relay.agents.j2", "dhcpv6-relay.agents.j2", "dhcpv6-relay.monitors.j2", "/usr/share/sonic/templates/"] +COPY ["dhcp-relay.programs.j2", "dhcpv4-relay.agents.j2", "dhcpv6-relay.agents.j2", "dhcp-relay.monitors.j2", "/usr/share/sonic/templates/"] COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] COPY ["critical_processes", "/etc/supervisor"] COPY ["cli", "/cli/"] diff --git a/dockers/docker-dhcp-relay/dhcpv6-relay.monitors.j2 b/dockers/docker-dhcp-relay/dhcp-relay.monitors.j2 similarity index 97% rename from dockers/docker-dhcp-relay/dhcpv6-relay.monitors.j2 rename to dockers/docker-dhcp-relay/dhcp-relay.monitors.j2 index 9f2d0f01b59f..ae11105ae3ba 100644 --- a/dockers/docker-dhcp-relay/dhcpv6-relay.monitors.j2 +++ b/dockers/docker-dhcp-relay/dhcp-relay.monitors.j2 @@ -59,8 +59,6 @@ command=/usr/sbin/dhcpmon -id {{ vlan_name }} {% if prefix | ipv4 %} -im {{ name }}{% endif -%} {% endfor %} {% endif %} -{% if relay_for_ipv4.flag %} -4{% endif %} -{% if relay_for_ipv6.flag %} -6{% endif %} priority=4 autostart=false diff --git a/dockers/docker-dhcp-relay/docker-dhcp-relay.supervisord.conf.j2 b/dockers/docker-dhcp-relay/docker-dhcp-relay.supervisord.conf.j2 index 664e1f36c05e..41a13dd496ad 100644 --- a/dockers/docker-dhcp-relay/docker-dhcp-relay.supervisord.conf.j2 +++ b/dockers/docker-dhcp-relay/docker-dhcp-relay.supervisord.conf.j2 @@ -65,6 +65,6 @@ dependent_startup_wait_for=rsyslogd:running {% include 'dhcpv6-relay.agents.j2' %} {% endfor %} -{% include 'dhcpv6-relay.monitors.j2' %} +{% include 'dhcp-relay.monitors.j2' %} {% endif %} {% endif %} diff --git a/dockers/docker-orchagent/Dockerfile.j2 b/dockers/docker-orchagent/Dockerfile.j2 index f71f31cfc0ac..ea4e0abbc2ef 100755 --- a/dockers/docker-orchagent/Dockerfile.j2 +++ b/dockers/docker-orchagent/Dockerfile.j2 @@ -40,7 +40,6 @@ RUN ln -s -f /usr/bin/gcc-8 /usr/bin/aarch64-linux-gnu-gcc # Dependencies of restore_neighbors.py RUN pip3 install \ - scapy==2.4.4 \ pyroute2==0.5.14 \ netifaces==0.10.9 @@ -57,6 +56,14 @@ RUN apt-get remove -y gcc-8 {{ install_debian_packages(docker_orchagent_debs.split(' ')) }} {%- endif %} +{% if docker_orchagent_whls.strip() -%} +# Copy locally-built Python wheel dependencies +{{ copy_files("python-wheels/", docker_orchagent_whls.split(' '), "/python-wheels/") }} + +# Install locally-built Python wheel dependencies +{{ install_python_wheels(docker_orchagent_whls.split(' ')) }} +{% endif %} + # Clean up RUN apt-get purge -y \ build-essential \ diff --git a/dockers/docker-orchagent/switch.json.j2 b/dockers/docker-orchagent/switch.json.j2 index fa0ef4b44ed7..30ad703bc2cf 100644 --- a/dockers/docker-orchagent/switch.json.j2 +++ b/dockers/docker-orchagent/switch.json.j2 @@ -3,7 +3,7 @@ {% set hash_seed = 0 %} {% set hash_seed_offset = 0 %} {% if DEVICE_METADATA.localhost.type %} -{% if "ToRRouter" in DEVICE_METADATA.localhost.type %} +{% if "ToRRouter" in DEVICE_METADATA.localhost.type or DEVICE_METADATA.localhost.type in ["EPMS", "MgmtTsToR"] %} {% set hash_seed = 0 %} {% elif "LeafRouter" in DEVICE_METADATA.localhost.type %} {% set hash_seed = 10 %} diff --git a/dockers/docker-platform-monitor/docker-pmon.supervisord.conf.j2 b/dockers/docker-platform-monitor/docker-pmon.supervisord.conf.j2 index b93f0cef3cee..4a13d76edb0a 100644 --- a/dockers/docker-platform-monitor/docker-pmon.supervisord.conf.j2 +++ b/dockers/docker-platform-monitor/docker-pmon.supervisord.conf.j2 @@ -171,7 +171,7 @@ dependent_startup_wait_for=rsyslogd:running {% if not skip_pcied %} [program:pcied] -command={% if API_VERSION == 3 and 'pcied' not in python2_daemons %}python3 {% else %} python2 {% endif %}/usr/local/bin/pcied +command=/usr/local/bin/pcied priority=11 autostart=false autorestart=unexpected diff --git a/dockers/docker-router-advertiser/Dockerfile.j2 b/dockers/docker-router-advertiser/Dockerfile.j2 index 7d225cbd4e79..44e2430077cb 100644 --- a/dockers/docker-router-advertiser/Dockerfile.j2 +++ b/dockers/docker-router-advertiser/Dockerfile.j2 @@ -1,5 +1,5 @@ {% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %} -FROM docker-config-engine-buster +FROM docker-config-engine-bullseye ARG docker_container_name ARG image_version @@ -15,7 +15,7 @@ ENV IMAGE_VERSION=$image_version RUN apt-get update # Install radvd Debian package -RUN apt-get -y install radvd=1:2.17-2 +RUN apt-get -y install radvd {% if docker_router_advertiser_debs.strip() -%} # Copy built Debian packages diff --git a/dockers/docker-router-advertiser/docker-router-advertiser.supervisord.conf.j2 b/dockers/docker-router-advertiser/docker-router-advertiser.supervisord.conf.j2 index 7562444946ed..22f33e412195 100644 --- a/dockers/docker-router-advertiser/docker-router-advertiser.supervisord.conf.j2 +++ b/dockers/docker-router-advertiser/docker-router-advertiser.supervisord.conf.j2 @@ -45,7 +45,7 @@ dependent_startup_wait_for=rsyslogd:running {%- set vlan_v6 = namespace(count=0) -%} {%- if DEVICE_METADATA.localhost.deployment_id != "8" -%} {%- if DEVICE_METADATA.localhost.type -%} - {%- if "ToRRouter" in DEVICE_METADATA.localhost.type or DEVICE_METADATA.localhost.type == "EPMS" -%} + {%- if "ToRRouter" in DEVICE_METADATA.localhost.type or DEVICE_METADATA.localhost.type in ["EPMS", "MgmtTsToR"] -%} {%- if VLAN_INTERFACE -%} {%- for (name, prefix) in VLAN_INTERFACE|pfx_filter -%} {# If this VLAN has an IPv6 address... #} diff --git a/files/Aboot/boot0.j2 b/files/Aboot/boot0.j2 index 7306c36cfc0c..2510695d1363 100644 --- a/files/Aboot/boot0.j2 +++ b/files/Aboot/boot0.j2 @@ -355,9 +355,6 @@ extract_image() { local rootdev="$(echo $mountstr | cut -f1 -d' ')" rootfs_type="$(echo $mountstr | cut -d' ' -f3)" - ## Don't reserve any blocks just for root - tune2fs -m 0 -r 0 $rootdev - info "Extracting $dockerfs from swi" ## Unpacking dockerfs delayed ## 1. when disk is vfat as it does not support symbolic link diff --git a/files/build_templates/docker_image_ctl.j2 b/files/build_templates/docker_image_ctl.j2 index b139eb570b3a..6d5024b716eb 100644 --- a/files/build_templates/docker_image_ctl.j2 +++ b/files/build_templates/docker_image_ctl.j2 @@ -233,6 +233,11 @@ start() { source $ASIC_CONF fi + PLATFORM_ENV_CONF=/usr/share/sonic/device/$PLATFORM/platform_env.conf + if [ -f "$PLATFORM_ENV_CONF" ]; then + source $PLATFORM_ENV_CONF + fi + {%- if docker_container_name == "database" %} # Don't mount HWSKU in {{docker_container_name}} container. HWSKU="" @@ -421,6 +426,7 @@ start() { {%- endif %} {%- if sonic_asic_platform == "broadcom" %} {%- if docker_container_name == "syncd" %} + --shm-size=${SYNCD_SHM_SIZE:-64m} \ -v /var/run/docker-syncd$DEV:/var/run/sswsyncd \ {%- endif %} {%- endif %} diff --git a/files/build_templates/qos_config.j2 b/files/build_templates/qos_config.j2 index 2a01e470fde8..9df061283034 100644 --- a/files/build_templates/qos_config.j2 +++ b/files/build_templates/qos_config.j2 @@ -29,6 +29,13 @@ {%- endfor %} {%- set port_names_active = port_names_list_active | join(',') -%} +{%- set port_names_list_extra_queues = [] %} +{%- for port in PORT_ACTIVE %} + {% if (generate_dscp_to_tc_map is defined) and ('type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] == 'LeafRouter' and DEVICE_NEIGHBOR_METADATA is defined and DEVICE_NEIGHBOR[port].name in DEVICE_NEIGHBOR_METADATA and DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[port].name].type == 'ToRRouter') or + ('subtype' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['subtype'] == 'DualToR' and DEVICE_NEIGHBOR_METADATA is defined and DEVICE_NEIGHBOR[port].name in DEVICE_NEIGHBOR_METADATA and DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[port].name].type == 'LeafRouter') %} + {%- if port_names_list_extra_queues.append(port) %}{%- endif %} + {% endif %} +{%- endfor %} {%- set pfc_to_pg_map_supported_asics = ['mellanox', 'barefoot', 'marvell'] -%} {%- set backend_device_types = ['BackEndToRRouter', 'BackEndLeafRouter'] -%} @@ -64,6 +71,9 @@ "7": "7" } }, +{% if generate_tc_to_queue_map is defined %} + {{- generate_tc_to_queue_map() }} +{% else %} "TC_TO_QUEUE_MAP": { "AZURE": { "0": "0", @@ -76,6 +86,7 @@ "7": "7" } }, +{% endif %} {% if 'type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] in backend_device_types and 'storage_device' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['storage_device'] == 'true' %} "DOT1P_TO_TC_MAP": { "AZURE": { @@ -89,6 +100,8 @@ "7": "7" } }, +{% elif generate_dscp_to_tc_map is defined %} + {{- generate_dscp_to_tc_map() }} {% else %} "DSCP_TO_TC_MAP": { "AZURE": { @@ -208,7 +221,12 @@ {% if asic_type in pfc_to_pg_map_supported_asics %} "pfc_to_pg_map" : "AZURE", {% endif %} - "pfc_enable" : "3,4" +{% if port in port_names_list_extra_queues %} + "pfc_enable" : "2,3,4,6", +{% else %} + "pfc_enable" : "3,4", +{% endif %} + "pfcwd_sw_enable" : "3,4" }{% if not loop.last %},{% endif %} {% endfor %} @@ -268,7 +286,12 @@ {% endfor %} {% for port in PORT_ACTIVE %} "{{ port }}|2": { + {% if port in port_names_list_extra_queues %} + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + {% else %} "scheduler": "scheduler.0" + {% endif %} }, {% endfor %} {% for port in PORT_ACTIVE %} @@ -278,7 +301,12 @@ {% endfor %} {% for port in PORT_ACTIVE %} "{{ port }}|6": { + {% if port in port_names_list_extra_queues %} + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + {% else %} "scheduler": "scheduler.0" + {% endif %} }{% if not loop.last %},{% endif %} {% endfor %} diff --git a/files/image_config/interfaces/interfaces-config.sh b/files/image_config/interfaces/interfaces-config.sh index 5753bebd378d..646fd7a94e71 100755 --- a/files/image_config/interfaces/interfaces-config.sh +++ b/files/image_config/interfaces/interfaces-config.sh @@ -1,6 +1,8 @@ #!/bin/bash -ifdown --force eth0 +if [[ $(ifquery --running eth0) ]]; then + ifdown --force eth0 +fi # Check if ZTP DHCP policy has been installed if [ -e /etc/network/ifupdown2/policy.d/ztp_dhcp.json ]; then diff --git a/files/initramfs-tools/mke2fs b/files/initramfs-tools/mke2fs index 1f98f20c23c4..2c6d45ea5bc9 100644 --- a/files/initramfs-tools/mke2fs +++ b/files/initramfs-tools/mke2fs @@ -21,6 +21,7 @@ copy_exec /usr/sbin/mke2fs /usr/local/sbin/ copy_exec /sbin/sfdisk copy_exec /sbin/fdisk copy_exec /sbin/resize2fs +copy_exec /sbin/tune2fs copy_exec /sbin/findfs fstypes="ext4 ext3" diff --git a/files/initramfs-tools/union-mount.j2 b/files/initramfs-tools/union-mount.j2 index 7a64f71d70bb..c9dd19204406 100644 --- a/files/initramfs-tools/union-mount.j2 +++ b/files/initramfs-tools/union-mount.j2 @@ -133,6 +133,7 @@ case "${ROOT}" in *) ## Mount the raw partition again mount -t ext4 ${ROOT} ${rootmnt}/host + tune2fs -m 0 -r 0 ${ROOT} ;; esac diff --git a/installer/arm64/install.sh b/installer/arm64/install.sh index 249c5b521700..dee3ceec9038 100755 --- a/installer/arm64/install.sh +++ b/installer/arm64/install.sh @@ -139,11 +139,6 @@ elif [ "$install_env" = "sonic" ]; then rm -rf $f fi done - - demo_dev=$(findmnt -n -o SOURCE --target /host) - - # Don't reserve any blocks just for root - tune2fs -m 0 -r 0 $demo_dev fi # Create target directory or clean it up if exists diff --git a/installer/armhf/install.sh b/installer/armhf/install.sh index 8cffa755734f..9ade40d5149e 100755 --- a/installer/armhf/install.sh +++ b/installer/armhf/install.sh @@ -139,11 +139,6 @@ elif [ "$install_env" = "sonic" ]; then rm -rf $f fi done - - demo_dev=$(findmnt -n -o SOURCE --target /host) - - # Don't reserve any blocks just for root - tune2fs -m 0 -r 0 $demo_dev fi # Create target directory or clean it up if exists diff --git a/installer/x86_64/install.sh b/installer/x86_64/install.sh index 950d765d2418..dbab4d54ab72 100755 --- a/installer/x86_64/install.sh +++ b/installer/x86_64/install.sh @@ -477,9 +477,6 @@ if [ "$install_env" = "onie" ]; then # Make filesystem mkfs.ext4 -L $demo_volume_label $demo_dev - # Don't reserve any blocks just for root - tune2fs -m 0 -r 0 $demo_dev - # Mount demo filesystem demo_mnt=$(${onie_bin} mktemp -d) || { echo "Error: Unable to create file system mount point" @@ -512,20 +509,12 @@ elif [ "$install_env" = "sonic" ]; then rm -rf $f fi done - - demo_dev=$(findmnt -n -o SOURCE --target /host) - - # Don't reserve any blocks just for root - tune2fs -m 0 -r 0 $demo_dev else demo_mnt="build_raw_image_mnt" demo_dev=$cur_wd/"%%OUTPUT_RAW_IMAGE%%" mkfs.ext4 -L $demo_volume_label $demo_dev - # Don't reserve any blocks just for root - tune2fs -m 0 -r 0 $demo_dev - echo "Mounting $demo_dev on $demo_mnt..." mkdir $demo_mnt mount -t auto -o loop $demo_dev $demo_mnt diff --git a/platform/barefoot/bfn-platform.mk b/platform/barefoot/bfn-platform.mk index 7ea4cbcd5cb8..f12bbaa8a966 100644 --- a/platform/barefoot/bfn-platform.mk +++ b/platform/barefoot/bfn-platform.mk @@ -1,4 +1,4 @@ -BFN_PLATFORM = bfnplatform_20220127_sai_1.9.1_deb10.deb +BFN_PLATFORM = bfnplatform_20220408_sai_1.9.1_deb10.deb $(BFN_PLATFORM)_URL = "https://github.com/barefootnetworks/sonic-release-pkgs/raw/dev/$(BFN_PLATFORM)" SONIC_ONLINE_DEBS += $(BFN_PLATFORM) diff --git a/platform/barefoot/bfn-sai.mk b/platform/barefoot/bfn-sai.mk index c61abeb0ae5d..a0a1d2348dea 100644 --- a/platform/barefoot/bfn-sai.mk +++ b/platform/barefoot/bfn-sai.mk @@ -1,4 +1,4 @@ -BFN_SAI = bfnsdk_20220127_sai_1.9.1_deb10.deb +BFN_SAI = bfnsdk_20220408_sai_1.9.1_deb10.deb $(BFN_SAI)_URL = "https://github.com/barefootnetworks/sonic-release-pkgs/raw/dev/$(BFN_SAI)" $(BFN_SAI)_DEPENDS += $(LIBNL_GENL3_DEV) diff --git a/platform/barefoot/libsaithrift-dev.mk b/platform/barefoot/libsaithrift-dev.mk index 40cd5554653e..0fb5ca0cb81d 100644 --- a/platform/barefoot/libsaithrift-dev.mk +++ b/platform/barefoot/libsaithrift-dev.mk @@ -1,7 +1,3 @@ -SAITHRIFT_PATCHES = saithrift-patches -$(SAITHRIFT_PATCHES)_SRC_PATH = $(PLATFORM_PATH)/saithrift-patches -SONIC_MAKE_FILES += $(SAITHRIFT_PATCHES) - # libsaithrift-dev package SAI_VER = 0.9.4 LIBSAITHRIFT_DEV = libsaithrift-dev_$(SAI_VER)_$(CONFIGURED_ARCH).deb @@ -13,7 +9,6 @@ $(LIBSAITHRIFT_DEV)_DEPENDS += $(LIBTHRIFT_0_14_1) $(LIBTHRIFT_0_14_1_DEV) \ #$(LIBSAIVS) $(LIBSAIVS_DEV) $(LIBSAIMETADATA) $(LIBSAIMETADATA_DEV) # $(LIBSAITHRIFT_DEV)_BUILD_ENV = platform=v -$(LIBSAITHRIFT_DEV)_AFTER_FILES = $(SAITHRIFT_PATCHES) $(LIBSAITHRIFT_DEV)_RDEPENDS += $(LIBTHRIFT_0_14_1) $(BFN_SAI) SONIC_DPKG_DEBS += $(LIBSAITHRIFT_DEV) diff --git a/platform/barefoot/saithrift-patches/0001-Replace-unions-with-structs-in-thrift.patch b/platform/barefoot/saithrift-patches/0001-Replace-unions-with-structs-in-thrift.patch deleted file mode 100644 index 762c72c75607..000000000000 --- a/platform/barefoot/saithrift-patches/0001-Replace-unions-with-structs-in-thrift.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 6f0188ad82845ac56729d3db621b2d10bea94ddd Mon Sep 17 00:00:00 2001 -From: Myron Sosyak -Date: Thu, 27 Jan 2022 17:25:42 +0000 -Subject: [PATCH 1/4] Replace unions with structs in thrift - ---- - test/saithrift/src/switch_sai.thrift | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/test/saithrift/src/switch_sai.thrift b/test/saithrift/src/switch_sai.thrift -index a9e1d28..0c24b71 100644 ---- a/test/saithrift/src/switch_sai.thrift -+++ b/test/saithrift/src/switch_sai.thrift -@@ -48,7 +48,7 @@ struct sai_thrift_vlan_port_t { - 2: sai_thrift_vlan_tagging_mode_t tagging_mode; - } - --union sai_thrift_ip_t { -+struct sai_thrift_ip_t { - 1: sai_thrift_ip4_t ip4; - 2: sai_thrift_ip6_t ip6; - } -@@ -79,7 +79,7 @@ struct sai_thrift_s32_list_t { - 2: list s32list; - } - --union sai_thrift_acl_mask_t { -+struct sai_thrift_acl_mask_t { - 1: byte u8; - 2: byte s8; - 3: i16 u16; -@@ -91,7 +91,7 @@ union sai_thrift_acl_mask_t { - 9: sai_thrift_ip6_t ip6; - } - --union sai_thrift_acl_data_t { -+struct sai_thrift_acl_data_t { - 1: byte u8; - 2: byte s8; - 3: i16 u16; -@@ -112,7 +112,7 @@ struct sai_thrift_acl_field_data_t - 3: sai_thrift_acl_data_t data; - } - --union sai_thrift_acl_parameter_t { -+struct sai_thrift_acl_parameter_t { - 1: byte u8; - 2: byte s8; - 3: i16 u16; -@@ -161,7 +161,7 @@ struct sai_thrift_fdb_values_t { - 2: sai_thrift_fdb_entry_t thrift_fdb_entry; - } - --union sai_thrift_attribute_value_t { -+struct sai_thrift_attribute_value_t { - 1: bool booldata; - 2: string chardata; - 3: byte u8; -@@ -207,7 +207,7 @@ struct sai_thrift_attribute_list_t { - 2: i32 attr_count; // redundant - } - --union sai_thrift_result_data_t { -+struct sai_thrift_result_data_t { - 1: sai_thrift_object_list_t objlist; - 2: sai_thrift_object_id_t oid; - 3: i16 u16; --- -2.20.1 - diff --git a/platform/barefoot/saithrift-patches/0002-Use-std-shared_ptr-instead-of-boost.patch b/platform/barefoot/saithrift-patches/0002-Use-std-shared_ptr-instead-of-boost.patch deleted file mode 100644 index 93602dc4e991..000000000000 --- a/platform/barefoot/saithrift-patches/0002-Use-std-shared_ptr-instead-of-boost.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 6605dbe4906173b78f428f42f749674c2722361a Mon Sep 17 00:00:00 2001 -From: Myron Sosyak -Date: Thu, 27 Jan 2022 17:26:08 +0000 -Subject: [PATCH 2/4] Use std::shared_ptr instead of boost - ---- - test/saithrift/src/switch_sai_rpc_server.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test/saithrift/src/switch_sai_rpc_server.cpp b/test/saithrift/src/switch_sai_rpc_server.cpp -index 0df9b3d..e990c50 100644 ---- a/test/saithrift/src/switch_sai_rpc_server.cpp -+++ b/test/saithrift/src/switch_sai_rpc_server.cpp -@@ -74,7 +74,7 @@ using namespace ::apache::thrift::protocol; - using namespace ::apache::thrift::transport; - using namespace ::apache::thrift::server; - --using boost::shared_ptr; -+using std::shared_ptr; - - using namespace ::switch_sai; - --- -2.20.1 - diff --git a/platform/barefoot/saithrift-patches/0003-include-algorithm.patch b/platform/barefoot/saithrift-patches/0003-include-algorithm.patch deleted file mode 100644 index 22471adc380e..000000000000 --- a/platform/barefoot/saithrift-patches/0003-include-algorithm.patch +++ /dev/null @@ -1,24 +0,0 @@ -From b468a7aa00843be9c5ead478bd074784c04b4ba2 Mon Sep 17 00:00:00 2001 -From: Myron Sosyak -Date: Thu, 27 Jan 2022 17:26:40 +0000 -Subject: [PATCH 3/4] include algorithm - ---- - test/saithrift/src/saiserver.cpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/test/saithrift/src/saiserver.cpp b/test/saithrift/src/saiserver.cpp -index 846c3f1..7120b26 100644 ---- a/test/saithrift/src/saiserver.cpp -+++ b/test/saithrift/src/saiserver.cpp -@@ -5,6 +5,7 @@ - #include - #include - #include -+#include - #include - #include - #include --- -2.20.1 - diff --git a/platform/barefoot/saithrift-patches/0004-Fix-Thrift-0.14.1-compatibility.patch b/platform/barefoot/saithrift-patches/0004-Fix-Thrift-0.14.1-compatibility.patch deleted file mode 100644 index 19e619aa5be0..000000000000 --- a/platform/barefoot/saithrift-patches/0004-Fix-Thrift-0.14.1-compatibility.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 58d5e21378d3fd5dd3a48adb24423c1bb9ff6f7a Mon Sep 17 00:00:00 2001 -From: Myron Sosyak -Date: Thu, 27 Jan 2022 17:28:05 +0000 -Subject: [PATCH 4/4] Fix Thrift 0.14.1 compatibility - ---- - test/saithrift/Makefile | 10 ++++------ - 1 file changed, 4 insertions(+), 6 deletions(-) - -diff --git a/test/saithrift/Makefile b/test/saithrift/Makefile -index cbe6f48..3734ee7 100644 ---- a/test/saithrift/Makefile -+++ b/test/saithrift/Makefile -@@ -21,8 +21,8 @@ CDEFS = -DBRCMSAI - endif - endif - endif --DEPS = switch_sai_constants.h switch_sai_rpc.h switch_sai_types.h --OBJS = switch_sai_constants.o switch_sai_rpc.o switch_sai_types.o -+DEPS = switch_sai_rpc.h switch_sai_types.h -+OBJS = switch_sai_rpc.o switch_sai_types.o - - ODIR = ./src/obj - SAIDIR = ./include -@@ -42,8 +42,6 @@ endif - SAI_LIBRARY_DIR ?= $(SAI_PREFIX)/lib - LDFLAGS = -L$(SAI_LIBRARY_DIR) -Wl,-rpath=$(SAI_LIBRARY_DIR) - CPP_SOURCES = \ -- src/gen-cpp/switch_sai_constants.cpp \ -- src/gen-cpp/switch_sai_constants.h \ - src/gen-cpp/switch_sai_rpc.cpp \ - src/gen-cpp/switch_sai_rpc.h \ - src/gen-cpp/switch_sai_types.cpp \ -@@ -89,8 +87,8 @@ $(ODIR)/switch_sai_rpc_server.o: src/switch_sai_rpc_server.cpp - $(ODIR)/saiserver.o: src/saiserver.cpp - $(CXX) $(CFLAGS) -c $^ -o $@ $(CFLAGS) $(CDEFS) -I$(SRC)/gen-cpp -I$(SRC) - --$(ODIR)/librpcserver.a: $(ODIR)/switch_sai_rpc.o $(ODIR)/switch_sai_types.o $(ODIR)/switch_sai_constants.o $(ODIR)/switch_sai_rpc_server.o -- ar rcs $(ODIR)/librpcserver.a $(ODIR)/switch_sai_rpc.o $(ODIR)/switch_sai_types.o $(ODIR)/switch_sai_constants.o $(ODIR)/switch_sai_rpc_server.o -+$(ODIR)/librpcserver.a: $(ODIR)/switch_sai_rpc.o $(ODIR)/switch_sai_types.o $(ODIR)/switch_sai_rpc_server.o -+ ar rcs $(ODIR)/librpcserver.a $(ODIR)/switch_sai_rpc.o $(ODIR)/switch_sai_types.o $(ODIR)/switch_sai_rpc_server.o - - saiserver: $(ODIR)/saiserver.o $(ODIR)/librpcserver.a - $(CXX) $(LDFLAGS) $(ODIR)/switch_sai_rpc_server.o $(ODIR)/saiserver.o -o $@ \ --- -2.20.1 - diff --git a/platform/barefoot/saithrift-patches/Makefile b/platform/barefoot/saithrift-patches/Makefile deleted file mode 100644 index 625317dcb5fe..000000000000 --- a/platform/barefoot/saithrift-patches/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -SHELL = /bin/bash -.ONESHELL: -.SHELLFLAGS += -e - -MAIN_TARGET = saithrift-patches - -$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : -# To add some BFN specific patches to SAI under sonic-sairedis while sai is not updated -SRC_DIR = ../saithrift-patches -DST_DIR = ../../../src/sonic-sairedis/SAI.patch/ - -$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : - # copy patches to SAI - mkdir -p $(DST_DIR) - cp -f $(SRC_DIR)/* $(DST_DIR) - - touch $(DEST)/saithrift-patches - - diff --git a/platform/barefoot/saithrift-patches/series b/platform/barefoot/saithrift-patches/series deleted file mode 100644 index fe26c2102c25..000000000000 --- a/platform/barefoot/saithrift-patches/series +++ /dev/null @@ -1,4 +0,0 @@ -0001-Replace-unions-with-structs-in-thrift.patch -0002-Use-std-shared_ptr-instead-of-boost.patch -0003-include-algorithm.patch -0004-Fix-Thrift-0.14.1-compatibility.patch diff --git a/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/chassis.py b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/chassis.py index 64536abbb532..6d0e8b8c120c 100644 --- a/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/chassis.py +++ b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/chassis.py @@ -1,8 +1,12 @@ #!/usr/bin/env python try: + import os import time import syslog + import logging + import logging.config + import yaml from sonic_platform_base.chassis_base import ChassisBase from sonic_platform.sfp import Sfp @@ -10,6 +14,7 @@ from sonic_platform.fan_drawer import fan_drawer_list_get from sonic_platform.thermal import thermal_list_get from eeprom import Eeprom + from platform_utils import file_create from sonic_platform.platform_thrift_client import pltfm_mgr_ready from sonic_platform.platform_thrift_client import thrift_try @@ -47,6 +52,11 @@ def __init__(self): self.qsfp_interval = self.QSFP_CHECK_INTERVAL self.__initialize_components() + with open(os.path.dirname(__file__) + "/logging.conf", 'r') as f: + config_dict = yaml.load(f, yaml.SafeLoader) + file_create(config_dict['handlers']['file']['filename'], '646') + logging.config.dictConfig(config_dict) + @property def _eeprom(self): if self.__eeprom is None: diff --git a/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/component.py b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/component.py index 5e72bb63e343..47a0993bf3e5 100644 --- a/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/component.py +++ b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/component.py @@ -1,4 +1,5 @@ try: + import os import subprocess from sonic_platform_base.component_base import ComponentBase from platform_thrift_client import thrift_try @@ -16,9 +17,12 @@ def get_bios_version(): A string containing the firmware version of the BIOS """ try: - return subprocess.check_output(['dmidecode', '-s', 'bios-version']).strip().decode() + cmd = ['dmidecode', '-s', 'bios-version'] + if os.geteuid() != 0: + cmd.insert(0, 'sudo') + return subprocess.check_output(cmd).strip().decode() except subprocess.CalledProcessError as e: - raise RuntimeError("Failed to getget BIOS version") + raise RuntimeError("Failed to get BIOS version") def get_bmc_version(): """ diff --git a/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/eeprom.py b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/eeprom.py index ec7112b3c093..2335c02863d9 100644 --- a/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/eeprom.py +++ b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/eeprom.py @@ -1,11 +1,7 @@ try: import os import sys - import errno import datetime - import logging - import logging.config - import yaml import re sys.path.append(os.path.dirname(__file__)) @@ -17,6 +13,7 @@ from sonic_platform_base.sonic_eeprom import eeprom_base from sonic_platform_base.sonic_eeprom import eeprom_tlvinfo + from platform_utils import file_create from platform_thrift_client import thrift_try except ImportError as e: @@ -45,18 +42,8 @@ class Eeprom(eeprom_tlvinfo.TlvInfoDecoder): def __init__(self): - with open(os.path.dirname(__file__) + "/logging.conf", 'r') as f: - config_dict = yaml.load(f, yaml.SafeLoader) - logging.config.dictConfig(config_dict) - - if not os.path.exists(os.path.dirname(_EEPROM_SYMLINK)): - try: - os.makedirs(os.path.dirname(_EEPROM_SYMLINK)) - except OSError as e: - if e.errno != errno.EEXIST: - raise - - open(_EEPROM_SYMLINK, 'a').close() + file_create(_EEPROM_SYMLINK, '646') + file_create(_EEPROM_STATUS, '646') with open(_EEPROM_STATUS, 'w') as f: f.write("initializing..") @@ -152,3 +139,4 @@ def modelstr(self): def revision_str(self): return self.__tlv_get(self._TLV_CODE_LABEL_REVISION) + diff --git a/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/platform_utils.py b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/platform_utils.py new file mode 100644 index 000000000000..81e78ee01041 --- /dev/null +++ b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/platform_utils.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python + +try: + import os + import subprocess + +except ImportError as e: + raise ImportError(str(e) + "- required module not found") + +def file_create(path, mode=None): + def run_cmd(cmd): + if os.geteuid() != 0: + cmd.insert(0, 'sudo') + subprocess.check_output(cmd) + + file_path = os.path.dirname(path) + if not os.path.exists(file_path): + run_cmd(['mkdir', '-p', file_path]) + if not os.path.isfile(path): + run_cmd(['touch', path]) + if (mode is not None): + run_cmd(['chmod', mode, path]) diff --git a/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/thermal.py b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/thermal.py index ef3c571ac301..e5034f09f558 100644 --- a/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/thermal.py +++ b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/thermal.py @@ -1,8 +1,11 @@ try: import subprocess - + from collections import namedtuple + import json from bfn_extensions.platform_sensors import platform_sensors_get from sonic_platform_base.thermal_base import ThermalBase + from sonic_py_common import device_info + import logging except ImportError as e: raise ImportError (str(e) + "- required module not found") @@ -18,6 +21,8 @@ temp2_input: 37.000 ... ''' +Threshold = namedtuple('Threshold', ['crit', 'max', 'min', 'alarm']) + def _sensors_chip_parsed(data: str): def kv(line): k, v, *_ = [t.strip(': ') for t in line.split(':') if t] + [''] @@ -68,27 +73,89 @@ def _value_get(d: dict, key_prefix, key_suffix=''): # Thermal -> ThermalBase -> DeviceBase class Thermal(ThermalBase): + _thresholds = dict() + _max_temperature = 100.0 + _min_temperature = 0.0 + _min_high_threshold_temperature = 35.0 + def __init__(self, chip, label, index = 0): self.__chip = chip self.__label = label self.__name = f"{chip}:{label}".lower().replace(' ', '-') self.__collect_temp = [] self.__index = index + self.__high_threshold = None + self.__low_threshold = None + f = None + try: + path = device_info.get_path_to_platform_dir() + '/' + 'thermal_thresholds.json' + f = open(path) + except FileNotFoundError: + logging.warning('can not open the file') + + if f is not None: + self.__get_thresholds(f) + + def __get_thresholds(self, f): + def_threshold_json = json.load(f) + all_data = def_threshold_json["thermals"] + for i in all_data: + for key, value in i.items(): + self._thresholds[key] = Threshold(*value) + + def check_in_range(self, temperature): + temp_f = float(temperature) + return temp_f > self._min_temperature and temp_f <= self._max_temperature + + def check_high_threshold(self, temperature, attr_suffix): + temp_f = float(temperature) + check_range = True + if attr_suffix == 'max': + if temp_f < self._min_high_threshold_temperature: + if self.__name in self._thresholds: + temp = self._thresholds[self.__name].max + self.set_high_threshold(temp) + check_range = False + return check_range def __get(self, attr_prefix, attr_suffix): sensor_data = _sensors_get().get(self.__chip, {}).get(self.__label, {}) value = _value_get(sensor_data, attr_prefix, attr_suffix) - return value if value is not None else -999.9 + if value is not None and self.check_in_range(value) and self.check_high_threshold(value, attr_suffix): + return value + elif self.__name in self._thresholds and attr_prefix == 'temp': + if attr_suffix == 'crit': + return self._thresholds[self.__name].crit + elif attr_suffix == 'max': + if self.__high_threshold is None: + return self._thresholds[self.__name].max + else: + return self.__high_threshold + elif attr_suffix == 'min': + if self.__low_threshold is None: + return self._thresholds[self.__name].min + else: + return self.__low_threshold + elif attr_suffix == 'alarm': + return self._thresholds[self.__name].alarm + else: + return 1.0 + else: + return 0.05 # ThermalBase interface methods: def get_temperature(self) -> float: temp = self.__get('temp', 'input') self.__collect_temp.append(float(temp)) self.__collect_temp.sort() + if len(self.__collect_temp) == 3: + del self.__collect_temp[1] return float(temp) def get_high_threshold(self) -> float: - return float(self.__get('temp', 'max')) + if self.__high_threshold is None: + return float(self.__get('temp', 'max')) + return float(self.__high_threshold) def get_high_critical_threshold(self) -> float: return float(self.__get('temp', 'crit')) @@ -113,28 +180,38 @@ def is_replaceable(self): return False def get_low_threshold(self) -> float: - return float(self.__get('temp', 'min')) + if self.__low_threshold is None: + return float(self.__get('temp', 'min')) + return float(self.__low_threshold) def get_serial(self): return 'N/A' def get_minimum_recorded(self) -> float: - temp = self.__collect_temp[0] if len(self.__collect_temp) > 0 else 0.1 + temp = self.__collect_temp[0] if len(self.__collect_temp) > 0 else self.get_temperature() + temp = temp if temp <= 100.0 else 100.0 temp = temp if temp > 0.0 else 0.1 return float(temp) def get_maximum_recorded(self) -> float: - temp = self.__collect_temp[-1] if len(self.__collect_temp) > 0 else 100.0 + temp = self.__collect_temp[-1] if len(self.__collect_temp) > 0 else self.get_temperature() temp = temp if temp <= 100.0 else 100.0 + temp = temp if temp > 0.0 else 0.1 return float(temp) def get_position_in_parent(self): return self.__index def set_high_threshold(self, temperature): + if self.check_in_range(temperature): + self.__high_threshold = temperature + return True return False def set_low_threshold(self, temperature): + if self.check_in_range(temperature): + self.__low_threshold = temperature + return True return False def thermal_list_get(): diff --git a/platform/broadcom/saibcm-modules/debian/opennsl-modules.init b/platform/broadcom/saibcm-modules/debian/opennsl-modules.init index 09112f5331ce..62274eaa36aa 100755 --- a/platform/broadcom/saibcm-modules/debian/opennsl-modules.init +++ b/platform/broadcom/saibcm-modules/debian/opennsl-modules.init @@ -14,17 +14,27 @@ function create_devices() { - rm -f /dev/linux-knet-cb - rm -f /dev/linux-bcm-knet - rm -f /dev/linux-bcm-bde - rm -f /dev/linux-kernel-bde - rm -f /dev/linux_ngbde - - mknod /dev/linux_ngbde c 120 0 - mknod /dev/linux-knet-cb c 121 0 - mknod /dev/linux-bcm-knet c 122 0 - mknod /dev/linux-bcm-bde c 126 0 - mknod /dev/linux-kernel-bde c 127 0 + if [[ $is_ltsw_chip -eq 1 ]]; then + rm -f /dev/linux_ngbde + rm -f /dev/linux_ngknet + rm -f /dev/linux_ngknetcb + + mknod /dev/linux_ngbde c 120 0 + mknod /dev/linux_ngknet c 121 0 + mknod /dev/linux_ngknetcb c 122 0 + else + rm -f /dev/linux-knet-cb + rm -f /dev/linux-bcm-knet + rm -f /dev/linux-bcm-bde + rm -f /dev/linux-kernel-bde + rm -f /dev/linux_ngbde + + mknod /dev/linux_ngbde c 120 0 + mknod /dev/linux-knet-cb c 121 0 + mknod /dev/linux-bcm-knet c 122 0 + mknod /dev/linux-bcm-bde c 126 0 + mknod /dev/linux-kernel-bde c 127 0 + fi } # linux-kernel-bde debug=4 ==> Verbose level debug @@ -33,6 +43,44 @@ function create_devices() # Events(0x20) and Instance(0x4000) # level logs function load_kernel_modules() +{ + if [[ $is_ltsw_chip -eq 1 ]]; then + insmod /lib/modules/$(uname -r)/extra/psample.ko + modprobe linux_ngbde + modprobe linux_ngknet + modprobe linux_ngknetcb + else + modprobe linux-kernel-bde dmasize=$dmasize maxpayload=128 debug=4 dma_debug=1 usemsi=$usemsi + modprobe linux-user-bde + + # Using insmod with absolute path for psample to make sure bcm psample is loaded. + # There is a different psample.ko module getting created at net/psample/psample.ko + insmod /lib/modules/$(uname -r)/extra/psample.ko + + modprobe linux-bcm-knet use_rx_skb=1 rx_buffer_size=9238 debug=0x5020 default_mtu=9100 + modprobe linux-knet-cb + modprobe linux_ngbde + fi +} + +function remove_kernel_modules() +{ + if [[ $is_ltsw_chip -eq 1 ]]; then + rmmod linux_ngknetcb + rmmod linux_ngknet + rmmod linux_ngbde + rmmod psample.ko + else + rmmod psample.ko + rmmod linux-knet-cb + rmmod linux-bcm-knet + rmmod linux-user-bde + rmmod linux-kernel-bde + rmmod linux_ngbde + fi +} + +function load_platform_env() { . /host/machine.conf @@ -47,37 +95,18 @@ function load_kernel_modules() # Set the default configuration for dmasize and usemsi parameters dmasize=32M usemsi=0 + is_ltsw_chip=0 # Source the platform env file env_file="/usr/share/sonic/device/$platform/platform_env.conf" source $env_file - - modprobe linux-kernel-bde dmasize=$dmasize maxpayload=128 debug=4 dma_debug=1 usemsi=$usemsi - modprobe linux-user-bde - - # Using insmod with absolute path for psample to make sure bcm psample is loaded. - # There is a different psample.ko module getting created at net/psample/psample.ko - insmod /lib/modules/$(uname -r)/extra/psample.ko - - modprobe linux-bcm-knet use_rx_skb=1 rx_buffer_size=9238 debug=0x5020 default_mtu=9100 - modprobe linux-knet-cb - modprobe linux_ngbde -} - -function remove_kernel_modules() -{ - rmmod psample.ko - rmmod linux-knet-cb - rmmod linux-bcm-knet - rmmod linux-user-bde - rmmod linux-kernel-bde - rmmod linux_ngbde } case "$1" in start) echo -n "Load OpenNSL kernel modules... " + load_platform_env create_devices load_kernel_modules @@ -87,6 +116,7 @@ start) stop) echo -n "Unload OpenNSL kernel modules... " + load_platform_env remove_kernel_modules echo "done." diff --git a/platform/broadcom/saibcm-modules/debian/opennsl-modules.install b/platform/broadcom/saibcm-modules/debian/opennsl-modules.install index 59bf020cb22c..c739b6a5fc40 100644 --- a/platform/broadcom/saibcm-modules/debian/opennsl-modules.install +++ b/platform/broadcom/saibcm-modules/debian/opennsl-modules.install @@ -4,3 +4,5 @@ systems/linux/user/x86-smp_generic_64-2_6/linux-user-bde.ko lib/modules/5.10.0-8 systems/linux/user/x86-smp_generic_64-2_6/linux-knet-cb.ko lib/modules/5.10.0-8-2-amd64/extra systemd/opennsl-modules.service lib/systemd/system sdklt/linux/bde/linux_ngbde.ko lib/modules/5.10.0-8-2-amd64/extra +sdklt/linux/knet/linux_ngknet.ko lib/modules/5.10.0-8-2-amd64/extra +sdklt/linux/knetcb/linux_ngknetcb.ko lib/modules/5.10.0-8-2-amd64/extra diff --git a/platform/broadcom/sonic-platform-modules-accton/as4630-54pe/service/pddf-platform-init.service b/platform/broadcom/sonic-platform-modules-accton/as4630-54pe/service/pddf-platform-init.service new file mode 120000 index 000000000000..0fd9f25b6c5e --- /dev/null +++ b/platform/broadcom/sonic-platform-modules-accton/as4630-54pe/service/pddf-platform-init.service @@ -0,0 +1 @@ +../../../../pddf/i2c/service/pddf-platform-init.service \ No newline at end of file diff --git a/platform/broadcom/sonic-platform-modules-accton/as4630-54pe/sonic_platform_setup.py b/platform/broadcom/sonic-platform-modules-accton/as4630-54pe/sonic_platform_setup.py index 553325484a92..59dad237f3b4 100644 --- a/platform/broadcom/sonic-platform-modules-accton/as4630-54pe/sonic_platform_setup.py +++ b/platform/broadcom/sonic-platform-modules-accton/as4630-54pe/sonic_platform_setup.py @@ -1,23 +1,14 @@ from setuptools import setup -DEVICE_NAME = 'accton' -HW_SKU = 'x86_64-accton_as4630_54pe-r0' - setup( name='sonic-platform', version='1.0', - description='SONiC platform API implementation on Accton Platforms', + description='SONiC platform API implementation on Accton Platforms using PDDF', license='Apache 2.0', author='SONiC Team', author_email='linuxnetdev@microsoft.com', url='https://github.com/Azure/sonic-buildimage', - maintainer='Jostar Yang', - maintainer_email='jostar_yang@edge-core.com', - packages=[ - 'sonic_platform', - ], - package_dir={ - 'sonic_platform': '../../../../device/{}/{}/sonic_platform'.format(DEVICE_NAME, HW_SKU)}, + packages=['sonic_platform'], classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Plugins', diff --git a/platform/broadcom/sonic-platform-modules-accton/as7326-56x/modules/Makefile b/platform/broadcom/sonic-platform-modules-accton/as7326-56x/modules/Makefile index 85c066571c2f..6789630def0b 100755 --- a/platform/broadcom/sonic-platform-modules-accton/as7326-56x/modules/Makefile +++ b/platform/broadcom/sonic-platform-modules-accton/as7326-56x/modules/Makefile @@ -1,7 +1,12 @@ ifneq ($(KERNELRELEASE),) obj-m:= accton_i2c_cpld.o \ accton_as7326_56x_fan.o accton_as7326_56x_leds.o \ - accton_as7326_56x_psu.o ym2651y.o + accton_as7326_56x_psu.o ym2651y.o \ + pddf_custom_psu.o + + +CFLAGS_pddf_custom_psu.o := -I$(M)/../../../../pddf/i2c/modules/include +KBUILD_EXTRA_SYMBOLS := $(M)/../../../../pddf/i2c/Module.symvers.PDDF else ifeq (,$(KERNEL_SRC)) diff --git a/platform/broadcom/sonic-platform-modules-accton/as7326-56x/modules/pddf_custom_psu.c b/platform/broadcom/sonic-platform-modules-accton/as7326-56x/modules/pddf_custom_psu.c new file mode 100644 index 000000000000..18c3edf72a8c --- /dev/null +++ b/platform/broadcom/sonic-platform-modules-accton/as7326-56x/modules/pddf_custom_psu.c @@ -0,0 +1,206 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "pddf_psu_defs.h" + +ssize_t pddf_get_custom_psu_model_name(struct device *dev, struct device_attribute *da, char *buf); +ssize_t pddf_get_custom_psu_serial_num(struct device *dev, struct device_attribute *da, char *buf); +extern PSU_SYSFS_ATTR_DATA access_psu_model_name; +extern PSU_SYSFS_ATTR_DATA access_psu_serial_num; + +#define MAX_MODEL_NAME 16 +#define MAX_SERIAL_NUMBER 19 + +enum psu_type { + PSU_TYPE_AC_110V, + PSU_TYPE_DC_48V, + PSU_TYPE_DC_12V, + PSU_TYPE_AC_ACBEL_FSF019, + PSU_TYPE_AC_ACBEL_FSF045 +}; + +struct model_name_info { + enum psu_type type; + u8 offset; + u8 length; + u8 chk_length; + char* model_name; +}; + +struct serial_number_info { + enum psu_type type; + u8 offset; + u8 length; + u8 chk_length; + char* serial_number; +}; + +struct model_name_info models[] = { +{PSU_TYPE_AC_110V, 0x20, 8, 8, "YM-2651Y"}, +{PSU_TYPE_DC_48V, 0x20, 8, 8, "YM-2651V"}, +{PSU_TYPE_DC_12V, 0x00, 11, 11, "PSU-12V-750"}, +{PSU_TYPE_AC_ACBEL_FSF019, 0x15, 10, 7, "FSF019-"}, +{PSU_TYPE_AC_ACBEL_FSF045, 0x15, 10, 7, "FSF045-"} + +}; + +struct serial_number_info serials[] = { +{PSU_TYPE_AC_110V, 0x2e, 18, 18, "YM-2651Y"}, +{PSU_TYPE_DC_48V, 0x2e, 18, 18, "YM-2651V"}, +{PSU_TYPE_DC_12V, 0x2e, 18, 18, "PSU-12V-750"}, +{PSU_TYPE_AC_ACBEL_FSF019, 0x2e, 16, 16, "FSF019-"}, +{PSU_TYPE_AC_ACBEL_FSF019, 0x2e, 16, 16, "FSF045-"} + +}; + +struct pddf_psu_data { + char model_name[MAX_MODEL_NAME+1]; + char serial_number[MAX_SERIAL_NUMBER+1]; +}; + + +static int pddf_psu_read_block(struct i2c_client *client, u8 command, u8 *data, + int data_len) +{ + int result = 0; + int retry_count = 10; + + while (retry_count) { + retry_count--; + + result = i2c_smbus_read_i2c_block_data(client, command, data_len, data); + + if (unlikely(result < 0)) { + msleep(10); + continue; + } + + if (unlikely(result != data_len)) { + result = -EIO; + msleep(10); + continue; + } + + result = 0; + break; + } + + return result; +} + +ssize_t pddf_get_custom_psu_serial_num(struct device *dev, struct device_attribute *da, char *buf) +{ + struct i2c_client *client = to_i2c_client(dev); + struct pddf_psu_data data; + int i, status; + + for (i = 0; i < ARRAY_SIZE(models); i++) { + memset(data.serial_number, 0, sizeof(data.serial_number)); + + status = pddf_psu_read_block(client, models[i].offset, + data.model_name, models[i].length); + if (status < 0) { + data.model_name[0] = '\0'; + dev_dbg(&client->dev, "unable to read model name from (0x%x) offset(0x%x)\n", + client->addr, models[i].offset); + return status; + } + else { + data.model_name[models[i].length] = '\0'; + } + + /* Determine if the model name is known, if not, read next index + */ + if (strncmp(data.model_name, models[i].model_name, models[i].chk_length) == 0) { + status = pddf_psu_read_block(client, serials[i].offset, + data.serial_number, serials[i].length); + + if (status < 0) { + data.serial_number[0] = '\0'; + dev_dbg(&client->dev, "unable to read serial num from (0x%x) offset(0x%x)\n", + client->addr, serials[i].offset); + return status; + } + else { + data.serial_number[serials[i].length] = '\0'; + return sprintf(buf, "%s\n", data.serial_number); + } + + return 0; + } + else { + data.serial_number[0] = '\0'; + } + } + + return -ENODATA; + + +} + +ssize_t pddf_get_custom_psu_model_name(struct device *dev, struct device_attribute *da, char *buf) +{ + struct i2c_client *client = to_i2c_client(dev); + struct pddf_psu_data data; + int i, status; + + for (i = 0; i < ARRAY_SIZE(models); i++) { + memset(data.model_name, 0, sizeof(data.model_name)); + + status = pddf_psu_read_block(client, models[i].offset, + data.model_name, models[i].length); + if (status < 0) { + data.model_name[0] = '\0'; + dev_dbg(&client->dev, "unable to read model name from (0x%x) offset(0x%x)\n", + client->addr, models[i].offset); + return status; + } + else { + data.model_name[models[i].length] = '\0'; + } + + /* Determine if the model name is known, if not, read next index + */ + if (strncmp(data.model_name, models[i].model_name, models[i].chk_length) == 0) { + return sprintf(buf, "%s\n", data.model_name); + } + else { + data.model_name[0] = '\0'; + } + } + + return -ENODATA; + +} + +static int __init pddf_custom_psu_init(void) +{ + access_psu_serial_num.show = pddf_get_custom_psu_serial_num; + access_psu_serial_num.do_get = NULL; + + access_psu_model_name.show = pddf_get_custom_psu_model_name; + access_psu_model_name.do_get = NULL; + + return 0; +} + +static void __exit pddf_custom_psu_exit(void) +{ + return; +} + +MODULE_AUTHOR("Broadcom"); +MODULE_DESCRIPTION("pddf custom psu api"); +MODULE_LICENSE("GPL"); + +module_init(pddf_custom_psu_init); +module_exit(pddf_custom_psu_exit); + diff --git a/platform/broadcom/sonic-platform-modules-accton/as7326-56x/service/as7326-56x-pddf-platform-monitor.service b/platform/broadcom/sonic-platform-modules-accton/as7326-56x/service/as7326-56x-pddf-platform-monitor.service new file mode 100644 index 000000000000..03351824b7b4 --- /dev/null +++ b/platform/broadcom/sonic-platform-modules-accton/as7326-56x/service/as7326-56x-pddf-platform-monitor.service @@ -0,0 +1,16 @@ +[Unit] +Description=Accton AS7326-56X Platform Monitoring service +Before=pmon.service +After=pddf-platform-init.service +DefaultDependencies=no + +[Service] +ExecStart=/usr/local/bin/accton_as7326_pddf_monitor.py +KillSignal=SIGKILL +SuccessExitStatus=SIGKILL + +# Resource Limitations +LimitCORE=infinity + +[Install] +WantedBy=multi-user.target diff --git a/platform/broadcom/sonic-platform-modules-accton/as7326-56x/service/pddf-platform-init.service b/platform/broadcom/sonic-platform-modules-accton/as7326-56x/service/pddf-platform-init.service new file mode 120000 index 000000000000..0fd9f25b6c5e --- /dev/null +++ b/platform/broadcom/sonic-platform-modules-accton/as7326-56x/service/pddf-platform-init.service @@ -0,0 +1 @@ +../../../../pddf/i2c/service/pddf-platform-init.service \ No newline at end of file diff --git a/platform/broadcom/sonic-platform-modules-accton/as7326-56x/sonic_platform_setup.py b/platform/broadcom/sonic-platform-modules-accton/as7326-56x/sonic_platform_setup.py index 15806d24fff0..22bd354ea686 100644 --- a/platform/broadcom/sonic-platform-modules-accton/as7326-56x/sonic_platform_setup.py +++ b/platform/broadcom/sonic-platform-modules-accton/as7326-56x/sonic_platform_setup.py @@ -1,8 +1,5 @@ from setuptools import setup -DEVICE_NAME = 'accton' -HW_SKU = 'x86_64-accton_as7326_56x-r0' - setup( name='sonic-platform', version='1.0', @@ -11,11 +8,7 @@ author='SONiC Team', author_email='linuxnetdev@microsoft.com', url='https://github.com/Azure/sonic-buildimage', - packages=[ - 'sonic_platform' - ], - package_dir={ - 'sonic_platform': '../../../../device/{}/{}/sonic_platform'.format(DEVICE_NAME, HW_SKU)}, + packages=['sonic_platform'], classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Plugins', diff --git a/platform/broadcom/sonic-platform-modules-accton/as7326-56x/utils/pddf_post_driver_install.sh b/platform/broadcom/sonic-platform-modules-accton/as7326-56x/utils/pddf_post_driver_install.sh new file mode 100755 index 000000000000..b2dc4ded1f6d --- /dev/null +++ b/platform/broadcom/sonic-platform-modules-accton/as7326-56x/utils/pddf_post_driver_install.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +dis_i2c_ir3570a() +{ + local addr=$1 + + i2cset -y -a 0 $addr 0xE5 0x01 &>/dev/null + i2cset -y -a 0 $addr 0x12 0x02 &>/dev/null +} + + +ir3570_check() +{ + dump=`i2cdump -y 0 0x42 s 0x9a |awk 'END {print $2}'` + if [ $dump -eq 24 ]; then + echo "Disabling i2c function of ir3570a" + dis_i2c_ir3570a 0x4 + fi +} + +ir3570_check + +echo "AS7326 post PDDF driver install completed" diff --git a/platform/broadcom/sonic-platform-modules-accton/as7726-32x/utils/pddf_post_driver_install.sh b/platform/broadcom/sonic-platform-modules-accton/as7726-32x/utils/pddf_post_driver_install.sh index c33f0b0c9797..484e5c976b4c 100755 --- a/platform/broadcom/sonic-platform-modules-accton/as7726-32x/utils/pddf_post_driver_install.sh +++ b/platform/broadcom/sonic-platform-modules-accton/as7726-32x/utils/pddf_post_driver_install.sh @@ -4,8 +4,8 @@ dis_i2c_ir3570a() { local addr=$1 - i2cset -y 0 $addr 0xE5 0x01 &>/dev/null - i2cset -y 0 $addr 0x12 0x02 &>/dev/null + i2cset -y -a 0 $addr 0xE5 0x01 &>/dev/null + i2cset -y -a 0 $addr 0x12 0x02 &>/dev/null } diff --git a/platform/broadcom/sonic-platform-modules-accton/as7816-64x/service/as7816-pddf-platform-monitor.service b/platform/broadcom/sonic-platform-modules-accton/as7816-64x/service/as7816-pddf-platform-monitor.service new file mode 100644 index 000000000000..7b6db7ddac01 --- /dev/null +++ b/platform/broadcom/sonic-platform-modules-accton/as7816-64x/service/as7816-pddf-platform-monitor.service @@ -0,0 +1,16 @@ +[Unit] +Description=Accton AS7816-64X Platform Monitoring service +Before=pmon.service +After=pddf-platform-init.service +DefaultDependencies=no + +[Service] +ExecStart=/usr/local/bin/accton_as7816_pddf_monitor.py +KillSignal=SIGKILL +SuccessExitStatus=SIGKILL + +# Resource Limitations +LimitCORE=infinity + +[Install] +WantedBy=multi-user.target diff --git a/platform/broadcom/sonic-platform-modules-accton/as7816-64x/service/pddf-platform-init.service b/platform/broadcom/sonic-platform-modules-accton/as7816-64x/service/pddf-platform-init.service new file mode 120000 index 000000000000..0fd9f25b6c5e --- /dev/null +++ b/platform/broadcom/sonic-platform-modules-accton/as7816-64x/service/pddf-platform-init.service @@ -0,0 +1 @@ +../../../../pddf/i2c/service/pddf-platform-init.service \ No newline at end of file diff --git a/platform/broadcom/sonic-platform-modules-accton/as7816-64x/sonic_platform_setup.py b/platform/broadcom/sonic-platform-modules-accton/as7816-64x/sonic_platform_setup.py index 607a9ef78dd9..22bd354ea686 100644 --- a/platform/broadcom/sonic-platform-modules-accton/as7816-64x/sonic_platform_setup.py +++ b/platform/broadcom/sonic-platform-modules-accton/as7816-64x/sonic_platform_setup.py @@ -1,8 +1,5 @@ from setuptools import setup -DEVICE_NAME = 'accton' -HW_SKU = 'x86_64-accton_as7816_64x-r0' - setup( name='sonic-platform', version='1.0', @@ -11,13 +8,7 @@ author='SONiC Team', author_email='linuxnetdev@microsoft.com', url='https://github.com/Azure/sonic-buildimage', - maintainer='Jostar Yang', - maintainer_email='jostar_yang@edge-core.com', - packages=[ - 'sonic_platform', - ], - package_dir={ - 'sonic_platform': '../../../../device/{}/{}/sonic_platform'.format(DEVICE_NAME, HW_SKU)}, + packages=['sonic_platform'], classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Plugins', diff --git a/platform/broadcom/sonic-platform-modules-accton/as7816-64x/utils/pddf_post_driver_install.sh b/platform/broadcom/sonic-platform-modules-accton/as7816-64x/utils/pddf_post_driver_install.sh new file mode 100755 index 000000000000..9783c323b606 --- /dev/null +++ b/platform/broadcom/sonic-platform-modules-accton/as7816-64x/utils/pddf_post_driver_install.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +dis_i2c_ir3570a() +{ + local addr=$1 + + i2cset -y -a 0 $addr 0xE5 0x01 &>/dev/null + i2cset -y -a 0 $addr 0x12 0x02 &>/dev/null +} + + +ir3570_check() +{ + dump=`i2cdump -y 0 0x42 s 0x9a |awk 'END {print $2}'` + if [ $dump -eq 24 ]; then + echo "Disabling i2c function of ir3570a" + dis_i2c_ir3570a 0x4 + fi +} + +ir3570_check + +echo "AS7816 post PDDF driver install completed" diff --git a/platform/broadcom/sonic-platform-modules-accton/as9716-32d/modules/Makefile b/platform/broadcom/sonic-platform-modules-accton/as9716-32d/modules/Makefile index 6ac9d418a3d2..d3811d459f04 100755 --- a/platform/broadcom/sonic-platform-modules-accton/as9716-32d/modules/Makefile +++ b/platform/broadcom/sonic-platform-modules-accton/as9716-32d/modules/Makefile @@ -1,7 +1,7 @@ ifneq ($(KERNELRELEASE),) obj-m:= accton_as9716_32d_cpld.o accton_as9716_32d_fan.o \ accton_as9716_32d_leds.o accton_as9716_32d_psu.o accton_i2c_psu.o \ - pddf_custom_psu.o + pddf_custom_psu.o accton_as9716_32d_ioport.o CFLAGS_pddf_custom_psu.o := -I$(M)/../../../../pddf/i2c/modules/include KBUILD_EXTRA_SYMBOLS := $(M)/../../../../pddf/i2c/Module.symvers.PDDF diff --git a/platform/broadcom/sonic-platform-modules-accton/as9716-32d/modules/accton_as9716_32d_ioport.c b/platform/broadcom/sonic-platform-modules-accton/as9716-32d/modules/accton_as9716_32d_ioport.c new file mode 100644 index 000000000000..e6d9e8adf373 --- /dev/null +++ b/platform/broadcom/sonic-platform-modules-accton/as9716-32d/modules/accton_as9716_32d_ioport.c @@ -0,0 +1,180 @@ +/* + * A hwmon driver for the Accton as9926 24d fan + * + * Copyright (C) 2016 Accton Technology Corporation. + * Brandon Chuang + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define DRVNAME "as9716_32d_ioport" +#define IOPORT_I2C_MUX_RST 0x50D + +static ssize_t show_i2c_mux_rst(struct device *dev, struct device_attribute *da, + char *buf); +static ssize_t set_i2c_mux_rst(struct device *dev, struct device_attribute *da, + const char *buf, size_t count); + +static struct as9716_ioport_data *data = NULL; + +/* ioport data */ +struct as9716_ioport_data { + struct platform_device *pdev; + struct device *hwmon_dev; + struct mutex update_lock; +}; + +/* sysfs attributes for hwmon + */ +static SENSOR_DEVICE_ATTR(i2c_mux_rst, S_IRUGO | S_IWUSR, show_i2c_mux_rst, + set_i2c_mux_rst, 0); + +static struct attribute *sys_attributes[] = { + &sensor_dev_attr_i2c_mux_rst.dev_attr.attr, + NULL +}; + +static struct attribute_group sys_group = { + .attrs = sys_attributes, +}; + +static ssize_t show_i2c_mux_rst(struct device *dev, struct device_attribute *da, + char *buf) +{ + u8 val = 0; + mutex_lock(&data->update_lock); + val = inb(IOPORT_I2C_MUX_RST); + mutex_unlock(&data->update_lock); + return sprintf(buf, "%d\n", !(val & 0xEF)); +} + +static ssize_t set_i2c_mux_rst(struct device *dev, struct device_attribute *da, + const char *buf, size_t count) +{ + u8 val = 0; + long value = 0; + int status = 0; + + status = kstrtol(buf, 10, &value); + if (status) + return status; + + mutex_lock(&data->update_lock); + + val = inb(IOPORT_I2C_MUX_RST); + if (value) + outb(val & 0xEF, IOPORT_I2C_MUX_RST); + else + outb(val | 0x10, IOPORT_I2C_MUX_RST); + + mutex_unlock(&data->update_lock); + return count; +} + +static int as9716_32d_ioport_probe(struct platform_device *pdev) +{ + int status = -1; + + request_region(IOPORT_I2C_MUX_RST, 1, "mux_rst"); + + /* Register sysfs hooks */ + status = sysfs_create_group(&pdev->dev.kobj, &sys_group); + if (status) { + goto exit; + } + + dev_info(&pdev->dev, "device created\n"); + return 0; + +exit: + sysfs_remove_group(&pdev->dev.kobj, &sys_group); + return status; +} + +static int as9716_32d_ioport_remove(struct platform_device *pdev) +{ + sysfs_remove_group(&pdev->dev.kobj, &sys_group); + release_region(IOPORT_I2C_MUX_RST, 1); + return 0; +} + +static struct platform_driver as9716_32d_ioport_driver = { + .probe = as9716_32d_ioport_probe, + .remove = as9716_32d_ioport_remove, + .driver = { + .name = DRVNAME, + .owner = THIS_MODULE, + }, +}; + +static int __init as9716_32d_ioport_init(void) +{ + int ret; + + data = kzalloc(sizeof(struct as9716_ioport_data), GFP_KERNEL); + if (!data) { + ret = -ENOMEM; + goto alloc_err; + } + + mutex_init(&data->update_lock); + + ret = platform_driver_register(&as9716_32d_ioport_driver); + if (ret < 0) + goto dri_reg_err; + + data->pdev = platform_device_register_simple(DRVNAME, -1, NULL, 0); + if (IS_ERR(data->pdev)) { + ret = PTR_ERR(data->pdev); + goto dev_reg_err; + } + + return 0; + +dev_reg_err: + platform_driver_unregister(&as9716_32d_ioport_driver); +dri_reg_err: + kfree(data); +alloc_err: + return ret; +} + +static void __exit as9716_32d_ioport_exit(void) +{ + platform_device_unregister(data->pdev); + platform_driver_unregister(&as9716_32d_ioport_driver); + kfree(data); +} + +module_init(as9716_32d_ioport_init); +module_exit(as9716_32d_ioport_exit); + +MODULE_AUTHOR("Brandon Chuang "); +MODULE_DESCRIPTION("as9716_32d_ioport driver"); +MODULE_LICENSE("GPL"); diff --git a/platform/broadcom/sonic-platform-modules-accton/as9716-32d/utils/pddf_post_driver_install.sh b/platform/broadcom/sonic-platform-modules-accton/as9716-32d/utils/pddf_post_driver_install.sh index 484a5f039c0f..61eb4c0fd5c7 100755 --- a/platform/broadcom/sonic-platform-modules-accton/as9716-32d/utils/pddf_post_driver_install.sh +++ b/platform/broadcom/sonic-platform-modules-accton/as9716-32d/utils/pddf_post_driver_install.sh @@ -4,8 +4,8 @@ dis_i2c_ir3570a() { local addr=$1 - i2cset -y 0 $addr 0xE5 0x01 &>/dev/null - i2cset -y 0 $addr 0x12 0x02 &>/dev/null + i2cset -y -a 0 $addr 0xE5 0x01 &>/dev/null + i2cset -y -a 0 $addr 0x12 0x02 &>/dev/null } diff --git a/platform/broadcom/sonic-platform-modules-accton/debian/sonic-platform-accton-as4630-54pe.install b/platform/broadcom/sonic-platform-modules-accton/debian/sonic-platform-accton-as4630-54pe.install index a87ebb5b046a..4ba26bed2625 100644 --- a/platform/broadcom/sonic-platform-modules-accton/debian/sonic-platform-accton-as4630-54pe.install +++ b/platform/broadcom/sonic-platform-modules-accton/debian/sonic-platform-accton-as4630-54pe.install @@ -1 +1 @@ -as4630-54pe/sonic_platform-1.0-py3-none-any.whl usr/share/sonic/device/x86_64-accton_as4630_54pe-r0 +as4630-54pe/sonic_platform-1.0-py3-none-any.whl usr/share/sonic/device/x86_64-accton_as4630_54pe-r0/pddf diff --git a/platform/broadcom/sonic-platform-modules-accton/debian/sonic-platform-accton-as4630-54pe.postinst b/platform/broadcom/sonic-platform-modules-accton/debian/sonic-platform-accton-as4630-54pe.postinst new file mode 100644 index 000000000000..23bebd3b295c --- /dev/null +++ b/platform/broadcom/sonic-platform-modules-accton/debian/sonic-platform-accton-as4630-54pe.postinst @@ -0,0 +1,8 @@ +# Special arrangement to make PDDF mode default +# Disable monitor, monitor-fan, monitor-psu (not enabling them would imply they will be disabled by default) +# Enable pddf-platform-monitor +depmod -a +systemctl enable pddf-platform-init.service +systemctl start pddf-platform-init.service +systemctl enable as4630-54pe-pddf-platform-monitor.service +systemctl start as4630-54pe-pddf-platform-monitor.service diff --git a/platform/broadcom/sonic-platform-modules-accton/debian/sonic-platform-accton-as7326-56x.install b/platform/broadcom/sonic-platform-modules-accton/debian/sonic-platform-accton-as7326-56x.install index a6b7094e0e03..1d9885d22d27 100644 --- a/platform/broadcom/sonic-platform-modules-accton/debian/sonic-platform-accton-as7326-56x.install +++ b/platform/broadcom/sonic-platform-modules-accton/debian/sonic-platform-accton-as7326-56x.install @@ -1,2 +1 @@ -as7326-56x/sonic_platform-1.0-py3-none-any.whl usr/share/sonic/device/x86_64-accton_as7326_56x-r0 - +as7326-56x/sonic_platform-1.0-py3-none-any.whl usr/share/sonic/device/x86_64-accton_as7326_56x-r0/pddf diff --git a/platform/broadcom/sonic-platform-modules-accton/debian/sonic-platform-accton-as7726-32x.postinst b/platform/broadcom/sonic-platform-modules-accton/debian/sonic-platform-accton-as7726-32x.postinst index efe159144770..b1c403623c95 100644 --- a/platform/broadcom/sonic-platform-modules-accton/debian/sonic-platform-accton-as7726-32x.postinst +++ b/platform/broadcom/sonic-platform-modules-accton/debian/sonic-platform-accton-as7726-32x.postinst @@ -2,6 +2,8 @@ # Disable monitor, monitor-fan, monitor-psu (not enabling them would imply they will be disabled by default) # Enable pddf-platform-monitor depmod -a +systemctl enable as7726-32x-platform-handle_mac.service +systemctl start as7726-32x-platform-handle_mac.service systemctl enable pddf-platform-init.service systemctl start pddf-platform-init.service systemctl enable as7726-32x-pddf-platform-monitor.service diff --git a/platform/broadcom/sonic-platform-modules-accton/debian/sonic-platform-accton-as7816-64x.install b/platform/broadcom/sonic-platform-modules-accton/debian/sonic-platform-accton-as7816-64x.install index 8f214208a6b8..01b33cc19e54 100644 --- a/platform/broadcom/sonic-platform-modules-accton/debian/sonic-platform-accton-as7816-64x.install +++ b/platform/broadcom/sonic-platform-modules-accton/debian/sonic-platform-accton-as7816-64x.install @@ -1,2 +1 @@ -as7816-64x/sonic_platform-1.0-py3-none-any.whl usr/share/sonic/device/x86_64-accton_as7816_64x-r0 - +as7816-64x/sonic_platform-1.0-py3-none-any.whl usr/share/sonic/device/x86_64-accton_as7816_64x-r0/pddf diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248pxe/modules/dell_n3248pxe_platform.c b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/modules/dell_n3248pxe_platform.c index 1c5d07bffaba..5fb106f186b3 100644 --- a/platform/broadcom/sonic-platform-modules-dell/n3248pxe/modules/dell_n3248pxe_platform.c +++ b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/modules/dell_n3248pxe_platform.c @@ -853,6 +853,41 @@ static ssize_t fan_led_store(struct device *dev, struct device_attribute *devatt return count; } +static ssize_t watchdog_show(struct device *dev, + struct device_attribute *devattr, char *buf) +{ + s32 ret; + u8 data = 0; + struct cpld_platform_data *pdata = dev->platform_data; + + ret = i2c_smbus_read_byte_data(pdata[cpu_cpld].client, 0x7); + if (ret < 0) + return sprintf(buf, "read error"); + data = ret; + + return sprintf(buf, "%x\n", data); +} + +static ssize_t watchdog_store(struct device *dev, struct device_attribute *devattr, const char *buf, size_t count) +{ + s32 ret, err; + unsigned long val; + u8 data = 0; + struct cpld_platform_data *pdata = dev->platform_data; + + err = kstrtoul(buf, 10, &val); + if (err) + return err; + + if (data) + { + ret = i2c_smbus_write_byte_data(pdata[cpu_cpld].client, 0x7, data); + if (ret < 0) + return ret; + } + + return count; +} static ssize_t power_good_show(struct device *dev, struct device_attribute *devattr, char *buf) @@ -947,6 +982,7 @@ static DEVICE_ATTR_RO(psu1_prs); static DEVICE_ATTR_RO(psu0_status); static DEVICE_ATTR_RO(psu1_status); static DEVICE_ATTR_RW(system_led); +static DEVICE_ATTR_RW(watchdog); static DEVICE_ATTR_RW(locator_led); static DEVICE_ATTR_RW(power_led); static DEVICE_ATTR_RW(master_led); @@ -988,6 +1024,7 @@ static struct attribute *n3248pxe_cpld_attrs[] = { &dev_attr_psu0_status.attr, &dev_attr_psu1_status.attr, &dev_attr_system_led.attr, + &dev_attr_watchdog.attr, &dev_attr_locator_led.attr, &dev_attr_power_led.attr, &dev_attr_master_led.attr, diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/watchdog.py b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/watchdog.py index 876aa4beda51..00277c2872f6 100644 --- a/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/watchdog.py +++ b/platform/broadcom/sonic-platform-modules-dell/n3248pxe/sonic_platform/watchdog.py @@ -11,7 +11,6 @@ try: import ctypes - import subprocess from sonic_platform_base.watchdog_base import WatchdogBase except ImportError as e: raise ImportError(str(e) + "- required module not found") @@ -29,43 +28,53 @@ class Watchdog(WatchdogBase): Abstract base class for interfacing with a hardware watchdog module """ - TIMERS = [15,20,30,40,50,60,65,70] + TIMERS = [15,20,30,40,50,60,65,70,80,100,120,140,160,180,210,240] armed_time = 0 timeout = 0 CLOCK_MONOTONIC = 1 def __init__(self): + WatchdogBase.__init__(self) self._librt = ctypes.CDLL('librt.so.1', use_errno=True) self._clock_gettime = self._librt.clock_gettime self._clock_gettime.argtypes=[ctypes.c_int, ctypes.POINTER(_timespec)] + self.watchdog_reg = "watchdog" - def _get_command_result(self, cmdline): + def _get_cpld_register(self, reg_name): + # On successful read, returns the value read from given + # reg name and on failure rethrns 'ERR' + cpld_dir = "/sys/devices/platform/dell-n3248pxe-cpld.0/" + cpld_reg_file = cpld_dir + '/' + reg_name try: - proc = subprocess.Popen(cmdline.split(), stdout=subprocess.PIPE, - stderr=subprocess.STDOUT) - stdout = proc.communicate()[0] - proc.wait() - result = stdout.rstrip('\n') - except OSError: - result = None + with open(cpld_reg_file, 'r') as fd: + rv = fd.read() + except IOError : return 'ERR' + return rv.strip('\r\n').lstrip(' ') - return result + def _set_cpld_register(self, reg_name, value): + # On successful write, returns the value will be written on + # reg_name and on failure returns 'ERR' + + cpld_dir = "/sys/devices/platform/dell-n3248pxe-cpld.0/" + cpld_reg_file = cpld_dir + '/' + reg_name + + try: + with open(cpld_reg_file, 'w') as fd: + rv = fd.write(str(value)) + except Exception: + rv = 'ERR' + + return rv def _get_reg_val(self): - # 0x31 = CPLD I2C Base Address - # 0x07 = Watchdog Function Register - value = self._get_command_result("/usr/sbin/i2cget -y 601 0x31 0x07") - if not value: - return None - else: - return int(value, 16) + value = self._get_cpld_register(self.watchdog_reg).strip() + if value == 'ERR': return False + + return int(value,16) def _set_reg_val(self,val): - # 0x31 = CPLD I2C Base Address - # 0x07 = Watchdog Function Register - value = self._get_command_result("/usr/sbin/i2cset -y 601 0x31 0x07 %s" - % (val)) + value = self._set_cpld_register(self.watchdog_reg, val) return value def _get_time(self): @@ -93,7 +102,7 @@ def arm(self, seconds): """ timer_offset = -1 for key,timer_seconds in enumerate(self.TIMERS): - if seconds <= timer_seconds: + if seconds > 0 and seconds <= timer_seconds: timer_offset = key seconds = timer_seconds break @@ -101,40 +110,29 @@ def arm(self, seconds): if timer_offset == -1: return -1 - # Extracting 5th to 7th bits for WD timer values - # 000 - 15 sec - # 001 - 20 sec - # 010 - 30 sec - # 011 - 40 sec - # 100 - 50 sec - # 101 - 60 sec - # 110 - 65 sec - # 111 - 70 sec + # Extracting 5th to 8th bits for WD timer values reg_val = self._get_reg_val() - wd_timer_offset = (reg_val >> 4) & 0x7 + wd_timer_offset = (reg_val >> 4) & 0xF if wd_timer_offset != timer_offset: - # Setting 5th to 7th bits + # Setting 5th to 8th bits # value from timer_offset self.disarm() - self._set_reg_val(reg_val | (timer_offset << 4)) + self._set_reg_val((reg_val & 0x0F) | (timer_offset << 4)) if self.is_armed(): # Setting last bit to WD Timer punch # Last bit = WD Timer punch self._set_reg_val(reg_val & 0xFE) - self.armed_time = self._get_time() - self.timeout = seconds else: # Setting 4th bit to enable WD # 4th bit = Enable WD reg_val = self._get_reg_val() self._set_reg_val(reg_val | 0x8) - self.armed_time = self._get_time() - self.timeout = seconds - + self.armed_time = self._get_time() + self.timeout = seconds return seconds def disarm(self): @@ -207,4 +205,3 @@ def get_remaining_time(self): return self.timeout - diff_time return 0 - diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248te/modules/dell_n3248te_platform.c b/platform/broadcom/sonic-platform-modules-dell/n3248te/modules/dell_n3248te_platform.c index f7a13c2a739f..92ee30af312f 100644 --- a/platform/broadcom/sonic-platform-modules-dell/n3248te/modules/dell_n3248te_platform.c +++ b/platform/broadcom/sonic-platform-modules-dell/n3248te/modules/dell_n3248te_platform.c @@ -572,7 +572,7 @@ static ssize_t system_led_show(struct device *dev, struct device_attribute *deva if (ret < 0) return sprintf(buf, "read error"); - data = (u8)(ret & 0x30) >> 5; + data = (u8)(ret & 0x30) >> 4; switch (data) { @@ -878,6 +878,42 @@ static ssize_t fan_led_store(struct device *dev, struct device_attribute *devatt return count; } +static ssize_t watchdog_show(struct device *dev, + struct device_attribute *devattr, char *buf) +{ + s32 ret; + u8 data = 0; + struct cpld_platform_data *pdata = dev->platform_data; + + ret = i2c_smbus_read_byte_data(pdata[cpu_cpld].client, 0x7); + if (ret < 0) + return sprintf(buf, "read error"); + data = ret; + + return sprintf(buf, "%x\n", data); +} + +static ssize_t watchdog_store(struct device *dev, struct device_attribute *devattr, const char *buf, size_t count) +{ + s32 ret, err; + unsigned long val; + u8 data = 0; + struct cpld_platform_data *pdata = dev->platform_data; + + err = kstrtoul(buf, 10, &val); + if (err) + return err; + + data = (u8) val; + if (data) + { + ret = i2c_smbus_write_byte_data(pdata[cpu_cpld].client, 0x7, data); + if (ret < 0) + return ret; + } + + return count; +} static ssize_t power_good_show(struct device *dev, struct device_attribute *devattr, char *buf) @@ -974,6 +1010,7 @@ static DEVICE_ATTR_RO(psu1_prs); static DEVICE_ATTR_RO(psu0_status); static DEVICE_ATTR_RO(psu1_status); static DEVICE_ATTR_RW(system_led); +static DEVICE_ATTR_RW(watchdog); static DEVICE_ATTR_RW(locator_led); static DEVICE_ATTR_RW(power_led); static DEVICE_ATTR_RW(master_led); @@ -1017,6 +1054,7 @@ static struct attribute *n3248te_cpld_attrs[] = { &dev_attr_psu0_status.attr, &dev_attr_psu1_status.attr, &dev_attr_system_led.attr, + &dev_attr_watchdog.attr, &dev_attr_locator_led.attr, &dev_attr_power_led.attr, &dev_attr_master_led.attr, diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/chassis.py b/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/chassis.py index d2922eac1fa5..ddc254881ca3 100644 --- a/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/chassis.py +++ b/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/chassis.py @@ -118,7 +118,8 @@ def _get_cpld_register(self, reg_name): # reg name and on failure rethrns 'ERR' cpld_reg_file = self.CPLD_DIR + '/' + reg_name try: - rv = open(cpld_reg_file, 'r').read() + with open(cpld_reg_file, 'r') as fd: + rv = fd.read() except IOError : return 'ERR' return rv.strip('\r\n').lstrip(' ') diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/fan.py b/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/fan.py index ff8ea160b95d..e82dc91cc686 100644 --- a/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/fan.py +++ b/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/fan.py @@ -47,7 +47,8 @@ def _get_cpld_register(self, reg_name): cpld_dir = "/sys/devices/platform/dell-n3248te-cpld.0/" cpld_reg_file = cpld_dir + '/' + reg_name try: - buf = open(cpld_reg_file, 'r').read() + with open(cpld_reg_file, 'r')as fd: + buf = fd.read() except (IOError, AttributeError): return 'ERR' return buf.strip('\r\n').lstrip(' ') @@ -228,7 +229,26 @@ def set_status_led(self, color): Returns: bool: True if set success, False if fail. """ - # Fan tray status LED controlled by HW - # Return True to avoid thermalctld alarm + # N3248TE has led only on FanTray and not available for seperate fans return True + def get_status_led(self): + """ + Gets the current system LED color + + Returns: + A string that represents the supported color + """ + + return None + + def get_target_speed(self): + """ + Retrieves the target (expected) speed of the fan + Returns: + An integer, the percentage of full fan speed, in the range 0 (off) + to 100 (full speed) + """ + # Return current speed to avoid false thermalctld alarm. + return self.get_speed() + diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/psu.py b/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/psu.py index 617b2ce7f966..b2f06785f0dc 100644 --- a/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/psu.py +++ b/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/psu.py @@ -38,7 +38,8 @@ def _get_cpld_register(self, reg_name): cpld_dir = "/sys/devices/platform/dell-n3248te-cpld.0/" cpld_reg_file = cpld_dir + '/' + reg_name try: - rv = open(cpld_reg_file, 'r').read() + with open(cpld_reg_file, 'r') as fd: + rv = fd.read() except IOError : return 'ERR' return rv.strip('\r\n').lstrip(' ') @@ -46,7 +47,8 @@ def _get_dps_register(self, reg_name): try : dps_dir = self.dps_hwmon + '/' + os.listdir(self.dps_hwmon)[0] dps_reg_file = dps_dir + '/' + reg_name - rv = open(dps_reg_file, 'r').read() + with open(dps_reg_file, 'r') as fd: + rv = fd.read() except (IOError, OSError) : return 'ERR' return rv diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/sfp.py b/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/sfp.py index 0a30ae272d76..3a6b0a4cd4cc 100644 --- a/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/sfp.py +++ b/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/sfp.py @@ -20,6 +20,22 @@ SFP_PORT_START = 49 SFP_PORT_END = 54 +QSFP_INFO_OFFSET = 128 +SFP_INFO_OFFSET = 0 +QSFP_DD_PAGE0 = 0 + +SFP_TYPE_LIST = [ + '0x3' # SFP/SFP+/SFP28 and later +] +QSFP_TYPE_LIST = [ + '0xc', # QSFP + '0xd', # QSFP+ or later + '0x11' # QSFP28 or later +] +QSFP_DD_TYPE_LIST = [ + '0x18' #QSFP_DD Type +] + class Sfp(SfpOptoeBase): """ DELLEMC Platform-specific Sfp class @@ -35,7 +51,7 @@ def get_eeprom_path(self): return self.eeprom_path def get_name(self): - return "SFP/SFP+/SFP28" + return "SFP/SFP+/SFP28" if self.index < 53 else "QSFP+ or later" def pci_mem_read(self, mm, offset): mm.seek(offset) @@ -70,7 +86,8 @@ def pci_get_value(self, resource, offset): def _get_cpld_register(self, reg): reg_file = '/sys/devices/platform/dell-n3248te-cpld.0/' + reg try: - rv = open(reg_file, 'r').read() + with open(reg_file, 'r') as fd: + rv = fd.read() except IOError : return 'ERR' return rv.strip('\r\n').lstrip(' ') @@ -109,7 +126,7 @@ def reset(self): """ Reset the SFP and returns all user settings to their default state """ - return True + return False def set_lpmode(self, lpmode): """ @@ -128,4 +145,42 @@ def get_max_port_power(self): """ Retrieves the maximumum power allowed on the port in watts """ - return 2.5 + return 5.0 if self.sfp_type == 'QSFP' else 2.5 + + def is_replaceable(self): + """ + Indicate whether this device is replaceable. + Returns: + bool: True if it is replaceable. + """ + return True + + def get_error_description(self): + """ + Retrives the error descriptions of the SFP module + Returns: + String that represents the current error descriptions of vendor specific errors + In case there are multiple errors, they should be joined by '|', + like: "Bad EEPROM|Unsupported cable" + """ + if not self.get_presence(): + return self.SFP_STATUS_UNPLUGGED + else: + if not os.path.isfile(self.eeprom_path): + return "EEPROM driver is not attached" + + if self.sfp_type == 'SFP': + offset = SFP_INFO_OFFSET + elif self.sfp_type == 'QSFP': + offset = QSFP_INFO_OFFSET + elif self.sfp_type == 'QSFP_DD': + offset = QSFP_DD_PAGE0 + + try: + with open(self.eeprom_path, mode="rb", buffering=0) as eeprom: + eeprom.seek(offset) + eeprom.read(1) + except OSError as e: + return "EEPROM read failed ({})".format(e.strerror) + + return self.SFP_STATUS_OK diff --git a/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/watchdog.py b/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/watchdog.py index ebd4706b4215..1e077e45d122 100644 --- a/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/watchdog.py +++ b/platform/broadcom/sonic-platform-modules-dell/n3248te/sonic_platform/watchdog.py @@ -11,7 +11,6 @@ try: import ctypes - import subprocess from sonic_platform_base.watchdog_base import WatchdogBase except ImportError as e: raise ImportError(str(e) + "- required module not found") @@ -29,43 +28,53 @@ class Watchdog(WatchdogBase): Abstract base class for interfacing with a hardware watchdog module """ - TIMERS = [15,20,30,40,50,60,65,70] + TIMERS = [15,20,30,40,50,60,65,70,80,100,120,140,160,180,210,240] armed_time = 0 timeout = 0 CLOCK_MONOTONIC = 1 def __init__(self): + WatchdogBase.__init__(self) self._librt = ctypes.CDLL('librt.so.1', use_errno=True) self._clock_gettime = self._librt.clock_gettime self._clock_gettime.argtypes=[ctypes.c_int, ctypes.POINTER(_timespec)] + self.watchdog_reg = "watchdog" - def _get_command_result(self, cmdline): + def _get_cpld_register(self, reg_name): + # On successful read, returns the value read from given + # reg name and on failure rethrns 'ERR' + cpld_dir = "/sys/devices/platform/dell-n3248te-cpld.0/" + cpld_reg_file = cpld_dir + '/' + reg_name try: - proc = subprocess.Popen(cmdline.split(), stdout=subprocess.PIPE, - stderr=subprocess.STDOUT) - stdout = proc.communicate()[0] - proc.wait() - result = stdout.rstrip('\n') - except OSError: - result = None + with open(cpld_reg_file, 'r') as fd: + rv = fd.read() + except IOError : return 'ERR' + return rv.strip('\r\n').lstrip(' ') - return result + def _set_cpld_register(self, reg_name, value): + # On successful write, returns the value will be written on + # reg_name and on failure returns 'ERR' + + cpld_dir = "/sys/devices/platform/dell-n3248te-cpld.0/" + cpld_reg_file = cpld_dir + '/' + reg_name + + try: + with open(cpld_reg_file, 'w') as fd: + rv = fd.write(str(value)) + except Exception: + rv = 'ERR' + + return rv def _get_reg_val(self): - # 0x31 = CPLD I2C Base Address - # 0x07 = Watchdog Function Register - value = self._get_command_result("/usr/sbin/i2cget -y 601 0x31 0x07") - if not value: - return None - else: - return int(value, 16) + value = self._get_cpld_register(self.watchdog_reg).strip() + if value == 'ERR': return False + + return int(value,16) def _set_reg_val(self,val): - # 0x31 = CPLD I2C Base Address - # 0x07 = Watchdog Function Register - value = self._get_command_result("/usr/sbin/i2cset -y 601 0x31 0x07 %s" - % (val)) + value = self._set_cpld_register(self.watchdog_reg, val) return value def _get_time(self): @@ -93,7 +102,7 @@ def arm(self, seconds): """ timer_offset = -1 for key,timer_seconds in enumerate(self.TIMERS): - if seconds <= timer_seconds: + if seconds > 0 and seconds <= timer_seconds: timer_offset = key seconds = timer_seconds break @@ -101,41 +110,30 @@ def arm(self, seconds): if timer_offset == -1: return -1 - # Extracting 5th to 7th bits for WD timer values - # 000 - 15 sec - # 001 - 20 sec - # 010 - 30 sec - # 011 - 40 sec - # 100 - 50 sec - # 101 - 60 sec - # 110 - 65 sec - # 111 - 70 sec + # Extracting 5th to 8th bits for WD timer values reg_val = self._get_reg_val() - wd_timer_offset = (reg_val >> 4) & 0x7 + wd_timer_offset = (reg_val >> 4) & 0xF if wd_timer_offset != timer_offset: - # Setting 5th to 7th bits + # Setting 5th to 8th bits # value from timer_offset self.disarm() - self._set_reg_val(reg_val | (timer_offset << 4)) + self._set_reg_val((reg_val & 0x0F) | (timer_offset << 4)) if self.is_armed(): # Setting last bit to WD Timer punch # Last bit = WD Timer punch self._set_reg_val(reg_val & 0xFE) - self.armed_time = self._get_time() - self.timeout = seconds - return seconds else: # Setting 4th bit to enable WD # 4th bit = Enable WD reg_val = self._get_reg_val() self._set_reg_val(reg_val | 0x8) - self.armed_time = self._get_time() - self.timeout = seconds - return seconds + self.armed_time = self._get_time() + self.timeout = seconds + return seconds def disarm(self): """ @@ -183,7 +181,7 @@ def get_remaining_time(self): their watchdog timer. If the watchdog is not armed, returns -1. - S5232 doesnot have hardware support to show remaining time. + N3248PXE doesnot have hardware support to show remaining time. Due to this limitation, this API is implemented in software. This API would return correct software time difference if it is called from the process which armed the watchdog timer. @@ -207,4 +205,3 @@ def get_remaining_time(self): return self.timeout - diff_time return 0 - diff --git a/platform/broadcom/sonic-platform-modules-nokia b/platform/broadcom/sonic-platform-modules-nokia index ded0344a6819..b67d4795e691 160000 --- a/platform/broadcom/sonic-platform-modules-nokia +++ b/platform/broadcom/sonic-platform-modules-nokia @@ -1 +1 @@ -Subproject commit ded0344a68197363c8c0eefff87b1be0a4591f87 +Subproject commit b67d4795e691cccd4321b196ba92942f5e8fe395 diff --git a/platform/marvell-armhf/sai.mk b/platform/marvell-armhf/sai.mk index 4df1b2c5b6f6..4ecfdce244a1 100644 --- a/platform/marvell-armhf/sai.mk +++ b/platform/marvell-armhf/sai.mk @@ -1,6 +1,6 @@ # Marvell SAI -export MRVL_SAI_VERSION = 1.9.1-1 +export MRVL_SAI_VERSION = 1.9.1-2 export MRVL_SAI = mrvllibsai_$(MRVL_SAI_VERSION)_$(PLATFORM_ARCH).deb $(MRVL_SAI)_SRC_PATH = $(PLATFORM_PATH)/sai diff --git a/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform/test/test-thermal.py b/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform/test/test-thermal.py index 91ef75d8f9a7..95cc8e89f0d8 100755 --- a/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform/test/test-thermal.py +++ b/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform/test/test-thermal.py @@ -30,7 +30,7 @@ def main(): high_thresh = "NA" print(" Low Threshold(C): {}, High Threshold(C): {}".format(low_thresh, - high_thresh)) + high_thresh)) try: crit_low_thresh = thermal.get_low_critical_threshold() diff --git a/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform/thermal.py b/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform/thermal.py index c7e408c3f3e9..444ca5b137d7 100644 --- a/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform/thermal.py +++ b/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform/thermal.py @@ -44,8 +44,8 @@ def __init__(self, thermal_index): if self.index < 3: i2c_path = self.I2C_CLASS_DIR + self.I2C_DEV_MAPPING[self.index - 1][0] sensor_index = self.I2C_DEV_MAPPING[self.index - 1][1] - sensor_max_suffix = "max" - sensor_crit_suffix = None + sensor_high_suffix = "max" + sensor_high_crit_suffix = None hwmon_node = os.listdir(i2c_path)[0] self.SENSOR_DIR = i2c_path + hwmon_node + '/' @@ -53,8 +53,8 @@ def __init__(self, thermal_index): elif self.index < 6: i2c_path = self.I2C_CLASS_DIR + self.I2C_DEV_MAPPING[self.index - 1][0] sensor_index = self.I2C_DEV_MAPPING[self.index - 1][1] - sensor_max_suffix = "max" - sensor_crit_suffix = "crit" + sensor_high_suffix = "crit" + sensor_high_crit_suffix = None hwmon_node = os.listdir(i2c_path)[0] self.SENSOR_DIR = i2c_path + hwmon_node + '/' @@ -62,8 +62,8 @@ def __init__(self, thermal_index): else: dev_path = self.HWMON_CLASS_DIR sensor_index = 1 - sensor_max_suffix = None - sensor_crit_suffix = None + sensor_high_suffix = None + sensor_high_crit_suffix = None hwmon_node = os.listdir(dev_path)[0] self.SENSOR_DIR = dev_path + hwmon_node + '/' @@ -72,16 +72,16 @@ def __init__(self, thermal_index): + "temp{}_input".format(sensor_index) # sysfs file for high threshold value if supported for this sensor - if sensor_max_suffix: + if sensor_high_suffix: self.thermal_high_threshold_file = self.SENSOR_DIR \ - + "temp{}_{}".format(sensor_index, sensor_max_suffix) + + "temp{}_{}".format(sensor_index, sensor_high_suffix) else: self.thermal_high_threshold_file = None # sysfs file for crit high threshold value if supported for this sensor - if sensor_crit_suffix: + if sensor_high_crit_suffix: self.thermal_high_crit_threshold_file = self.SENSOR_DIR \ - + "temp{}_{}".format(sensor_index, sensor_crit_suffix) + + "temp{}_{}".format(sensor_index, sensor_high_crit_suffix) else: self.thermal_high_crit_threshold_file = None diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/psu.py b/platform/mellanox/mlnx-platform-api/sonic_platform/psu.py index 39494a124ed4..a2dcfcd55b4e 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/psu.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/psu.py @@ -24,8 +24,10 @@ try: import os + import time from sonic_platform_base.psu_base import PsuBase from sonic_py_common.logger import Logger + from .device_data import DeviceDataManager from .led import PsuLed, SharedLed, ComponentFaultyIndicator from . import utils from .vpd_parser import VpdParser @@ -411,6 +413,7 @@ def get_voltage_high_threshold(self): capability = utils.read_str_from_file(self.psu_voltage_capability) if 'max' in capability: max_voltage = utils.read_int_from_file(self.psu_voltage_max, log_func=logger.log_info) + max_voltage = InvalidPsuVolWA.run(self, max_voltage, self.psu_voltage_max) return float(max_voltage) / 1000 return None @@ -431,6 +434,7 @@ def get_voltage_low_threshold(self): capability = utils.read_str_from_file(self.psu_voltage_capability) if 'min' in capability: min_voltage = utils.read_int_from_file(self.psu_voltage_min, log_func=logger.log_info) + min_voltage = InvalidPsuVolWA.run(self, min_voltage, self.psu_voltage_min) return float(min_voltage) / 1000 return None @@ -448,3 +452,69 @@ def get_maximum_supplied_power(self): return float(power_max) / 1000000 else: return None + + +class InvalidPsuVolWA: + """This class is created as a workaround for a known hardware issue that the PSU voltage threshold could be a + invalid value 127998. Once we read a voltage threshold value equal to 127998, we should do following: + 1. Check the PSU vendor, it should be Delta + 2. Generate a temp sensor configuration file which contains a few set commands. Those set commands are the WA provided by low level team. + 3. Call "sensors -s -c " + 4. Wait for it to take effect + + This issue is found on 3700, 3700c, 3800, 4600c + """ + + INVALID_VOLTAGE_VALUE = 127998 + EXPECT_VENDOR_NAME = 'DELTA' + EXPECT_CAPACITY = '1100' + EXPECT_PLATFORMS = ['x86_64-mlnx_msn3700-r0', 'x86_64-mlnx_msn3700c-r0', 'x86_64-mlnx_msn3800-r0', 'x86_64-mlnx_msn4600c-r0'] + MFR_FIELD = 'MFR_NAME' + CAPACITY_FIELD = 'CAPACITY' + WAIT_TIME = 5 + + @classmethod + def run(cls, psu, threshold_value, threshold_file): + if threshold_value != cls.INVALID_VOLTAGE_VALUE: + # If the threshold value is not an invalid value, just return + return threshold_value + + platform_name = DeviceDataManager.get_platform_name() + # Apply the WA to specified platforms + if platform_name not in cls.EXPECT_PLATFORMS: + # It is unlikely to go to this branch, so we log a warning here + logger.log_warning('PSU {} threshold file {} value {}, but platform is {}'.format(psu.index, threshold_file, threshold_value, platform_name)) + return threshold_value + + # Check PSU vendor, make sure it is DELTA + vendor_name = psu.vpd_parser.get_entry_value(cls.MFR_FIELD) + if vendor_name != 'N/A' and vendor_name != cls.EXPECT_VENDOR_NAME: + # It is unlikely to go to this branch, so we log a warning here + logger.log_warning('PSU {} threshold file {} value {}, but its vendor is {}'.format(psu.index, threshold_file, threshold_value, vendor_name)) + return threshold_value + + # Check PSU version, make sure it is 1100 + capacity = psu.vpd_parser.get_entry_value(cls.CAPACITY_FIELD) + if capacity != 'N/A' and capacity != cls.EXPECT_CAPACITY: + logger.log_warning('PSU {} threshold file {} value {}, but its capacity is {}'.format(psu.index, threshold_file, threshold_value, capacity)) + return threshold_value + + # Run a sensor -s command to triger hardware to get the real threashold value + utils.run_command('sensor -s') + + # Wait for the threshold value change + return cls.wait_set_done(threshold_file) + + @classmethod + def wait_set_done(cls, threshold_file): + wait_time = cls.WAIT_TIME + while wait_time > 0: + value = utils.read_int_from_file(threshold_file, log_func=logger.log_info) + if value != cls.INVALID_VOLTAGE_VALUE: + return value + + wait_time -= 1 + time.sleep(1) + + logger.log_error('sensor -s does not recover PSU threshold sensor after {} seconds'.format(cls.WAIT_TIME)) + return None diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/utils.py b/platform/mellanox/mlnx-platform-api/sonic_platform/utils.py index 0650d9af1a1c..22ef4bb1f27d 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/utils.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/utils.py @@ -194,3 +194,16 @@ def _impl(*args, **kwargs): return return_value return _impl return wrapper + + +def run_command(command): + """ + Utility function to run an shell command and return the output. + :param command: Shell command string. + :return: Output of the shell command. + """ + try: + process = subprocess.Popen(command, shell=True, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + return process.communicate()[0].strip() + except Exception: + return None \ No newline at end of file diff --git a/platform/mellanox/mlnx-platform-api/sonic_platform/vpd_parser.py b/platform/mellanox/mlnx-platform-api/sonic_platform/vpd_parser.py index ea66234e4bff..e53d825adfd6 100644 --- a/platform/mellanox/mlnx-platform-api/sonic_platform/vpd_parser.py +++ b/platform/mellanox/mlnx-platform-api/sonic_platform/vpd_parser.py @@ -24,6 +24,7 @@ SN_VPD_FIELD = "SN_VPD_FIELD" PN_VPD_FIELD = "PN_VPD_FIELD" REV_VPD_FIELD = "REV_VPD_FIELD" +MFR_VPD_FIELD = "MFR_NAME" class VpdParser: @@ -82,3 +83,17 @@ def get_revision(self): logger.log_error("Fail to read revision: No key {} in VPD {}".format(REV_VPD_FIELD, self.vpd_file)) return 'N/A' return self.vpd_data.get(REV_VPD_FIELD, 'N/A') + + def get_entry_value(self, key): + """ + Retrieves an vpd entry of the device + + Returns: + string: Vpd entry value of device + """ + if self._get_data() and key not in self.vpd_data: + logger.log_warning("Fail to read vpd info: No key {} in VPD {}".format(key, self.vpd_file)) + return 'N/A' + return self.vpd_data.get(key, 'N/A') + + diff --git a/platform/mellanox/mlnx-platform-api/tests/test_psu.py b/platform/mellanox/mlnx-platform-api/tests/test_psu.py index c53a9d44797d..5a5f13ff05f3 100644 --- a/platform/mellanox/mlnx-platform-api/tests/test_psu.py +++ b/platform/mellanox/mlnx-platform-api/tests/test_psu.py @@ -116,3 +116,40 @@ def test_psu_vpd(self): assert psu.get_model() == 'MTEF-PSF-AC-C' assert psu.get_serial() == 'MT1946X07684' assert psu.get_revision() == 'A3' + + assert psu.vpd_parser.get_entry_value('MFR_NAME') == 'DELTA' + + @mock.patch('sonic_platform.utils.read_int_from_file', mock.MagicMock(return_value=9999)) + @mock.patch('sonic_platform.utils.run_command') + @mock.patch('sonic_platform.device_data.DeviceDataManager.get_platform_name') + @mock.patch('sonic_platform.vpd_parser.VpdParser.get_entry_value') + def test_psu_workaround(self, mock_get_entry_value, mock_get_platform_name, mock_run_command): + from sonic_platform.psu import InvalidPsuVolWA + psu = Psu(0) + # Threshold value is not InvalidPsuVolWA.INVALID_VOLTAGE_VALUE + assert InvalidPsuVolWA.run(psu, 9999, '') == 9999 + + # Platform name is not in InvalidPsuVolWA.EXPECT_PLATFORMS + mock_get_platform_name.return_value = 'some platform' + assert InvalidPsuVolWA.run(psu, InvalidPsuVolWA.INVALID_VOLTAGE_VALUE, '') == InvalidPsuVolWA.INVALID_VOLTAGE_VALUE + + # PSU vendor is not InvalidPsuVolWA.EXPECT_VENDOR_NAME + vpd_info = { + InvalidPsuVolWA.MFR_FIELD: 'some psu', + InvalidPsuVolWA.CAPACITY_FIELD: 'some capacity' + } + def get_entry_value(key): + return vpd_info[key] + + mock_get_entry_value.side_effect = get_entry_value + mock_get_platform_name.return_value = 'x86_64-mlnx_msn3700-r0' + assert InvalidPsuVolWA.run(psu, InvalidPsuVolWA.INVALID_VOLTAGE_VALUE, '') == InvalidPsuVolWA.INVALID_VOLTAGE_VALUE + + # PSU capacity is not InvalidPsuVolWA.EXPECT_CAPACITY + vpd_info[InvalidPsuVolWA.MFR_FIELD] = InvalidPsuVolWA.EXPECT_VENDOR_NAME + assert InvalidPsuVolWA.run(psu, InvalidPsuVolWA.INVALID_VOLTAGE_VALUE, '') == InvalidPsuVolWA.INVALID_VOLTAGE_VALUE + + # Normal + vpd_info[InvalidPsuVolWA.CAPACITY_FIELD] = InvalidPsuVolWA.EXPECT_CAPACITY + assert InvalidPsuVolWA.run(psu, InvalidPsuVolWA.INVALID_VOLTAGE_VALUE, '') == 9999 + mock_run_command.assert_called_with('sensor -s') diff --git a/platform/mellanox/mlnx-platform-api/tests/test_utils.py b/platform/mellanox/mlnx-platform-api/tests/test_utils.py index 7da17dc5e7bc..bbc3ab28e58c 100644 --- a/platform/mellanox/mlnx-platform-api/tests/test_utils.py +++ b/platform/mellanox/mlnx-platform-api/tests/test_utils.py @@ -116,3 +116,7 @@ def func(): assert func() == 100 assert mock_log.call_count == 1 + + def test_run_command(self): + output = utils.run_command('ls') + assert output diff --git a/rules/docker-orchagent.mk b/rules/docker-orchagent.mk index d9453465c702..ef0c203877d8 100644 --- a/rules/docker-orchagent.mk +++ b/rules/docker-orchagent.mk @@ -10,6 +10,7 @@ $(DOCKER_ORCHAGENT)_DBG_DEPENDS = $($(DOCKER_SWSS_LAYER_BUSTER)_DBG_DEPENDS) $(DOCKER_ORCHAGENT)_DBG_DEPENDS += $(SWSS_DBG) \ $(LIBSWSSCOMMON_DBG) \ $(LIBSAIREDIS_DBG) +$(DOCKER_ORCHAGENT)_PYTHON_WHEELS += $(SCAPY) $(DOCKER_ORCHAGENT)_DBG_IMAGE_PACKAGES = $($(DOCKER_SWSS_LAYER_BUSTER)_DBG_IMAGE_PACKAGES) diff --git a/rules/docker-router-advertiser.mk b/rules/docker-router-advertiser.mk index c2a5f9bf5d3c..6d5b9e4717bd 100644 --- a/rules/docker-router-advertiser.mk +++ b/rules/docker-router-advertiser.mk @@ -6,12 +6,12 @@ DOCKER_ROUTER_ADVERTISER_DBG = $(DOCKER_ROUTER_ADVERTISER_STEM)-$(DBG_IMAGE_MARK $(DOCKER_ROUTER_ADVERTISER)_PATH = $(DOCKERS_PATH)/$(DOCKER_ROUTER_ADVERTISER_STEM) -$(DOCKER_ROUTER_ADVERTISER)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_DEPENDS) +$(DOCKER_ROUTER_ADVERTISER)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_DEPENDS) $(DOCKER_ROUTER_ADVERTISER)_DBG_DEPENDS += $(RADVD_DBG) -$(DOCKER_ROUTER_ADVERTISER)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_PACKAGES) +$(DOCKER_ROUTER_ADVERTISER)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_IMAGE_PACKAGES) -$(DOCKER_ROUTER_ADVERTISER)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_BUSTER) +$(DOCKER_ROUTER_ADVERTISER)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_BULLSEYE) $(DOCKER_ROUTER_ADVERTISER)_VERSION = 1.0.0 $(DOCKER_ROUTER_ADVERTISER)_PACKAGE_NAME = radv @@ -29,6 +29,3 @@ $(DOCKER_ROUTER_ADVERTISER)_RUN_OPT += --privileged -t $(DOCKER_ROUTER_ADVERTISER)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro $(DOCKER_ROUTER_ADVERTISER)_RUN_OPT += -v /usr/share/sonic/scripts:/usr/share/sonic/scripts:ro $(DOCKER_ROUTER_ADVERTISER)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT) - -SONIC_BUSTER_DOCKERS += $(DOCKER_ROUTER_ADVERTISER) -SONIC_BUSTER_DBG_DOCKERS += $(DOCKER_ROUTER_ADVERTISER_DBG) diff --git a/rules/scapy.dep b/rules/scapy.dep new file mode 100644 index 000000000000..ef09fb12223b --- /dev/null +++ b/rules/scapy.dep @@ -0,0 +1,10 @@ +SPATH := $($(SCAPY)_SRC_PATH) +DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/scapy.mk rules/scapy.dep +DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) +SMDEP_FILES := $(addprefix $(SPATH)/,$(shell cd $(SPATH) && git ls-files -- ':!:doc/*')) + +$(SCAPY)_CACHE_MODE := GIT_CONTENT_SHA +$(SCAPY)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) +$(SCAPY)_DEP_FILES := $(DEP_FILES) +$(SCAPY)_SMDEP_FILES := $(SMDEP_FILES) +$(SCAPY)_SMDEP_PATHS := $(SPATH) diff --git a/rules/scapy.mk b/rules/scapy.mk new file mode 100644 index 000000000000..6953c1ef10e2 --- /dev/null +++ b/rules/scapy.mk @@ -0,0 +1,7 @@ +# scapy python3 wheel + +SCAPY = scapy-2.4.5-py2.py3-none-any.whl +$(SCAPY)_SRC_PATH = $(SRC_PATH)/scapy +$(SCAPY)_PYTHON_VERSION = 3 +$(SCAPY)_TEST = n +SONIC_PYTHON_WHEELS += $(SCAPY) diff --git a/rules/sonic-pcied.dep b/rules/sonic-pcied.dep index ddb07f722f6d..05cd1fe5cf42 100644 --- a/rules/sonic-pcied.dep +++ b/rules/sonic-pcied.dep @@ -3,12 +3,6 @@ DEP_FILES:= $(SONIC_COMMON_FILES_LIST) rules/sonic-pcied.mk rules/sonic-pcied.de DEP_FILES+= $(SONIC_COMMON_BASE_FILES_LIST) SMDEP_FILES:= $(addprefix $(SPATH)/,$(shell cd $(SPATH) && git ls-files)) -$(SONIC_PCIED_PY2)_CACHE_MODE:= GIT_CONTENT_SHA -$(SONIC_PCIED_PY2)_DEP_FLAGS:= $(SONIC_COMMON_FLAGS_LIST) -$(SONIC_PCIED_PY2)_DEP_FILES:= $(DEP_FILES) -$(SONIC_PCIED_PY2)_SMDEP_FILES:= $(SMDEP_FILES) -$(SONIC_PCIED_PY2)_SMDEP_PATHS:= $(SPATH) - $(SONIC_PCIED_PY3)_CACHE_MODE:= GIT_CONTENT_SHA $(SONIC_PCIED_PY3)_DEP_FLAGS:= $(SONIC_COMMON_FLAGS_LIST) $(SONIC_PCIED_PY3)_DEP_FILES:= $(DEP_FILES) diff --git a/rules/sonic-pcied.mk b/rules/sonic-pcied.mk index 5c80ae276860..a5d0c8d5054c 100644 --- a/rules/sonic-pcied.mk +++ b/rules/sonic-pcied.mk @@ -1,17 +1,9 @@ # sonic-pcied (SONiC PCIe Monitor daemon) Debian package -# SONIC_PCIED_PY2 package - -SONIC_PCIED_PY2 = sonic_pcied-1.0-py2-none-any.whl -$(SONIC_PCIED_PY2)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-pcied -$(SONIC_PCIED_PY2)_DEPENDS = $(SONIC_PY_COMMON_PY2) -$(SONIC_PCIED_PY2)_PYTHON_VERSION = 2 -SONIC_PYTHON_WHEELS += $(SONIC_PCIED_PY2) - # SONIC_PCIED_PY3 package SONIC_PCIED_PY3 = sonic_pcied-1.0-py3-none-any.whl $(SONIC_PCIED_PY3)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-pcied -$(SONIC_PCIED_PY3)_DEPENDS = $(SONIC_PY_COMMON_PY3) $(SONIC_PCIED_PY2) +$(SONIC_PCIED_PY3)_DEPENDS = $(SONIC_PY_COMMON_PY3) $(SONIC_PCIED_PY3)_PYTHON_VERSION = 3 SONIC_PYTHON_WHEELS += $(SONIC_PCIED_PY3) diff --git a/slave.mk b/slave.mk index 641b732db64e..185574e61808 100644 --- a/slave.mk +++ b/slave.mk @@ -268,6 +268,11 @@ export SONIC_ROUTING_STACK export FRR_USER_UID export FRR_USER_GID +############################################################################### +## Build Options +############################################################################### +export DEB_BUILD_OPTIONS = hardening=+all + ############################################################################### ## Dumping key config attributes associated to current building exercise ############################################################################### diff --git a/sonic-slave-bullseye/Dockerfile.j2 b/sonic-slave-bullseye/Dockerfile.j2 index a75cef0b680e..9a47b48ab93f 100644 --- a/sonic-slave-bullseye/Dockerfile.j2 +++ b/sonic-slave-bullseye/Dockerfile.j2 @@ -20,7 +20,9 @@ RUN echo "deb [arch=amd64] http://debian-archive.trafficmanager.net/debian/ bull echo "deb-src [arch=amd64] http://debian-archive.trafficmanager.net/debian/ bullseye main contrib non-free" >> /etc/apt/sources.list && \ echo "deb [arch=amd64] http://debian-archive.trafficmanager.net/debian-security/ bullseye-security main contrib non-free" >> /etc/apt/sources.list && \ echo "deb-src [arch=amd64] http://debian-archive.trafficmanager.net/debian-security/ bullseye-security main contrib non-free" >> /etc/apt/sources.list && \ - echo "deb [arch=amd64] http://debian-archive.trafficmanager.net/debian bullseye-backports main" >> /etc/apt/sources.list + echo "deb [arch=amd64] http://debian-archive.trafficmanager.net/debian bullseye-backports main" >> /etc/apt/sources.list && \ + echo "deb [arch=amd64] http://packages.trafficmanager.net/debian/debian bullseye main contrib non-free" >> /etc/apt/sources.list && \ + echo "deb [arch=amd64] http://packages.trafficmanager.net/debian/debian bullseye-updates main contrib non-free" >> /etc/apt/sources.list {%- if CONFIGURED_ARCH == "armhf" %} RUN echo "deb [arch=armhf] http://deb.debian.org/debian bullseye main contrib non-free" > /etc/apt/sources.list && \ @@ -339,6 +341,7 @@ RUN apt-get update && apt-get install -y \ libboost-regex-dev \ googletest \ libgtest-dev \ + libgmock-dev \ libgcc-10-dev \ # For sonic-host-services build libcairo2-dev \ diff --git a/sonic-slave-buster/Dockerfile.j2 b/sonic-slave-buster/Dockerfile.j2 index fa8ac44f1b9e..269501fb2e47 100644 --- a/sonic-slave-buster/Dockerfile.j2 +++ b/sonic-slave-buster/Dockerfile.j2 @@ -353,6 +353,7 @@ RUN apt-get update && apt-get install -y \ libboost-regex1.71-dev \ googletest \ libgtest-dev \ + libgmock-dev \ libgcc-8-dev \ # For sonic-host-services build libcairo2-dev \ diff --git a/src/dhcpmon/src/dhcp_device.c b/src/dhcpmon/src/dhcp_device.c index e4fbc7f56909..f45483f8504c 100644 --- a/src/dhcpmon/src/dhcp_device.c +++ b/src/dhcpmon/src/dhcp_device.c @@ -21,51 +21,25 @@ #include #include #include -#include -#include -#include #include "dhcp_device.h" -/** DHCP versions flags */ -static bool dhcpv4_enabled; -static bool dhcpv6_enabled; - /** Counter print width */ #define DHCP_COUNTER_WIDTH 9 /** Start of Ether header of a captured frame */ #define ETHER_START_OFFSET 0 -/** EtherType field offset from Ether header of a captured frame */ -#define ETHER_TYPE_OFFSET (ETHER_START_OFFSET + 12) /** Start of IP header of a captured frame */ #define IP_START_OFFSET (ETHER_START_OFFSET + ETHER_HDR_LEN) -/** Start of UDP header on IPv4 packet of a captured frame */ -#define UDPv4_START_OFFSET (IP_START_OFFSET + sizeof(struct ip)) -/** Start of DHCPv4 header of a captured frame */ -#define DHCPv4_START_OFFSET (UDPv4_START_OFFSET + sizeof(struct udphdr)) -/** Start of DHCPv4 Options segment of a captured frame */ -#define DHCPv4_OPTIONS_HEADER_SIZE 240 +/** Start of UDP header of a captured frame */ +#define UDP_START_OFFSET (IP_START_OFFSET + sizeof(struct ip)) +/** Start of DHCP header of a captured frame */ +#define DHCP_START_OFFSET (UDP_START_OFFSET + sizeof(struct udphdr)) +/** Start of DHCP Options segment of a captured frame */ +#define DHCP_OPTIONS_HEADER_SIZE 240 /** Offset of DHCP GIADDR */ #define DHCP_GIADDR_OFFSET 24 -/** IPv6 link-local prefix */ -#define IPV6_LINK_LOCAL_PREFIX 0x80fe -/** Start of UDP header on IPv6 packet of a captured frame */ -#define UDPv6_START_OFFSET (IP_START_OFFSET + sizeof(struct ip6_hdr)) -/** Start of DHCPv6 header of a captured frame */ -#define DHCPv6_START_OFFSET (UDPv6_START_OFFSET + sizeof(struct udphdr)) -/** Size of 'type' field on DHCPv6 header */ -#define DHCPv6_TYPE_LENGTH 1 -/** Size of DHCPv6 relay message header to first option */ -#define DHCPv6_RELAY_MSG_OPTIONS_OFFSET 34 -/** Size of 'option' field on DHCPv6 header */ -#define DHCPv6_OPTION_LENGTH 2 -/** Size of 'option length' field on DHCPv6 header */ -#define DHCPv6_OPTION_LEN_LENGTH 2 -/** DHCPv6 OPTION_RELAY_MSG */ -#define DHCPv6_OPTION_RELAY_MSG 9 - #define OP_LDHA (BPF_LD | BPF_H | BPF_ABS) /** bpf ldh Abs */ #define OP_LDHI (BPF_LD | BPF_H | BPF_IND) /** bpf ldh Ind */ #define OP_LDB (BPF_LD | BPF_B | BPF_ABS) /** bpf ldb Abs*/ @@ -75,40 +49,34 @@ static bool dhcpv6_enabled; #define OP_JSET (BPF_JMP | BPF_JSET | BPF_K) /** bpf jset */ #define OP_LDXB (BPF_LDX | BPF_B | BPF_MSH) /** bpf ldxb */ -/** Berkeley Packet Filter program for "udp and (port 546 or port 547 or port 67 or port 68)". +/** Berkeley Packet Filter program for "udp and (port 67 or port 68)". * This program is obtained using the following command tcpdump: - * `tcpdump -dd "udp and (port 546 or port 547 or port 67 or port 68)"` + * `tcpdump -dd "udp and (port 67 or port 68)"` */ static struct sock_filter dhcp_bpf_code[] = { - {.code = OP_LDHA, .jt = 0, .jf = 0, .k = 0x0000000c}, // (000) ldh [12] - {.code = OP_JEQ, .jt = 0, .jf = 9, .k = 0x000086dd}, // (001) jeq #0x86dd jt 2 jf 11 - {.code = OP_LDB, .jt = 0, .jf = 0, .k = 0x00000014}, // (002) ldb [20] - {.code = OP_JEQ, .jt = 0, .jf = 24, .k = 0x00000011}, // (003) jeq #0x11 jt 4 jf 28 - {.code = OP_LDHA, .jt = 0, .jf = 0, .k = 0x00000036}, // (004) ldh [54] - {.code = OP_JEQ, .jt = 21, .jf = 0, .k = 0x00000222}, // (005) jeq #0x222 jt 27 jf 6 - {.code = OP_JEQ, .jt = 20, .jf = 0, .k = 0x00000223}, // (006) jeq #0x223 jt 27 jf 7 - {.code = OP_JEQ, .jt = 19, .jf = 0, .k = 0x00000043}, // (007) jeq #0x43 jt 27 jf 8 - {.code = OP_JEQ, .jt = 18, .jf = 0, .k = 0x00000044}, // (008) jeq #0x44 jt 27 jf 9 - {.code = OP_LDHA, .jt = 0, .jf = 0, .k = 0x00000038}, // (009) ldh [56] - {.code = OP_JEQ, .jt = 16, .jf = 13, .k = 0x00000222}, // (010) jeq #0x222 jt 27 jf 24 - {.code = OP_JEQ, .jt = 0, .jf = 16, .k = 0x00000800}, // (011) jeq #0x800 jt 12 jf 28 - {.code = OP_LDB, .jt = 0, .jf = 0, .k = 0x00000017}, // (012) ldb [23] - {.code = OP_JEQ, .jt = 0, .jf = 14, .k = 0x00000011}, // (013) jeq #0x11 jt 14 jf 28 - {.code = OP_LDHA, .jt = 0, .jf = 0, .k = 0x00000014}, // (014) ldh [20] - {.code = OP_JSET, .jt = 12, .jf = 0, .k = 0x00001fff}, // (015) jset #0x1fff jt 28 jf 16 - {.code = OP_LDXB, .jt = 0, .jf = 0, .k = 0x0000000e}, // (016) ldxb 4*([14]&0xf) - {.code = OP_LDHI, .jt = 0, .jf = 0, .k = 0x0000000e}, // (017) ldh [x + 14] - {.code = OP_JEQ, .jt = 8, .jf = 0, .k = 0x00000222}, // (018) jeq #0x222 jt 27 jf 19 - {.code = OP_JEQ, .jt = 7, .jf = 0, .k = 0x00000223}, // (019) jeq #0x223 jt 27 jf 20 - {.code = OP_JEQ, .jt = 6, .jf = 0, .k = 0x00000043}, // (020) jeq #0x43 jt 27 jf 21 - {.code = OP_JEQ, .jt = 5, .jf = 0, .k = 0x00000044}, // (021) jeq #0x44 jt 27 jf 22 - {.code = OP_LDHI, .jt = 0, .jf = 0, .k = 0x00000010}, // (022) ldh [x + 16] - {.code = OP_JEQ, .jt = 3, .jf = 0, .k = 0x00000222}, // (023) jeq #0x222 jt 27 jf 24 - {.code = OP_JEQ, .jt = 2, .jf = 0, .k = 0x00000223}, // (024) jeq #0x223 jt 27 jf 25 - {.code = OP_JEQ, .jt = 1, .jf = 0, .k = 0x00000043}, // (025) jeq #0x43 jt 27 jf 26 - {.code = OP_JEQ, .jt = 0, .jf = 1, .k = 0x00000044}, // (026) jeq #0x44 jt 27 jf 28 - {.code = OP_RET, .jt = 0, .jf = 0, .k = 0x00040000}, // (027) ret #262144 - {.code = OP_RET, .jt = 0, .jf = 0, .k = 0x00000000}, // (028) ret + {.code = OP_LDHA, .jt = 0, .jf = 0, .k = 0x0000000c}, // (000) ldh [12] + {.code = OP_JEQ, .jt = 0, .jf = 7, .k = 0x000086dd}, // (001) jeq #0x86dd jt 2 jf 9 + {.code = OP_LDB, .jt = 0, .jf = 0, .k = 0x00000014}, // (002) ldb [20] + {.code = OP_JEQ, .jt = 0, .jf = 18, .k = 0x00000011}, // (003) jeq #0x11 jt 4 jf 22 + {.code = OP_LDHA, .jt = 0, .jf = 0, .k = 0x00000036}, // (004) ldh [54] + {.code = OP_JEQ, .jt = 15, .jf = 0, .k = 0x00000043}, // (005) jeq #0x43 jt 21 jf 6 + {.code = OP_JEQ, .jt = 14, .jf = 0, .k = 0x00000044}, // (006) jeq #0x44 jt 21 jf 7 + {.code = OP_LDHA, .jt = 0, .jf = 0, .k = 0x00000038}, // (007) ldh [56] + {.code = OP_JEQ, .jt = 12, .jf = 11, .k = 0x00000043}, // (008) jeq #0x43 jt 21 jf 20 + {.code = OP_JEQ, .jt = 0, .jf = 12, .k = 0x00000800}, // (009) jeq #0x800 jt 10 jf 22 + {.code = OP_LDB, .jt = 0, .jf = 0, .k = 0x00000017}, // (010) ldb [23] + {.code = OP_JEQ, .jt = 0, .jf = 10, .k = 0x00000011}, // (011) jeq #0x11 jt 12 jf 22 + {.code = OP_LDHA, .jt = 0, .jf = 0, .k = 0x00000014}, // (012) ldh [20] + {.code = OP_JSET, .jt = 8, .jf = 0, .k = 0x00001fff}, // (013) jset #0x1fff jt 22 jf 14 + {.code = OP_LDXB, .jt = 0, .jf = 0, .k = 0x0000000e}, // (014) ldxb 4*([14]&0xf) + {.code = OP_LDHI, .jt = 0, .jf = 0, .k = 0x0000000e}, // (015) ldh [x + 14] + {.code = OP_JEQ, .jt = 4, .jf = 0, .k = 0x00000043}, // (016) jeq #0x43 jt 21 jf 17 + {.code = OP_JEQ, .jt = 3, .jf = 0, .k = 0x00000044}, // (017) jeq #0x44 jt 21 jf 18 + {.code = OP_LDHI, .jt = 0, .jf = 0, .k = 0x00000010}, // (018) ldh [x + 16] + {.code = OP_JEQ, .jt = 1, .jf = 0, .k = 0x00000043}, // (019) jeq #0x43 jt 21 jf 20 + {.code = OP_JEQ, .jt = 0, .jf = 1, .k = 0x00000044}, // (020) jeq #0x44 jt 21 jf 22 + {.code = OP_RET, .jt = 0, .jf = 0, .k = 0x00040000}, // (021) ret #262144 + {.code = OP_RET, .jt = 0, .jf = 0, .k = 0x00000000}, // (022) ret #0 }; /** Filter program socket struct */ @@ -121,29 +89,16 @@ static struct sock_fprog dhcp_sock_bfp = { */ static dhcp_device_context_t aggregate_dev = {0}; -static dhcp_device_context_t *mgmt_intf = NULL; - -/** Monitored DHCPv4 message type */ -static dhcpv4_message_type_t v4_monitored_msgs[] = { - DHCPv4_MESSAGE_TYPE_DISCOVER, - DHCPv4_MESSAGE_TYPE_OFFER, - DHCPv4_MESSAGE_TYPE_REQUEST, - DHCPv4_MESSAGE_TYPE_ACK -}; - -/** Monitored DHCPv6 message type */ -static dhcpv6_message_type_t v6_monitored_msgs[] = { - DHCPv6_MESSAGE_TYPE_SOLICIT, - DHCPv6_MESSAGE_TYPE_ADVERTISE, - DHCPv6_MESSAGE_TYPE_REQUEST, - DHCPv6_MESSAGE_TYPE_REPLY +/** Monitored DHCP message type */ +static dhcp_message_type_t monitored_msgs[] = { + DHCP_MESSAGE_TYPE_DISCOVER, + DHCP_MESSAGE_TYPE_OFFER, + DHCP_MESSAGE_TYPE_REQUEST, + DHCP_MESSAGE_TYPE_ACK }; -/** Number of monitored DHCPv4 message type */ -static uint8_t v4_monitored_msg_sz = sizeof(v4_monitored_msgs) / sizeof(*v4_monitored_msgs); - -/** Number of monitored DHCPv6 message type */ -static uint8_t v6_monitored_msg_sz = sizeof(v6_monitored_msgs) / sizeof(*v6_monitored_msgs); +/** Number of monitored DHCP message type */ +static uint8_t monitored_msg_sz = sizeof(monitored_msgs) / sizeof(*monitored_msgs); /** * @code handle_dhcp_option_53(context, dhcp_option, dir, iphdr, dhcphdr); @@ -168,37 +123,27 @@ static void handle_dhcp_option_53(dhcp_device_context_t *context, switch (dhcp_option[2]) { // DHCP messages send by client - case DHCPv4_MESSAGE_TYPE_DISCOVER: - case DHCPv4_MESSAGE_TYPE_REQUEST: - case DHCPv4_MESSAGE_TYPE_DECLINE: - case DHCPv4_MESSAGE_TYPE_RELEASE: - case DHCPv4_MESSAGE_TYPE_INFORM: + case DHCP_MESSAGE_TYPE_DISCOVER: + case DHCP_MESSAGE_TYPE_REQUEST: + case DHCP_MESSAGE_TYPE_DECLINE: + case DHCP_MESSAGE_TYPE_RELEASE: + case DHCP_MESSAGE_TYPE_INFORM: giaddr = ntohl(dhcphdr[DHCP_GIADDR_OFFSET] << 24 | dhcphdr[DHCP_GIADDR_OFFSET + 1] << 16 | dhcphdr[DHCP_GIADDR_OFFSET + 2] << 8 | dhcphdr[DHCP_GIADDR_OFFSET + 3]); if ((context->giaddr_ip == giaddr && context->is_uplink && dir == DHCP_TX) || (!context->is_uplink && dir == DHCP_RX && iphdr->ip_dst.s_addr == INADDR_BROADCAST)) { - context->counters.v4counters[DHCP_COUNTERS_CURRENT][dir][dhcp_option[2]]++; - // If the packet recieved on the mgmt interface, we don't want to increment the aggregate device - if (context == mgmt_intf) - { - break; - } - aggregate_dev.counters.v4counters[DHCP_COUNTERS_CURRENT][dir][dhcp_option[2]]++; + context->counters[DHCP_COUNTERS_CURRENT][dir][dhcp_option[2]]++; + aggregate_dev.counters[DHCP_COUNTERS_CURRENT][dir][dhcp_option[2]]++; } break; // DHCP messages send by server - case DHCPv4_MESSAGE_TYPE_OFFER: - case DHCPv4_MESSAGE_TYPE_ACK: - case DHCPv4_MESSAGE_TYPE_NAK: + case DHCP_MESSAGE_TYPE_OFFER: + case DHCP_MESSAGE_TYPE_ACK: + case DHCP_MESSAGE_TYPE_NAK: if ((context->giaddr_ip == iphdr->ip_dst.s_addr && context->is_uplink && dir == DHCP_RX) || (!context->is_uplink && dir == DHCP_TX)) { - context->counters.v4counters[DHCP_COUNTERS_CURRENT][dir][dhcp_option[2]]++; - // If the packet recieved on the mgmt interface, we don't want to increment the aggregate device - if (context == mgmt_intf) - { - break; - } - aggregate_dev.counters.v4counters[DHCP_COUNTERS_CURRENT][dir][dhcp_option[2]]++; + context->counters[DHCP_COUNTERS_CURRENT][dir][dhcp_option[2]]++; + aggregate_dev.counters[DHCP_COUNTERS_CURRENT][dir][dhcp_option[2]]++; } break; default: @@ -207,48 +152,6 @@ static void handle_dhcp_option_53(dhcp_device_context_t *context, } } -/** - * @code handle_dhcpv6_option(context, dhcp_option, dir); - * - * @brief handle the logic related to DHCPv6 option - * - * @param context Device (interface) context - * @param dhcp_option pointer to DHCP option buffer space - * @param dir packet direction - * - * @return none - */ -static void handle_dhcpv6_option(dhcp_device_context_t *context, - const u_char dhcp_option, - dhcp_packet_direction_t dir) -{ - switch (dhcp_option) - { - case DHCPv6_MESSAGE_TYPE_SOLICIT: - case DHCPv6_MESSAGE_TYPE_REQUEST: - case DHCPv6_MESSAGE_TYPE_CONFIRM: - case DHCPv6_MESSAGE_TYPE_RENEW: - case DHCPv6_MESSAGE_TYPE_REBIND: - case DHCPv6_MESSAGE_TYPE_RELEASE: - case DHCPv6_MESSAGE_TYPE_DECLINE: - case DHCPv6_MESSAGE_TYPE_ADVERTISE: - case DHCPv6_MESSAGE_TYPE_REPLY: - case DHCPv6_MESSAGE_TYPE_RECONFIGURE: - case DHCPv6_MESSAGE_TYPE_INFORMATION_REQUEST: - context->counters.v6counters[DHCP_COUNTERS_CURRENT][dir][dhcp_option]++; - // If the packet recieved on the mgmt interface, we don't want to increment the aggregate device - if (context == mgmt_intf) - { - break; - } - aggregate_dev.counters.v6counters[DHCP_COUNTERS_CURRENT][dir][dhcp_option]++; - break; - default: - syslog(LOG_WARNING, "handle_dhcpv6_option(%s): Unknown DHCPv6 option type %d", context->intf, dhcp_option); - break; - } -} - /** * @code read_callback(fd, event, arg); * @@ -268,29 +171,16 @@ static void read_callback(int fd, short event, void *arg) while ((event == EV_READ) && ((buffer_sz = recv(fd, context->buffer, context->snaplen, MSG_DONTWAIT)) > 0)) { struct ether_header *ethhdr = (struct ether_header*) context->buffer; - struct ip *iphdr; - struct ip6_hdr *ipv6hdr; - struct udphdr *udp; - uint8_t *dhcphdr; - int dhcp_option_offset; - - bool is_ipv4 = (ntohs(ethhdr->ether_type) == ETHERTYPE_IP); - if (is_ipv4) { - iphdr = (struct ip*) (context->buffer + IP_START_OFFSET); - udp = (struct udphdr*) (context->buffer + UDPv4_START_OFFSET); - dhcphdr = context->buffer + DHCPv4_START_OFFSET; - dhcp_option_offset = DHCPv4_START_OFFSET + DHCPv4_OPTIONS_HEADER_SIZE; - } else { - ipv6hdr = (struct ip6_hdr*) (context->buffer + IP_START_OFFSET); - udp = (struct udphdr*) (context->buffer + UDPv6_START_OFFSET); - dhcphdr = context->buffer + DHCPv6_START_OFFSET; - dhcp_option_offset = DHCPv6_START_OFFSET; - } - if (is_ipv4 && dhcpv4_enabled && (buffer_sz > UDPv4_START_OFFSET + sizeof(struct udphdr) + DHCPv4_OPTIONS_HEADER_SIZE) && - (ntohs(udp->len) > DHCPv4_OPTIONS_HEADER_SIZE)) { - int dhcp_sz = ntohs(udp->len) < buffer_sz - UDPv4_START_OFFSET - sizeof(struct udphdr) ? - ntohs(udp->len) : buffer_sz - UDPv4_START_OFFSET - sizeof(struct udphdr); - int dhcp_option_sz = dhcp_sz - DHCPv4_OPTIONS_HEADER_SIZE; + struct ip *iphdr = (struct ip*) (context->buffer + IP_START_OFFSET); + struct udphdr *udp = (struct udphdr*) (context->buffer + UDP_START_OFFSET); + uint8_t *dhcphdr = context->buffer + DHCP_START_OFFSET; + int dhcp_option_offset = DHCP_START_OFFSET + DHCP_OPTIONS_HEADER_SIZE; + + if ((buffer_sz > UDP_START_OFFSET + sizeof(struct udphdr) + DHCP_OPTIONS_HEADER_SIZE) && + (ntohs(udp->len) > DHCP_OPTIONS_HEADER_SIZE)) { + int dhcp_sz = ntohs(udp->len) < buffer_sz - UDP_START_OFFSET - sizeof(struct udphdr) ? + ntohs(udp->len) : buffer_sz - UDP_START_OFFSET - sizeof(struct udphdr); + int dhcp_option_sz = dhcp_sz - DHCP_OPTIONS_HEADER_SIZE; const u_char *dhcp_option = context->buffer + dhcp_option_offset; dhcp_packet_direction_t dir = (ethhdr->ether_shost[0] == context->mac[0] && ethhdr->ether_shost[1] == context->mac[1] && @@ -324,37 +214,6 @@ static void read_callback(int fd, short event, void *arg) offset += dhcp_option[offset + 1] + 2; } } - } - else if (!is_ipv4 && dhcpv6_enabled && (buffer_sz > UDPv6_START_OFFSET + sizeof(struct udphdr) + DHCPv6_TYPE_LENGTH)) { - const u_char* dhcp_header = context->buffer + dhcp_option_offset; - dhcp_packet_direction_t dir = (ethhdr->ether_shost[0] == context->mac[0] && - ethhdr->ether_shost[1] == context->mac[1] && - ethhdr->ether_shost[2] == context->mac[2] && - ethhdr->ether_shost[3] == context->mac[3] && - ethhdr->ether_shost[4] == context->mac[4] && - ethhdr->ether_shost[5] == context->mac[5]) ? - DHCP_TX : DHCP_RX; - int offset = 0; - uint16_t option = 0; - uint16_t current_option_len = 0; - // Get to inner DHCP header from encapsulated RELAY_FORWARD or RELAY_REPLY header - while (dhcp_header[offset] == DHCPv6_MESSAGE_TYPE_RELAY_FORWARD || dhcp_header[offset] == DHCPv6_MESSAGE_TYPE_RELAY_REPLY) - { - // Get to DHCPv6_OPTION_RELAY_MSG from all options - offset += DHCPv6_RELAY_MSG_OPTIONS_OFFSET; - option = htons(*((uint16_t*)(&(dhcp_header[offset])))); - - while (option != DHCPv6_OPTION_RELAY_MSG) - { - // Add to offset the option length and get the next option ID - current_option_len = htons(*((uint16_t*)(&(dhcp_header[offset + DHCPv6_OPTION_LENGTH])))); - offset += DHCPv6_OPTION_LENGTH + DHCPv6_OPTION_LEN_LENGTH + current_option_len; - option = htons(*((uint16_t*)(&(dhcp_header[offset])))); - } - // Set the offset to DHCP-relay-message data - offset += DHCPv6_OPTION_LENGTH + DHCPv6_OPTION_LEN_LENGTH; - } - handle_dhcpv6_option(context, dhcp_header[offset], dir); } else { syslog(LOG_WARNING, "read_callback(%s): read length (%ld) is too small to capture DHCP options", context->intf, buffer_sz); @@ -363,73 +222,29 @@ static void read_callback(int fd, short event, void *arg) } /** - * @code dhcp_device_is_dhcp_inactive(v4counters, v6counters, type); + * @code dhcp_device_is_dhcp_inactive(counters); * * @brief Check if there were no DHCP activity * - * @param v4counters current/snapshot v4counter - * - * @param v6counters current/snapshot v6counter - * - * @param type DHCP type + * @param counters current/snapshot counter * * @return true if there were no DHCP activity, false otherwise */ -static bool dhcp_device_is_dhcp_inactive(uint64_t v4counters[][DHCP_DIR_COUNT][DHCPv4_MESSAGE_TYPE_COUNT], - uint64_t v6counters[][DHCP_DIR_COUNT][DHCPv6_MESSAGE_TYPE_COUNT], - dhcp_type_t type) +static bool dhcp_device_is_dhcp_inactive(uint64_t counters[][DHCP_DIR_COUNT][DHCP_MESSAGE_TYPE_COUNT]) { - bool rv = true; - uint64_t *rx_counters; - uint64_t *rx_counter_snapshot; - - switch (type) - { - case DHCPv4_TYPE: - rx_counters = v4counters[DHCP_COUNTERS_CURRENT][DHCP_RX]; - rx_counter_snapshot = v4counters[DHCP_COUNTERS_SNAPSHOT][DHCP_RX]; - for (uint8_t i = 0; (i < v4_monitored_msg_sz) && rv; i++) { - rv = rx_counters[v4_monitored_msgs[i]] == rx_counter_snapshot[v4_monitored_msgs[i]]; - } - break; - - case DHCPv6_TYPE: - rx_counters = v6counters[DHCP_COUNTERS_CURRENT][DHCP_RX]; - rx_counter_snapshot = v6counters[DHCP_COUNTERS_SNAPSHOT][DHCP_RX]; - for (uint8_t i = 0; (i < v6_monitored_msg_sz) && rv; i++) { - rv = rx_counters[v6_monitored_msgs[i]] == rx_counter_snapshot[v6_monitored_msgs[i]]; - } - break; + uint64_t *rx_counters = counters[DHCP_COUNTERS_CURRENT][DHCP_RX]; + uint64_t *rx_counter_snapshot = counters[DHCP_COUNTERS_SNAPSHOT][DHCP_RX]; - default: - syslog(LOG_ERR, "Unknown DHCP type %d\n", type); - break; + bool rv = true; + for (uint8_t i = 0; (i < monitored_msg_sz) && rv; i++) { + rv = rx_counters[monitored_msgs[i]] == rx_counter_snapshot[monitored_msgs[i]]; } return rv; } /** - * @code dhcp_device_is_dhcpv4_msg_unhealthy(type, counters); - * - * @brief Check if DHCP relay is functioning properly for message of type 'type'. - * For every rx of message 'type', there should be increment of the same message type. - * - * @param type DHCP message type - * @param counters current/snapshot counter - * - * @return true if DHCP message 'type' is transmitted,false otherwise - */ -static bool dhcp_device_is_dhcpv4_msg_unhealthy(dhcpv4_message_type_t type, - uint64_t v4counters[][DHCP_DIR_COUNT][DHCPv4_MESSAGE_TYPE_COUNT]) -{ - // check if DHCP message 'type' is being relayed - return ((v4counters[DHCP_COUNTERS_CURRENT][DHCP_RX][type] > v4counters[DHCP_COUNTERS_SNAPSHOT][DHCP_RX][type]) && - (v4counters[DHCP_COUNTERS_CURRENT][DHCP_TX][type] <= v4counters[DHCP_COUNTERS_SNAPSHOT][DHCP_TX][type]) ); -} - -/** - * @code dhcp_device_is_dhcpv6_msg_unhealthy(type, counters); + * @code dhcp_device_is_dhcp_msg_unhealthy(type, counters); * * @brief Check if DHCP relay is functioning properly for message of type 'type'. * For every rx of message 'type', there should be increment of the same message type. @@ -439,57 +254,34 @@ static bool dhcp_device_is_dhcpv4_msg_unhealthy(dhcpv4_message_type_t type, * * @return true if DHCP message 'type' is transmitted,false otherwise */ -static bool dhcp_device_is_dhcpv6_msg_unhealthy(dhcpv6_message_type_t type, - uint64_t v6counters[][DHCP_DIR_COUNT][DHCPv6_MESSAGE_TYPE_COUNT]) +static bool dhcp_device_is_dhcp_msg_unhealthy(dhcp_message_type_t type, + uint64_t counters[][DHCP_DIR_COUNT][DHCP_MESSAGE_TYPE_COUNT]) { // check if DHCP message 'type' is being relayed - return ((v6counters[DHCP_COUNTERS_CURRENT][DHCP_RX][type] > v6counters[DHCP_COUNTERS_SNAPSHOT][DHCP_RX][type]) && - (v6counters[DHCP_COUNTERS_CURRENT][DHCP_TX][type] <= v6counters[DHCP_COUNTERS_SNAPSHOT][DHCP_TX][type]) ); + return ((counters[DHCP_COUNTERS_CURRENT][DHCP_RX][type] > counters[DHCP_COUNTERS_SNAPSHOT][DHCP_RX][type]) && + (counters[DHCP_COUNTERS_CURRENT][DHCP_TX][type] <= counters[DHCP_COUNTERS_SNAPSHOT][DHCP_TX][type]) ); } /** - * @code dhcp_device_check_positive_health(v4counters, v6counters, type); + * @code dhcp_device_check_positive_health(counters, counters_snapshot); * - * @brief Check if DHCPv4/6 relay is functioning properly for monitored messages. - * DHCPv4 (Discover, Offer, Request, ACK.) and DHCPv6 (Solicit, Advertise, Request, Reply). + * @brief Check if DHCP relay is functioning properly for monitored messages (Discover, Offer, Request, ACK.) * For every rx of monitored messages, there should be increment of the same message type. * - * @param v4counters current/snapshot counter - * - * @param v6counters current/snapshot counter - * - * @param type DHCP type + * @param counters current/snapshot counter * * @return DHCP_MON_STATUS_HEALTHY, DHCP_MON_STATUS_UNHEALTHY, or DHCP_MON_STATUS_INDETERMINATE */ -static dhcp_mon_status_t dhcp_device_check_positive_health(uint64_t v4counters[][DHCP_DIR_COUNT][DHCPv4_MESSAGE_TYPE_COUNT], - uint64_t v6counters[][DHCP_DIR_COUNT][DHCPv6_MESSAGE_TYPE_COUNT], - dhcp_type_t type) +static dhcp_mon_status_t dhcp_device_check_positive_health(uint64_t counters[][DHCP_DIR_COUNT][DHCP_MESSAGE_TYPE_COUNT]) { dhcp_mon_status_t rv = DHCP_MON_STATUS_HEALTHY; bool is_dhcp_unhealthy = false; - - switch (type) - { - case DHCPv4_TYPE: - for (uint8_t i = 0; (i < v4_monitored_msg_sz) && !is_dhcp_unhealthy; i++) { - is_dhcp_unhealthy = dhcp_device_is_dhcpv4_msg_unhealthy(v4_monitored_msgs[i], v4counters); - } - break; - - case DHCPv6_TYPE: - for (uint8_t i = 0; (i < v6_monitored_msg_sz) && !is_dhcp_unhealthy; i++) { - is_dhcp_unhealthy = dhcp_device_is_dhcpv6_msg_unhealthy(v6_monitored_msgs[i], v6counters); - } - break; - - default: - syslog(LOG_ERR, "Unknown DHCP type %d\n", type); - break; + for (uint8_t i = 0; (i < monitored_msg_sz) && !is_dhcp_unhealthy; i++) { + is_dhcp_unhealthy = dhcp_device_is_dhcp_msg_unhealthy(monitored_msgs[i], counters); } - // if we have rx DORA/SARR then we should have corresponding tx DORA/SARR (DORA/SARR being relayed) + // if we have rx DORA then we should have corresponding tx DORA (DORA being relayed) if (is_dhcp_unhealthy) { rv = DHCP_MON_STATUS_UNHEALTHY; } @@ -498,47 +290,27 @@ static dhcp_mon_status_t dhcp_device_check_positive_health(uint64_t v4counters[] } /** - * @code dhcp_device_check_negative_health(v4counters, v6counters, type); + * @code dhcp_device_check_negative_health(counters); * * @brief Check that DHCP relayed messages are not being transmitted out of this interface/dev * using its counters. The interface is negatively healthy if there are not DHCP message * travelling through it. * - * @param v4counters current/snapshot counter - * @param v6counters current/snapshot counter - * @param type DHCP type + * @param counters recent interface counter + * @param counters_snapshot snapshot counters * * @return DHCP_MON_STATUS_HEALTHY, DHCP_MON_STATUS_UNHEALTHY, or DHCP_MON_STATUS_INDETERMINATE */ -static dhcp_mon_status_t dhcp_device_check_negative_health(uint64_t v4counters[][DHCP_DIR_COUNT][DHCPv4_MESSAGE_TYPE_COUNT], - uint64_t v6counters[][DHCP_DIR_COUNT][DHCPv6_MESSAGE_TYPE_COUNT], - dhcp_type_t type) +static dhcp_mon_status_t dhcp_device_check_negative_health(uint64_t counters[][DHCP_DIR_COUNT][DHCP_MESSAGE_TYPE_COUNT]) { dhcp_mon_status_t rv = DHCP_MON_STATUS_HEALTHY; - bool is_dhcp_unhealthy = false; - uint64_t *tx_counters; - uint64_t *tx_counter_snapshot; + uint64_t *tx_counters = counters[DHCP_COUNTERS_CURRENT][DHCP_TX]; + uint64_t *tx_counter_snapshot = counters[DHCP_COUNTERS_SNAPSHOT][DHCP_TX]; - switch (type) - { - case DHCPv4_TYPE: - tx_counters = v4counters[DHCP_COUNTERS_CURRENT][DHCP_TX]; - tx_counter_snapshot = v4counters[DHCP_COUNTERS_SNAPSHOT][DHCP_TX]; - for (uint8_t i = 0; (i < v4_monitored_msg_sz) && !is_dhcp_unhealthy; i++) { - is_dhcp_unhealthy = tx_counters[v4_monitored_msgs[i]] > tx_counter_snapshot[v4_monitored_msgs[i]]; - } - break; - case DHCPv6_TYPE: - tx_counters = v6counters[DHCP_COUNTERS_CURRENT][DHCP_TX]; - tx_counter_snapshot = v6counters[DHCP_COUNTERS_SNAPSHOT][DHCP_TX]; - for (uint8_t i = 0; (i < v6_monitored_msg_sz) && !is_dhcp_unhealthy; i++) { - is_dhcp_unhealthy = tx_counters[v6_monitored_msgs[i]] > tx_counter_snapshot[v6_monitored_msgs[i]]; - } - break; - default: - syslog(LOG_ERR, "Unknown DHCP type %d\n", type); - break; + bool is_dhcp_unhealthy = false; + for (uint8_t i = 0; (i < monitored_msg_sz) && !is_dhcp_unhealthy; i++) { + is_dhcp_unhealthy = tx_counters[monitored_msgs[i]] > tx_counter_snapshot[monitored_msgs[i]]; } // for negative validation, return unhealthy if DHCP packet are being @@ -551,7 +323,7 @@ static dhcp_mon_status_t dhcp_device_check_negative_health(uint64_t v4counters[] } /** - * @code dhcp_device_check_health(check_type, v4counters, v6counters, type); + * @code dhcp_device_check_health(check_type, counters, counters_snapshot); * * @brief Check that DHCP relay is functioning properly given a check type. Positive check * indicates for every rx of DHCP message of type 'type', there would increment of @@ -560,80 +332,59 @@ static dhcp_mon_status_t dhcp_device_check_negative_health(uint64_t v4counters[] * considered unhealthy. * * @param check_type type of health check - * @param v4counters current/snapshot counters - * @param v6counters current/snapshot counters - * @param type DHCP type + * @param counters current/snapshot counter * * @return DHCP_MON_STATUS_HEALTHY, DHCP_MON_STATUS_UNHEALTHY, or DHCP_MON_STATUS_INDETERMINATE */ static dhcp_mon_status_t dhcp_device_check_health(dhcp_mon_check_t check_type, - uint64_t v4counters[][DHCP_DIR_COUNT][DHCPv4_MESSAGE_TYPE_COUNT], - uint64_t v6counters[][DHCP_DIR_COUNT][DHCPv6_MESSAGE_TYPE_COUNT], - dhcp_type_t type) + uint64_t counters[][DHCP_DIR_COUNT][DHCP_MESSAGE_TYPE_COUNT]) { dhcp_mon_status_t rv = DHCP_MON_STATUS_HEALTHY; - if (dhcp_device_is_dhcp_inactive(v4counters, v6counters, type)) { + if (dhcp_device_is_dhcp_inactive(aggregate_dev.counters)) { rv = DHCP_MON_STATUS_INDETERMINATE; } else if (check_type == DHCP_MON_CHECK_POSITIVE) { - rv = dhcp_device_check_positive_health(v4counters, v6counters, type); + rv = dhcp_device_check_positive_health(counters); } else if (check_type == DHCP_MON_CHECK_NEGATIVE) { - rv = dhcp_device_check_negative_health(v4counters, v6counters, type); + rv = dhcp_device_check_negative_health(counters); } return rv; } /** - * @code dhcp_print_counters(vlan_intf, type, v4counters, v6counters); + * @code dhcp_print_counters(vlan_intf, type, counters); * * @brief prints DHCP counters to sylsog. * - * @param vlan_intf vlan interface name - * @param type counter type - * @param v4counters interface counter - * @param v6counters interface counter + * @param vlan_intf vlan interface name + * @param type counter type + * @param counters interface counter * * @return none */ static void dhcp_print_counters(const char *vlan_intf, dhcp_counters_type_t type, - uint64_t v4counters[][DHCPv4_MESSAGE_TYPE_COUNT], - uint64_t v6counters[][DHCPv6_MESSAGE_TYPE_COUNT]) + uint64_t counters[][DHCP_MESSAGE_TYPE_COUNT]) { - static const char *v4_counter_desc[DHCP_COUNTERS_COUNT] = { - [DHCP_COUNTERS_CURRENT] = " Current", - [DHCP_COUNTERS_SNAPSHOT] = "Snapshot" - }; - static const char *v6_counter_desc[DHCP_COUNTERS_COUNT] = { + static const char *counter_desc[DHCP_COUNTERS_COUNT] = { [DHCP_COUNTERS_CURRENT] = " Current", [DHCP_COUNTERS_SNAPSHOT] = "Snapshot" }; syslog( LOG_NOTICE, - "DHCPv4 [%*s-%*s rx/tx] Discover: %*lu/%*lu, Offer: %*lu/%*lu, Request: %*lu/%*lu, ACK: %*lu/%*lu\n\ - DHCPv6 [%*s-%*s rx/tx] Solicit: %*lu/%*lu, Advertise: %*lu/%*lu, Request: %*lu/%*lu, Reply: %*lu/%*lu\n", + "[%*s-%*s rx/tx] Discover: %*lu/%*lu, Offer: %*lu/%*lu, Request: %*lu/%*lu, ACK: %*lu/%*lu\n", IF_NAMESIZE, vlan_intf, - (int) strlen(v4_counter_desc[type]), v4_counter_desc[type], - DHCP_COUNTER_WIDTH, v4counters[DHCP_RX][DHCPv4_MESSAGE_TYPE_DISCOVER], - DHCP_COUNTER_WIDTH, v4counters[DHCP_TX][DHCPv4_MESSAGE_TYPE_DISCOVER], - DHCP_COUNTER_WIDTH, v4counters[DHCP_RX][DHCPv4_MESSAGE_TYPE_OFFER], - DHCP_COUNTER_WIDTH, v4counters[DHCP_TX][DHCPv4_MESSAGE_TYPE_OFFER], - DHCP_COUNTER_WIDTH, v4counters[DHCP_RX][DHCPv4_MESSAGE_TYPE_REQUEST], - DHCP_COUNTER_WIDTH, v4counters[DHCP_TX][DHCPv4_MESSAGE_TYPE_REQUEST], - DHCP_COUNTER_WIDTH, v4counters[DHCP_RX][DHCPv4_MESSAGE_TYPE_ACK], - DHCP_COUNTER_WIDTH, v4counters[DHCP_TX][DHCPv4_MESSAGE_TYPE_ACK], - IF_NAMESIZE, vlan_intf, - (int) strlen(v6_counter_desc[type]), v6_counter_desc[type], - DHCP_COUNTER_WIDTH, v6counters[DHCP_RX][DHCPv6_MESSAGE_TYPE_SOLICIT], - DHCP_COUNTER_WIDTH, v6counters[DHCP_TX][DHCPv6_MESSAGE_TYPE_SOLICIT], - DHCP_COUNTER_WIDTH, v6counters[DHCP_RX][DHCPv6_MESSAGE_TYPE_ADVERTISE], - DHCP_COUNTER_WIDTH, v6counters[DHCP_TX][DHCPv6_MESSAGE_TYPE_ADVERTISE], - DHCP_COUNTER_WIDTH, v6counters[DHCP_RX][DHCPv6_MESSAGE_TYPE_REQUEST], - DHCP_COUNTER_WIDTH, v6counters[DHCP_TX][DHCPv6_MESSAGE_TYPE_REQUEST], - DHCP_COUNTER_WIDTH, v6counters[DHCP_RX][DHCPv6_MESSAGE_TYPE_REPLY], - DHCP_COUNTER_WIDTH, v6counters[DHCP_TX][DHCPv6_MESSAGE_TYPE_REPLY] + (int) strlen(counter_desc[type]), counter_desc[type], + DHCP_COUNTER_WIDTH, counters[DHCP_RX][DHCP_MESSAGE_TYPE_DISCOVER], + DHCP_COUNTER_WIDTH, counters[DHCP_TX][DHCP_MESSAGE_TYPE_DISCOVER], + DHCP_COUNTER_WIDTH, counters[DHCP_RX][DHCP_MESSAGE_TYPE_OFFER], + DHCP_COUNTER_WIDTH, counters[DHCP_TX][DHCP_MESSAGE_TYPE_OFFER], + DHCP_COUNTER_WIDTH, counters[DHCP_RX][DHCP_MESSAGE_TYPE_REQUEST], + DHCP_COUNTER_WIDTH, counters[DHCP_TX][DHCP_MESSAGE_TYPE_REQUEST], + DHCP_COUNTER_WIDTH, counters[DHCP_RX][DHCP_MESSAGE_TYPE_ACK], + DHCP_COUNTER_WIDTH, counters[DHCP_TX][DHCP_MESSAGE_TYPE_ACK] ); } @@ -703,12 +454,12 @@ int initialize_intf_mac_and_ip_addr(dhcp_device_context_t *context) strncpy(ifr.ifr_name, context->intf, sizeof(ifr.ifr_name) - 1); ifr.ifr_name[sizeof(ifr.ifr_name) - 1] = '\0'; - // Get v4 network address + // Get network address if (ioctl(fd, SIOCGIFADDR, &ifr) == -1) { syslog(LOG_ALERT, "ioctl: %s", explain_ioctl(fd, SIOCGIFADDR, &ifr)); break; } - context->ipv4 = ((struct sockaddr_in*) &ifr.ifr_addr)->sin_addr.s_addr; + context->ip = ((struct sockaddr_in*) &ifr.ifr_addr)->sin_addr.s_addr; // Get mac address if (ioctl(fd, SIOCGIFHWADDR, &ifr) == -1) { @@ -719,30 +470,6 @@ int initialize_intf_mac_and_ip_addr(dhcp_device_context_t *context) close(fd); - // Get v6 network address - memset(&context->ipv6, 0, sizeof(context->ipv6)); - struct ifaddrs *ifa, *ifa_tmp; - - if (getifaddrs(&ifa) == -1) { - syslog(LOG_ALERT, "getifaddrs failed"); - break; - } - - ifa_tmp = ifa; - while (ifa_tmp) { - // Check if current interface has a valid IPv6 address (not link local address) - if ((strncmp(ifa_tmp->ifa_name, context->intf, sizeof(context->intf)) == 0) && - (ifa_tmp->ifa_addr) && - (ifa_tmp->ifa_addr->sa_family == AF_INET6) && - (((struct sockaddr_in6*)(ifa_tmp->ifa_addr))->sin6_addr.__in6_u.__u6_addr16[0] != IPV6_LINK_LOCAL_PREFIX)) { - - struct sockaddr_in6 *in6 = (struct sockaddr_in6*) ifa_tmp->ifa_addr; - memcpy(&context->ipv6, &in6->sin6_addr, sizeof(context->ipv6)); - } - ifa_tmp = ifa_tmp->ifa_next; - } - freeifaddrs(ifa); - rv = 0; } while (0); @@ -750,41 +477,20 @@ int initialize_intf_mac_and_ip_addr(dhcp_device_context_t *context) } /** - * @code dhcp_device_get_ipv4(context); + * @code dhcp_device_get_ip(context); * * @brief Accessor method * * @param context pointer to device (interface) context * - * @return interface IPv4 + * @return interface IP */ -int dhcp_device_get_ipv4(dhcp_device_context_t *context, in_addr_t *ip) +int dhcp_device_get_ip(dhcp_device_context_t *context, in_addr_t *ip) { int rv = -1; if (context != NULL && ip != NULL) { - *ip = context->ipv4; - rv = 0; - } - - return rv; -} - -/** - * @code dhcp_device_get_ipv6(context); - * - * @brief Accessor method - * - * @param context pointer to device (interface) context - * - * @return interface IPv6 - */ -int dhcp_device_get_ipv6(dhcp_device_context_t *context, struct in6_addr *ip) -{ - int rv = -1; - - if (context != NULL && ip != NULL) { - *ip = context->ipv6; + *ip = context->ip; rv = 0; } @@ -822,8 +528,7 @@ int dhcp_device_init(dhcp_device_context_t **context, const char *intf, uint8_t dev_context->is_uplink = is_uplink; - memset(dev_context->counters.v4counters, 0, sizeof(dev_context->counters.v4counters)); - memset(dev_context->counters.v6counters, 0, sizeof(dev_context->counters.v6counters)); + memset(dev_context->counters, 0, sizeof(dev_context->counters)); *context = dev_context; rv = 0; @@ -838,15 +543,14 @@ int dhcp_device_init(dhcp_device_context_t **context, const char *intf, uint8_t } /** - * @code dhcp_device_start_capture(context, snaplen, base, giaddr_ip, v6_vlan_ip); + * @code dhcp_device_start_capture(context, snaplen, base, giaddr_ip); * * @brief starts packet capture on this interface */ int dhcp_device_start_capture(dhcp_device_context_t *context, size_t snaplen, struct event_base *base, - in_addr_t giaddr_ip, - struct in6_addr v6_vlan_ip) + in_addr_t giaddr_ip) { int rv = -1; @@ -856,20 +560,12 @@ int dhcp_device_start_capture(dhcp_device_context_t *context, break; } - // snaplen check for DHCPv4 size - if (dhcpv4_enabled && snaplen < UDPv4_START_OFFSET + sizeof(struct udphdr) + DHCPv4_OPTIONS_HEADER_SIZE) { - syslog(LOG_ALERT, "dhcp_device_start_capture(%s): snap length is too low to capture DHCPv4 options", context->intf); - break; - } - - // snaplen check for DHCPv6 size - DHCPv6 message type is the first byte of the udp payload - if (dhcpv6_enabled && snaplen < DHCPv6_START_OFFSET + 1) { - syslog(LOG_ALERT, "dhcp_device_start_capture(%s): snap length is too low to capture DHCPv6 option", context->intf); + if (snaplen < UDP_START_OFFSET + sizeof(struct udphdr) + DHCP_OPTIONS_HEADER_SIZE) { + syslog(LOG_ALERT, "dhcp_device_start_capture(%s): snap length is too low to capture DHCP options", context->intf); break; } context->giaddr_ip = giaddr_ip; - context->v6_vlan_ip = v6_vlan_ip; context->buffer = (uint8_t *) malloc(snaplen); if (context->buffer == NULL) { @@ -907,17 +603,17 @@ void dhcp_device_shutdown(dhcp_device_context_t *context) } /** - * @code dhcp_device_get_status(check_type, context, type); + * @code dhcp_device_get_status(check_type, context); * * @brief collects DHCP relay status info for a given interface. If context is null, it will report aggregate * status */ -dhcp_mon_status_t dhcp_device_get_status(dhcp_mon_check_t check_type, dhcp_device_context_t *context, dhcp_type_t type) +dhcp_mon_status_t dhcp_device_get_status(dhcp_mon_check_t check_type, dhcp_device_context_t *context) { dhcp_mon_status_t rv = DHCP_MON_STATUS_HEALTHY; if (context != NULL) { - rv = dhcp_device_check_health(check_type, context->counters.v4counters, context->counters.v6counters, type); + rv = dhcp_device_check_health(check_type, context->counters); } return rv; @@ -931,17 +627,9 @@ dhcp_mon_status_t dhcp_device_get_status(dhcp_mon_check_t check_type, dhcp_devic void dhcp_device_update_snapshot(dhcp_device_context_t *context) { if (context != NULL) { - if (dhcpv4_enabled) { - memcpy(context->counters.v4counters[DHCP_COUNTERS_SNAPSHOT], - context->counters.v4counters[DHCP_COUNTERS_CURRENT], - sizeof(context->counters.v4counters[DHCP_COUNTERS_SNAPSHOT])); - } - - if (dhcpv6_enabled) { - memcpy(context->counters.v6counters[DHCP_COUNTERS_SNAPSHOT], - context->counters.v6counters[DHCP_COUNTERS_CURRENT], - sizeof(context->counters.v6counters[DHCP_COUNTERS_SNAPSHOT])); - } + memcpy(context->counters[DHCP_COUNTERS_SNAPSHOT], + context->counters[DHCP_COUNTERS_CURRENT], + sizeof(context->counters[DHCP_COUNTERS_SNAPSHOT])); } } @@ -953,27 +641,6 @@ void dhcp_device_update_snapshot(dhcp_device_context_t *context) void dhcp_device_print_status(dhcp_device_context_t *context, dhcp_counters_type_t type) { if (context != NULL) { - dhcp_print_counters(context->intf, type, context->counters.v4counters[type], context->counters.v6counters[type]); + dhcp_print_counters(context->intf, type, context->counters[type]); } } - -/** - * @code dhcp_device_active_types(dhcpv4, dhcpv6); - * - * @brief update local variables with active protocols - */ -void dhcp_device_active_types(bool dhcpv4, bool dhcpv6) -{ - dhcpv4_enabled = dhcpv4; - dhcpv6_enabled = dhcpv6; -} - -/** - * @code dhcp_device_init_mgmt_intf(mgmt_intf_context); - * - * @brief assign context address of mgmt interface - */ -void dhcp_device_init_mgmt_intf(dhcp_device_context_t *mgmt_intf_context) -{ - mgmt_intf = mgmt_intf_context; -} diff --git a/src/dhcpmon/src/dhcp_device.h b/src/dhcpmon/src/dhcp_device.h index 433eb0907626..aa686f4e2718 100644 --- a/src/dhcpmon/src/dhcp_device.h +++ b/src/dhcpmon/src/dhcp_device.h @@ -18,43 +18,21 @@ /** - * DHCPv4 message types + * DHCP message types **/ typedef enum { - DHCPv4_MESSAGE_TYPE_DISCOVER = 1, - DHCPv4_MESSAGE_TYPE_OFFER = 2, - DHCPv4_MESSAGE_TYPE_REQUEST = 3, - DHCPv4_MESSAGE_TYPE_DECLINE = 4, - DHCPv4_MESSAGE_TYPE_ACK = 5, - DHCPv4_MESSAGE_TYPE_NAK = 6, - DHCPv4_MESSAGE_TYPE_RELEASE = 7, - DHCPv4_MESSAGE_TYPE_INFORM = 8, - - DHCPv4_MESSAGE_TYPE_COUNT -} dhcpv4_message_type_t; - -/** - * DHCPv6 message types - **/ -typedef enum -{ - DHCPv6_MESSAGE_TYPE_SOLICIT = 1, - DHCPv6_MESSAGE_TYPE_ADVERTISE = 2, - DHCPv6_MESSAGE_TYPE_REQUEST = 3, - DHCPv6_MESSAGE_TYPE_CONFIRM = 4, - DHCPv6_MESSAGE_TYPE_RENEW = 5, - DHCPv6_MESSAGE_TYPE_REBIND = 6, - DHCPv6_MESSAGE_TYPE_REPLY = 7, - DHCPv6_MESSAGE_TYPE_RELEASE = 8, - DHCPv6_MESSAGE_TYPE_DECLINE = 9, - DHCPv6_MESSAGE_TYPE_RECONFIGURE = 10, - DHCPv6_MESSAGE_TYPE_INFORMATION_REQUEST = 11, - DHCPv6_MESSAGE_TYPE_RELAY_FORWARD = 12, - DHCPv6_MESSAGE_TYPE_RELAY_REPLY = 13, - - DHCPv6_MESSAGE_TYPE_COUNT -} dhcpv6_message_type_t; + DHCP_MESSAGE_TYPE_DISCOVER = 1, + DHCP_MESSAGE_TYPE_OFFER = 2, + DHCP_MESSAGE_TYPE_REQUEST = 3, + DHCP_MESSAGE_TYPE_DECLINE = 4, + DHCP_MESSAGE_TYPE_ACK = 5, + DHCP_MESSAGE_TYPE_NAK = 6, + DHCP_MESSAGE_TYPE_RELEASE = 7, + DHCP_MESSAGE_TYPE_INFORM = 8, + + DHCP_MESSAGE_TYPE_COUNT +} dhcp_message_type_t; /** packet direction */ typedef enum @@ -82,13 +60,6 @@ typedef enum DHCP_MON_STATUS_INDETERMINATE, /** DHCP relay health could not be determined */ } dhcp_mon_status_t; -/** dhcp type */ -typedef enum -{ - DHCPv4_TYPE, - DHCPv6_TYPE, -} dhcp_type_t; - /** dhcp check type */ typedef enum { @@ -96,28 +67,19 @@ typedef enum DHCP_MON_CHECK_POSITIVE, /** Validate that received DORA packets are relayed */ } dhcp_mon_check_t; -typedef struct -{ - uint64_t v4counters[DHCP_COUNTERS_COUNT][DHCP_DIR_COUNT][DHCPv4_MESSAGE_TYPE_COUNT]; - /** current/snapshot counters of DHCPv4 packets */ - uint64_t v6counters[DHCP_COUNTERS_COUNT][DHCP_DIR_COUNT][DHCPv6_MESSAGE_TYPE_COUNT]; - /** current/snapshot counters of DHCPv6 packets */ -} counters_t; - /** DHCP device (interface) context */ typedef struct { int sock; /** Raw socket associated with this device/interface */ - in_addr_t ipv4; /** ipv4 network address of this device (interface) */ - struct in6_addr ipv6; /** ipv6 network address of this device (interface) */ + in_addr_t ip; /** network address of this device (interface) */ uint8_t mac[ETHER_ADDR_LEN]; /** hardware address of this device (interface) */ - in_addr_t giaddr_ip; /** Gateway IPv4 address */ - struct in6_addr v6_vlan_ip; /** Vlan IPv6 address */ + in_addr_t giaddr_ip; /** Gateway IP address */ uint8_t is_uplink; /** north interface? */ char intf[IF_NAMESIZE]; /** device (interface) name */ uint8_t *buffer; /** buffer used to read socket data */ size_t snaplen; /** snap length or buffer size */ - counters_t counters; /** counters for DHCPv4/6 packets */ + uint64_t counters[DHCP_COUNTERS_COUNT][DHCP_DIR_COUNT][DHCP_MESSAGE_TYPE_COUNT]; + /** current/snapshot counters of DHCP packets */ } dhcp_device_context_t; /** @@ -132,28 +94,16 @@ typedef struct int initialize_intf_mac_and_ip_addr(dhcp_device_context_t *context); /** - * @code dhcp_device_get_ipv4(context, ip); + * @code dhcp_device_get_ip(context, ip); * * @brief Accessor method * * @param context pointer to device (interface) context - * @param ip(out) pointer to device IPv4 + * @param ip(out) pointer to device IP * * @return 0 on success, otherwise for failure */ -int dhcp_device_get_ipv4(dhcp_device_context_t *context, in_addr_t *ip); - -/** - * @code dhcp_device_get_ipv6(context, ip); - * - * @brief Accessor method - * - * @param context pointer to device (interface) context - * @param ip(out) pointer to device IPv6 - * - * @return 0 on success, otherwise for failure - */ -int dhcp_device_get_ipv6(dhcp_device_context_t *context, struct in6_addr *ip); +int dhcp_device_get_ip(dhcp_device_context_t *context, in_addr_t *ip); /** * @code dhcp_device_get_aggregate_context(); @@ -180,7 +130,7 @@ int dhcp_device_init(dhcp_device_context_t **context, uint8_t is_uplink); /** - * @code dhcp_device_start_capture(context, snaplen, base, giaddr_ip, v6_vlan_ip); + * @code dhcp_device_start_capture(context, snaplen, base, giaddr_ip); * * @brief starts packet capture on this interface * @@ -188,15 +138,13 @@ int dhcp_device_init(dhcp_device_context_t **context, * @param snaplen length of packet capture * @param base pointer to libevent base * @param giaddr_ip gateway IP address - * @param v6_vlan_ip vlan IPv6 address * * @return 0 on success, otherwise for failure */ int dhcp_device_start_capture(dhcp_device_context_t *context, size_t snaplen, struct event_base *base, - in_addr_t giaddr_ip, - struct in6_addr v6_vlan_ip); + in_addr_t giaddr_ip); /** * @code dhcp_device_shutdown(context); @@ -210,18 +158,17 @@ int dhcp_device_start_capture(dhcp_device_context_t *context, void dhcp_device_shutdown(dhcp_device_context_t *context); /** - * @code dhcp_device_get_status(check_type, context, type); + * @code dhcp_device_get_status(check_type, context); * * @brief collects DHCP relay status info for a given interface. If context is null, it will report aggregate * status * * @param check_type Type of validation * @param context Device (interface) context - * @param type DHCP type * * @return DHCP_MON_STATUS_HEALTHY, DHCP_MON_STATUS_UNHEALTHY, or DHCP_MON_STATUS_INDETERMINATE */ -dhcp_mon_status_t dhcp_device_get_status(dhcp_mon_check_t check_type, dhcp_device_context_t *context, dhcp_type_t type); +dhcp_mon_status_t dhcp_device_get_status(dhcp_mon_check_t check_type, dhcp_device_context_t *context); /** * @code dhcp_device_update_snapshot(context); @@ -238,32 +185,10 @@ void dhcp_device_update_snapshot(dhcp_device_context_t *context); * @brief prints status counters to syslog. If context is null, it will print aggregate status * * @param context Device (interface) context - * @param type Counter type to be printed + * @param counters_type Counter type to be printed * * @return none */ void dhcp_device_print_status(dhcp_device_context_t *context, dhcp_counters_type_t type); -/** - * @code dhcp_device_active_types(dhcpv4, dhcpv6); - * - * @brief update local variables with active protocols - * - * @param dhcpv4 DHCPv4 enable flag - * @param dhcpv6 DHCPv6 enable flag - * - * @return none - */ -void dhcp_device_active_types(bool dhcpv4, bool dhcpv6); - -/** - * @code dhcp_device_init_mgmt_intf(mgmt_intf_context); - * - * @brief assign context address of mgmt interface - * - * @param mgmt_intf_context MGMT interface context struct address - * - * @return none - */ -void dhcp_device_init_mgmt_intf(dhcp_device_context_t *mgmt_intf_context); #endif /* DHCP_DEVICE_H_ */ diff --git a/src/dhcpmon/src/dhcp_devman.c b/src/dhcpmon/src/dhcp_devman.c index b36d926c1d5b..65484798dbd6 100644 --- a/src/dhcpmon/src/dhcp_devman.c +++ b/src/dhcpmon/src/dhcp_devman.c @@ -9,8 +9,6 @@ #include #include #include -#include -#include #include "dhcp_devman.h" @@ -37,8 +35,7 @@ static uint32_t dhcp_num_mgmt_intf = 0; /** On Device vlan interface IP address corresponding vlan downlink IP * This IP is used to filter Offer/Ack packet coming from DHCP server */ -static in_addr_t v4_vlan_ip = 0; -static struct in6_addr v6_vlan_ip = {0}; +static in_addr_t vlan_ip = 0; /* Device loopback interface ip, which will be used as the giaddr in dual tor setup. */ static in_addr_t loopback_ip = 0; @@ -139,8 +136,7 @@ int dhcp_devman_add_intf(const char *name, char intf_type) rv = dhcp_device_init(&dev->dev_context, dev->name, dev->is_uplink); if (rv == 0 && intf_type == 'd') { - rv = dhcp_device_get_ipv4(dev->dev_context, &v4_vlan_ip); - rv = dhcp_device_get_ipv6(dev->dev_context, &v6_vlan_ip); + rv = dhcp_device_get_ip(dev->dev_context, &vlan_ip); dhcp_device_context_t *agg_dev = dhcp_device_get_aggregate_context(); @@ -148,9 +144,6 @@ int dhcp_devman_add_intf(const char *name, char intf_type) strncpy(agg_dev->intf + sizeof(AGG_DEV_PREFIX) - 1, name, sizeof(agg_dev->intf) - sizeof(AGG_DEV_PREFIX)); agg_dev->intf[sizeof(agg_dev->intf) - 1] = '\0'; } - else if (rv == 0 && intf_type == 'm') { - dhcp_device_init_mgmt_intf(dev->dev_context); - } LIST_INSERT_HEAD(&intfs, dev, entry); } @@ -181,7 +174,7 @@ int dhcp_devman_setup_dual_tor_mode(const char *name) } if (initialize_intf_mac_and_ip_addr(&loopback_intf_context) == 0 && - dhcp_device_get_ipv4(&loopback_intf_context, &loopback_ip) == 0) { + dhcp_device_get_ip(&loopback_intf_context, &loopback_ip) == 0) { dual_tor_mode = 1; } else { syslog(LOG_ALERT, "failed to retrieve ip addr for loopback interface (%s)", name); @@ -204,13 +197,11 @@ int dhcp_devman_start_capture(size_t snaplen, struct event_base *base) if ((dhcp_num_south_intf == 1) && (dhcp_num_north_intf >= 1)) { LIST_FOREACH(int_ptr, &intfs, entry) { - rv = dhcp_device_start_capture(int_ptr->dev_context, snaplen, base, dual_tor_mode ? loopback_ip : v4_vlan_ip, v6_vlan_ip); + rv = dhcp_device_start_capture(int_ptr->dev_context, snaplen, base, dual_tor_mode ? loopback_ip : vlan_ip); if (rv == 0) { - char ipv6_addr[INET6_ADDRSTRLEN]; - inet_ntop(AF_INET6, &int_ptr->dev_context->ipv6, ipv6_addr, sizeof(ipv6_addr)); syslog(LOG_INFO, - "Capturing DHCP packets on interface %s, ipv4: 0x%08x, ipv6: %s, mac [%02x:%02x:%02x:%02x:%02x:%02x] \n", - int_ptr->name, int_ptr->dev_context->ipv4, ipv6_addr, int_ptr->dev_context->mac[0], + "Capturing DHCP packets on interface %s, ip: 0x%08x, mac [%02x:%02x:%02x:%02x:%02x:%02x] \n", + int_ptr->name, int_ptr->dev_context->ip, int_ptr->dev_context->mac[0], int_ptr->dev_context->mac[1], int_ptr->dev_context->mac[2], int_ptr->dev_context->mac[3], int_ptr->dev_context->mac[4], int_ptr->dev_context->mac[5]); } @@ -228,13 +219,13 @@ int dhcp_devman_start_capture(size_t snaplen, struct event_base *base) } /** - * @code dhcp_devman_get_status(check_type, context, type); + * @code dhcp_devman_get_status(check_type, context); * * @brief collects DHCP relay status info. */ -dhcp_mon_status_t dhcp_devman_get_status(dhcp_mon_check_t check_type, dhcp_device_context_t *context, dhcp_type_t type) +dhcp_mon_status_t dhcp_devman_get_status(dhcp_mon_check_t check_type, dhcp_device_context_t *context) { - return dhcp_device_get_status(check_type, context, type); + return dhcp_device_get_status(check_type, context); } /** @@ -276,13 +267,3 @@ void dhcp_devman_print_status(dhcp_device_context_t *context, dhcp_counters_type dhcp_device_print_status(context, type); } } - -/** - * @code dhcp_devman_active_types(dhcpv4, dhcpv6); - * - * @brief update local variables with active protocols - */ -void dhcp_devman_active_types(bool dhcpv4, bool dhcpv6) -{ - dhcp_device_active_types(dhcpv4, dhcpv6); -} diff --git a/src/dhcpmon/src/dhcp_devman.h b/src/dhcpmon/src/dhcp_devman.h index 6e30c654f69e..948e79cde4f4 100644 --- a/src/dhcpmon/src/dhcp_devman.h +++ b/src/dhcpmon/src/dhcp_devman.h @@ -87,17 +87,16 @@ int dhcp_devman_setup_dual_tor_mode(const char *name); int dhcp_devman_start_capture(size_t snaplen, struct event_base *base); /** - * @code dhcp_devman_get_status(check_type, context, type); + * @code dhcp_devman_get_status(check_type, context); * * @brief collects DHCP relay status info. * * @param check_type Type of validation * @param context pointer to device (interface) context - * @param type DHCP type * * @return DHCP_MON_STATUS_HEALTHY, DHCP_MON_STATUS_UNHEALTHY, or DHCP_MON_STATUS_INDETERMINATE */ -dhcp_mon_status_t dhcp_devman_get_status(dhcp_mon_check_t check_type, dhcp_device_context_t *context, dhcp_type_t type); +dhcp_mon_status_t dhcp_devman_get_status(dhcp_mon_check_t check_type, dhcp_device_context_t *context); /** * @code dhcp_devman_update_snapshot(context); @@ -120,16 +119,4 @@ void dhcp_devman_update_snapshot(dhcp_device_context_t *context); */ void dhcp_devman_print_status(dhcp_device_context_t *context, dhcp_counters_type_t type); -/** - * @code dhcp_devman_active_types(dhcpv4, dhcpv6); - * - * @brief update local variables with active protocols - * - * @param dhcpv4 flag indicating dhcpv4 is enabled - * @param dhcpv6 flag indicating dhcpv6 is enabled - * - * @return none - */ -void dhcp_devman_active_types(bool dhcpv4, bool dhcpv6); - #endif /* DHCP_DEVMAN_H_ */ diff --git a/src/dhcpmon/src/dhcp_mon.c b/src/dhcpmon/src/dhcp_mon.c index 2777b6484082..74d9869741d1 100644 --- a/src/dhcpmon/src/dhcp_mon.c +++ b/src/dhcpmon/src/dhcp_mon.c @@ -12,24 +12,16 @@ #include #include #include -#include #include "dhcp_mon.h" #include "dhcp_devman.h" -/** DHCP device/interface state counters */ -typedef struct -{ - int v4_count; /** count in the number of DHCPv4 unhealthy checks */ - int v6_count; /** count in the number of DHCPv6 unhealthy checks */ -} dhcp_mon_count_t; - /** DHCP device/interface state */ typedef struct { dhcp_mon_check_t check_type; /** check type */ dhcp_device_context_t* (*get_context)(); /** functor to a device context accessor function */ - dhcp_mon_count_t counters; /** count in the number of unhealthy checks */ + int count; /** count in the number of unhealthy checks */ const char *msg; /** message to be printed if unhealthy state is determined */ } dhcp_mon_state_t; @@ -37,10 +29,6 @@ typedef struct static int window_interval_sec = 18; /** dhcp_unhealthy_max_count max count of consecutive unhealthy statuses before reporting to syslog */ static int dhcp_unhealthy_max_count = 10; -/** DHCP versions flags */ -static bool dhcpv4_enabled; -static bool dhcpv6_enabled; - /** libevent base struct */ static struct event_base *base; /** libevent timeout event struct */ @@ -57,15 +45,13 @@ static dhcp_mon_state_t state_data[] = { [0] = { .check_type = DHCP_MON_CHECK_POSITIVE, .get_context = dhcp_devman_get_agg_dev, - .counters.v4_count = 0, - .counters.v6_count = 0, + .count = 0, .msg = "dhcpmon detected disparity in DHCP Relay behavior. Duration: %d (sec) for vlan: '%s'\n" }, [1] = { .check_type = DHCP_MON_CHECK_NEGATIVE, .get_context = dhcp_devman_get_mgmt_dev, - .counters.v4_count = 0, - .counters.v6_count = 0, + .count = 0, .msg = "dhcpmon detected DHCP packets traveling through mgmt interface (please check BGP routes.)" " Duration: %d (sec) for intf: '%s'\n" } @@ -92,89 +78,36 @@ static void signal_callback(evutil_socket_t fd, short event, void *arg) } /** - * @code check_dhcp_relay_health(state_data, dhcp_type); + * @code check_dhcp_relay_health(state_data); * * @brief check DHCP relay overall health * * @param state_data pointer to dhcpmon state data * - * @param type DHCP type - * * @return none */ -static void check_dhcp_relay_health(dhcp_mon_state_t *state_data, dhcp_type_t type) +static void check_dhcp_relay_health(dhcp_mon_state_t *state_data) { dhcp_device_context_t *context = state_data->get_context(); - dhcp_mon_status_t dhcp_mon_status = dhcp_devman_get_status(state_data->check_type, context, type); + dhcp_mon_status_t dhcp_mon_status = dhcp_devman_get_status(state_data->check_type, context); switch (dhcp_mon_status) { case DHCP_MON_STATUS_UNHEALTHY: - switch (type) - { - case DHCPv4_TYPE: - if (++state_data->counters.v4_count > dhcp_unhealthy_max_count) { - syslog(LOG_ALERT, state_data->msg, state_data->counters.v4_count * window_interval_sec, context->intf); - dhcp_devman_print_status(context, DHCP_COUNTERS_SNAPSHOT); - dhcp_devman_print_status(context, DHCP_COUNTERS_CURRENT); - } - break; - case DHCPv6_TYPE: - if (++state_data->counters.v6_count > dhcp_unhealthy_max_count) { - syslog(LOG_ALERT, state_data->msg, state_data->counters.v6_count * window_interval_sec, context->intf); - dhcp_devman_print_status(context, DHCP_COUNTERS_SNAPSHOT); - dhcp_devman_print_status(context, DHCP_COUNTERS_CURRENT); - } - break; - - default: - syslog(LOG_ERR, "Unknown DHCP type %d\n", type); - break; + if (++state_data->count > dhcp_unhealthy_max_count) { + syslog(LOG_ALERT, state_data->msg, state_data->count * window_interval_sec, context->intf); + dhcp_devman_print_status(context, DHCP_COUNTERS_SNAPSHOT); + dhcp_devman_print_status(context, DHCP_COUNTERS_CURRENT); } break; - case DHCP_MON_STATUS_HEALTHY: - switch (type) - { - case DHCPv4_TYPE: - state_data->counters.v4_count = 0; - break; - case DHCPv6_TYPE: - state_data->counters.v6_count = 0; - break; - default: - syslog(LOG_ERR, "Unknown DHCP type %d\n", type); - break; - } + state_data->count = 0; break; - case DHCP_MON_STATUS_INDETERMINATE: - switch (type) - { - case DHCPv4_TYPE: - if (state_data->counters.v4_count) { - if (++state_data->counters.v4_count > dhcp_unhealthy_max_count) { - syslog(LOG_ALERT, state_data->msg, state_data->counters.v4_count * window_interval_sec, context->intf); - dhcp_devman_print_status(context, DHCP_COUNTERS_SNAPSHOT); - dhcp_devman_print_status(context, DHCP_COUNTERS_CURRENT); - } - } - break; - case DHCPv6_TYPE: - if (state_data->counters.v6_count) { - if (++state_data->counters.v6_count > dhcp_unhealthy_max_count) { - syslog(LOG_ALERT, state_data->msg, state_data->counters.v6_count * window_interval_sec, context->intf); - dhcp_devman_print_status(context, DHCP_COUNTERS_SNAPSHOT); - dhcp_devman_print_status(context, DHCP_COUNTERS_CURRENT); - } - } - break; - default: - syslog(LOG_ERR, "Unknown DHCP type %d\n", type); - break; + if (state_data->count) { + state_data->count++; } break; - default: syslog(LOG_ERR, "DHCP Relay returned unknown status %d\n", dhcp_mon_status); break; @@ -195,12 +128,7 @@ static void check_dhcp_relay_health(dhcp_mon_state_t *state_data, dhcp_type_t ty static void timeout_callback(evutil_socket_t fd, short event, void *arg) { for (uint8_t i = 0; i < sizeof(state_data) / sizeof(*state_data); i++) { - if (dhcpv4_enabled) { - check_dhcp_relay_health(&state_data[i], DHCPv4_TYPE); - } - if (dhcpv6_enabled) { - check_dhcp_relay_health(&state_data[i], DHCPv6_TYPE); - } + check_dhcp_relay_health(&state_data[i]); } dhcp_devman_update_snapshot(NULL); @@ -213,17 +141,13 @@ static void timeout_callback(evutil_socket_t fd, short event, void *arg) * seconds. It also writes to syslog when dhcp relay has been unhealthy for consecutive max_count checks. * */ -int dhcp_mon_init(int window_sec, int max_count, bool dhcpv4, bool dhcpv6) +int dhcp_mon_init(int window_sec, int max_count) { int rv = -1; do { window_interval_sec = window_sec; dhcp_unhealthy_max_count = max_count; - dhcpv4_enabled = dhcpv4; - dhcpv6_enabled = dhcpv6; - - dhcp_devman_active_types(dhcpv4, dhcpv6); base = event_base_new(); if (base == NULL) { diff --git a/src/dhcpmon/src/dhcp_mon.h b/src/dhcpmon/src/dhcp_mon.h index facd46da6860..ae8911ab51fc 100644 --- a/src/dhcpmon/src/dhcp_mon.h +++ b/src/dhcpmon/src/dhcp_mon.h @@ -17,12 +17,10 @@ * * @param window_sec time interval between health checks * @param max_count max count of consecutive unhealthy statuses before reporting to syslog - * @param dhcpv4 flag indicating dhcpv4 is enabled - * @param dhcpv6 flag indicating dhcpv6 is enabled * * @return 0 upon success, otherwise upon failure */ -int dhcp_mon_init(int window_sec, int max_count, bool dhcpv4, bool dhcpv6); +int dhcp_mon_init(int window_sec, int max_count); /** * @code dhcp_mon_shutdown(); diff --git a/src/dhcpmon/src/main.c b/src/dhcpmon/src/main.c index 1cf931821495..29bc534accf0 100644 --- a/src/dhcpmon/src/main.c +++ b/src/dhcpmon/src/main.c @@ -16,7 +16,6 @@ #include #include #include -#include #include "dhcp_mon.h" #include "dhcp_devman.h" @@ -42,8 +41,7 @@ static const uint32_t dhcpmon_default_unhealthy_max_count = 10; static void usage(const char *prog) { printf("Usage: %s -id {-iu }+ -im [-u ]" - "[-w ] [-c ] [-s ]" - "[-4 ] [-6 ] [-d]\n", prog); + "[-w ] [-c ] [-s ] [-d]\n", prog); printf("where\n"); printf("\tsouth interface: is a vlan interface,\n"); printf("\tnorth interface: is a TOR-T1 interface,\n"); @@ -114,8 +112,6 @@ int main(int argc, char **argv) int max_unhealthy_count = dhcpmon_default_unhealthy_max_count; size_t snaplen = dhcpmon_default_snaplen; int make_daemon = 0; - bool dhcpv4_enabled = false; - bool dhcpv6_enabled = false; setlogmask(LOG_UPTO(LOG_INFO)); openlog(basename(argv[0]), LOG_CONS | LOG_PID | LOG_NDELAY, LOG_DAEMON); @@ -159,14 +155,6 @@ int main(int argc, char **argv) max_unhealthy_count = atoi(argv[i + 1]); i += 2; break; - case '4': - dhcpv4_enabled = true; - i++; - break; - case '6': - dhcpv6_enabled = true; - i++; - break; default: fprintf(stderr, "%s: %c: Unknown option\n", basename(argv[0]), argv[i][1]); usage(basename(argv[0])); @@ -177,11 +165,7 @@ int main(int argc, char **argv) dhcpmon_daemonize(); } - if (!dhcpv4_enabled && !dhcpv6_enabled) { - dhcpv4_enabled = true; - } - - if ((dhcp_mon_init(window_interval, max_unhealthy_count, dhcpv4_enabled, dhcpv6_enabled) == 0) && + if ((dhcp_mon_init(window_interval, max_unhealthy_count) == 0) && (dhcp_mon_start(snaplen) == 0)) { rv = EXIT_SUCCESS; diff --git a/src/linkmgrd b/src/linkmgrd index f00efefd3099..83dfc992d1b2 160000 --- a/src/linkmgrd +++ b/src/linkmgrd @@ -1 +1 @@ -Subproject commit f00efefd30995de447fd6932369cb5be250ddf90 +Subproject commit 83dfc992d1b24b01bb9b125cc86a8ce63ba060f6 diff --git a/src/scapy b/src/scapy new file mode 160000 index 000000000000..8b63d73a1726 --- /dev/null +++ b/src/scapy @@ -0,0 +1 @@ +Subproject commit 8b63d73a17266bae2a61513ea97ded5283a7ccd3 diff --git a/src/scapy.patch/0001-Fix-version-string-generation-when-scapy-is-a-submod.patch b/src/scapy.patch/0001-Fix-version-string-generation-when-scapy-is-a-submod.patch new file mode 100644 index 000000000000..37f5253db0cc --- /dev/null +++ b/src/scapy.patch/0001-Fix-version-string-generation-when-scapy-is-a-submod.patch @@ -0,0 +1,27 @@ +From 988c808af6065b740006aef0e94496821d41fb98 Mon Sep 17 00:00:00 2001 +From: Stepan Blyschak +Date: Mon, 4 Apr 2022 09:57:39 +0000 +Subject: [PATCH] Fix version string generation when scapy is a submodule + +Signed-off-by: Stepan Blyschak +--- + scapy/__init__.py | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/scapy/__init__.py b/scapy/__init__.py +index f920151e..2adbea19 100644 +--- a/scapy/__init__.py ++++ b/scapy/__init__.py +@@ -42,9 +42,6 @@ def _version_from_git_describe(): + :raises CalledProcessError: if git is unavailable + :return: Scapy's latest tag + """ +- if not os.path.isdir(os.path.join(os.path.dirname(_SCAPY_PKG_DIR), '.git')): # noqa: E501 +- raise ValueError('not in scapy git repo') +- + def _git(cmd): + # type: (str) -> str + process = subprocess.Popen( +-- +2.14.1 + diff --git a/src/scapy.patch/0002-Check-if-the-network-interface-still-exists.patch b/src/scapy.patch/0002-Check-if-the-network-interface-still-exists.patch new file mode 100644 index 000000000000..c42c12e1a8aa --- /dev/null +++ b/src/scapy.patch/0002-Check-if-the-network-interface-still-exists.patch @@ -0,0 +1,42 @@ +From 7ffd8101c1e535f9c3225db2c319958a64412686 Mon Sep 17 00:00:00 2001 +From: Guillaume Valadon +Date: Tue, 14 Sep 2021 19:34:43 +0200 +Subject: [PATCH] Check if the network interface still exists + +Signed-off-by: Stepan Blyschak +--- + scapy/arch/linux.py | 18 +++++++++++------- + 1 file changed, 11 insertions(+), 7 deletions(-) + +diff --git a/scapy/arch/linux.py b/scapy/arch/linux.py +index 94fac8f0..b86e98ab 100644 +--- a/scapy/arch/linux.py ++++ b/scapy/arch/linux.py +@@ -414,13 +414,17 @@ class LinuxInterfaceProvider(InterfaceProvider): + data = {} + ips = in6_getifaddr() + for i in _get_if_list(): +- ifflags = struct.unpack("16xH14x", get_if(i, SIOCGIFFLAGS))[0] +- index = get_if_index(i) +- mac = scapy.utils.str2mac( +- get_if_raw_hwaddr(i, siocgifhwaddr=SIOCGIFHWADDR)[1] +- ) +- ip = None # type: Optional[str] +- ip = inet_ntop(socket.AF_INET, get_if_raw_addr(i)) ++ try: ++ ifflags = struct.unpack("16xH14x", get_if(i, SIOCGIFFLAGS))[0] ++ index = get_if_index(i) ++ mac = scapy.utils.str2mac( ++ get_if_raw_hwaddr(i, siocgifhwaddr=SIOCGIFHWADDR)[1] ++ ) ++ ip = None # type: Optional[str] ++ ip = inet_ntop(socket.AF_INET, get_if_raw_addr(i)) ++ except IOError: ++ warning("Interface %s does not exist!", i) ++ continue + if ip == "0.0.0.0": + ip = None + ifflags = FlagValue(ifflags, _iff_flags) +-- +2.14.1 + diff --git a/src/scapy.patch/series b/src/scapy.patch/series new file mode 100644 index 000000000000..d64f20f136c1 --- /dev/null +++ b/src/scapy.patch/series @@ -0,0 +1,2 @@ +0001-Fix-version-string-generation-when-scapy-is-a-submod.patch +0002-Check-if-the-network-interface-still-exists.patch diff --git a/src/sonic-build-hooks/scripts/buildinfo_base.sh b/src/sonic-build-hooks/scripts/buildinfo_base.sh index 3873d1362926..e1ef80b01162 100755 --- a/src/sonic-build-hooks/scripts/buildinfo_base.sh +++ b/src/sonic-build-hooks/scripts/buildinfo_base.sh @@ -169,6 +169,10 @@ run_pip_command() elif [[ "$para" == *.whl ]]; then package_name=$(echo $para | cut -d- -f1 | tr _ .) $SUDO sed "/^${package_name}==/d" -i $tmp_version_file + elif [[ "$para" == *==* ]]; then + # fix pip package constraint conflict issue + package_name=$(echo $para | cut -d= -f1) + $SUDO sed "/^${package_name}==/d" -i $tmp_version_file fi done diff --git a/src/sonic-config-engine/sonic-cfggen b/src/sonic-config-engine/sonic-cfggen index bf93ad849fcb..aebd4d0544f5 100755 --- a/src/sonic-config-engine/sonic-cfggen +++ b/src/sonic-config-engine/sonic-cfggen @@ -247,6 +247,19 @@ def _get_jinja2_env(paths): return env +def _must_field_by_yang(data, table, must_fields): + """ + Check if table contains must field based on yang definition + """ + if table not in data: + return + + for must_field in must_fields: + for _, fields in data[table].items(): + if must_field not in fields: + print(must_field, 'is a must field in', table, file=sys.stderr) + sys.exit(1) + def main(): parser=argparse.ArgumentParser(description="Render configuration file from minigraph data and jinja2 template.") group = parser.add_mutually_exclusive_group() @@ -335,6 +348,8 @@ def main(): deep_update(data, parse_xml(minigraph, platform, asic_name=asic_name)) else: deep_update(data, parse_xml(minigraph, port_config_file=args.port_config, asic_name=asic_name, hwsku_config_file=args.hwsku_config)) + # check if minigraph parser has speed and lanes in PORT table + _must_field_by_yang(data, 'PORT', ['speed', 'lanes']) if args.device_description is not None: deep_update(data, parse_device_desc_xml(args.device_description)) diff --git a/src/sonic-config-engine/tests/multi_npu_data/sample-minigraph-noportchannel.xml b/src/sonic-config-engine/tests/multi_npu_data/sample-minigraph-noportchannel.xml index 460f71e21c2a..6ec84dc4fe31 100644 --- a/src/sonic-config-engine/tests/multi_npu_data/sample-minigraph-noportchannel.xml +++ b/src/sonic-config-engine/tests/multi_npu_data/sample-minigraph-noportchannel.xml @@ -1119,6 +1119,294 @@ 0 40000 + + DeviceInterface + + true + 1 + Ethernet-BP0 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP4 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP8 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP12 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP16 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP20 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP24 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP28 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP256 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP260 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP264 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP268 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP272 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP276 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP280 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP284 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP384 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP388 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP392 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP396 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP400 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP404 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP408 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP412 + + false + 0 + 0 + 40000 + true 0 diff --git a/src/sonic-config-engine/tests/multi_npu_data/sample-minigraph.xml b/src/sonic-config-engine/tests/multi_npu_data/sample-minigraph.xml index 5dac8e95bf1a..935d2c0c833a 100644 --- a/src/sonic-config-engine/tests/multi_npu_data/sample-minigraph.xml +++ b/src/sonic-config-engine/tests/multi_npu_data/sample-minigraph.xml @@ -1105,6 +1105,294 @@ 0 40000 + + DeviceInterface + + true + 1 + Ethernet-BP0 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP4 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP8 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP12 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP16 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP20 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP24 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP28 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP256 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP260 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP264 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP268 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP272 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP276 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP280 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP284 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP384 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP388 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP392 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP396 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP400 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP404 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP408 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet-BP412 + + false + 0 + 0 + 40000 + true 0 diff --git a/src/sonic-config-engine/tests/multi_npu_data/sample_port_config.ini b/src/sonic-config-engine/tests/multi_npu_data/sample_port_config.ini new file mode 100644 index 000000000000..d2cdb5fedd27 --- /dev/null +++ b/src/sonic-config-engine/tests/multi_npu_data/sample_port_config.ini @@ -0,0 +1,34 @@ +# name lanes alias index asic_port_name role +Ethernet0 33,34,35,36 Ethernet1/1 0 Eth0-ASIC0 Ext +Ethernet4 29,30,31,32 Ethernet1/2 1 Eth1-ASIC0 Ext +Ethernet8 41,42,43,44 Ethernet1/3 2 Eth2-ASIC0 Ext +Ethernet12 37,38,39,40 Ethernet1/4 3 Eth3-ASIC0 Ext +Ethernet-BP0 13,14,15,16 Eth4-ASIC0 4 Eth4-ASIC0 Int +Ethernet-BP4 17,18,19,20 Eth5-ASIC0 5 Eth5-ASIC0 Int +Ethernet-BP8 21,22,23,24 Eth6-ASIC0 6 Eth6-ASIC0 Int +Ethernet-BP12 25,26,27,28 Eth7-ASIC0 7 Eth7-ASIC0 Int +Ethernet16 33,34,35,36 Ethernet1/5 8 Eth0-ASIC1 Ext +Ethernet20 29,30,31,32 Ethernet1/6 9 Eth1-ASIC1 Ext +Ethernet24 41,42,43,44 Ethernet1/7 10 Eth2-ASIC1 Ext +Ethernet28 37,38,39,40 Ethernet1/8 11 Eth3-ASIC1 Ext +Ethernet-BP16 13,14,15,16 Eth4-ASIC1 12 Eth4-ASIC1 Int +Ethernet-BP20 17,18,19,20 Eth5-ASIC1 13 Eth5-ASIC1 Int +Ethernet-BP24 21,22,23,24 Eth6-ASIC1 14 Eth6-ASIC1 Int +Ethernet-BP28 25,26,27,28 Eth7-ASIC1 15 Eth7-ASIC1 Int +Ethernet-BP256 61,62,63,64 Eth0-ASIC2 16 Eth0-ASIC2 Int +Ethernet-BP260 57,58,59,60 Eth1-ASIC2 17 Eth1-ASIC2 Int +Ethernet-BP264 53,54,55,56 Eth2-ASIC2 18 Eth2-ASIC2 Int +Ethernet-BP268 49,50,51,52 Eth3-ASIC2 19 Eth3-ASIC2 Int +Ethernet-BP272 45,46,47,48 Eth4-ASIC2 20 Eth4-ASIC2 Int +Ethernet-BP276 41,42,43,44 Eth5-ASIC2 21 Eth5-ASIC2 Int +Ethernet-BP280 37,38,39,40 Eth6-ASIC2 22 Eth6-ASIC2 Int +Ethernet-BP284 33,34,35,36 Eth7-ASIC2 23 Eth7-ASIC2 Int +Ethernet-BP384 29,30,31,32 Eth0-ASIC3 24 Eth0-ASIC3 Int +Ethernet-BP388 25,26,27,28 Eth1-ASIC3 25 Eth1-ASIC3 Int +Ethernet-BP392 21,22,23,24 Eth2-ASIC3 26 Eth2-ASIC3 Int +Ethernet-BP396 17,18,19,20 Eth3-ASIC3 27 Eth3-ASIC3 Int +Ethernet-BP400 13,14,15,16 Eth4-ASIC3 28 Eth4-ASIC3 Int +Ethernet-BP404 9,10,11,12 Eth5-ASIC3 29 Eth5-ASIC3 Int +Ethernet-BP408 5,6,7,8 Eth6-ASIC3 30 Eth6-ASIC3 Int +Ethernet-BP412 1,2,3,4 Eth7-ASIC3 31 Eth7-ASIC3 Int + diff --git a/src/sonic-config-engine/tests/pc-test-graph.xml b/src/sonic-config-engine/tests/pc-test-graph.xml index 814686d8ff06..4a7ecabaf9f4 100644 --- a/src/sonic-config-engine/tests/pc-test-graph.xml +++ b/src/sonic-config-engine/tests/pc-test-graph.xml @@ -202,6 +202,400 @@ + + + + + DeviceInterface + + true + 1 + fortyGigE0/0 + + false + 0 + 0 + 10000 + + + DeviceInterface + + true + 1 + fortyGigE0/4 + + false + 0 + 0 + 25000 + + + DeviceInterface + + true + 1 + fortyGigE0/8 + + false + 0 + 0 + 40000 + Interface description + + + DeviceInterface + + true + 1 + fortyGigE0/12 + + false + 0 + 0 + 100000 + Interface description + + + DeviceInterface + + true + 1 + fortyGigE0/16 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/20 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/24 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/28 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/32 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/36 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/40 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/44 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/48 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/52 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/56 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/60 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/64 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/68 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/72 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/76 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/80 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/84 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/88 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/92 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/96 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/100 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/104 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/108 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/112 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/116 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/120 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/124 + + false + 0 + 0 + 100000 + + + Force10-S6000 + + + diff --git a/src/sonic-config-engine/tests/radv-test-sample-graph.xml b/src/sonic-config-engine/tests/radv-test-sample-graph.xml index 6945c8e175d2..94cb73d67464 100644 --- a/src/sonic-config-engine/tests/radv-test-sample-graph.xml +++ b/src/sonic-config-engine/tests/radv-test-sample-graph.xml @@ -90,7 +90,7 @@ - 0 + 1 BGPMonitor @@ -508,6 +508,374 @@ + + + + + DeviceInterface + + true + 1 + Ethernet0 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet8 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet12 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet16 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet20 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet24 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet28 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet32 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet36 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet40 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet44 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet48 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet52 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet56 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet60 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet64 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet68 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet72 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet76 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet80 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet84 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet88 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet92 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet96 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet100 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet104 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet108 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet112 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet116 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet120 + + false + 0 + 0 + 40000 + + + Force10-S6000 + + + diff --git a/src/sonic-config-engine/tests/sample-arista-7050-t0-minigraph.xml b/src/sonic-config-engine/tests/sample-arista-7050-t0-minigraph.xml index 4d216b30f203..4d79d6f2c457 100644 --- a/src/sonic-config-engine/tests/sample-arista-7050-t0-minigraph.xml +++ b/src/sonic-config-engine/tests/sample-arista-7050-t0-minigraph.xml @@ -463,6 +463,66 @@ + + DeviceInterface + + true + 1 + Ethernet0 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet1 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet2 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet3 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet4 + + false + 0 + 0 + 40000 + DeviceInterface diff --git a/src/sonic-config-engine/tests/sample-arista-7050cx3-dualtor-minigraph.xml b/src/sonic-config-engine/tests/sample-arista-7050cx3-dualtor-minigraph.xml new file mode 100644 index 000000000000..9ffb8230a6bf --- /dev/null +++ b/src/sonic-config-engine/tests/sample-arista-7050cx3-dualtor-minigraph.xml @@ -0,0 +1,2369 @@ + + + + + + false + str2-7050cx3-acs-10 + 10.0.0.56 + ARISTA01T1 + 10.0.0.57 + 1 + 10 + 3 + + + str2-7050cx3-acs-10 + FC00::71 + ARISTA01T1 + FC00::72 + 1 + 10 + 3 + + + false + str2-7050cx3-acs-10 + 10.0.0.58 + ARISTA02T1 + 10.0.0.59 + 1 + 10 + 3 + + + str2-7050cx3-acs-10 + FC00::75 + ARISTA02T1 + FC00::76 + 1 + 10 + 3 + + + false + str2-7050cx3-acs-10 + 10.0.0.60 + ARISTA03T1 + 10.0.0.61 + 1 + 10 + 3 + + + str2-7050cx3-acs-10 + FC00::79 + ARISTA03T1 + FC00::7A + 1 + 10 + 3 + + + false + str2-7050cx3-acs-10 + 10.0.0.62 + ARISTA04T1 + 10.0.0.63 + 1 + 10 + 3 + + + str2-7050cx3-acs-10 + FC00::7D + ARISTA04T1 + FC00::7E + 1 + 10 + 3 + + + + + 65100 + str2-7050cx3-acs-10 + + +
10.0.0.57
+ + + +
+ +
10.0.0.59
+ + + +
+ +
10.0.0.61
+ + + +
+ +
10.0.0.63
+ + + +
+ + BGPPeer +
10.1.0.32
+ + + + BGPSLBPassive + 10.255.0.0/25 +
+ + BGPPeer +
10.1.0.32
+ + + + BGPVac + 192.168.0.0/21 +
+
+ +
+ + 64600 + ARISTA01T1 + + + + 64600 + ARISTA02T1 + + + + 64600 + ARISTA03T1 + + + + 64600 + ARISTA04T1 + + +
+
+ + + + + + HostIP + Loopback0 + + 10.1.0.32/32 + + 10.1.0.32/32 + + + HostIP1 + Loopback0 + + FC00:1::32/128 + + FC00:1::32/128 + + + HostIP2 + Loopback1 + + 10.1.0.34/32 + + 10.1.0.34/32 + + + HostIP3 + Loopback1 + + FC00:1::34/128 + + FC00:1::34/128 + + HostIP6 + Loopback3 + + 10.1.0.38/32 + + 10.1.0.38/32 + + + HostIP7 + Loopback3 + + FC00:1::38/128 + + FC00:1::38/128 + + HostIP4 + Loopback2 + + 10.1.0.36/32 + + 10.1.0.36/32 + + + HostIP5 + Loopback2 + + FC00:1::36/128 + + FC00:1::36/128 + + + + HostIP + eth0 + + 10.3.146.122/23 + + 10.3.146.122/23 + + + V6HostIP + eth0 + + FC00:2::32/64 + + FC00:2::32/64 + + + + + + + str2-7050cx3-acs-10 + + + PortChannel101 + Ethernet7/1;Ethernet8/1 + + + + PortChannel102 + Ethernet9/1;Ethernet10/1 + + + + PortChannel103 + Ethernet23/1;Ethernet24/1 + + + + PortChannel104 + Ethernet25/1;Ethernet26/1 + + + + + + + + + Vlan1000 + Ethernet1/1;Ethernet2/1;Ethernet3/1;Ethernet4/1;Ethernet5/1;Ethernet6/1;Ethernet11/1;Ethernet12/1;Ethernet13/1;Ethernet14/1;Ethernet15/1;Ethernet16/1;Ethernet17/1;Ethernet18/1;Ethernet19/1;Ethernet20/1;Ethernet21/1;Ethernet22/1;Ethernet27/1;Ethernet28/1;Ethernet29/1;Ethernet30/1;Ethernet31/1;Ethernet32/1 + False + 0.0.0.0/0 + 192.0.0.1;192.0.0.2;192.0.0.3;192.0.0.4;192.0.0.5;192.0.0.6;192.0.0.7;192.0.0.8;192.0.0.9;192.0.0.10;192.0.0.11;192.0.0.12;192.0.0.13;192.0.0.14;192.0.0.15;192.0.0.16;192.0.0.17;192.0.0.18;192.0.0.19;192.0.0.20;192.0.0.21;192.0.0.22;192.0.0.23;192.0.0.24;192.0.0.25;192.0.0.26;192.0.0.27;192.0.0.28;192.0.0.29;192.0.0.30;192.0.0.31;192.0.0.32;192.0.0.33;192.0.0.34;192.0.0.35;192.0.0.36;192.0.0.37;192.0.0.38;192.0.0.39;192.0.0.40;192.0.0.41;192.0.0.42;192.0.0.43;192.0.0.44;192.0.0.45;192.0.0.46;192.0.0.47;192.0.0.48 + fc02:2000::1;fc02:2000::2;fc02:2000::3;fc02:2000::4 + 1000 + 1000 + 192.168.0.0/21 + 00:aa:bb:cc:dd:ee + + + + + + PortChannel101 + 10.0.0.56/31 + + + + PortChannel101 + FC00::71/126 + + + + PortChannel102 + 10.0.0.58/31 + + + + PortChannel102 + FC00::75/126 + + + + PortChannel103 + 10.0.0.60/31 + + + + PortChannel103 + FC00::79/126 + + + + PortChannel104 + 10.0.0.62/31 + + + + PortChannel104 + FC00::7D/126 + + + + Vlan1000 + 192.168.0.1/21 + + + + Vlan1000 + fc02:1000::1/64 + + + + + + NTP_ACL + NTP + NTP + + + SNMP_ACL + SNMP + SNMP + + + ERSPAN + Everflow + Everflow + + + ERSPANV6 + EverflowV6 + EverflowV6 + + + VTY_LINE + ssh-only + SSH + + + + + + + + + + DeviceInterfaceLink + ARISTA01T1 + Ethernet1 + str2-7050cx3-acs-10 + Ethernet7/1 + + + DeviceInterfaceLink + ARISTA01T1 + Ethernet2 + str2-7050cx3-acs-10 + Ethernet8/1 + + + DeviceInterfaceLink + ARISTA02T1 + Ethernet1 + str2-7050cx3-acs-10 + Ethernet9/1 + + + DeviceInterfaceLink + ARISTA02T1 + Ethernet2 + str2-7050cx3-acs-10 + Ethernet10/1 + + + DeviceInterfaceLink + ARISTA03T1 + Ethernet1 + str2-7050cx3-acs-10 + Ethernet23/1 + + + DeviceInterfaceLink + ARISTA03T1 + Ethernet2 + str2-7050cx3-acs-10 + Ethernet24/1 + + + DeviceInterfaceLink + ARISTA04T1 + Ethernet1 + str2-7050cx3-acs-10 + Ethernet25/1 + + + DeviceInterfaceLink + ARISTA04T1 + Ethernet2 + str2-7050cx3-acs-10 + Ethernet26/1 + + + DeviceInterfaceLink + str2-7050cx3-acs-10 + Ethernet1/1 + Servers0 + eth0 + + + DeviceInterfaceLink + str2-7050cx3-acs-10 + Ethernet2/1 + Servers1 + eth0 + + + DeviceInterfaceLink + str2-7050cx3-acs-10 + Ethernet3/1 + Servers2 + eth0 + + + DeviceInterfaceLink + str2-7050cx3-acs-10 + Ethernet4/1 + Servers3 + eth0 + + + DeviceInterfaceLink + str2-7050cx3-acs-10 + Ethernet5/1 + Servers4 + eth0 + + + DeviceInterfaceLink + str2-7050cx3-acs-10 + Ethernet6/1 + Servers5 + eth0 + + + DeviceInterfaceLink + str2-7050cx3-acs-10 + Ethernet11/1 + Servers6 + eth0 + + + DeviceInterfaceLink + str2-7050cx3-acs-10 + Ethernet12/1 + Servers7 + eth0 + + + DeviceInterfaceLink + str2-7050cx3-acs-10 + Ethernet13/1 + Servers8 + eth0 + + + DeviceInterfaceLink + str2-7050cx3-acs-10 + Ethernet14/1 + Servers9 + eth0 + + + DeviceInterfaceLink + str2-7050cx3-acs-10 + Ethernet15/1 + Servers10 + eth0 + + + DeviceInterfaceLink + str2-7050cx3-acs-10 + Ethernet16/1 + Servers11 + eth0 + + + DeviceInterfaceLink + str2-7050cx3-acs-10 + Ethernet17/1 + Servers12 + eth0 + + + DeviceInterfaceLink + str2-7050cx3-acs-10 + Ethernet18/1 + Servers13 + eth0 + + + DeviceInterfaceLink + str2-7050cx3-acs-10 + Ethernet19/1 + Servers14 + eth0 + + + DeviceInterfaceLink + str2-7050cx3-acs-10 + Ethernet20/1 + Servers15 + eth0 + + + DeviceInterfaceLink + str2-7050cx3-acs-10 + Ethernet21/1 + Servers16 + eth0 + + + DeviceInterfaceLink + str2-7050cx3-acs-10 + Ethernet22/1 + Servers17 + eth0 + + + DeviceInterfaceLink + str2-7050cx3-acs-10 + Ethernet27/1 + Servers18 + eth0 + + + DeviceInterfaceLink + str2-7050cx3-acs-10 + Ethernet28/1 + Servers19 + eth0 + + + DeviceInterfaceLink + str2-7050cx3-acs-10 + Ethernet29/1 + Servers20 + eth0 + + + DeviceInterfaceLink + str2-7050cx3-acs-10 + Ethernet30/1 + Servers21 + eth0 + + + DeviceInterfaceLink + str2-7050cx3-acs-10 + Ethernet31/1 + Servers22 + eth0 + + + DeviceInterfaceLink + str2-7050cx3-acs-10 + Ethernet32/1 + Servers23 + eth0 + + + LogicalLink + str2-7050cx3-acs-10 + Ethernet1/1 + str2-7050cx3-acs-10-Servers0-SC + U + + + LogicalLink + str2-7050cx3-acs-10 + Ethernet2/1 + str2-7050cx3-acs-10-Servers1-SC + U + + + LogicalLink + str2-7050cx3-acs-10 + Ethernet3/1 + str2-7050cx3-acs-10-Servers2-SC + U + + + LogicalLink + str2-7050cx3-acs-10 + Ethernet4/1 + str2-7050cx3-acs-10-Servers3-SC + U + + + LogicalLink + str2-7050cx3-acs-10 + Ethernet5/1 + str2-7050cx3-acs-10-Servers4-SC + U + + + LogicalLink + str2-7050cx3-acs-10 + Ethernet6/1 + str2-7050cx3-acs-10-Servers5-SC + U + + + LogicalLink + str2-7050cx3-acs-10 + Ethernet11/1 + str2-7050cx3-acs-10-Servers6-SC + U + + + LogicalLink + str2-7050cx3-acs-10 + Ethernet12/1 + str2-7050cx3-acs-10-Servers7-SC + U + + + LogicalLink + str2-7050cx3-acs-10 + Ethernet13/1 + str2-7050cx3-acs-10-Servers8-SC + U + + + LogicalLink + str2-7050cx3-acs-10 + Ethernet14/1 + str2-7050cx3-acs-10-Servers9-SC + U + + + LogicalLink + str2-7050cx3-acs-10 + Ethernet15/1 + str2-7050cx3-acs-10-Servers10-SC + U + + + LogicalLink + str2-7050cx3-acs-10 + Ethernet16/1 + str2-7050cx3-acs-10-Servers11-SC + U + + + LogicalLink + str2-7050cx3-acs-10 + Ethernet17/1 + str2-7050cx3-acs-10-Servers12-SC + U + + + LogicalLink + str2-7050cx3-acs-10 + Ethernet18/1 + str2-7050cx3-acs-10-Servers13-SC + U + + + LogicalLink + str2-7050cx3-acs-10 + Ethernet19/1 + str2-7050cx3-acs-10-Servers14-SC + U + + + LogicalLink + str2-7050cx3-acs-10 + Ethernet20/1 + str2-7050cx3-acs-10-Servers15-SC + U + + + LogicalLink + str2-7050cx3-acs-10 + Ethernet21/1 + str2-7050cx3-acs-10-Servers16-SC + U + + + LogicalLink + str2-7050cx3-acs-10 + Ethernet22/1 + str2-7050cx3-acs-10-Servers17-SC + U + + + LogicalLink + str2-7050cx3-acs-10 + Ethernet27/1 + str2-7050cx3-acs-10-Servers18-SC + U + + + LogicalLink + str2-7050cx3-acs-10 + Ethernet28/1 + str2-7050cx3-acs-10-Servers19-SC + U + + + LogicalLink + str2-7050cx3-acs-10 + Ethernet29/1 + str2-7050cx3-acs-10-Servers20-SC + U + + + LogicalLink + str2-7050cx3-acs-10 + Ethernet30/1 + str2-7050cx3-acs-10-Servers21-SC + U + + + LogicalLink + str2-7050cx3-acs-10 + Ethernet31/1 + str2-7050cx3-acs-10-Servers22-SC + U + + + LogicalLink + str2-7050cx3-acs-10 + Ethernet32/1 + str2-7050cx3-acs-10-Servers23-SC + U + + + + + str2-7050cx3-acs-10 + Arista-7050CX3-32S-D48C8 +
+ 10.1.0.32/32 +
+ + FC00:1::32/128 + + + 10.3.146.122 + +
+ + str2-7050cx3-acs-11 + Arista-7050CX3-32S-D48C8 +
+ 10.1.0.33/32 +
+ + FC00:1::33/128 + + + 10.3.146.127 + +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7050cx3-acs-10-Servers0-SC +
+ + Server +
+ 192.168.0.2/26 +
+ + fc02:1000::2/96 + + + 0.0.0.0/0 + + Servers0 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7050cx3-acs-10-Servers1-SC +
+ + Server +
+ 192.168.0.3/26 +
+ + fc02:1000::3/96 + + + 0.0.0.0/0 + + Servers1 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7050cx3-acs-10-Servers2-SC +
+ + Server +
+ 192.168.0.4/26 +
+ + fc02:1000::4/96 + + + 0.0.0.0/0 + + Servers2 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7050cx3-acs-10-Servers3-SC +
+ + Server +
+ 192.168.0.5/26 +
+ + fc02:1000::5/96 + + + 0.0.0.0/0 + + Servers3 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7050cx3-acs-10-Servers4-SC +
+ + Server +
+ 192.168.0.6/26 +
+ + fc02:1000::6/96 + + + 0.0.0.0/0 + + Servers4 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7050cx3-acs-10-Servers5-SC +
+ + Server +
+ 192.168.0.7/26 +
+ + fc02:1000::7/96 + + + 0.0.0.0/0 + + Servers5 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7050cx3-acs-10-Servers6-SC +
+ + Server +
+ 192.168.0.8/26 +
+ + fc02:1000::8/96 + + + 0.0.0.0/0 + + Servers6 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7050cx3-acs-10-Servers7-SC +
+ + Server +
+ 192.168.0.9/26 +
+ + fc02:1000::9/96 + + + 0.0.0.0/0 + + Servers7 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7050cx3-acs-10-Servers8-SC +
+ + Server +
+ 192.168.0.10/26 +
+ + fc02:1000::a/96 + + + 0.0.0.0/0 + + Servers8 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7050cx3-acs-10-Servers9-SC +
+ + Server +
+ 192.168.0.11/26 +
+ + fc02:1000::b/96 + + + 0.0.0.0/0 + + Servers9 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7050cx3-acs-10-Servers10-SC +
+ + Server +
+ 192.168.0.12/26 +
+ + fc02:1000::c/96 + + + 0.0.0.0/0 + + Servers10 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7050cx3-acs-10-Servers11-SC +
+ + Server +
+ 192.168.0.13/26 +
+ + fc02:1000::d/96 + + + 0.0.0.0/0 + + Servers11 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7050cx3-acs-10-Servers12-SC +
+ + Server +
+ 192.168.0.14/26 +
+ + fc02:1000::e/96 + + + 0.0.0.0/0 + + Servers12 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7050cx3-acs-10-Servers13-SC +
+ + Server +
+ 192.168.0.15/26 +
+ + fc02:1000::f/96 + + + 0.0.0.0/0 + + Servers13 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7050cx3-acs-10-Servers14-SC +
+ + Server +
+ 192.168.0.16/26 +
+ + fc02:1000::10/96 + + + 0.0.0.0/0 + + Servers14 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7050cx3-acs-10-Servers15-SC +
+ + Server +
+ 192.168.0.17/26 +
+ + fc02:1000::11/96 + + + 0.0.0.0/0 + + Servers15 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7050cx3-acs-10-Servers16-SC +
+ + Server +
+ 192.168.0.18/26 +
+ + fc02:1000::12/96 + + + 0.0.0.0/0 + + Servers16 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7050cx3-acs-10-Servers17-SC +
+ + Server +
+ 192.168.0.19/26 +
+ + fc02:1000::13/96 + + + 0.0.0.0/0 + + Servers17 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7050cx3-acs-10-Servers18-SC +
+ + Server +
+ 192.168.0.20/26 +
+ + fc02:1000::14/96 + + + 0.0.0.0/0 + + Servers18 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7050cx3-acs-10-Servers19-SC +
+ + Server +
+ 192.168.0.21/26 +
+ + fc02:1000::15/96 + + + 0.0.0.0/0 + + Servers19 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7050cx3-acs-10-Servers20-SC +
+ + Server +
+ 192.168.0.22/26 +
+ + fc02:1000::16/96 + + + 0.0.0.0/0 + + Servers20 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7050cx3-acs-10-Servers21-SC +
+ + Server +
+ 192.168.0.23/26 +
+ + fc02:1000::17/96 + + + 0.0.0.0/0 + + Servers21 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7050cx3-acs-10-Servers22-SC +
+ + Server +
+ 192.168.0.24/26 +
+ + fc02:1000::18/96 + + + 0.0.0.0/0 + + Servers22 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7050cx3-acs-10-Servers23-SC +
+ + Server +
+ 192.168.0.25/26 +
+ + fc02:1000::19/96 + + + 0.0.0.0/0 + + Servers23 +
+ + ARISTA04T1 + + 172.16.142.63 + + Arista-VM + + + ARISTA03T1 + + 172.16.142.62 + + Arista-VM + + + ARISTA02T1 + + 172.16.142.61 + + Arista-VM + + + ARISTA01T1 + + 172.16.142.60 + + Arista-VM + +
+
+ + + true + + + DeviceInterface + + true + true + 1 + Ethernet1/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet1/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet2/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet2/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet3/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet3/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet4/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet4/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet5/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet5/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet6/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet6/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet7/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet8/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet9/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet10/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet11/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet11/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet12/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet12/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet13/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet13/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet14/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet14/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet15/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet15/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet16/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet16/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet17/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet17/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet18/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet18/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet19/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet19/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet20/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet20/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet21/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet21/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet22/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet22/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet23/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet24/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet25/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet26/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet27/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet27/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet28/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet28/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet29/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet29/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet30/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet30/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet31/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet31/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet32/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet32/3 + + false + 0 + 0 + 50000 + + + true + 0 + Arista-7050CX3-32S-D48C8 + + + + + + + str2-7050cx3-acs-10 + + + DeploymentId + + 1 + + + QosProfile + + Profile0 + + + GeminiEnabled + + True + + + DhcpResources + + 192.0.0.1;192.0.0.2;192.0.0.3;192.0.0.4;192.0.0.5;192.0.0.6;192.0.0.7;192.0.0.8;192.0.0.9;192.0.0.10;192.0.0.11;192.0.0.12;192.0.0.13;192.0.0.14;192.0.0.15;192.0.0.16;192.0.0.17;192.0.0.18;192.0.0.19;192.0.0.20;192.0.0.21;192.0.0.22;192.0.0.23;192.0.0.24;192.0.0.25;192.0.0.26;192.0.0.27;192.0.0.28;192.0.0.29;192.0.0.30;192.0.0.31;192.0.0.32;192.0.0.33;192.0.0.34;192.0.0.35;192.0.0.36;192.0.0.37;192.0.0.38;192.0.0.39;192.0.0.40;192.0.0.41;192.0.0.42;192.0.0.43;192.0.0.44;192.0.0.45;192.0.0.46;192.0.0.47;192.0.0.48 + + + NtpResources + + 10.20.8.129;10.20.8.130 + + + SnmpResources + + 10.3.145.98 + + + SyslogResources + + 10.64.246.95 + + + TacacsGroup + + Starlab + + + TacacsServer + + 100.127.20.21 + + + ForcedMgmtRoutes + + 10.3.145.98/31;10.3.145.8;100.127.20.16/28;10.3.149.170/31;40.122.216.24;13.91.48.226;10.3.145.14;10.64.246.0/24;10.3.146.0/23;10.64.5.5 + + + ErspanDestinationIpv4 + + 10.20.6.16 + + + + + + + + + + + + + GeminiPeeringLink + + True + + + UpperTOR + + str2-7050cx3-acs-10 + + + LowerTOR + + str2-7050cx3-acs-11 + + + str2-7050cx3-acs-11:MuxTunnel0;str2-7050cx3-acs-10:MuxTunnel0 + + + + str2-7050cx3-acs-10 + Arista-7050CX3-32S-D48C8 +
diff --git a/src/sonic-config-engine/tests/sample-arista-7260-dualtor-minigraph.xml b/src/sonic-config-engine/tests/sample-arista-7260-dualtor-minigraph.xml new file mode 100644 index 000000000000..01a42f934726 --- /dev/null +++ b/src/sonic-config-engine/tests/sample-arista-7260-dualtor-minigraph.xml @@ -0,0 +1,4635 @@ + + + + + + false + str2-7260cx3-acs-12 + 10.0.0.56 + ARISTA01T1 + 10.0.0.57 + 1 + 10 + 3 + + + str2-7260cx3-acs-12 + FC00::71 + ARISTA01T1 + FC00::72 + 1 + 10 + 3 + + + false + str2-7260cx3-acs-12 + 10.0.0.58 + ARISTA02T1 + 10.0.0.59 + 1 + 10 + 3 + + + str2-7260cx3-acs-12 + FC00::75 + ARISTA02T1 + FC00::76 + 1 + 10 + 3 + + + false + str2-7260cx3-acs-12 + 10.0.0.60 + ARISTA03T1 + 10.0.0.61 + 1 + 10 + 3 + + + str2-7260cx3-acs-12 + FC00::79 + ARISTA03T1 + FC00::7A + 1 + 10 + 3 + + + false + str2-7260cx3-acs-12 + 10.0.0.62 + ARISTA04T1 + 10.0.0.63 + 1 + 10 + 3 + + + str2-7260cx3-acs-12 + FC00::7D + ARISTA04T1 + FC00::7E + 1 + 10 + 3 + + + + + 65100 + str2-7260cx3-acs-12 + + +
10.0.0.57
+ + + +
+ +
10.0.0.59
+ + + +
+ +
10.0.0.61
+ + + +
+ +
10.0.0.63
+ + + +
+ + BGPPeer +
10.1.0.32
+ + + + BGPSLBPassive + 10.255.0.0/25 +
+ + BGPPeer +
10.1.0.32
+ + + + BGPVac + 192.168.0.0/21 +
+
+ +
+ + 64600 + ARISTA01T1 + + + + 64600 + ARISTA02T1 + + + + 64600 + ARISTA03T1 + + + + 64600 + ARISTA04T1 + + +
+
+ + + + + + HostIP + Loopback0 + + 10.1.0.32/32 + + 10.1.0.32/32 + + + HostIP1 + Loopback0 + + FC00:1::32/128 + + FC00:1::32/128 + + + HostIP2 + Loopback1 + + 10.1.0.34/32 + + 10.1.0.34/32 + + + HostIP3 + Loopback1 + + FC00:1::34/128 + + FC00:1::34/128 + + HostIP6 + Loopback3 + + 10.1.0.38/32 + + 10.1.0.38/32 + + + HostIP7 + Loopback3 + + FC00:1::38/128 + + FC00:1::38/128 + + HostIP4 + Loopback2 + + 10.1.0.36/32 + + 10.1.0.36/32 + + + HostIP5 + Loopback2 + + FC00:1::36/128 + + FC00:1::36/128 + + + + HostIP + eth0 + + 10.3.147.165/23 + + 10.3.147.165/23 + + + V6HostIP + eth0 + + FC00:2::32/64 + + FC00:2::32/64 + + + + + + + str2-7260cx3-acs-12 + + + PortChannel101 + Ethernet13/1;Ethernet14/1 + + + + PortChannel102 + Ethernet15/1;Ethernet16/1 + + + + PortChannel103 + Ethernet17/1;Ethernet18/1 + + + + PortChannel104 + Ethernet19/1;Ethernet20/1 + + + + + + + + + Vlan1000 + Ethernet1/1;Ethernet2/1;Ethernet3/1;Ethernet4/1;Ethernet5/1;Ethernet6/1;Ethernet7/1;Ethernet8/1;Ethernet9/1;Ethernet10/1;Ethernet11/1;Ethernet12/1;Ethernet21/1;Ethernet22/1;Ethernet23/1;Ethernet24/1;Ethernet25/1;Ethernet26/1;Ethernet27/1;Ethernet28/1;Ethernet29/1;Ethernet30/1;Ethernet31/1;Ethernet32/1;Ethernet33/1;Ethernet34/1;Ethernet35/1;Ethernet36/1;Ethernet37/1;Ethernet38/1;Ethernet39/1;Ethernet40/1;Ethernet41/1;Ethernet42/1;Ethernet43/1;Ethernet44/1;Ethernet45/1;Ethernet46/1;Ethernet47/1;Ethernet48/1;Ethernet49/1;Ethernet50/1;Ethernet51/1;Ethernet52/1;Ethernet53/1;Ethernet54/1;Ethernet55/1;Ethernet56/1;Ethernet57/1;Ethernet58/1;Ethernet59/1;Ethernet60/1;Ethernet61/1;Ethernet62/1;Ethernet63/1;Ethernet64/1 + False + 0.0.0.0/0 + 192.0.0.1;192.0.0.2;192.0.0.3;192.0.0.4;192.0.0.5;192.0.0.6;192.0.0.7;192.0.0.8;192.0.0.9;192.0.0.10;192.0.0.11;192.0.0.12;192.0.0.13;192.0.0.14;192.0.0.15;192.0.0.16;192.0.0.17;192.0.0.18;192.0.0.19;192.0.0.20;192.0.0.21;192.0.0.22;192.0.0.23;192.0.0.24;192.0.0.25;192.0.0.26;192.0.0.27;192.0.0.28;192.0.0.29;192.0.0.30;192.0.0.31;192.0.0.32;192.0.0.33;192.0.0.34;192.0.0.35;192.0.0.36;192.0.0.37;192.0.0.38;192.0.0.39;192.0.0.40;192.0.0.41;192.0.0.42;192.0.0.43;192.0.0.44;192.0.0.45;192.0.0.46;192.0.0.47;192.0.0.48 + fc02:2000::1;fc02:2000::2;fc02:2000::3;fc02:2000::4 + 1000 + 1000 + 192.168.0.0/21 + 00:aa:bb:cc:dd:ee + + + + + + PortChannel101 + 10.0.0.56/31 + + + + PortChannel101 + FC00::71/126 + + + + PortChannel102 + 10.0.0.58/31 + + + + PortChannel102 + FC00::75/126 + + + + PortChannel103 + 10.0.0.60/31 + + + + PortChannel103 + FC00::79/126 + + + + PortChannel104 + 10.0.0.62/31 + + + + PortChannel104 + FC00::7D/126 + + + + Vlan1000 + 192.168.0.1/21 + + + + Vlan1000 + fc02:1000::1/64 + + + + + + NTP_ACL + NTP + NTP + + + SNMP_ACL + SNMP + SNMP + + + ERSPAN + Everflow + Everflow + + + ERSPANV6 + EverflowV6 + EverflowV6 + + + VTY_LINE + ssh-only + SSH + + + + + + + + + + DeviceInterfaceLink + ARISTA01T1 + Ethernet1 + str2-7260cx3-acs-12 + Ethernet13/1 + + + DeviceInterfaceLink + ARISTA01T1 + Ethernet2 + str2-7260cx3-acs-12 + Ethernet14/1 + + + DeviceInterfaceLink + ARISTA02T1 + Ethernet1 + str2-7260cx3-acs-12 + Ethernet15/1 + + + DeviceInterfaceLink + ARISTA02T1 + Ethernet2 + str2-7260cx3-acs-12 + Ethernet16/1 + + + DeviceInterfaceLink + ARISTA03T1 + Ethernet1 + str2-7260cx3-acs-12 + Ethernet17/1 + + + DeviceInterfaceLink + ARISTA03T1 + Ethernet2 + str2-7260cx3-acs-12 + Ethernet18/1 + + + DeviceInterfaceLink + ARISTA04T1 + Ethernet1 + str2-7260cx3-acs-12 + Ethernet19/1 + + + DeviceInterfaceLink + ARISTA04T1 + Ethernet2 + str2-7260cx3-acs-12 + Ethernet20/1 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet1/1 + Servers0 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet2/1 + Servers1 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet3/1 + Servers2 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet4/1 + Servers3 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet5/1 + Servers4 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet6/1 + Servers5 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet7/1 + Servers6 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet8/1 + Servers7 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet9/1 + Servers8 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet10/1 + Servers9 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet11/1 + Servers10 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet12/1 + Servers11 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet21/1 + Servers12 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet22/1 + Servers13 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet23/1 + Servers14 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet24/1 + Servers15 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet25/1 + Servers16 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet26/1 + Servers17 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet27/1 + Servers18 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet28/1 + Servers19 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet29/1 + Servers20 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet30/1 + Servers21 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet31/1 + Servers22 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet32/1 + Servers23 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet33/1 + Servers24 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet34/1 + Servers25 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet35/1 + Servers26 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet36/1 + Servers27 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet37/1 + Servers28 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet38/1 + Servers29 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet39/1 + Servers30 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet40/1 + Servers31 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet41/1 + Servers32 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet42/1 + Servers33 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet43/1 + Servers34 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet44/1 + Servers35 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet45/1 + Servers36 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet46/1 + Servers37 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet47/1 + Servers38 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet48/1 + Servers39 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet49/1 + Servers40 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet50/1 + Servers41 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet51/1 + Servers42 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet52/1 + Servers43 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet53/1 + Servers44 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet54/1 + Servers45 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet55/1 + Servers46 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet56/1 + Servers47 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet57/1 + Servers48 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet58/1 + Servers49 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet59/1 + Servers50 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet60/1 + Servers51 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet61/1 + Servers52 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet62/1 + Servers53 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet63/1 + Servers54 + eth0 + + + DeviceInterfaceLink + str2-7260cx3-acs-12 + Ethernet64/1 + Servers55 + eth0 + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet1/1 + str2-7260cx3-acs-12-Servers0-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet2/1 + str2-7260cx3-acs-12-Servers1-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet3/1 + str2-7260cx3-acs-12-Servers2-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet4/1 + str2-7260cx3-acs-12-Servers3-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet5/1 + str2-7260cx3-acs-12-Servers4-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet6/1 + str2-7260cx3-acs-12-Servers5-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet7/1 + str2-7260cx3-acs-12-Servers6-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet8/1 + str2-7260cx3-acs-12-Servers7-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet9/1 + str2-7260cx3-acs-12-Servers8-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet10/1 + str2-7260cx3-acs-12-Servers9-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet11/1 + str2-7260cx3-acs-12-Servers10-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet12/1 + str2-7260cx3-acs-12-Servers11-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet21/1 + str2-7260cx3-acs-12-Servers12-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet22/1 + str2-7260cx3-acs-12-Servers13-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet23/1 + str2-7260cx3-acs-12-Servers14-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet24/1 + str2-7260cx3-acs-12-Servers15-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet25/1 + str2-7260cx3-acs-12-Servers16-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet26/1 + str2-7260cx3-acs-12-Servers17-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet27/1 + str2-7260cx3-acs-12-Servers18-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet28/1 + str2-7260cx3-acs-12-Servers19-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet29/1 + str2-7260cx3-acs-12-Servers20-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet30/1 + str2-7260cx3-acs-12-Servers21-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet31/1 + str2-7260cx3-acs-12-Servers22-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet32/1 + str2-7260cx3-acs-12-Servers23-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet33/1 + str2-7260cx3-acs-12-Servers24-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet34/1 + str2-7260cx3-acs-12-Servers25-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet35/1 + str2-7260cx3-acs-12-Servers26-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet36/1 + str2-7260cx3-acs-12-Servers27-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet37/1 + str2-7260cx3-acs-12-Servers28-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet38/1 + str2-7260cx3-acs-12-Servers29-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet39/1 + str2-7260cx3-acs-12-Servers30-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet40/1 + str2-7260cx3-acs-12-Servers31-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet41/1 + str2-7260cx3-acs-12-Servers32-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet42/1 + str2-7260cx3-acs-12-Servers33-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet43/1 + str2-7260cx3-acs-12-Servers34-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet44/1 + str2-7260cx3-acs-12-Servers35-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet45/1 + str2-7260cx3-acs-12-Servers36-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet46/1 + str2-7260cx3-acs-12-Servers37-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet47/1 + str2-7260cx3-acs-12-Servers38-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet48/1 + str2-7260cx3-acs-12-Servers39-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet49/1 + str2-7260cx3-acs-12-Servers40-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet50/1 + str2-7260cx3-acs-12-Servers41-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet51/1 + str2-7260cx3-acs-12-Servers42-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet52/1 + str2-7260cx3-acs-12-Servers43-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet53/1 + str2-7260cx3-acs-12-Servers44-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet54/1 + str2-7260cx3-acs-12-Servers45-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet55/1 + str2-7260cx3-acs-12-Servers46-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet56/1 + str2-7260cx3-acs-12-Servers47-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet57/1 + str2-7260cx3-acs-12-Servers48-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet58/1 + str2-7260cx3-acs-12-Servers49-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet59/1 + str2-7260cx3-acs-12-Servers50-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet60/1 + str2-7260cx3-acs-12-Servers51-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet61/1 + str2-7260cx3-acs-12-Servers52-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet62/1 + str2-7260cx3-acs-12-Servers53-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet63/1 + str2-7260cx3-acs-12-Servers54-SC + U + + + LogicalLink + str2-7260cx3-acs-12 + Ethernet64/1 + str2-7260cx3-acs-12-Servers55-SC + U + + + + + str2-7260cx3-acs-12 + Arista-7260CX3-D108C8 +
+ 10.1.0.32/32 +
+ + FC00:1::32/128 + + + 10.3.147.165 + +
+ + str2-7260cx3-acs-13 + Arista-7260CX3-D108C8 +
+ 10.1.0.33/32 +
+ + FC00:1::33/128 + + + 10.3.147.167 + +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers0-SC +
+ + Server +
+ 192.168.0.2/26 +
+ + fc02:1000::2/96 + + + 0.0.0.0/0 + + Servers0 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers1-SC +
+ + Server +
+ 192.168.0.3/26 +
+ + fc02:1000::3/96 + + + 0.0.0.0/0 + + Servers1 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers2-SC +
+ + Server +
+ 192.168.0.4/26 +
+ + fc02:1000::4/96 + + + 0.0.0.0/0 + + Servers2 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers3-SC +
+ + Server +
+ 192.168.0.5/26 +
+ + fc02:1000::5/96 + + + 0.0.0.0/0 + + Servers3 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers4-SC +
+ + Server +
+ 192.168.0.6/26 +
+ + fc02:1000::6/96 + + + 0.0.0.0/0 + + Servers4 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers5-SC +
+ + Server +
+ 192.168.0.7/26 +
+ + fc02:1000::7/96 + + + 0.0.0.0/0 + + Servers5 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers6-SC +
+ + Server +
+ 192.168.0.8/26 +
+ + fc02:1000::8/96 + + + 0.0.0.0/0 + + Servers6 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers7-SC +
+ + Server +
+ 192.168.0.9/26 +
+ + fc02:1000::9/96 + + + 0.0.0.0/0 + + Servers7 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers8-SC +
+ + Server +
+ 192.168.0.10/26 +
+ + fc02:1000::a/96 + + + 0.0.0.0/0 + + Servers8 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers9-SC +
+ + Server +
+ 192.168.0.11/26 +
+ + fc02:1000::b/96 + + + 0.0.0.0/0 + + Servers9 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers10-SC +
+ + Server +
+ 192.168.0.12/26 +
+ + fc02:1000::c/96 + + + 0.0.0.0/0 + + Servers10 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers11-SC +
+ + Server +
+ 192.168.0.13/26 +
+ + fc02:1000::d/96 + + + 0.0.0.0/0 + + Servers11 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers12-SC +
+ + Server +
+ 192.168.0.14/26 +
+ + fc02:1000::e/96 + + + 0.0.0.0/0 + + Servers12 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers13-SC +
+ + Server +
+ 192.168.0.15/26 +
+ + fc02:1000::f/96 + + + 0.0.0.0/0 + + Servers13 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers14-SC +
+ + Server +
+ 192.168.0.16/26 +
+ + fc02:1000::10/96 + + + 0.0.0.0/0 + + Servers14 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers15-SC +
+ + Server +
+ 192.168.0.17/26 +
+ + fc02:1000::11/96 + + + 0.0.0.0/0 + + Servers15 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers16-SC +
+ + Server +
+ 192.168.0.18/26 +
+ + fc02:1000::12/96 + + + 0.0.0.0/0 + + Servers16 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers17-SC +
+ + Server +
+ 192.168.0.19/26 +
+ + fc02:1000::13/96 + + + 0.0.0.0/0 + + Servers17 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers18-SC +
+ + Server +
+ 192.168.0.20/26 +
+ + fc02:1000::14/96 + + + 0.0.0.0/0 + + Servers18 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers19-SC +
+ + Server +
+ 192.168.0.21/26 +
+ + fc02:1000::15/96 + + + 0.0.0.0/0 + + Servers19 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers20-SC +
+ + Server +
+ 192.168.0.22/26 +
+ + fc02:1000::16/96 + + + 0.0.0.0/0 + + Servers20 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers21-SC +
+ + Server +
+ 192.168.0.23/26 +
+ + fc02:1000::17/96 + + + 0.0.0.0/0 + + Servers21 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers22-SC +
+ + Server +
+ 192.168.0.24/26 +
+ + fc02:1000::18/96 + + + 0.0.0.0/0 + + Servers22 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers23-SC +
+ + Server +
+ 192.168.0.25/26 +
+ + fc02:1000::19/96 + + + 0.0.0.0/0 + + Servers23 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers24-SC +
+ + Server +
+ 192.168.0.26/26 +
+ + fc02:1000::1a/96 + + + 0.0.0.0/0 + + Servers24 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers25-SC +
+ + Server +
+ 192.168.0.27/26 +
+ + fc02:1000::1b/96 + + + 0.0.0.0/0 + + Servers25 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers26-SC +
+ + Server +
+ 192.168.0.28/26 +
+ + fc02:1000::1c/96 + + + 0.0.0.0/0 + + Servers26 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers27-SC +
+ + Server +
+ 192.168.0.29/26 +
+ + fc02:1000::1d/96 + + + 0.0.0.0/0 + + Servers27 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers28-SC +
+ + Server +
+ 192.168.0.30/26 +
+ + fc02:1000::1e/96 + + + 0.0.0.0/0 + + Servers28 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers29-SC +
+ + Server +
+ 192.168.0.31/26 +
+ + fc02:1000::1f/96 + + + 0.0.0.0/0 + + Servers29 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers30-SC +
+ + Server +
+ 192.168.0.32/26 +
+ + fc02:1000::20/96 + + + 0.0.0.0/0 + + Servers30 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers31-SC +
+ + Server +
+ 192.168.0.33/26 +
+ + fc02:1000::21/96 + + + 0.0.0.0/0 + + Servers31 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers32-SC +
+ + Server +
+ 192.168.0.34/26 +
+ + fc02:1000::22/96 + + + 0.0.0.0/0 + + Servers32 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers33-SC +
+ + Server +
+ 192.168.0.35/26 +
+ + fc02:1000::23/96 + + + 0.0.0.0/0 + + Servers33 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers34-SC +
+ + Server +
+ 192.168.0.36/26 +
+ + fc02:1000::24/96 + + + 0.0.0.0/0 + + Servers34 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers35-SC +
+ + Server +
+ 192.168.0.37/26 +
+ + fc02:1000::25/96 + + + 0.0.0.0/0 + + Servers35 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers36-SC +
+ + Server +
+ 192.168.0.38/26 +
+ + fc02:1000::26/96 + + + 0.0.0.0/0 + + Servers36 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers37-SC +
+ + Server +
+ 192.168.0.39/26 +
+ + fc02:1000::27/96 + + + 0.0.0.0/0 + + Servers37 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers38-SC +
+ + Server +
+ 192.168.0.40/26 +
+ + fc02:1000::28/96 + + + 0.0.0.0/0 + + Servers38 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers39-SC +
+ + Server +
+ 192.168.0.41/26 +
+ + fc02:1000::29/96 + + + 0.0.0.0/0 + + Servers39 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers40-SC +
+ + Server +
+ 192.168.0.42/26 +
+ + fc02:1000::2a/96 + + + 0.0.0.0/0 + + Servers40 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers41-SC +
+ + Server +
+ 192.168.0.43/26 +
+ + fc02:1000::2b/96 + + + 0.0.0.0/0 + + Servers41 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers42-SC +
+ + Server +
+ 192.168.0.44/26 +
+ + fc02:1000::2c/96 + + + 0.0.0.0/0 + + Servers42 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers43-SC +
+ + Server +
+ 192.168.0.45/26 +
+ + fc02:1000::2d/96 + + + 0.0.0.0/0 + + Servers43 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers44-SC +
+ + Server +
+ 192.168.0.46/26 +
+ + fc02:1000::2e/96 + + + 0.0.0.0/0 + + Servers44 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers45-SC +
+ + Server +
+ 192.168.0.47/26 +
+ + fc02:1000::2f/96 + + + 0.0.0.0/0 + + Servers45 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers46-SC +
+ + Server +
+ 192.168.0.48/26 +
+ + fc02:1000::30/96 + + + 0.0.0.0/0 + + Servers46 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers47-SC +
+ + Server +
+ 192.168.0.49/26 +
+ + fc02:1000::31/96 + + + 0.0.0.0/0 + + Servers47 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers48-SC +
+ + Server +
+ 192.168.0.50/26 +
+ + fc02:1000::32/96 + + + 0.0.0.0/0 + + Servers48 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers49-SC +
+ + Server +
+ 192.168.0.51/26 +
+ + fc02:1000::33/96 + + + 0.0.0.0/0 + + Servers49 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers50-SC +
+ + Server +
+ 192.168.0.52/26 +
+ + fc02:1000::34/96 + + + 0.0.0.0/0 + + Servers50 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers51-SC +
+ + Server +
+ 192.168.0.53/26 +
+ + fc02:1000::35/96 + + + 0.0.0.0/0 + + Servers51 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers52-SC +
+ + Server +
+ 192.168.0.54/26 +
+ + fc02:1000::36/96 + + + 0.0.0.0/0 + + Servers52 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers53-SC +
+ + Server +
+ 192.168.0.55/26 +
+ + fc02:1000::37/96 + + + 0.0.0.0/0 + + Servers53 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers54-SC +
+ + Server +
+ 192.168.0.56/26 +
+ + fc02:1000::38/96 + + + 0.0.0.0/0 + + Servers54 +
+ + SmartCable +
+ 0.0.0.0/0 +
+ + ::/0 + + + 0.0.0.0/0 + + + ::/0 + + + str2-7260cx3-acs-12-Servers55-SC +
+ + Server +
+ 192.168.0.57/26 +
+ + fc02:1000::39/96 + + + 0.0.0.0/0 + + Servers55 +
+ + ARISTA04T1 + + 172.16.147.75 + + Arista-VM + + + ARISTA03T1 + + 172.16.147.74 + + Arista-VM + + + ARISTA02T1 + + 172.16.147.73 + + Arista-VM + + + ARISTA01T1 + + 172.16.147.72 + + Arista-VM + +
+
+ + + true + + + DeviceInterface + + true + true + 1 + Ethernet1/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet1/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet2/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet2/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet3/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet3/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet4/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet4/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet5/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet5/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet6/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet6/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet7/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet7/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet8/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet8/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet9/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet9/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet10/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet10/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet11/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet11/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet12/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet12/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet13/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet14/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet15/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet16/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet17/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet18/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet19/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet20/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet21/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet21/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet22/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet22/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet23/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet23/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet24/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet24/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet25/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet25/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet26/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet26/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet27/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet27/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet28/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet28/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet29/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet29/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet30/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet30/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet31/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet31/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet32/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet32/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet33/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet33/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet34/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet34/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet35/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet35/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet36/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet36/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet37/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet37/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet38/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet38/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet39/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet39/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet40/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet40/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet41/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet41/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet42/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet42/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet43/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet43/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet44/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet44/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet45/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet45/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet46/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet46/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet47/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet47/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet48/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet48/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet49/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet49/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet50/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet50/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet51/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet51/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet52/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet52/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet53/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet53/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet54/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet54/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet55/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet55/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet56/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet56/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet57/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet57/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet58/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet58/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet59/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet59/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet60/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet60/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet61/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet61/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet62/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet62/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet63/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet63/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet64/1 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet64/3 + + false + 0 + 0 + 50000 + + + DeviceInterface + + true + true + 1 + Ethernet65 + + false + 0 + 0 + 10000 + + + DeviceInterface + + true + true + 1 + Ethernet66 + + false + 0 + 0 + 10000 + + + true + 0 + Arista-7260CX3-D108C8 + + + + + + + str2-7260cx3-acs-12 + + + DeploymentId + + 1 + + + QosProfile + + Profile0 + + + GeminiEnabled + + True + + + DhcpResources + + 192.0.0.1;192.0.0.2;192.0.0.3;192.0.0.4;192.0.0.5;192.0.0.6;192.0.0.7;192.0.0.8;192.0.0.9;192.0.0.10;192.0.0.11;192.0.0.12;192.0.0.13;192.0.0.14;192.0.0.15;192.0.0.16;192.0.0.17;192.0.0.18;192.0.0.19;192.0.0.20;192.0.0.21;192.0.0.22;192.0.0.23;192.0.0.24;192.0.0.25;192.0.0.26;192.0.0.27;192.0.0.28;192.0.0.29;192.0.0.30;192.0.0.31;192.0.0.32;192.0.0.33;192.0.0.34;192.0.0.35;192.0.0.36;192.0.0.37;192.0.0.38;192.0.0.39;192.0.0.40;192.0.0.41;192.0.0.42;192.0.0.43;192.0.0.44;192.0.0.45;192.0.0.46;192.0.0.47;192.0.0.48 + + + NtpResources + + 10.20.8.129;10.20.8.130 + + + SnmpResources + + 10.3.145.98 + + + SyslogResources + + 10.64.246.95 + + + TacacsGroup + + Starlab + + + TacacsServer + + 100.127.20.21 + + + ForcedMgmtRoutes + + 10.3.145.98/31;10.3.145.8;100.127.20.16/28;10.3.149.170/31;40.122.216.24;13.91.48.226;10.3.145.14;10.64.246.0/24;10.3.146.0/23;10.64.5.5 + + + ErspanDestinationIpv4 + + 10.20.6.16 + + + + + + + + + + + + + GeminiPeeringLink + + True + + + UpperTOR + + str2-7260cx3-acs-12 + + + LowerTOR + + str2-7260cx3-acs-13 + + + str2-7260cx3-acs-13:MuxTunnel0;str2-7260cx3-acs-12:MuxTunnel0 + + + + str2-7260cx3-acs-12 + Arista-7260CX3-D108C8 +
diff --git a/src/sonic-config-engine/tests/sample-arista-7260-t1-minigraph.xml b/src/sonic-config-engine/tests/sample-arista-7260-t1-minigraph.xml new file mode 100644 index 000000000000..4367b705a11a --- /dev/null +++ b/src/sonic-config-engine/tests/sample-arista-7260-t1-minigraph.xml @@ -0,0 +1,2491 @@ + + + + + + false + str-7260cx3-acs-7 + 10.0.0.32 + ARISTA01T0 + 10.0.0.33 + 1 + 10 + 3 + + + str-7260cx3-acs-7 + FC00::41 + ARISTA01T0 + FC00::42 + 1 + 10 + 3 + + + false + str-7260cx3-acs-7 + 10.0.0.0 + ARISTA01T2 + 10.0.0.1 + 1 + 10 + 3 + + + str-7260cx3-acs-7 + FC00::1 + ARISTA01T2 + FC00::2 + 1 + 10 + 3 + + + false + str-7260cx3-acs-7 + 10.0.0.34 + ARISTA02T0 + 10.0.0.35 + 1 + 10 + 3 + + + str-7260cx3-acs-7 + FC00::45 + ARISTA02T0 + FC00::46 + 1 + 10 + 3 + + + false + str-7260cx3-acs-7 + 10.0.0.36 + ARISTA03T0 + 10.0.0.37 + 1 + 10 + 3 + + + str-7260cx3-acs-7 + FC00::49 + ARISTA03T0 + FC00::4A + 1 + 10 + 3 + + + false + str-7260cx3-acs-7 + 10.0.0.4 + ARISTA03T2 + 10.0.0.5 + 1 + 10 + 3 + + + str-7260cx3-acs-7 + FC00::5 + ARISTA03T2 + FC00::6 + 1 + 10 + 3 + + + false + str-7260cx3-acs-7 + 10.0.0.38 + ARISTA04T0 + 10.0.0.39 + 1 + 10 + 3 + + + str-7260cx3-acs-7 + FC00::4D + ARISTA04T0 + FC00::4E + 1 + 10 + 3 + + + false + str-7260cx3-acs-7 + 10.0.0.40 + ARISTA05T0 + 10.0.0.41 + 1 + 10 + 3 + + + str-7260cx3-acs-7 + FC00::51 + ARISTA05T0 + FC00::52 + 1 + 10 + 3 + + + false + str-7260cx3-acs-7 + 10.0.0.8 + ARISTA05T2 + 10.0.0.9 + 1 + 10 + 3 + + + str-7260cx3-acs-7 + FC00::9 + ARISTA05T2 + FC00::A + 1 + 10 + 3 + + + false + str-7260cx3-acs-7 + 10.0.0.42 + ARISTA06T0 + 10.0.0.43 + 1 + 10 + 3 + + + str-7260cx3-acs-7 + FC00::55 + ARISTA06T0 + FC00::56 + 1 + 10 + 3 + + + false + str-7260cx3-acs-7 + 10.0.0.44 + ARISTA07T0 + 10.0.0.45 + 1 + 10 + 3 + + + str-7260cx3-acs-7 + FC00::59 + ARISTA07T0 + FC00::5A + 1 + 10 + 3 + + + false + str-7260cx3-acs-7 + 10.0.0.12 + ARISTA07T2 + 10.0.0.13 + 1 + 10 + 3 + + + str-7260cx3-acs-7 + FC00::D + ARISTA07T2 + FC00::E + 1 + 10 + 3 + + + false + str-7260cx3-acs-7 + 10.0.0.46 + ARISTA08T0 + 10.0.0.47 + 1 + 10 + 3 + + + str-7260cx3-acs-7 + FC00::5D + ARISTA08T0 + FC00::5E + 1 + 10 + 3 + + + false + str-7260cx3-acs-7 + 10.0.0.48 + ARISTA09T0 + 10.0.0.49 + 1 + 10 + 3 + + + str-7260cx3-acs-7 + FC00::61 + ARISTA09T0 + FC00::62 + 1 + 10 + 3 + + + false + str-7260cx3-acs-7 + 10.0.0.50 + ARISTA10T0 + 10.0.0.51 + 1 + 10 + 3 + + + str-7260cx3-acs-7 + FC00::65 + ARISTA10T0 + FC00::66 + 1 + 10 + 3 + + + false + str-7260cx3-acs-7 + 10.0.0.52 + ARISTA11T0 + 10.0.0.53 + 1 + 10 + 3 + + + str-7260cx3-acs-7 + FC00::69 + ARISTA11T0 + FC00::6A + 1 + 10 + 3 + + + false + str-7260cx3-acs-7 + 10.0.0.54 + ARISTA12T0 + 10.0.0.55 + 1 + 10 + 3 + + + str-7260cx3-acs-7 + FC00::6D + ARISTA12T0 + FC00::6E + 1 + 10 + 3 + + + false + str-7260cx3-acs-7 + 10.0.0.56 + ARISTA13T0 + 10.0.0.57 + 1 + 10 + 3 + + + str-7260cx3-acs-7 + FC00::71 + ARISTA13T0 + FC00::72 + 1 + 10 + 3 + + + false + str-7260cx3-acs-7 + 10.0.0.58 + ARISTA14T0 + 10.0.0.59 + 1 + 10 + 3 + + + str-7260cx3-acs-7 + FC00::75 + ARISTA14T0 + FC00::76 + 1 + 10 + 3 + + + false + str-7260cx3-acs-7 + 10.0.0.60 + ARISTA15T0 + 10.0.0.61 + 1 + 10 + 3 + + + str-7260cx3-acs-7 + FC00::79 + ARISTA15T0 + FC00::7A + 1 + 10 + 3 + + + false + str-7260cx3-acs-7 + 10.0.0.62 + ARISTA16T0 + 10.0.0.63 + 1 + 10 + 3 + + + str-7260cx3-acs-7 + FC00::7D + ARISTA16T0 + FC00::7E + 1 + 10 + 3 + + + false + str-7260cx3-acs-7 + 10.0.0.64 + ARISTA17T0 + 10.0.0.65 + 1 + 10 + 3 + + + str-7260cx3-acs-7 + FC00::81 + ARISTA17T0 + FC00::82 + 1 + 10 + 3 + + + false + str-7260cx3-acs-7 + 10.0.0.66 + ARISTA18T0 + 10.0.0.67 + 1 + 10 + 3 + + + str-7260cx3-acs-7 + FC00::85 + ARISTA18T0 + FC00::86 + 1 + 10 + 3 + + + false + str-7260cx3-acs-7 + 10.0.0.68 + ARISTA19T0 + 10.0.0.69 + 1 + 10 + 3 + + + str-7260cx3-acs-7 + FC00::89 + ARISTA19T0 + FC00::8A + 1 + 10 + 3 + + + false + str-7260cx3-acs-7 + 10.0.0.70 + ARISTA20T0 + 10.0.0.71 + 1 + 10 + 3 + + + str-7260cx3-acs-7 + FC00::8D + ARISTA20T0 + FC00::8E + 1 + 10 + 3 + + + + + 65100 + str-7260cx3-acs-7 + + +
10.0.0.33
+ + + +
+ +
10.0.0.1
+ + + +
+ +
10.0.0.35
+ + + +
+ +
10.0.0.37
+ + + +
+ +
10.0.0.5
+ + + +
+ +
10.0.0.39
+ + + +
+ +
10.0.0.41
+ + + +
+ +
10.0.0.9
+ + + +
+ +
10.0.0.43
+ + + +
+ +
10.0.0.45
+ + + +
+ +
10.0.0.13
+ + + +
+ +
10.0.0.47
+ + + +
+ +
10.0.0.49
+ + + +
+ +
10.0.0.51
+ + + +
+ +
10.0.0.53
+ + + +
+ +
10.0.0.55
+ + + +
+ +
10.0.0.57
+ + + +
+ +
10.0.0.59
+ + + +
+ +
10.0.0.61
+ + + +
+ +
10.0.0.63
+ + + +
+ +
10.0.0.65
+ + + +
+ +
10.0.0.67
+ + + +
+ +
10.0.0.69
+ + + +
+ +
10.0.0.71
+ + + +
+
+ +
+ + 64001 + ARISTA01T0 + + + + 65200 + ARISTA01T2 + + + + 64002 + ARISTA02T0 + + + + 64003 + ARISTA03T0 + + + + 65200 + ARISTA03T2 + + + + 64004 + ARISTA04T0 + + + + 64005 + ARISTA05T0 + + + + 65200 + ARISTA05T2 + + + + 64006 + ARISTA06T0 + + + + 64007 + ARISTA07T0 + + + + 65200 + ARISTA07T2 + + + + 64008 + ARISTA08T0 + + + + 64009 + ARISTA09T0 + + + + 64010 + ARISTA10T0 + + + + 64011 + ARISTA11T0 + + + + 64012 + ARISTA12T0 + + + + 64013 + ARISTA13T0 + + + + 64014 + ARISTA14T0 + + + + 64015 + ARISTA15T0 + + + + 64016 + ARISTA16T0 + + + + 64017 + ARISTA17T0 + + + + 64018 + ARISTA18T0 + + + + 64019 + ARISTA19T0 + + + + 64020 + ARISTA20T0 + + +
+
+ + + + + + HostIP + Loopback0 + + 10.1.0.32/32 + + 10.1.0.32/32 + + + HostIP1 + Loopback0 + + FC00:1::32/128 + + FC00:1::32/128 + + + + + HostIP + eth0 + + 10.64.246.78/23 + + 10.64.246.78/23 + + + V6HostIP + eth0 + + FC00:2::32/64 + + FC00:2::32/64 + + + + + + + str-7260cx3-acs-7 + + + PortChannel101 + Ethernet35/1 + + + + PortChannel102 + Ethernet1/1;Ethernet2/1 + + + + PortChannel103 + Ethernet37/1 + + + + PortChannel104 + Ethernet38/1 + + + + PortChannel105 + Ethernet5/1;Ethernet6/1 + + + + PortChannel106 + Ethernet39/1 + + + + PortChannel107 + Ethernet40/1 + + + + PortChannel108 + Ethernet17/1;Ethernet18/1 + + + + PortChannel109 + Ethernet43/1 + + + + PortChannel1010 + Ethernet45/1 + + + + PortChannel1011 + Ethernet21/1;Ethernet22/1 + + + + PortChannel1012 + Ethernet46/1 + + + + PortChannel1013 + Ethernet47/1 + + + + PortChannel1014 + Ethernet48/1 + + + + PortChannel1015 + Ethernet51/1 + + + + PortChannel1016 + Ethernet53/1 + + + + PortChannel1017 + Ethernet54/1 + + + + PortChannel1018 + Ethernet55/1 + + + + PortChannel1019 + Ethernet56/1 + + + + PortChannel1020 + Ethernet59/1 + + + + PortChannel1021 + Ethernet61/1 + + + + PortChannel1022 + Ethernet62/1 + + + + PortChannel1023 + Ethernet63/1 + + + + PortChannel1024 + Ethernet64/1 + + + + + + + + + PortChannel101 + 10.0.0.32/31 + + + + PortChannel101 + FC00::41/126 + + + + PortChannel102 + 10.0.0.0/31 + + + + PortChannel102 + FC00::1/126 + + + + PortChannel103 + 10.0.0.34/31 + + + + PortChannel103 + FC00::45/126 + + + + PortChannel104 + 10.0.0.36/31 + + + + PortChannel104 + FC00::49/126 + + + + PortChannel105 + 10.0.0.4/31 + + + + PortChannel105 + FC00::5/126 + + + + PortChannel106 + 10.0.0.38/31 + + + + PortChannel106 + FC00::4D/126 + + + + PortChannel107 + 10.0.0.40/31 + + + + PortChannel107 + FC00::51/126 + + + + PortChannel108 + 10.0.0.8/31 + + + + PortChannel108 + FC00::9/126 + + + + PortChannel109 + 10.0.0.42/31 + + + + PortChannel109 + FC00::55/126 + + + + PortChannel1010 + 10.0.0.44/31 + + + + PortChannel1010 + FC00::59/126 + + + + PortChannel1011 + 10.0.0.12/31 + + + + PortChannel1011 + FC00::D/126 + + + + PortChannel1012 + 10.0.0.46/31 + + + + PortChannel1012 + FC00::5D/126 + + + + PortChannel1013 + 10.0.0.48/31 + + + + PortChannel1013 + FC00::61/126 + + + + PortChannel1014 + 10.0.0.50/31 + + + + PortChannel1014 + FC00::65/126 + + + + PortChannel1015 + 10.0.0.52/31 + + + + PortChannel1015 + FC00::69/126 + + + + PortChannel1016 + 10.0.0.54/31 + + + + PortChannel1016 + FC00::6D/126 + + + + PortChannel1017 + 10.0.0.56/31 + + + + PortChannel1017 + FC00::71/126 + + + + PortChannel1018 + 10.0.0.58/31 + + + + PortChannel1018 + FC00::75/126 + + + + PortChannel1019 + 10.0.0.60/31 + + + + PortChannel1019 + FC00::79/126 + + + + PortChannel1020 + 10.0.0.62/31 + + + + PortChannel1020 + FC00::7D/126 + + + + PortChannel1021 + 10.0.0.64/31 + + + + PortChannel1021 + FC00::81/126 + + + + PortChannel1022 + 10.0.0.66/31 + + + + PortChannel1022 + FC00::85/126 + + + + PortChannel1023 + 10.0.0.68/31 + + + + PortChannel1023 + FC00::89/126 + + + + PortChannel1024 + 10.0.0.70/31 + + + + PortChannel1024 + FC00::8D/126 + + + + + + NTP_ACL + NTP + NTP + + + SNMP_ACL + SNMP + SNMP + + + ERSPAN + Everflow + Everflow + + + ERSPANV6 + EverflowV6 + EverflowV6 + + + VTY_LINE + ssh-only + SSH + + + PortChannel101;PortChannel102;PortChannel103;PortChannel104;PortChannel105;PortChannel106;PortChannel107;PortChannel108;PortChannel109;PortChannel1010;PortChannel1011;PortChannel1012;PortChannel1013;PortChannel1014;PortChannel1015;PortChannel1016;PortChannel1017;PortChannel1018;PortChannel1019;PortChannel1020;PortChannel1021;PortChannel1022;PortChannel1023;PortChannel1024 + DataAcl + DataPlane + + + + + + + + + + DeviceInterfaceLink + ARISTA01T0 + Ethernet1 + str-7260cx3-acs-7 + Ethernet35/1 + + + DeviceInterfaceLink + ARISTA01T2 + Ethernet1 + str-7260cx3-acs-7 + Ethernet1/1 + + + DeviceInterfaceLink + ARISTA01T2 + Ethernet2 + str-7260cx3-acs-7 + Ethernet2/1 + + + DeviceInterfaceLink + ARISTA02T0 + Ethernet1 + str-7260cx3-acs-7 + Ethernet37/1 + + + DeviceInterfaceLink + ARISTA03T0 + Ethernet1 + str-7260cx3-acs-7 + Ethernet38/1 + + + DeviceInterfaceLink + ARISTA03T2 + Ethernet1 + str-7260cx3-acs-7 + Ethernet5/1 + + + DeviceInterfaceLink + ARISTA03T2 + Ethernet2 + str-7260cx3-acs-7 + Ethernet6/1 + + + DeviceInterfaceLink + ARISTA04T0 + Ethernet1 + str-7260cx3-acs-7 + Ethernet39/1 + + + DeviceInterfaceLink + ARISTA05T0 + Ethernet1 + str-7260cx3-acs-7 + Ethernet40/1 + + + DeviceInterfaceLink + ARISTA05T2 + Ethernet1 + str-7260cx3-acs-7 + Ethernet17/1 + + + DeviceInterfaceLink + ARISTA05T2 + Ethernet2 + str-7260cx3-acs-7 + Ethernet18/1 + + + DeviceInterfaceLink + ARISTA06T0 + Ethernet1 + str-7260cx3-acs-7 + Ethernet43/1 + + + DeviceInterfaceLink + ARISTA07T0 + Ethernet1 + str-7260cx3-acs-7 + Ethernet45/1 + + + DeviceInterfaceLink + ARISTA07T2 + Ethernet1 + str-7260cx3-acs-7 + Ethernet21/1 + + + DeviceInterfaceLink + ARISTA07T2 + Ethernet2 + str-7260cx3-acs-7 + Ethernet22/1 + + + DeviceInterfaceLink + ARISTA08T0 + Ethernet1 + str-7260cx3-acs-7 + Ethernet46/1 + + + DeviceInterfaceLink + ARISTA09T0 + Ethernet1 + str-7260cx3-acs-7 + Ethernet47/1 + + + DeviceInterfaceLink + ARISTA10T0 + Ethernet1 + str-7260cx3-acs-7 + Ethernet48/1 + + + DeviceInterfaceLink + ARISTA11T0 + Ethernet1 + str-7260cx3-acs-7 + Ethernet51/1 + + + DeviceInterfaceLink + ARISTA12T0 + Ethernet1 + str-7260cx3-acs-7 + Ethernet53/1 + + + DeviceInterfaceLink + ARISTA13T0 + Ethernet1 + str-7260cx3-acs-7 + Ethernet54/1 + + + DeviceInterfaceLink + ARISTA14T0 + Ethernet1 + str-7260cx3-acs-7 + Ethernet55/1 + + + DeviceInterfaceLink + ARISTA15T0 + Ethernet1 + str-7260cx3-acs-7 + Ethernet56/1 + + + DeviceInterfaceLink + ARISTA16T0 + Ethernet1 + str-7260cx3-acs-7 + Ethernet59/1 + + + DeviceInterfaceLink + ARISTA17T0 + Ethernet1 + str-7260cx3-acs-7 + Ethernet61/1 + + + DeviceInterfaceLink + ARISTA18T0 + Ethernet1 + str-7260cx3-acs-7 + Ethernet62/1 + + + DeviceInterfaceLink + ARISTA19T0 + Ethernet1 + str-7260cx3-acs-7 + Ethernet63/1 + + + DeviceInterfaceLink + ARISTA20T0 + Ethernet1 + str-7260cx3-acs-7 + Ethernet64/1 + + + + + str-7260cx3-acs-7 + Arista-7260CX3-C64 + + 10.64.246.78 + + + + ARISTA16T0 + + 172.16.141.95 + + Arista-VM + + + ARISTA11T0 + + 172.16.141.90 + + Arista-VM + + + ARISTA10T0 + + 172.16.141.89 + + Arista-VM + + + ARISTA17T0 + + 172.16.141.96 + + Arista-VM + + + ARISTA09T0 + + 172.16.141.88 + + Arista-VM + + + ARISTA20T0 + + 172.16.141.99 + + Arista-VM + + + ARISTA08T0 + + 172.16.141.87 + + Arista-VM + + + ARISTA07T0 + + 172.16.141.86 + + Arista-VM + + + ARISTA07T2 + + 172.16.141.79 + + Arista-VM + + + ARISTA01T2 + + 172.16.141.76 + + Arista-VM + + + ARISTA01T0 + + 172.16.141.80 + + Arista-VM + + + ARISTA05T2 + + 172.16.141.78 + + Arista-VM + + + ARISTA05T0 + + 172.16.141.84 + + Arista-VM + + + ARISTA02T0 + + 172.16.141.81 + + Arista-VM + + + ARISTA03T0 + + 172.16.141.82 + + Arista-VM + + + ARISTA03T2 + + 172.16.141.77 + + Arista-VM + + + ARISTA04T0 + + 172.16.141.83 + + Arista-VM + + + ARISTA18T0 + + 172.16.141.97 + + Arista-VM + + + ARISTA15T0 + + 172.16.141.94 + + Arista-VM + + + ARISTA19T0 + + 172.16.141.98 + + Arista-VM + + + ARISTA14T0 + + 172.16.141.93 + + Arista-VM + + + ARISTA12T0 + + 172.16.141.91 + + Arista-VM + + + ARISTA13T0 + + 172.16.141.92 + + Arista-VM + + + ARISTA06T0 + + 172.16.141.85 + + Arista-VM + + + + + + true + + + DeviceInterface + + true + true + 1 + Ethernet1/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet2/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet3/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet4/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet5/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet6/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet7/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet8/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet9/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet10/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet11/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet12/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet13/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet14/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet15/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet16/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet17/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet18/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet19/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet20/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet21/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet22/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet23/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet24/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet25/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet26/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet27/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet28/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet29/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet30/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet31/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet32/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet33/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet34/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet35/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet36/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet37/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet38/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet39/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet40/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet41/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet42/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet43/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet44/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet45/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet46/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet47/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet48/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet49/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet50/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet51/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet52/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet53/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet54/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet55/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet56/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet57/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet58/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet59/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet60/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet61/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet62/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet63/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet64/1 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + true + 1 + Ethernet65 + + false + 0 + 0 + 10000 + + + DeviceInterface + + true + true + 1 + Ethernet66 + + false + 0 + 0 + 10000 + + + true + 0 + Arista-7260CX3-C64 + + + + + + + str-7260cx3-acs-7 + + + DeploymentId + + 1 + + + QosProfile + + Profile0 + + + DhcpResources + + 192.0.0.1;192.0.0.2;192.0.0.3;192.0.0.4;192.0.0.5;192.0.0.6;192.0.0.7;192.0.0.8;192.0.0.9;192.0.0.10;192.0.0.11;192.0.0.12;192.0.0.13;192.0.0.14;192.0.0.15;192.0.0.16;192.0.0.17;192.0.0.18;192.0.0.19;192.0.0.20;192.0.0.21;192.0.0.22;192.0.0.23;192.0.0.24;192.0.0.25;192.0.0.26;192.0.0.27;192.0.0.28;192.0.0.29;192.0.0.30;192.0.0.31;192.0.0.32;192.0.0.33;192.0.0.34;192.0.0.35;192.0.0.36;192.0.0.37;192.0.0.38;192.0.0.39;192.0.0.40;192.0.0.41;192.0.0.42;192.0.0.43;192.0.0.44;192.0.0.45;192.0.0.46;192.0.0.47;192.0.0.48 + + + NtpResources + + 10.20.8.129;10.20.8.130 + + + SnmpResources + + 10.3.145.98 + + + SyslogResources + + 10.64.246.95 + + + TacacsGroup + + Starlab + + + TacacsServer + + 100.127.20.21 + + + ForcedMgmtRoutes + + 10.3.145.98/31;10.3.145.8;100.127.20.16/28;10.3.149.170/31;40.122.216.24;13.91.48.226;10.3.145.14;10.64.246.0/24;10.64.247.0/24;10.64.5.5 + + + ErspanDestinationIpv4 + + 10.20.6.16 + + + + + + + str-7260cx3-acs-7 + Arista-7260CX3-C64 +
diff --git a/src/sonic-config-engine/tests/sample-graph-resource-type.xml b/src/sonic-config-engine/tests/sample-graph-resource-type.xml index f09e4112d8ff..9ba4f1e70267 100644 --- a/src/sonic-config-engine/tests/sample-graph-resource-type.xml +++ b/src/sonic-config-engine/tests/sample-graph-resource-type.xml @@ -72,7 +72,7 @@ - 0 + 1 BGPMonitor @@ -415,6 +415,330 @@ 0 100000
+ + DeviceInterface + + true + 1 + fortyGigE0/20 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/24 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/28 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/32 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/36 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/40 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/44 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/48 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/52 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/56 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/60 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/64 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/68 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/72 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/76 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/80 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/84 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/88 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/92 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/96 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/100 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/104 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/108 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/112 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/116 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/120 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/124 + + false + 0 + 0 + 100000 +
true 0 diff --git a/src/sonic-config-engine/tests/sample-graph-subintf.xml b/src/sonic-config-engine/tests/sample-graph-subintf.xml index 29568be727a7..d5fd2d461c8a 100644 --- a/src/sonic-config-engine/tests/sample-graph-subintf.xml +++ b/src/sonic-config-engine/tests/sample-graph-subintf.xml @@ -72,7 +72,7 @@ - 0 + 1 BGPMonitor @@ -423,6 +423,330 @@ 0 100000 + + DeviceInterface + + true + 1 + fortyGigE0/20 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/24 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/28 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/32 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/36 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/40 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/44 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/48 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/52 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/56 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/60 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/64 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/68 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/72 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/76 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/80 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/84 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/88 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/92 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/96 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/100 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/104 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/108 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/112 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/116 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/120 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/124 + + false + 0 + 0 + 100000 + true 0 diff --git a/src/sonic-config-engine/tests/sample-voq-graph.xml b/src/sonic-config-engine/tests/sample-voq-graph.xml index 5257efd4b0ae..5205265ee384 100644 --- a/src/sonic-config-engine/tests/sample-voq-graph.xml +++ b/src/sonic-config-engine/tests/sample-voq-graph.xml @@ -202,6 +202,366 @@ 100000 Interface description + + DeviceInterface + + true + 1 + fortyGigE0/16 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/20 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/24 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/28 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/32 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/36 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/40 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/40 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/44 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/48 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/52 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/56 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/60 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/64 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/68 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/72 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/76 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/80 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/84 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/88 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/92 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/96 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/100 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/104 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/108 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/112 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/116 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/120 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/124 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + Recycle0 + + false + 0 + 0 + 100000 + true 0 diff --git a/src/sonic-config-engine/tests/sample_graph.xml b/src/sonic-config-engine/tests/sample_graph.xml index 7bd08ab8f7c8..478fdd5ba8d4 100644 --- a/src/sonic-config-engine/tests/sample_graph.xml +++ b/src/sonic-config-engine/tests/sample_graph.xml @@ -88,7 +88,7 @@ - Ethernet1 + Ethernet4 10.10.2.13/30 @@ -112,7 +112,7 @@ 40000 DeviceInterfaceLink OCPSCH01040DDLF - Ethernet1 + Ethernet4 OCPSCH0104002MS Ethernet12 @@ -124,6 +124,424 @@
+ + + + + DeviceInterface + + true + 1 + fortyGigE0/0 + + false + 0 + 0 + 10000 + + + DeviceInterface + + true + 1 + Ethernet1 + + false + 0 + 0 + 10000 + + + DeviceInterface + + true + 1 + Ethernet2 + + false + 0 + 0 + 10000 + + + DeviceInterface + + true + 1 + fortyGigE0/4 + + false + 0 + 0 + 25000 + + + DeviceInterface + + true + 1 + fortyGigE0/8 + + false + 0 + 0 + 40000 + Interface description + + + DeviceInterface + + true + 1 + fortyGigE0/12 + + false + 0 + 0 + 100000 + Interface description + + + DeviceInterface + + true + 1 + fortyGigE0/16 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/20 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/24 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/28 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/32 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/36 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/40 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/44 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/48 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/52 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/56 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/60 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/64 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/68 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/72 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/76 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/80 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/84 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/88 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/92 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/96 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/100 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/104 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/108 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/112 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/116 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/120 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/124 + + false + 0 + 0 + 100000 + + + Force10-Z9100 + + + diff --git a/src/sonic-config-engine/tests/sample_output/py2/docker-dhcp-relay.supervisord.conf b/src/sonic-config-engine/tests/sample_output/py2/docker-dhcp-relay.supervisord.conf index a9004e2b00f5..407ac2c80bc9 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/docker-dhcp-relay.supervisord.conf +++ b/src/sonic-config-engine/tests/sample_output/py2/docker-dhcp-relay.supervisord.conf @@ -68,7 +68,7 @@ dependent_startup_wait_for=start:exited programs=dhcpmon-Vlan1000 [program:dhcpmon-Vlan1000] -command=/usr/sbin/dhcpmon -id Vlan1000 -iu Vlan2000 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 -iu PortChannel01 -im eth0 -4 -6 +command=/usr/sbin/dhcpmon -id Vlan1000 -iu Vlan2000 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 -iu PortChannel01 -im eth0 priority=4 autostart=false autorestart=false diff --git a/src/sonic-config-engine/tests/sample_output/py2/ports.json b/src/sonic-config-engine/tests/sample_output/py2/ports.json index 4b36790c7cd0..959a234eaace 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/ports.json +++ b/src/sonic-config-engine/tests/sample_output/py2/ports.json @@ -20,6 +20,104 @@ }, "OP": "SET" }, + { + "PORT_TABLE:Ethernet108": { + "speed": "100000", + "description": "fortyGigE0/108" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet100": { + "speed": "100000", + "description": "fortyGigE0/100" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet104": { + "speed": "100000", + "description": "fortyGigE0/104" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet68": { + "speed": "100000", + "description": "fortyGigE0/68" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet96": { + "speed": "100000", + "description": "fortyGigE0/96" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet124": { + "speed": "100000", + "description": "fortyGigE0/124" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet92": { + "speed": "100000", + "description": "fortyGigE0/92" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet120": { + "speed": "100000", + "description": "fortyGigE0/120" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet52": { + "speed": "100000", + "description": "fortyGigE0/52" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet56": { + "speed": "100000", + "description": "fortyGigE0/56" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet76": { + "speed": "100000", + "description": "fortyGigE0/76" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet72": { + "speed": "100000", + "description": "fortyGigE0/72" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet64": { + "speed": "100000", + "description": "fortyGigE0/64" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet32": { + "speed": "100000", + "description": "fortyGigE0/32" + }, + "OP": "SET" + }, { "PORT_TABLE:Ethernet16": { "speed": "1000", @@ -27,11 +125,102 @@ }, "OP": "SET" }, + { + "PORT_TABLE:Ethernet36": { + "speed": "100000", + "description": "fortyGigE0/36" + }, + "OP": "SET" + }, { "PORT_TABLE:Ethernet12": { "speed": "100000", "description": "Interface description" }, "OP": "SET" + }, + { + "PORT_TABLE:Ethernet88": { + "speed": "100000", + "description": "fortyGigE0/88" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet116": { + "speed": "100000", + "description": "fortyGigE0/116" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet80": { + "speed": "100000", + "description": "fortyGigE0/80" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet112": { + "speed": "100000", + "description": "fortyGigE0/112" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet84": { + "speed": "100000", + "description": "fortyGigE0/84" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet48": { + "speed": "100000", + "description": "fortyGigE0/48" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet44": { + "speed": "100000", + "description": "fortyGigE0/44" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet40": { + "speed": "100000", + "description": "fortyGigE0/40" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet28": { + "speed": "100000", + "description": "fortyGigE0/28" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet60": { + "speed": "100000", + "description": "fortyGigE0/60" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet20": { + "speed": "100000", + "description": "fortyGigE0/20" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet24": { + "speed": "100000", + "description": "fortyGigE0/24" + }, + "OP": "SET" } ] diff --git a/src/sonic-config-engine/tests/sample_output/py2/qos-arista7050.json b/src/sonic-config-engine/tests/sample_output/py2/qos-arista7050.json index 9a6f8a2ada78..b15fcf7a36c1 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/qos-arista7050.json +++ b/src/sonic-config-engine/tests/sample_output/py2/qos-arista7050.json @@ -119,196 +119,224 @@ "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet8": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet12": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet16": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet20": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet24": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet28": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet32": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet36": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet40": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet44": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet48": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet52": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet56": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet60": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet64": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet68": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet72": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet76": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet80": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet84": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet88": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet92": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet96": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet112": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet116": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet120": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet124": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" } }, "WRED_PROFILE": { diff --git a/src/sonic-config-engine/tests/sample_output/py2/qos-arista7800r3-48cq2-lc.json b/src/sonic-config-engine/tests/sample_output/py2/qos-arista7800r3-48cq2-lc.json index 3044749a2776..92ba2caf8d17 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/qos-arista7800r3-48cq2-lc.json +++ b/src/sonic-config-engine/tests/sample_output/py2/qos-arista7800r3-48cq2-lc.json @@ -119,315 +119,360 @@ "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet4": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet8": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet12": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet16": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet20": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet24": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet28": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet32": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet36": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet40": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet44": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet48": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet52": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet56": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet60": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet64": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet68": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet72": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet76": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet80": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet84": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet88": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet92": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet96": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet100": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet104": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet108": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet112": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet116": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet120": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet124": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet128": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet132": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet136": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet140": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet144": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet148": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet152": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet156": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet164": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet176": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet180": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet184": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet188": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" } }, "WRED_PROFILE": { diff --git a/src/sonic-config-engine/tests/sample_output/py2/qos-dell6100.json b/src/sonic-config-engine/tests/sample_output/py2/qos-dell6100.json index eecd81c99e5c..27bea8cd32d3 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/qos-dell6100.json +++ b/src/sonic-config-engine/tests/sample_output/py2/qos-dell6100.json @@ -119,308 +119,352 @@ "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet1": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet4": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet5": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet6": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet7": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet8": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet9": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet10": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet11": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet12": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet13": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet14": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet15": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet16": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet17": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet20": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet21": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet22": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet23": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet24": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet25": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet26": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet27": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet28": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet29": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet30": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet31": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet32": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet36": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet37": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet38": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet39": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet40": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet41": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet42": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet48": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet52": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet53": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet54": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet55": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet56": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet57": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet58": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" } }, "WRED_PROFILE": { diff --git a/src/sonic-config-engine/tests/sample_output/py2/qos-dell9332.json b/src/sonic-config-engine/tests/sample_output/py2/qos-dell9332.json index 39f4b26e8372..8130a455497a 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/qos-dell9332.json +++ b/src/sonic-config-engine/tests/sample_output/py2/qos-dell9332.json @@ -123,224 +123,256 @@ "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet8": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet16": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet24": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet32": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet40": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet48": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet56": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet64": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet72": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet80": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet88": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet96": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet104": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet112": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet120": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet128": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet136": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet144": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet152": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet160": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet168": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet176": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet184": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet192": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet200": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet208": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet216": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet224": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet232": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet240": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet248": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" } }, "WRED_PROFILE": { diff --git a/src/sonic-config-engine/tests/sample_output/py3/docker-dhcp-relay.supervisord.conf b/src/sonic-config-engine/tests/sample_output/py3/docker-dhcp-relay.supervisord.conf index 521899b939f4..5456409738e6 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/docker-dhcp-relay.supervisord.conf +++ b/src/sonic-config-engine/tests/sample_output/py3/docker-dhcp-relay.supervisord.conf @@ -68,7 +68,7 @@ dependent_startup_wait_for=start:exited programs=dhcpmon-Vlan1000 [program:dhcpmon-Vlan1000] -command=/usr/sbin/dhcpmon -id Vlan1000 -iu Vlan2000 -iu PortChannel01 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 -im eth0 -4 -6 +command=/usr/sbin/dhcpmon -id Vlan1000 -iu Vlan2000 -iu PortChannel01 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 -im eth0 priority=4 autostart=false autorestart=false diff --git a/src/sonic-config-engine/tests/sample_output/py3/ports.json b/src/sonic-config-engine/tests/sample_output/py3/ports.json index 1fee36338bd2..de9d4e25d1f3 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/ports.json +++ b/src/sonic-config-engine/tests/sample_output/py3/ports.json @@ -33,5 +33,194 @@ "description": "fortyGigE0/16" }, "OP": "SET" + }, + { + "PORT_TABLE:Ethernet20": { + "speed": "100000", + "description": "fortyGigE0/20" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet24": { + "speed": "100000", + "description": "fortyGigE0/24" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet28": { + "speed": "100000", + "description": "fortyGigE0/28" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet32": { + "speed": "100000", + "description": "fortyGigE0/32" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet36": { + "speed": "100000", + "description": "fortyGigE0/36" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet40": { + "speed": "100000", + "description": "fortyGigE0/40" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet44": { + "speed": "100000", + "description": "fortyGigE0/44" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet48": { + "speed": "100000", + "description": "fortyGigE0/48" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet52": { + "speed": "100000", + "description": "fortyGigE0/52" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet56": { + "speed": "100000", + "description": "fortyGigE0/56" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet60": { + "speed": "100000", + "description": "fortyGigE0/60" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet64": { + "speed": "100000", + "description": "fortyGigE0/64" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet68": { + "speed": "100000", + "description": "fortyGigE0/68" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet72": { + "speed": "100000", + "description": "fortyGigE0/72" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet76": { + "speed": "100000", + "description": "fortyGigE0/76" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet80": { + "speed": "100000", + "description": "fortyGigE0/80" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet84": { + "speed": "100000", + "description": "fortyGigE0/84" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet88": { + "speed": "100000", + "description": "fortyGigE0/88" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet92": { + "speed": "100000", + "description": "fortyGigE0/92" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet96": { + "speed": "100000", + "description": "fortyGigE0/96" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet100": { + "speed": "100000", + "description": "fortyGigE0/100" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet104": { + "speed": "100000", + "description": "fortyGigE0/104" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet108": { + "speed": "100000", + "description": "fortyGigE0/108" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet112": { + "speed": "100000", + "description": "fortyGigE0/112" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet116": { + "speed": "100000", + "description": "fortyGigE0/116" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet120": { + "speed": "100000", + "description": "fortyGigE0/120" + }, + "OP": "SET" + }, + { + "PORT_TABLE:Ethernet124": { + "speed": "100000", + "description": "fortyGigE0/124" + }, + "OP": "SET" } ] diff --git a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7050.json b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7050.json index 9a6f8a2ada78..b15fcf7a36c1 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7050.json +++ b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7050.json @@ -119,196 +119,224 @@ "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet8": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet12": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet16": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet20": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet24": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet28": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet32": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet36": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet40": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet44": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet48": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet52": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet56": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet60": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet64": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet68": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet72": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet76": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet80": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet84": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet88": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet92": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet96": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet112": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet116": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet120": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet124": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" } }, "WRED_PROFILE": { diff --git a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7050cx3-dualtor.json b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7050cx3-dualtor.json new file mode 100644 index 000000000000..84a2613df90d --- /dev/null +++ b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7050cx3-dualtor.json @@ -0,0 +1,1145 @@ +{ + "MAP_PFC_PRIORITY_TO_QUEUE": { + "AZURE": { + "0": "0", + "1": "1", + "2": "2", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7" + } + }, + "TC_TO_QUEUE_MAP": { + "AZURE": { + "0": "0", + "1": "1", + "2": "1", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7" + } + }, + "DSCP_TO_TC_MAP": { + "AZURE": { + "0" : "1", + "1" : "1", + "2" : "1", + "3" : "3", + "4" : "4", + "5" : "1", + "6" : "1", + "7" : "1", + "8" : "0", + "9" : "1", + "10": "1", + "11": "1", + "12": "1", + "13": "1", + "14": "1", + "15": "1", + "16": "1", + "17": "1", + "18": "1", + "19": "1", + "20": "1", + "21": "1", + "22": "1", + "23": "1", + "24": "1", + "25": "1", + "26": "1", + "27": "1", + "28": "1", + "29": "1", + "30": "1", + "31": "1", + "32": "1", + "33": "2", + "34": "1", + "35": "1", + "36": "1", + "37": "1", + "38": "1", + "39": "1", + "40": "1", + "41": "1", + "42": "1", + "43": "1", + "44": "1", + "45": "1", + "46": "5", + "47": "1", + "48": "7", + "49": "1", + "50": "1", + "51": "1", + "52": "1", + "53": "1", + "54": "1", + "55": "1", + "56": "1", + "57": "1", + "58": "1", + "59": "1", + "60": "1", + "61": "1", + "62": "1", + "63": "1" + } + }, + "TC_TO_PRIORITY_GROUP_MAP": { + "AZURE": { + "0": "0", + "1": "0", + "2": "0", + "3": "3", + "4": "4", + "5": "0", + "6": "0", + "7": "7" + } + }, + "SCHEDULER": { + "scheduler.0": { + "type" : "DWRR", + "weight": "14" + }, + "scheduler.1": { + "type" : "DWRR", + "weight": "15" + } + }, + "PORT_QOS_MAP": { + "Ethernet0": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet4": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet8": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet12": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet16": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet20": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet24": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet28": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet32": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet36": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet40": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet44": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet48": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet52": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet56": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet60": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet64": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet68": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet72": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet76": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet80": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet84": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet88": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet92": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet96": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet100": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet104": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet108": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet112": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet116": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet120": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet124": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + } + }, + "WRED_PROFILE": { + "AZURE_LOSSLESS" : { + "wred_green_enable" : "true", + "wred_yellow_enable" : "true", + "wred_red_enable" : "true", + "ecn" : "ecn_all", + "green_max_threshold" : "2097152", + "green_min_threshold" : "1048576", + "yellow_max_threshold" : "2097152", + "yellow_min_threshold" : "1048576", + "red_max_threshold" : "2097152", + "red_min_threshold" : "1048576", + "green_drop_probability" : "5", + "yellow_drop_probability": "5", + "red_drop_probability" : "5" + } + }, + "QUEUE": { + "Ethernet0|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet4|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet8|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet12|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet16|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet20|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet24|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet28|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet32|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet36|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet40|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet44|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet48|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet52|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet56|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet60|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet64|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet68|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet72|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet76|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet80|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet84|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet88|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet92|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet96|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet100|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet104|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet108|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet112|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet116|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet120|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet124|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet0|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet4|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet8|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet12|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet16|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet20|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet24|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet28|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet32|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet36|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet40|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet44|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet48|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet52|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet56|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet60|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet64|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet68|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet72|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet76|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet80|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet84|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet88|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet92|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet96|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet100|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet104|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet108|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet112|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet116|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet120|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet124|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet0|0": { + "scheduler": "scheduler.0" + }, + "Ethernet4|0": { + "scheduler": "scheduler.0" + }, + "Ethernet8|0": { + "scheduler": "scheduler.0" + }, + "Ethernet12|0": { + "scheduler": "scheduler.0" + }, + "Ethernet16|0": { + "scheduler": "scheduler.0" + }, + "Ethernet20|0": { + "scheduler": "scheduler.0" + }, + "Ethernet24|0": { + "scheduler": "scheduler.0" + }, + "Ethernet28|0": { + "scheduler": "scheduler.0" + }, + "Ethernet32|0": { + "scheduler": "scheduler.0" + }, + "Ethernet36|0": { + "scheduler": "scheduler.0" + }, + "Ethernet40|0": { + "scheduler": "scheduler.0" + }, + "Ethernet44|0": { + "scheduler": "scheduler.0" + }, + "Ethernet48|0": { + "scheduler": "scheduler.0" + }, + "Ethernet52|0": { + "scheduler": "scheduler.0" + }, + "Ethernet56|0": { + "scheduler": "scheduler.0" + }, + "Ethernet60|0": { + "scheduler": "scheduler.0" + }, + "Ethernet64|0": { + "scheduler": "scheduler.0" + }, + "Ethernet68|0": { + "scheduler": "scheduler.0" + }, + "Ethernet72|0": { + "scheduler": "scheduler.0" + }, + "Ethernet76|0": { + "scheduler": "scheduler.0" + }, + "Ethernet80|0": { + "scheduler": "scheduler.0" + }, + "Ethernet84|0": { + "scheduler": "scheduler.0" + }, + "Ethernet88|0": { + "scheduler": "scheduler.0" + }, + "Ethernet92|0": { + "scheduler": "scheduler.0" + }, + "Ethernet96|0": { + "scheduler": "scheduler.0" + }, + "Ethernet100|0": { + "scheduler": "scheduler.0" + }, + "Ethernet104|0": { + "scheduler": "scheduler.0" + }, + "Ethernet108|0": { + "scheduler": "scheduler.0" + }, + "Ethernet112|0": { + "scheduler": "scheduler.0" + }, + "Ethernet116|0": { + "scheduler": "scheduler.0" + }, + "Ethernet120|0": { + "scheduler": "scheduler.0" + }, + "Ethernet124|0": { + "scheduler": "scheduler.0" + }, + "Ethernet0|1": { + "scheduler": "scheduler.0" + }, + "Ethernet4|1": { + "scheduler": "scheduler.0" + }, + "Ethernet8|1": { + "scheduler": "scheduler.0" + }, + "Ethernet12|1": { + "scheduler": "scheduler.0" + }, + "Ethernet16|1": { + "scheduler": "scheduler.0" + }, + "Ethernet20|1": { + "scheduler": "scheduler.0" + }, + "Ethernet24|1": { + "scheduler": "scheduler.0" + }, + "Ethernet28|1": { + "scheduler": "scheduler.0" + }, + "Ethernet32|1": { + "scheduler": "scheduler.0" + }, + "Ethernet36|1": { + "scheduler": "scheduler.0" + }, + "Ethernet40|1": { + "scheduler": "scheduler.0" + }, + "Ethernet44|1": { + "scheduler": "scheduler.0" + }, + "Ethernet48|1": { + "scheduler": "scheduler.0" + }, + "Ethernet52|1": { + "scheduler": "scheduler.0" + }, + "Ethernet56|1": { + "scheduler": "scheduler.0" + }, + "Ethernet60|1": { + "scheduler": "scheduler.0" + }, + "Ethernet64|1": { + "scheduler": "scheduler.0" + }, + "Ethernet68|1": { + "scheduler": "scheduler.0" + }, + "Ethernet72|1": { + "scheduler": "scheduler.0" + }, + "Ethernet76|1": { + "scheduler": "scheduler.0" + }, + "Ethernet80|1": { + "scheduler": "scheduler.0" + }, + "Ethernet84|1": { + "scheduler": "scheduler.0" + }, + "Ethernet88|1": { + "scheduler": "scheduler.0" + }, + "Ethernet92|1": { + "scheduler": "scheduler.0" + }, + "Ethernet96|1": { + "scheduler": "scheduler.0" + }, + "Ethernet100|1": { + "scheduler": "scheduler.0" + }, + "Ethernet104|1": { + "scheduler": "scheduler.0" + }, + "Ethernet108|1": { + "scheduler": "scheduler.0" + }, + "Ethernet112|1": { + "scheduler": "scheduler.0" + }, + "Ethernet116|1": { + "scheduler": "scheduler.0" + }, + "Ethernet120|1": { + "scheduler": "scheduler.0" + }, + "Ethernet124|1": { + "scheduler": "scheduler.0" + }, + "Ethernet0|2": { + "scheduler": "scheduler.0" + }, + "Ethernet4|2": { + "scheduler": "scheduler.0" + }, + "Ethernet8|2": { + "scheduler": "scheduler.0" + }, + "Ethernet12|2": { + "scheduler": "scheduler.0" + }, + "Ethernet16|2": { + "scheduler": "scheduler.0" + }, + "Ethernet20|2": { + "scheduler": "scheduler.0" + }, + "Ethernet24|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet28|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet32|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet36|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet40|2": { + "scheduler": "scheduler.0" + }, + "Ethernet44|2": { + "scheduler": "scheduler.0" + }, + "Ethernet48|2": { + "scheduler": "scheduler.0" + }, + "Ethernet52|2": { + "scheduler": "scheduler.0" + }, + "Ethernet56|2": { + "scheduler": "scheduler.0" + }, + "Ethernet60|2": { + "scheduler": "scheduler.0" + }, + "Ethernet64|2": { + "scheduler": "scheduler.0" + }, + "Ethernet68|2": { + "scheduler": "scheduler.0" + }, + "Ethernet72|2": { + "scheduler": "scheduler.0" + }, + "Ethernet76|2": { + "scheduler": "scheduler.0" + }, + "Ethernet80|2": { + "scheduler": "scheduler.0" + }, + "Ethernet84|2": { + "scheduler": "scheduler.0" + }, + "Ethernet88|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet92|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet96|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet100|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet104|2": { + "scheduler": "scheduler.0" + }, + "Ethernet108|2": { + "scheduler": "scheduler.0" + }, + "Ethernet112|2": { + "scheduler": "scheduler.0" + }, + "Ethernet116|2": { + "scheduler": "scheduler.0" + }, + "Ethernet120|2": { + "scheduler": "scheduler.0" + }, + "Ethernet124|2": { + "scheduler": "scheduler.0" + }, + "Ethernet0|5": { + "scheduler": "scheduler.0" + }, + "Ethernet4|5": { + "scheduler": "scheduler.0" + }, + "Ethernet8|5": { + "scheduler": "scheduler.0" + }, + "Ethernet12|5": { + "scheduler": "scheduler.0" + }, + "Ethernet16|5": { + "scheduler": "scheduler.0" + }, + "Ethernet20|5": { + "scheduler": "scheduler.0" + }, + "Ethernet24|5": { + "scheduler": "scheduler.0" + }, + "Ethernet28|5": { + "scheduler": "scheduler.0" + }, + "Ethernet32|5": { + "scheduler": "scheduler.0" + }, + "Ethernet36|5": { + "scheduler": "scheduler.0" + }, + "Ethernet40|5": { + "scheduler": "scheduler.0" + }, + "Ethernet44|5": { + "scheduler": "scheduler.0" + }, + "Ethernet48|5": { + "scheduler": "scheduler.0" + }, + "Ethernet52|5": { + "scheduler": "scheduler.0" + }, + "Ethernet56|5": { + "scheduler": "scheduler.0" + }, + "Ethernet60|5": { + "scheduler": "scheduler.0" + }, + "Ethernet64|5": { + "scheduler": "scheduler.0" + }, + "Ethernet68|5": { + "scheduler": "scheduler.0" + }, + "Ethernet72|5": { + "scheduler": "scheduler.0" + }, + "Ethernet76|5": { + "scheduler": "scheduler.0" + }, + "Ethernet80|5": { + "scheduler": "scheduler.0" + }, + "Ethernet84|5": { + "scheduler": "scheduler.0" + }, + "Ethernet88|5": { + "scheduler": "scheduler.0" + }, + "Ethernet92|5": { + "scheduler": "scheduler.0" + }, + "Ethernet96|5": { + "scheduler": "scheduler.0" + }, + "Ethernet100|5": { + "scheduler": "scheduler.0" + }, + "Ethernet104|5": { + "scheduler": "scheduler.0" + }, + "Ethernet108|5": { + "scheduler": "scheduler.0" + }, + "Ethernet112|5": { + "scheduler": "scheduler.0" + }, + "Ethernet116|5": { + "scheduler": "scheduler.0" + }, + "Ethernet120|5": { + "scheduler": "scheduler.0" + }, + "Ethernet124|5": { + "scheduler": "scheduler.0" + }, + "Ethernet0|6": { + "scheduler": "scheduler.0" + }, + "Ethernet4|6": { + "scheduler": "scheduler.0" + }, + "Ethernet8|6": { + "scheduler": "scheduler.0" + }, + "Ethernet12|6": { + "scheduler": "scheduler.0" + }, + "Ethernet16|6": { + "scheduler": "scheduler.0" + }, + "Ethernet20|6": { + "scheduler": "scheduler.0" + }, + "Ethernet24|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet28|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet32|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet36|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet40|6": { + "scheduler": "scheduler.0" + }, + "Ethernet44|6": { + "scheduler": "scheduler.0" + }, + "Ethernet48|6": { + "scheduler": "scheduler.0" + }, + "Ethernet52|6": { + "scheduler": "scheduler.0" + }, + "Ethernet56|6": { + "scheduler": "scheduler.0" + }, + "Ethernet60|6": { + "scheduler": "scheduler.0" + }, + "Ethernet64|6": { + "scheduler": "scheduler.0" + }, + "Ethernet68|6": { + "scheduler": "scheduler.0" + }, + "Ethernet72|6": { + "scheduler": "scheduler.0" + }, + "Ethernet76|6": { + "scheduler": "scheduler.0" + }, + "Ethernet80|6": { + "scheduler": "scheduler.0" + }, + "Ethernet84|6": { + "scheduler": "scheduler.0" + }, + "Ethernet88|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet92|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet96|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet100|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet104|6": { + "scheduler": "scheduler.0" + }, + "Ethernet108|6": { + "scheduler": "scheduler.0" + }, + "Ethernet112|6": { + "scheduler": "scheduler.0" + }, + "Ethernet116|6": { + "scheduler": "scheduler.0" + }, + "Ethernet120|6": { + "scheduler": "scheduler.0" + }, + "Ethernet124|6": { + "scheduler": "scheduler.0" + } + } +} diff --git a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-dualtor.json b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-dualtor.json new file mode 100644 index 000000000000..e8476cc0c865 --- /dev/null +++ b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-dualtor.json @@ -0,0 +1,2137 @@ +{ + "MAP_PFC_PRIORITY_TO_QUEUE": { + "AZURE": { + "0": "0", + "1": "1", + "2": "2", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7" + } + }, + "TC_TO_QUEUE_MAP": { + "AZURE": { + "0": "0", + "1": "1", + "2": "1", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7" + } + }, + "DSCP_TO_TC_MAP": { + "AZURE": { + "0" : "1", + "1" : "1", + "2" : "1", + "3" : "3", + "4" : "4", + "5" : "1", + "6" : "1", + "7" : "1", + "8" : "0", + "9" : "1", + "10": "1", + "11": "1", + "12": "1", + "13": "1", + "14": "1", + "15": "1", + "16": "1", + "17": "1", + "18": "1", + "19": "1", + "20": "1", + "21": "1", + "22": "1", + "23": "1", + "24": "1", + "25": "1", + "26": "1", + "27": "1", + "28": "1", + "29": "1", + "30": "1", + "31": "1", + "32": "1", + "33": "2", + "34": "1", + "35": "1", + "36": "1", + "37": "1", + "38": "1", + "39": "1", + "40": "1", + "41": "1", + "42": "1", + "43": "1", + "44": "1", + "45": "1", + "46": "5", + "47": "1", + "48": "7", + "49": "1", + "50": "1", + "51": "1", + "52": "1", + "53": "1", + "54": "1", + "55": "1", + "56": "1", + "57": "1", + "58": "1", + "59": "1", + "60": "1", + "61": "1", + "62": "1", + "63": "1" + } + }, + "TC_TO_PRIORITY_GROUP_MAP": { + "AZURE": { + "0": "0", + "1": "0", + "2": "0", + "3": "3", + "4": "4", + "5": "0", + "6": "0", + "7": "7" + } + }, + "SCHEDULER": { + "scheduler.0": { + "type" : "DWRR", + "weight": "14" + }, + "scheduler.1": { + "type" : "DWRR", + "weight": "15" + } + }, + "PORT_QOS_MAP": { + "Ethernet0": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet4": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet8": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet12": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet16": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet20": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet24": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet28": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet32": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet36": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet40": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet44": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet48": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet52": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet56": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet60": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet64": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet68": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet72": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet76": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet80": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet84": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet88": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet92": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet96": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet100": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet104": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet108": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet112": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet116": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet120": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet124": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet128": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet132": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet136": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet140": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet144": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet148": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet152": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet156": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet160": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet164": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet168": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet172": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet176": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet180": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet184": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet188": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet192": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet196": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet200": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet204": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet208": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet212": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet216": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet220": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet224": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet228": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet232": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet236": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet240": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet244": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet248": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet252": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + } + }, + "WRED_PROFILE": { + "AZURE_LOSSLESS" : { + "wred_green_enable" : "true", + "wred_yellow_enable" : "true", + "wred_red_enable" : "true", + "ecn" : "ecn_all", + "green_max_threshold" : "2097152", + "green_min_threshold" : "1048576", + "yellow_max_threshold" : "2097152", + "yellow_min_threshold" : "1048576", + "red_max_threshold" : "2097152", + "red_min_threshold" : "1048576", + "green_drop_probability" : "5", + "yellow_drop_probability": "5", + "red_drop_probability" : "5" + } + }, + "QUEUE": { + "Ethernet0|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet4|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet8|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet12|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet16|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet20|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet24|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet28|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet32|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet36|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet40|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet44|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet48|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet52|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet56|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet60|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet64|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet68|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet72|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet76|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet80|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet84|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet88|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet92|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet96|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet100|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet104|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet108|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet112|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet116|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet120|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet124|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet128|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet132|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet136|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet140|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet144|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet148|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet152|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet156|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet160|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet164|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet168|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet172|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet176|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet180|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet184|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet188|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet192|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet196|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet200|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet204|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet208|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet212|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet216|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet220|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet224|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet228|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet232|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet236|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet240|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet244|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet248|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet252|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet0|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet4|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet8|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet12|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet16|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet20|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet24|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet28|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet32|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet36|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet40|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet44|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet48|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet52|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet56|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet60|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet64|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet68|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet72|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet76|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet80|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet84|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet88|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet92|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet96|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet100|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet104|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet108|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet112|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet116|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet120|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet124|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet128|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet132|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet136|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet140|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet144|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet148|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet152|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet156|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet160|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet164|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet168|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet172|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet176|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet180|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet184|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet188|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet192|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet196|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet200|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet204|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet208|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet212|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet216|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet220|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet224|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet228|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet232|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet236|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet240|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet244|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet248|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet252|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet0|0": { + "scheduler": "scheduler.0" + }, + "Ethernet4|0": { + "scheduler": "scheduler.0" + }, + "Ethernet8|0": { + "scheduler": "scheduler.0" + }, + "Ethernet12|0": { + "scheduler": "scheduler.0" + }, + "Ethernet16|0": { + "scheduler": "scheduler.0" + }, + "Ethernet20|0": { + "scheduler": "scheduler.0" + }, + "Ethernet24|0": { + "scheduler": "scheduler.0" + }, + "Ethernet28|0": { + "scheduler": "scheduler.0" + }, + "Ethernet32|0": { + "scheduler": "scheduler.0" + }, + "Ethernet36|0": { + "scheduler": "scheduler.0" + }, + "Ethernet40|0": { + "scheduler": "scheduler.0" + }, + "Ethernet44|0": { + "scheduler": "scheduler.0" + }, + "Ethernet48|0": { + "scheduler": "scheduler.0" + }, + "Ethernet52|0": { + "scheduler": "scheduler.0" + }, + "Ethernet56|0": { + "scheduler": "scheduler.0" + }, + "Ethernet60|0": { + "scheduler": "scheduler.0" + }, + "Ethernet64|0": { + "scheduler": "scheduler.0" + }, + "Ethernet68|0": { + "scheduler": "scheduler.0" + }, + "Ethernet72|0": { + "scheduler": "scheduler.0" + }, + "Ethernet76|0": { + "scheduler": "scheduler.0" + }, + "Ethernet80|0": { + "scheduler": "scheduler.0" + }, + "Ethernet84|0": { + "scheduler": "scheduler.0" + }, + "Ethernet88|0": { + "scheduler": "scheduler.0" + }, + "Ethernet92|0": { + "scheduler": "scheduler.0" + }, + "Ethernet96|0": { + "scheduler": "scheduler.0" + }, + "Ethernet100|0": { + "scheduler": "scheduler.0" + }, + "Ethernet104|0": { + "scheduler": "scheduler.0" + }, + "Ethernet108|0": { + "scheduler": "scheduler.0" + }, + "Ethernet112|0": { + "scheduler": "scheduler.0" + }, + "Ethernet116|0": { + "scheduler": "scheduler.0" + }, + "Ethernet120|0": { + "scheduler": "scheduler.0" + }, + "Ethernet124|0": { + "scheduler": "scheduler.0" + }, + "Ethernet128|0": { + "scheduler": "scheduler.0" + }, + "Ethernet132|0": { + "scheduler": "scheduler.0" + }, + "Ethernet136|0": { + "scheduler": "scheduler.0" + }, + "Ethernet140|0": { + "scheduler": "scheduler.0" + }, + "Ethernet144|0": { + "scheduler": "scheduler.0" + }, + "Ethernet148|0": { + "scheduler": "scheduler.0" + }, + "Ethernet152|0": { + "scheduler": "scheduler.0" + }, + "Ethernet156|0": { + "scheduler": "scheduler.0" + }, + "Ethernet160|0": { + "scheduler": "scheduler.0" + }, + "Ethernet164|0": { + "scheduler": "scheduler.0" + }, + "Ethernet168|0": { + "scheduler": "scheduler.0" + }, + "Ethernet172|0": { + "scheduler": "scheduler.0" + }, + "Ethernet176|0": { + "scheduler": "scheduler.0" + }, + "Ethernet180|0": { + "scheduler": "scheduler.0" + }, + "Ethernet184|0": { + "scheduler": "scheduler.0" + }, + "Ethernet188|0": { + "scheduler": "scheduler.0" + }, + "Ethernet192|0": { + "scheduler": "scheduler.0" + }, + "Ethernet196|0": { + "scheduler": "scheduler.0" + }, + "Ethernet200|0": { + "scheduler": "scheduler.0" + }, + "Ethernet204|0": { + "scheduler": "scheduler.0" + }, + "Ethernet208|0": { + "scheduler": "scheduler.0" + }, + "Ethernet212|0": { + "scheduler": "scheduler.0" + }, + "Ethernet216|0": { + "scheduler": "scheduler.0" + }, + "Ethernet220|0": { + "scheduler": "scheduler.0" + }, + "Ethernet224|0": { + "scheduler": "scheduler.0" + }, + "Ethernet228|0": { + "scheduler": "scheduler.0" + }, + "Ethernet232|0": { + "scheduler": "scheduler.0" + }, + "Ethernet236|0": { + "scheduler": "scheduler.0" + }, + "Ethernet240|0": { + "scheduler": "scheduler.0" + }, + "Ethernet244|0": { + "scheduler": "scheduler.0" + }, + "Ethernet248|0": { + "scheduler": "scheduler.0" + }, + "Ethernet252|0": { + "scheduler": "scheduler.0" + }, + "Ethernet0|1": { + "scheduler": "scheduler.0" + }, + "Ethernet4|1": { + "scheduler": "scheduler.0" + }, + "Ethernet8|1": { + "scheduler": "scheduler.0" + }, + "Ethernet12|1": { + "scheduler": "scheduler.0" + }, + "Ethernet16|1": { + "scheduler": "scheduler.0" + }, + "Ethernet20|1": { + "scheduler": "scheduler.0" + }, + "Ethernet24|1": { + "scheduler": "scheduler.0" + }, + "Ethernet28|1": { + "scheduler": "scheduler.0" + }, + "Ethernet32|1": { + "scheduler": "scheduler.0" + }, + "Ethernet36|1": { + "scheduler": "scheduler.0" + }, + "Ethernet40|1": { + "scheduler": "scheduler.0" + }, + "Ethernet44|1": { + "scheduler": "scheduler.0" + }, + "Ethernet48|1": { + "scheduler": "scheduler.0" + }, + "Ethernet52|1": { + "scheduler": "scheduler.0" + }, + "Ethernet56|1": { + "scheduler": "scheduler.0" + }, + "Ethernet60|1": { + "scheduler": "scheduler.0" + }, + "Ethernet64|1": { + "scheduler": "scheduler.0" + }, + "Ethernet68|1": { + "scheduler": "scheduler.0" + }, + "Ethernet72|1": { + "scheduler": "scheduler.0" + }, + "Ethernet76|1": { + "scheduler": "scheduler.0" + }, + "Ethernet80|1": { + "scheduler": "scheduler.0" + }, + "Ethernet84|1": { + "scheduler": "scheduler.0" + }, + "Ethernet88|1": { + "scheduler": "scheduler.0" + }, + "Ethernet92|1": { + "scheduler": "scheduler.0" + }, + "Ethernet96|1": { + "scheduler": "scheduler.0" + }, + "Ethernet100|1": { + "scheduler": "scheduler.0" + }, + "Ethernet104|1": { + "scheduler": "scheduler.0" + }, + "Ethernet108|1": { + "scheduler": "scheduler.0" + }, + "Ethernet112|1": { + "scheduler": "scheduler.0" + }, + "Ethernet116|1": { + "scheduler": "scheduler.0" + }, + "Ethernet120|1": { + "scheduler": "scheduler.0" + }, + "Ethernet124|1": { + "scheduler": "scheduler.0" + }, + "Ethernet128|1": { + "scheduler": "scheduler.0" + }, + "Ethernet132|1": { + "scheduler": "scheduler.0" + }, + "Ethernet136|1": { + "scheduler": "scheduler.0" + }, + "Ethernet140|1": { + "scheduler": "scheduler.0" + }, + "Ethernet144|1": { + "scheduler": "scheduler.0" + }, + "Ethernet148|1": { + "scheduler": "scheduler.0" + }, + "Ethernet152|1": { + "scheduler": "scheduler.0" + }, + "Ethernet156|1": { + "scheduler": "scheduler.0" + }, + "Ethernet160|1": { + "scheduler": "scheduler.0" + }, + "Ethernet164|1": { + "scheduler": "scheduler.0" + }, + "Ethernet168|1": { + "scheduler": "scheduler.0" + }, + "Ethernet172|1": { + "scheduler": "scheduler.0" + }, + "Ethernet176|1": { + "scheduler": "scheduler.0" + }, + "Ethernet180|1": { + "scheduler": "scheduler.0" + }, + "Ethernet184|1": { + "scheduler": "scheduler.0" + }, + "Ethernet188|1": { + "scheduler": "scheduler.0" + }, + "Ethernet192|1": { + "scheduler": "scheduler.0" + }, + "Ethernet196|1": { + "scheduler": "scheduler.0" + }, + "Ethernet200|1": { + "scheduler": "scheduler.0" + }, + "Ethernet204|1": { + "scheduler": "scheduler.0" + }, + "Ethernet208|1": { + "scheduler": "scheduler.0" + }, + "Ethernet212|1": { + "scheduler": "scheduler.0" + }, + "Ethernet216|1": { + "scheduler": "scheduler.0" + }, + "Ethernet220|1": { + "scheduler": "scheduler.0" + }, + "Ethernet224|1": { + "scheduler": "scheduler.0" + }, + "Ethernet228|1": { + "scheduler": "scheduler.0" + }, + "Ethernet232|1": { + "scheduler": "scheduler.0" + }, + "Ethernet236|1": { + "scheduler": "scheduler.0" + }, + "Ethernet240|1": { + "scheduler": "scheduler.0" + }, + "Ethernet244|1": { + "scheduler": "scheduler.0" + }, + "Ethernet248|1": { + "scheduler": "scheduler.0" + }, + "Ethernet252|1": { + "scheduler": "scheduler.0" + }, + "Ethernet0|2": { + "scheduler": "scheduler.0" + }, + "Ethernet4|2": { + "scheduler": "scheduler.0" + }, + "Ethernet8|2": { + "scheduler": "scheduler.0" + }, + "Ethernet12|2": { + "scheduler": "scheduler.0" + }, + "Ethernet16|2": { + "scheduler": "scheduler.0" + }, + "Ethernet20|2": { + "scheduler": "scheduler.0" + }, + "Ethernet24|2": { + "scheduler": "scheduler.0" + }, + "Ethernet28|2": { + "scheduler": "scheduler.0" + }, + "Ethernet32|2": { + "scheduler": "scheduler.0" + }, + "Ethernet36|2": { + "scheduler": "scheduler.0" + }, + "Ethernet40|2": { + "scheduler": "scheduler.0" + }, + "Ethernet44|2": { + "scheduler": "scheduler.0" + }, + "Ethernet48|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet52|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet56|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet60|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet64|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet68|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet72|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet76|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet80|2": { + "scheduler": "scheduler.0" + }, + "Ethernet84|2": { + "scheduler": "scheduler.0" + }, + "Ethernet88|2": { + "scheduler": "scheduler.0" + }, + "Ethernet92|2": { + "scheduler": "scheduler.0" + }, + "Ethernet96|2": { + "scheduler": "scheduler.0" + }, + "Ethernet100|2": { + "scheduler": "scheduler.0" + }, + "Ethernet104|2": { + "scheduler": "scheduler.0" + }, + "Ethernet108|2": { + "scheduler": "scheduler.0" + }, + "Ethernet112|2": { + "scheduler": "scheduler.0" + }, + "Ethernet116|2": { + "scheduler": "scheduler.0" + }, + "Ethernet120|2": { + "scheduler": "scheduler.0" + }, + "Ethernet124|2": { + "scheduler": "scheduler.0" + }, + "Ethernet128|2": { + "scheduler": "scheduler.0" + }, + "Ethernet132|2": { + "scheduler": "scheduler.0" + }, + "Ethernet136|2": { + "scheduler": "scheduler.0" + }, + "Ethernet140|2": { + "scheduler": "scheduler.0" + }, + "Ethernet144|2": { + "scheduler": "scheduler.0" + }, + "Ethernet148|2": { + "scheduler": "scheduler.0" + }, + "Ethernet152|2": { + "scheduler": "scheduler.0" + }, + "Ethernet156|2": { + "scheduler": "scheduler.0" + }, + "Ethernet160|2": { + "scheduler": "scheduler.0" + }, + "Ethernet164|2": { + "scheduler": "scheduler.0" + }, + "Ethernet168|2": { + "scheduler": "scheduler.0" + }, + "Ethernet172|2": { + "scheduler": "scheduler.0" + }, + "Ethernet176|2": { + "scheduler": "scheduler.0" + }, + "Ethernet180|2": { + "scheduler": "scheduler.0" + }, + "Ethernet184|2": { + "scheduler": "scheduler.0" + }, + "Ethernet188|2": { + "scheduler": "scheduler.0" + }, + "Ethernet192|2": { + "scheduler": "scheduler.0" + }, + "Ethernet196|2": { + "scheduler": "scheduler.0" + }, + "Ethernet200|2": { + "scheduler": "scheduler.0" + }, + "Ethernet204|2": { + "scheduler": "scheduler.0" + }, + "Ethernet208|2": { + "scheduler": "scheduler.0" + }, + "Ethernet212|2": { + "scheduler": "scheduler.0" + }, + "Ethernet216|2": { + "scheduler": "scheduler.0" + }, + "Ethernet220|2": { + "scheduler": "scheduler.0" + }, + "Ethernet224|2": { + "scheduler": "scheduler.0" + }, + "Ethernet228|2": { + "scheduler": "scheduler.0" + }, + "Ethernet232|2": { + "scheduler": "scheduler.0" + }, + "Ethernet236|2": { + "scheduler": "scheduler.0" + }, + "Ethernet240|2": { + "scheduler": "scheduler.0" + }, + "Ethernet244|2": { + "scheduler": "scheduler.0" + }, + "Ethernet248|2": { + "scheduler": "scheduler.0" + }, + "Ethernet252|2": { + "scheduler": "scheduler.0" + }, + "Ethernet0|5": { + "scheduler": "scheduler.0" + }, + "Ethernet4|5": { + "scheduler": "scheduler.0" + }, + "Ethernet8|5": { + "scheduler": "scheduler.0" + }, + "Ethernet12|5": { + "scheduler": "scheduler.0" + }, + "Ethernet16|5": { + "scheduler": "scheduler.0" + }, + "Ethernet20|5": { + "scheduler": "scheduler.0" + }, + "Ethernet24|5": { + "scheduler": "scheduler.0" + }, + "Ethernet28|5": { + "scheduler": "scheduler.0" + }, + "Ethernet32|5": { + "scheduler": "scheduler.0" + }, + "Ethernet36|5": { + "scheduler": "scheduler.0" + }, + "Ethernet40|5": { + "scheduler": "scheduler.0" + }, + "Ethernet44|5": { + "scheduler": "scheduler.0" + }, + "Ethernet48|5": { + "scheduler": "scheduler.0" + }, + "Ethernet52|5": { + "scheduler": "scheduler.0" + }, + "Ethernet56|5": { + "scheduler": "scheduler.0" + }, + "Ethernet60|5": { + "scheduler": "scheduler.0" + }, + "Ethernet64|5": { + "scheduler": "scheduler.0" + }, + "Ethernet68|5": { + "scheduler": "scheduler.0" + }, + "Ethernet72|5": { + "scheduler": "scheduler.0" + }, + "Ethernet76|5": { + "scheduler": "scheduler.0" + }, + "Ethernet80|5": { + "scheduler": "scheduler.0" + }, + "Ethernet84|5": { + "scheduler": "scheduler.0" + }, + "Ethernet88|5": { + "scheduler": "scheduler.0" + }, + "Ethernet92|5": { + "scheduler": "scheduler.0" + }, + "Ethernet96|5": { + "scheduler": "scheduler.0" + }, + "Ethernet100|5": { + "scheduler": "scheduler.0" + }, + "Ethernet104|5": { + "scheduler": "scheduler.0" + }, + "Ethernet108|5": { + "scheduler": "scheduler.0" + }, + "Ethernet112|5": { + "scheduler": "scheduler.0" + }, + "Ethernet116|5": { + "scheduler": "scheduler.0" + }, + "Ethernet120|5": { + "scheduler": "scheduler.0" + }, + "Ethernet124|5": { + "scheduler": "scheduler.0" + }, + "Ethernet128|5": { + "scheduler": "scheduler.0" + }, + "Ethernet132|5": { + "scheduler": "scheduler.0" + }, + "Ethernet136|5": { + "scheduler": "scheduler.0" + }, + "Ethernet140|5": { + "scheduler": "scheduler.0" + }, + "Ethernet144|5": { + "scheduler": "scheduler.0" + }, + "Ethernet148|5": { + "scheduler": "scheduler.0" + }, + "Ethernet152|5": { + "scheduler": "scheduler.0" + }, + "Ethernet156|5": { + "scheduler": "scheduler.0" + }, + "Ethernet160|5": { + "scheduler": "scheduler.0" + }, + "Ethernet164|5": { + "scheduler": "scheduler.0" + }, + "Ethernet168|5": { + "scheduler": "scheduler.0" + }, + "Ethernet172|5": { + "scheduler": "scheduler.0" + }, + "Ethernet176|5": { + "scheduler": "scheduler.0" + }, + "Ethernet180|5": { + "scheduler": "scheduler.0" + }, + "Ethernet184|5": { + "scheduler": "scheduler.0" + }, + "Ethernet188|5": { + "scheduler": "scheduler.0" + }, + "Ethernet192|5": { + "scheduler": "scheduler.0" + }, + "Ethernet196|5": { + "scheduler": "scheduler.0" + }, + "Ethernet200|5": { + "scheduler": "scheduler.0" + }, + "Ethernet204|5": { + "scheduler": "scheduler.0" + }, + "Ethernet208|5": { + "scheduler": "scheduler.0" + }, + "Ethernet212|5": { + "scheduler": "scheduler.0" + }, + "Ethernet216|5": { + "scheduler": "scheduler.0" + }, + "Ethernet220|5": { + "scheduler": "scheduler.0" + }, + "Ethernet224|5": { + "scheduler": "scheduler.0" + }, + "Ethernet228|5": { + "scheduler": "scheduler.0" + }, + "Ethernet232|5": { + "scheduler": "scheduler.0" + }, + "Ethernet236|5": { + "scheduler": "scheduler.0" + }, + "Ethernet240|5": { + "scheduler": "scheduler.0" + }, + "Ethernet244|5": { + "scheduler": "scheduler.0" + }, + "Ethernet248|5": { + "scheduler": "scheduler.0" + }, + "Ethernet252|5": { + "scheduler": "scheduler.0" + }, + "Ethernet0|6": { + "scheduler": "scheduler.0" + }, + "Ethernet4|6": { + "scheduler": "scheduler.0" + }, + "Ethernet8|6": { + "scheduler": "scheduler.0" + }, + "Ethernet12|6": { + "scheduler": "scheduler.0" + }, + "Ethernet16|6": { + "scheduler": "scheduler.0" + }, + "Ethernet20|6": { + "scheduler": "scheduler.0" + }, + "Ethernet24|6": { + "scheduler": "scheduler.0" + }, + "Ethernet28|6": { + "scheduler": "scheduler.0" + }, + "Ethernet32|6": { + "scheduler": "scheduler.0" + }, + "Ethernet36|6": { + "scheduler": "scheduler.0" + }, + "Ethernet40|6": { + "scheduler": "scheduler.0" + }, + "Ethernet44|6": { + "scheduler": "scheduler.0" + }, + "Ethernet48|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet52|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet56|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet60|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet64|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet68|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet72|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet76|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet80|6": { + "scheduler": "scheduler.0" + }, + "Ethernet84|6": { + "scheduler": "scheduler.0" + }, + "Ethernet88|6": { + "scheduler": "scheduler.0" + }, + "Ethernet92|6": { + "scheduler": "scheduler.0" + }, + "Ethernet96|6": { + "scheduler": "scheduler.0" + }, + "Ethernet100|6": { + "scheduler": "scheduler.0" + }, + "Ethernet104|6": { + "scheduler": "scheduler.0" + }, + "Ethernet108|6": { + "scheduler": "scheduler.0" + }, + "Ethernet112|6": { + "scheduler": "scheduler.0" + }, + "Ethernet116|6": { + "scheduler": "scheduler.0" + }, + "Ethernet120|6": { + "scheduler": "scheduler.0" + }, + "Ethernet124|6": { + "scheduler": "scheduler.0" + }, + "Ethernet128|6": { + "scheduler": "scheduler.0" + }, + "Ethernet132|6": { + "scheduler": "scheduler.0" + }, + "Ethernet136|6": { + "scheduler": "scheduler.0" + }, + "Ethernet140|6": { + "scheduler": "scheduler.0" + }, + "Ethernet144|6": { + "scheduler": "scheduler.0" + }, + "Ethernet148|6": { + "scheduler": "scheduler.0" + }, + "Ethernet152|6": { + "scheduler": "scheduler.0" + }, + "Ethernet156|6": { + "scheduler": "scheduler.0" + }, + "Ethernet160|6": { + "scheduler": "scheduler.0" + }, + "Ethernet164|6": { + "scheduler": "scheduler.0" + }, + "Ethernet168|6": { + "scheduler": "scheduler.0" + }, + "Ethernet172|6": { + "scheduler": "scheduler.0" + }, + "Ethernet176|6": { + "scheduler": "scheduler.0" + }, + "Ethernet180|6": { + "scheduler": "scheduler.0" + }, + "Ethernet184|6": { + "scheduler": "scheduler.0" + }, + "Ethernet188|6": { + "scheduler": "scheduler.0" + }, + "Ethernet192|6": { + "scheduler": "scheduler.0" + }, + "Ethernet196|6": { + "scheduler": "scheduler.0" + }, + "Ethernet200|6": { + "scheduler": "scheduler.0" + }, + "Ethernet204|6": { + "scheduler": "scheduler.0" + }, + "Ethernet208|6": { + "scheduler": "scheduler.0" + }, + "Ethernet212|6": { + "scheduler": "scheduler.0" + }, + "Ethernet216|6": { + "scheduler": "scheduler.0" + }, + "Ethernet220|6": { + "scheduler": "scheduler.0" + }, + "Ethernet224|6": { + "scheduler": "scheduler.0" + }, + "Ethernet228|6": { + "scheduler": "scheduler.0" + }, + "Ethernet232|6": { + "scheduler": "scheduler.0" + }, + "Ethernet236|6": { + "scheduler": "scheduler.0" + }, + "Ethernet240|6": { + "scheduler": "scheduler.0" + }, + "Ethernet244|6": { + "scheduler": "scheduler.0" + }, + "Ethernet248|6": { + "scheduler": "scheduler.0" + }, + "Ethernet252|6": { + "scheduler": "scheduler.0" + } + } +} diff --git a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-t1.json b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-t1.json new file mode 100644 index 000000000000..9db828a759e4 --- /dev/null +++ b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-t1.json @@ -0,0 +1,1045 @@ +{ + "MAP_PFC_PRIORITY_TO_QUEUE": { + "AZURE": { + "0": "0", + "1": "1", + "2": "2", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7" + } + }, + "TC_TO_QUEUE_MAP": { + "AZURE": { + "0": "0", + "1": "1", + "2": "2", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7" + } + }, + "DSCP_TO_TC_MAP": { + "AZURE": { + "0" : "1", + "1" : "1", + "2" : "2", + "3" : "3", + "4" : "4", + "5" : "1", + "6" : "6", + "7" : "1", + "8" : "0", + "9" : "1", + "10": "1", + "11": "1", + "12": "1", + "13": "1", + "14": "1", + "15": "1", + "16": "1", + "17": "1", + "18": "1", + "19": "1", + "20": "1", + "21": "1", + "22": "1", + "23": "1", + "24": "1", + "25": "1", + "26": "1", + "27": "1", + "28": "1", + "29": "1", + "30": "1", + "31": "1", + "32": "1", + "33": "1", + "34": "1", + "35": "1", + "36": "1", + "37": "1", + "38": "1", + "39": "1", + "40": "1", + "41": "1", + "42": "1", + "43": "1", + "44": "1", + "45": "1", + "46": "5", + "47": "1", + "48": "7", + "49": "1", + "50": "1", + "51": "1", + "52": "1", + "53": "1", + "54": "1", + "55": "1", + "56": "1", + "57": "1", + "58": "1", + "59": "1", + "60": "1", + "61": "1", + "62": "1", + "63": "1" + } + }, + "TC_TO_PRIORITY_GROUP_MAP": { + "AZURE": { + "0": "0", + "1": "0", + "2": "2", + "3": "3", + "4": "4", + "5": "0", + "6": "6", + "7": "7" + } + }, + "SCHEDULER": { + "scheduler.0": { + "type" : "DWRR", + "weight": "14" + }, + "scheduler.1": { + "type" : "DWRR", + "weight": "15" + } + }, + "PORT_QOS_MAP": { + "Ethernet0": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet4": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet16": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet20": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet64": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet68": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet80": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet84": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet136": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet144": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet148": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet152": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet156": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet168": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet176": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet180": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet184": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet188": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet200": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet208": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet212": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet216": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet220": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet232": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet240": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet244": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet248": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + }, + "Ethernet252": { + "dscp_to_tc_map" : "AZURE", + "tc_to_queue_map" : "AZURE", + "tc_to_pg_map" : "AZURE", + "pfc_to_queue_map": "AZURE", + "pfc_enable" : "2,3,4,6", + "pfcwd_sw_enable" : "3,4" + } + }, + "WRED_PROFILE": { + "AZURE_LOSSLESS" : { + "wred_green_enable" : "true", + "wred_yellow_enable" : "true", + "wred_red_enable" : "true", + "ecn" : "ecn_all", + "green_max_threshold" : "2097152", + "green_min_threshold" : "1048576", + "yellow_max_threshold" : "2097152", + "yellow_min_threshold" : "1048576", + "red_max_threshold" : "2097152", + "red_min_threshold" : "1048576", + "green_drop_probability" : "5", + "yellow_drop_probability": "5", + "red_drop_probability" : "5" + } + }, + "QUEUE": { + "Ethernet0|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet4|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet16|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet20|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet64|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet68|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet80|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet84|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet136|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet144|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet148|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet152|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet156|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet168|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet176|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet180|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet184|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet188|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet200|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet208|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet212|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet216|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet220|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet232|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet240|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet244|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet248|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet252|3": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet0|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet4|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet16|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet20|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet64|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet68|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet80|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet84|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet136|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet144|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet148|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet152|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet156|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet168|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet176|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet180|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet184|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet188|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet200|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet208|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet212|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet216|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet220|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet232|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet240|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet244|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet248|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet252|4": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet0|0": { + "scheduler": "scheduler.0" + }, + "Ethernet4|0": { + "scheduler": "scheduler.0" + }, + "Ethernet16|0": { + "scheduler": "scheduler.0" + }, + "Ethernet20|0": { + "scheduler": "scheduler.0" + }, + "Ethernet64|0": { + "scheduler": "scheduler.0" + }, + "Ethernet68|0": { + "scheduler": "scheduler.0" + }, + "Ethernet80|0": { + "scheduler": "scheduler.0" + }, + "Ethernet84|0": { + "scheduler": "scheduler.0" + }, + "Ethernet136|0": { + "scheduler": "scheduler.0" + }, + "Ethernet144|0": { + "scheduler": "scheduler.0" + }, + "Ethernet148|0": { + "scheduler": "scheduler.0" + }, + "Ethernet152|0": { + "scheduler": "scheduler.0" + }, + "Ethernet156|0": { + "scheduler": "scheduler.0" + }, + "Ethernet168|0": { + "scheduler": "scheduler.0" + }, + "Ethernet176|0": { + "scheduler": "scheduler.0" + }, + "Ethernet180|0": { + "scheduler": "scheduler.0" + }, + "Ethernet184|0": { + "scheduler": "scheduler.0" + }, + "Ethernet188|0": { + "scheduler": "scheduler.0" + }, + "Ethernet200|0": { + "scheduler": "scheduler.0" + }, + "Ethernet208|0": { + "scheduler": "scheduler.0" + }, + "Ethernet212|0": { + "scheduler": "scheduler.0" + }, + "Ethernet216|0": { + "scheduler": "scheduler.0" + }, + "Ethernet220|0": { + "scheduler": "scheduler.0" + }, + "Ethernet232|0": { + "scheduler": "scheduler.0" + }, + "Ethernet240|0": { + "scheduler": "scheduler.0" + }, + "Ethernet244|0": { + "scheduler": "scheduler.0" + }, + "Ethernet248|0": { + "scheduler": "scheduler.0" + }, + "Ethernet252|0": { + "scheduler": "scheduler.0" + }, + "Ethernet0|1": { + "scheduler": "scheduler.0" + }, + "Ethernet4|1": { + "scheduler": "scheduler.0" + }, + "Ethernet16|1": { + "scheduler": "scheduler.0" + }, + "Ethernet20|1": { + "scheduler": "scheduler.0" + }, + "Ethernet64|1": { + "scheduler": "scheduler.0" + }, + "Ethernet68|1": { + "scheduler": "scheduler.0" + }, + "Ethernet80|1": { + "scheduler": "scheduler.0" + }, + "Ethernet84|1": { + "scheduler": "scheduler.0" + }, + "Ethernet136|1": { + "scheduler": "scheduler.0" + }, + "Ethernet144|1": { + "scheduler": "scheduler.0" + }, + "Ethernet148|1": { + "scheduler": "scheduler.0" + }, + "Ethernet152|1": { + "scheduler": "scheduler.0" + }, + "Ethernet156|1": { + "scheduler": "scheduler.0" + }, + "Ethernet168|1": { + "scheduler": "scheduler.0" + }, + "Ethernet176|1": { + "scheduler": "scheduler.0" + }, + "Ethernet180|1": { + "scheduler": "scheduler.0" + }, + "Ethernet184|1": { + "scheduler": "scheduler.0" + }, + "Ethernet188|1": { + "scheduler": "scheduler.0" + }, + "Ethernet200|1": { + "scheduler": "scheduler.0" + }, + "Ethernet208|1": { + "scheduler": "scheduler.0" + }, + "Ethernet212|1": { + "scheduler": "scheduler.0" + }, + "Ethernet216|1": { + "scheduler": "scheduler.0" + }, + "Ethernet220|1": { + "scheduler": "scheduler.0" + }, + "Ethernet232|1": { + "scheduler": "scheduler.0" + }, + "Ethernet240|1": { + "scheduler": "scheduler.0" + }, + "Ethernet244|1": { + "scheduler": "scheduler.0" + }, + "Ethernet248|1": { + "scheduler": "scheduler.0" + }, + "Ethernet252|1": { + "scheduler": "scheduler.0" + }, + "Ethernet0|2": { + "scheduler": "scheduler.0" + }, + "Ethernet4|2": { + "scheduler": "scheduler.0" + }, + "Ethernet16|2": { + "scheduler": "scheduler.0" + }, + "Ethernet20|2": { + "scheduler": "scheduler.0" + }, + "Ethernet64|2": { + "scheduler": "scheduler.0" + }, + "Ethernet68|2": { + "scheduler": "scheduler.0" + }, + "Ethernet80|2": { + "scheduler": "scheduler.0" + }, + "Ethernet84|2": { + "scheduler": "scheduler.0" + }, + "Ethernet136|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet144|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet148|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet152|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet156|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet168|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet176|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet180|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet184|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet188|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet200|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet208|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet212|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet216|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet220|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet232|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet240|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet244|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet248|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet252|2": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet0|5": { + "scheduler": "scheduler.0" + }, + "Ethernet4|5": { + "scheduler": "scheduler.0" + }, + "Ethernet16|5": { + "scheduler": "scheduler.0" + }, + "Ethernet20|5": { + "scheduler": "scheduler.0" + }, + "Ethernet64|5": { + "scheduler": "scheduler.0" + }, + "Ethernet68|5": { + "scheduler": "scheduler.0" + }, + "Ethernet80|5": { + "scheduler": "scheduler.0" + }, + "Ethernet84|5": { + "scheduler": "scheduler.0" + }, + "Ethernet136|5": { + "scheduler": "scheduler.0" + }, + "Ethernet144|5": { + "scheduler": "scheduler.0" + }, + "Ethernet148|5": { + "scheduler": "scheduler.0" + }, + "Ethernet152|5": { + "scheduler": "scheduler.0" + }, + "Ethernet156|5": { + "scheduler": "scheduler.0" + }, + "Ethernet168|5": { + "scheduler": "scheduler.0" + }, + "Ethernet176|5": { + "scheduler": "scheduler.0" + }, + "Ethernet180|5": { + "scheduler": "scheduler.0" + }, + "Ethernet184|5": { + "scheduler": "scheduler.0" + }, + "Ethernet188|5": { + "scheduler": "scheduler.0" + }, + "Ethernet200|5": { + "scheduler": "scheduler.0" + }, + "Ethernet208|5": { + "scheduler": "scheduler.0" + }, + "Ethernet212|5": { + "scheduler": "scheduler.0" + }, + "Ethernet216|5": { + "scheduler": "scheduler.0" + }, + "Ethernet220|5": { + "scheduler": "scheduler.0" + }, + "Ethernet232|5": { + "scheduler": "scheduler.0" + }, + "Ethernet240|5": { + "scheduler": "scheduler.0" + }, + "Ethernet244|5": { + "scheduler": "scheduler.0" + }, + "Ethernet248|5": { + "scheduler": "scheduler.0" + }, + "Ethernet252|5": { + "scheduler": "scheduler.0" + }, + "Ethernet0|6": { + "scheduler": "scheduler.0" + }, + "Ethernet4|6": { + "scheduler": "scheduler.0" + }, + "Ethernet16|6": { + "scheduler": "scheduler.0" + }, + "Ethernet20|6": { + "scheduler": "scheduler.0" + }, + "Ethernet64|6": { + "scheduler": "scheduler.0" + }, + "Ethernet68|6": { + "scheduler": "scheduler.0" + }, + "Ethernet80|6": { + "scheduler": "scheduler.0" + }, + "Ethernet84|6": { + "scheduler": "scheduler.0" + }, + "Ethernet136|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet144|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet148|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet152|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet156|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet168|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet176|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet180|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet184|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet188|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet200|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet208|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet212|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet216|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet220|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet232|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet240|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet244|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet248|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + }, + "Ethernet252|6": { + "scheduler" : "scheduler.1", + "wred_profile": "AZURE_LOSSLESS" + } + } +} diff --git a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7800r3-48cq2-lc.json b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7800r3-48cq2-lc.json index 3044749a2776..92ba2caf8d17 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7800r3-48cq2-lc.json +++ b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7800r3-48cq2-lc.json @@ -119,315 +119,360 @@ "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet4": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet8": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet12": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet16": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet20": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet24": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet28": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet32": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet36": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet40": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet44": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet48": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet52": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet56": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet60": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet64": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet68": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet72": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet76": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet80": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet84": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet88": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet92": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet96": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet100": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet104": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet108": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet112": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet116": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet120": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet124": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet128": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet132": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet136": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet140": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet144": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet148": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet152": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet156": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet164": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet176": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet180": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet184": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet188": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" } }, "WRED_PROFILE": { diff --git a/src/sonic-config-engine/tests/sample_output/py3/qos-dell6100.json b/src/sonic-config-engine/tests/sample_output/py3/qos-dell6100.json index eecd81c99e5c..27bea8cd32d3 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/qos-dell6100.json +++ b/src/sonic-config-engine/tests/sample_output/py3/qos-dell6100.json @@ -119,308 +119,352 @@ "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet1": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet4": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet5": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet6": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet7": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet8": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet9": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet10": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet11": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet12": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet13": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet14": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet15": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet16": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet17": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet20": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet21": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet22": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet23": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet24": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet25": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet26": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet27": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet28": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet29": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet30": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet31": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet32": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet36": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet37": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet38": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet39": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet40": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet41": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet42": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet48": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet52": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet53": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet54": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet55": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet56": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet57": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet58": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" } }, "WRED_PROFILE": { diff --git a/src/sonic-config-engine/tests/sample_output/py3/qos-dell9332.json b/src/sonic-config-engine/tests/sample_output/py3/qos-dell9332.json index 39f4b26e8372..8130a455497a 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/qos-dell9332.json +++ b/src/sonic-config-engine/tests/sample_output/py3/qos-dell9332.json @@ -123,224 +123,256 @@ "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet8": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet16": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet24": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet32": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet40": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet48": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet56": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet64": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet72": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet80": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet88": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet96": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet104": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet112": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet120": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet128": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet136": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet144": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet152": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet160": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet168": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet176": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet184": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet192": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet200": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet208": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet216": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet224": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet232": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet240": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet248": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" } }, "WRED_PROFILE": { diff --git a/src/sonic-config-engine/tests/simple-sample-graph-case.xml b/src/sonic-config-engine/tests/simple-sample-graph-case.xml index 08f750457499..d6a8c394f604 100644 --- a/src/sonic-config-engine/tests/simple-sample-graph-case.xml +++ b/src/sonic-config-engine/tests/simple-sample-graph-case.xml @@ -527,6 +527,342 @@ 100000 Interface description + + DeviceInterface + + true + 1 + fortyGigE0/16 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/20 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/24 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/28 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/32 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/36 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/40 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/44 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/48 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/52 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/56 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/60 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/64 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/68 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/72 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/76 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/80 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/84 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/88 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/92 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/96 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/100 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/104 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/108 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/112 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/116 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/120 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/124 + + false + 0 + 0 + 100000 + true 0 diff --git a/src/sonic-config-engine/tests/simple-sample-graph-metadata.xml b/src/sonic-config-engine/tests/simple-sample-graph-metadata.xml index 5691ff81578a..fbc33b49862a 100644 --- a/src/sonic-config-engine/tests/simple-sample-graph-metadata.xml +++ b/src/sonic-config-engine/tests/simple-sample-graph-metadata.xml @@ -321,6 +321,342 @@ 100000 Interface description + + DeviceInterface + + true + 1 + fortyGigE0/16 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/20 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/24 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/28 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/32 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/36 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/40 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/44 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/48 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/52 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/56 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/60 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/64 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/68 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/72 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/76 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/80 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/84 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/88 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/92 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/96 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/100 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/104 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/108 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/112 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/116 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/120 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/124 + + false + 0 + 0 + 100000 + true 0 diff --git a/src/sonic-config-engine/tests/simple-sample-graph.xml b/src/sonic-config-engine/tests/simple-sample-graph.xml index 388627f8cdbf..a8bd8b0b4685 100644 --- a/src/sonic-config-engine/tests/simple-sample-graph.xml +++ b/src/sonic-config-engine/tests/simple-sample-graph.xml @@ -72,7 +72,7 @@ - 0 + 1 BGPMonitor @@ -415,6 +415,330 @@ 0 100000 + + DeviceInterface + + true + 1 + fortyGigE0/20 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/24 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/28 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/32 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/36 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/40 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/44 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/48 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/52 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/56 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/60 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/64 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/68 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/72 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/76 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/80 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/84 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/88 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/92 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/96 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/100 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/104 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/108 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/112 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/116 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/120 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/124 + + false + 0 + 0 + 100000 + true 0 diff --git a/src/sonic-config-engine/tests/t0-sample-bgp-speaker.xml b/src/sonic-config-engine/tests/t0-sample-bgp-speaker.xml index f2690985d9f3..552d219964c2 100644 --- a/src/sonic-config-engine/tests/t0-sample-bgp-speaker.xml +++ b/src/sonic-config-engine/tests/t0-sample-bgp-speaker.xml @@ -327,6 +327,400 @@ + + + + + DeviceInterface + + true + 1 + fortyGigE0/0 + + false + 0 + 0 + 10000 + + + DeviceInterface + + true + 1 + fortyGigE0/4 + + false + 0 + 0 + 25000 + + + DeviceInterface + + true + 1 + fortyGigE0/8 + + false + 0 + 0 + 40000 + Interface description + + + DeviceInterface + + true + 1 + fortyGigE0/12 + + false + 0 + 0 + 100000 + Interface description + + + DeviceInterface + + true + 1 + fortyGigE0/16 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/20 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/24 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/28 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/32 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/36 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/40 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/44 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/48 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/52 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/56 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/60 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/64 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/68 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/72 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/76 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/80 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/84 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/88 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/92 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/96 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/100 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/104 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/108 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/112 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/116 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/120 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/124 + + false + 0 + 0 + 100000 + + + Force10-S6000 + + + diff --git a/src/sonic-config-engine/tests/t0-sample-deployment-id.xml b/src/sonic-config-engine/tests/t0-sample-deployment-id.xml index b6b47d979102..30517dfee19f 100644 --- a/src/sonic-config-engine/tests/t0-sample-deployment-id.xml +++ b/src/sonic-config-engine/tests/t0-sample-deployment-id.xml @@ -327,6 +327,400 @@ + + + + + DeviceInterface + + true + 1 + fortyGigE0/0 + + false + 0 + 0 + 10000 + + + DeviceInterface + + true + 1 + fortyGigE0/4 + + false + 0 + 0 + 25000 + + + DeviceInterface + + true + 1 + fortyGigE0/8 + + false + 0 + 0 + 40000 + Interface description + + + DeviceInterface + + true + 1 + fortyGigE0/12 + + false + 0 + 0 + 100000 + Interface description + + + DeviceInterface + + true + 1 + fortyGigE0/16 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/20 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/24 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/28 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/32 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/36 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/40 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/44 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/48 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/52 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/56 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/60 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/64 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/68 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/72 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/76 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/80 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/84 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/88 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/92 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/96 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/100 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/104 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/108 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/112 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/116 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/120 + + false + 0 + 0 + 100000 + + + DeviceInterface + + true + 1 + fortyGigE0/124 + + false + 0 + 0 + 100000 + + + Force10-S6000 + + + diff --git a/src/sonic-config-engine/tests/t0-sample-graph-mvrf.xml b/src/sonic-config-engine/tests/t0-sample-graph-mvrf.xml index e7e2b5789816..3fd73f7369fe 100644 --- a/src/sonic-config-engine/tests/t0-sample-graph-mvrf.xml +++ b/src/sonic-config-engine/tests/t0-sample-graph-mvrf.xml @@ -387,6 +387,398 @@ + + + + + DeviceInterface + + true + 1 + Ethernet0 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet4 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet8 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet12 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet16 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet20 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet24 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet28 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet32 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet36 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet40 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet44 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet48 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet52 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet56 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet60 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet64 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet68 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet72 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet76 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet80 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet84 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet88 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet92 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet96 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet100 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet104 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet108 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet112 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet116 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet120 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet124 + + false + 0 + 0 + 40000 + + + Force10-S6000 + + + diff --git a/src/sonic-config-engine/tests/t0-sample-graph.xml b/src/sonic-config-engine/tests/t0-sample-graph.xml index f0da95149653..15fb1dc79210 100644 --- a/src/sonic-config-engine/tests/t0-sample-graph.xml +++ b/src/sonic-config-engine/tests/t0-sample-graph.xml @@ -90,7 +90,7 @@ - 0 + 1 BGPMonitor @@ -498,6 +498,374 @@ + + + + + DeviceInterface + + true + 1 + Ethernet0 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet8 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet12 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet16 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet20 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet24 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet28 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet32 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet36 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet40 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet44 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet48 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet52 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet56 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet60 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet64 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet68 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet72 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet76 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet80 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet84 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet88 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet92 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet96 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet100 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet104 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet108 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet112 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet116 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet120 + + false + 0 + 0 + 40000 + + + Force10-S6000 + + + diff --git a/src/sonic-config-engine/tests/t2-chassis-fe-graph-pc.xml b/src/sonic-config-engine/tests/t2-chassis-fe-graph-pc.xml index bc1a5142fc86..212d9c76a647 100644 --- a/src/sonic-config-engine/tests/t2-chassis-fe-graph-pc.xml +++ b/src/sonic-config-engine/tests/t2-chassis-fe-graph-pc.xml @@ -296,6 +296,318 @@ 0 25000 + + DeviceInterface + + false + 1 + Ethernet24 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet28 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet32 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet36 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet40 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet44 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet48 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet52 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet56 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet60 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet64 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet68 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet72 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet76 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet80 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet84 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet88 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet92 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet96 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet100 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet104 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet108 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet112 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet116 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet120 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet124 + + false + 0 + 0 + 40000 + false 0 diff --git a/src/sonic-config-engine/tests/t2-chassis-fe-graph-vni.xml b/src/sonic-config-engine/tests/t2-chassis-fe-graph-vni.xml index 0dc534b3de88..9384446aa913 100644 --- a/src/sonic-config-engine/tests/t2-chassis-fe-graph-vni.xml +++ b/src/sonic-config-engine/tests/t2-chassis-fe-graph-vni.xml @@ -224,6 +224,354 @@ 0 40000 + + DeviceInterface + + false + 1 + Ethernet12 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet16 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet20 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet24 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet28 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet32 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet36 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet40 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet44 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet48 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet52 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet56 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet60 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet64 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet68 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet72 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet76 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet80 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet84 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet88 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet92 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet96 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet100 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet104 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet108 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet112 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet116 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet120 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet124 + + false + 0 + 0 + 40000 + false 0 diff --git a/src/sonic-config-engine/tests/t2-chassis-fe-graph.xml b/src/sonic-config-engine/tests/t2-chassis-fe-graph.xml index 3b0c56a57a70..3fd8ed01c215 100644 --- a/src/sonic-config-engine/tests/t2-chassis-fe-graph.xml +++ b/src/sonic-config-engine/tests/t2-chassis-fe-graph.xml @@ -223,6 +223,354 @@ 0 40000 + + DeviceInterface + + false + 1 + Ethernet12 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet16 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet20 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet24 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet28 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet32 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet36 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet40 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet44 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet48 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet52 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet56 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet60 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet64 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet68 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet72 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet76 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet80 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet84 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet88 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet92 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet96 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet100 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet104 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet108 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet112 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet116 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet120 + + false + 0 + 0 + 40000 + + + DeviceInterface + + false + 1 + Ethernet124 + + false + 0 + 0 + 40000 + false 0 diff --git a/src/sonic-config-engine/tests/test_cfggen.py b/src/sonic-config-engine/tests/test_cfggen.py index c75c53b7f626..e1f6844dd5f2 100644 --- a/src/sonic-config-engine/tests/test_cfggen.py +++ b/src/sonic-config-engine/tests/test_cfggen.py @@ -83,44 +83,46 @@ def test_device_desc_mgmt_ip(self): self.assertEqual(output.strip(), "('eth0', '10.0.1.5/28')") def test_minigraph_hostname(self): - argument = '-v "DEVICE_METADATA[\'localhost\'][\'hostname\']" -m "' + self.sample_graph + '"' + argument = '-v "DEVICE_METADATA[\'localhost\'][\'hostname\']" -m "' + self.sample_graph + '" -p "' + self.port_config + '"' output = self.run_script(argument) self.assertEqual(output.strip(), 'OCPSCH01040DDLF') def test_minigraph_sku(self): - argument = '-v "DEVICE_METADATA[\'localhost\'][\'hwsku\']" -m "' + self.sample_graph + '"' + argument = '-v "DEVICE_METADATA[\'localhost\'][\'hwsku\']" -m "' + self.sample_graph + '" -p "' + self.port_config + '"' output = self.run_script(argument) self.assertEqual(output.strip(), 'Force10-Z9100') def test_minigraph_region(self): - argument = '-v "DEVICE_METADATA[\'localhost\'][\'region\']" -m "' + self.sample_graph_metadata + '"' + argument = '-v "DEVICE_METADATA[\'localhost\'][\'region\']" -m "' + self.sample_graph_metadata + '" -p "' + self.port_config + '"' output = self.run_script(argument) self.assertEqual(output.strip(), 'usfoo') def test_minigraph_cloudtype(self): - argument = '-v "DEVICE_METADATA[\'localhost\'][\'cloudtype\']" -m "' + self.sample_graph_metadata + '"' + argument = '-v "DEVICE_METADATA[\'localhost\'][\'cloudtype\']" -m "' + self.sample_graph_metadata + '" -p "' + self.port_config + '"' output = self.run_script(argument) self.assertEqual(output.strip(), 'Public') def test_minigraph_resourcetype(self): - argument = '-v "DEVICE_METADATA[\'localhost\'][\'resource_type\']" -m "' + self.sample_graph_metadata + '"' + argument = '-v "DEVICE_METADATA[\'localhost\'][\'resource_type\']" -m "' + self.sample_graph_metadata + '" -p "' + self.port_config + '"' output = self.run_script(argument) self.assertEqual(output.strip(), 'resource_type_x') def test_minigraph_downstream_subrole(self): - argument = '-v "DEVICE_METADATA[\'localhost\'][\'downstream_subrole\']" -m "' + self.sample_graph_metadata + '"' + argument = '-v "DEVICE_METADATA[\'localhost\'][\'downstream_subrole\']" -m "' + self.sample_graph_metadata + '" -p "' + self.port_config + '"' output = self.run_script(argument) self.assertEqual(output.strip(), 'downstream_subrole_y') def test_print_data(self): - argument = '-m "' + self.sample_graph + '" --print-data' + argument = '-m "' + self.sample_graph + '" -p "' + self.port_config + '" --print-data' output = self.run_script(argument) self.assertTrue(len(output.strip()) > 0) - def test_jinja_expression(self, graph=None, expected_router_type='LeafRouter'): + def test_jinja_expression(self, graph=None, port_config=None, expected_router_type='LeafRouter'): if graph is None: graph = self.sample_graph - argument = '-m "' + graph + '" -v "DEVICE_METADATA[\'localhost\'][\'type\']"' + if port_config is None: + port_config = self.port_config + argument = '-m "' + graph + '" -p "' + port_config + '" -v "DEVICE_METADATA[\'localhost\'][\'type\']"' output = self.run_script(argument) self.assertEqual(output.strip(), expected_router_type) @@ -394,37 +396,37 @@ def test_minigraph_port_autonegotiation(self): self.assertEqual( utils.to_dict(output.strip()), utils.to_dict( - "{'Ethernet0': {'alias': 'fortyGigE0/0', 'pfc_asym': 'off', 'lanes': '29,30,31,32', 'description': 'fortyGigE0/0', 'mtu': '9100', 'tpid': '0x8100'}, " + "{'Ethernet0': {'alias': 'fortyGigE0/0', 'pfc_asym': 'off', 'lanes': '29,30,31,32', 'description': 'fortyGigE0/0', 'mtu': '9100', 'tpid': '0x8100', 'speed': '40000'}, " "'Ethernet4': {'lanes': '25,26,27,28', 'description': 'Servers0:eth0', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/4', 'admin_status': 'up', 'autoneg': 'on', 'speed': '100000', 'fec': 'none'}, " - "'Ethernet8': {'lanes': '37,38,39,40', 'description': 'fortyGigE0/8', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/8', 'admin_status': 'up', 'autoneg': 'off', 'fec': 'none'}, " - "'Ethernet12': {'lanes': '33,34,35,36', 'description': 'fortyGigE0/12', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/12', 'admin_status': 'up'}, " - "'Ethernet16': {'lanes': '41,42,43,44', 'description': 'fortyGigE0/16', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/16', 'admin_status': 'up'}, " - "'Ethernet20': {'lanes': '45,46,47,48', 'description': 'fortyGigE0/20', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/20', 'admin_status': 'up'}, " - "'Ethernet24': {'lanes': '5,6,7,8', 'description': 'fortyGigE0/24', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/24', 'admin_status': 'up'}, " - "'Ethernet28': {'lanes': '1,2,3,4', 'description': 'fortyGigE0/28', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/28', 'admin_status': 'up'}, " - "'Ethernet32': {'lanes': '9,10,11,12', 'description': 'fortyGigE0/32', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/32', 'admin_status': 'up'}, " - "'Ethernet36': {'lanes': '13,14,15,16', 'description': 'fortyGigE0/36', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/36', 'admin_status': 'up'}, " - "'Ethernet40': {'lanes': '21,22,23,24', 'description': 'fortyGigE0/40', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/40', 'admin_status': 'up'}, " - "'Ethernet44': {'lanes': '17,18,19,20', 'description': 'fortyGigE0/44', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/44', 'admin_status': 'up'}, " - "'Ethernet48': {'lanes': '49,50,51,52', 'description': 'fortyGigE0/48', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/48', 'admin_status': 'up'}, " - "'Ethernet52': {'lanes': '53,54,55,56', 'description': 'fortyGigE0/52', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/52', 'admin_status': 'up'}, " - "'Ethernet56': {'lanes': '61,62,63,64', 'description': 'fortyGigE0/56', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/56', 'admin_status': 'up'}, " - "'Ethernet60': {'lanes': '57,58,59,60', 'description': 'fortyGigE0/60', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/60', 'admin_status': 'up'}, " - "'Ethernet64': {'lanes': '65,66,67,68', 'description': 'fortyGigE0/64', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/64', 'admin_status': 'up'}, " - "'Ethernet68': {'lanes': '69,70,71,72', 'description': 'fortyGigE0/68', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/68', 'admin_status': 'up'}, " - "'Ethernet72': {'lanes': '77,78,79,80', 'description': 'fortyGigE0/72', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/72', 'admin_status': 'up'}, " - "'Ethernet76': {'lanes': '73,74,75,76', 'description': 'fortyGigE0/76', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/76', 'admin_status': 'up'}, " - "'Ethernet80': {'lanes': '105,106,107,108', 'description': 'fortyGigE0/80', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/80', 'admin_status': 'up'}, " - "'Ethernet84': {'lanes': '109,110,111,112', 'description': 'fortyGigE0/84', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/84', 'admin_status': 'up'}, " - "'Ethernet88': {'lanes': '117,118,119,120', 'description': 'fortyGigE0/88', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/88', 'admin_status': 'up'}, " - "'Ethernet92': {'lanes': '113,114,115,116', 'description': 'fortyGigE0/92', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/92', 'admin_status': 'up'}, " - "'Ethernet96': {'lanes': '121,122,123,124', 'description': 'fortyGigE0/96', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/96', 'admin_status': 'up'}, " - "'Ethernet100': {'lanes': '125,126,127,128', 'description': 'Servers100:eth0', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/100', 'admin_status': 'up'}, " - "'Ethernet104': {'alias': 'fortyGigE0/104', 'pfc_asym': 'off', 'lanes': '85,86,87,88', 'description': 'fortyGigE0/104', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet108': {'alias': 'fortyGigE0/108', 'pfc_asym': 'off', 'lanes': '81,82,83,84', 'description': 'fortyGigE0/108', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet112': {'lanes': '89,90,91,92', 'description': 'ARISTA01T1:Ethernet1/1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/112', 'admin_status': 'up'}, " - "'Ethernet116': {'lanes': '93,94,95,96', 'description': 'ARISTA02T1:Ethernet1/1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/116', 'admin_status': 'up'}, " - "'Ethernet120': {'lanes': '97,98,99,100', 'description': 'ARISTA03T1:Ethernet1/1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/120', 'admin_status': 'up'}, " + "'Ethernet8': {'lanes': '37,38,39,40', 'description': 'fortyGigE0/8', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/8', 'admin_status': 'up', 'autoneg': 'off', 'fec': 'none', 'speed': '40000'}, " + "'Ethernet12': {'lanes': '33,34,35,36', 'description': 'fortyGigE0/12', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/12', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet16': {'lanes': '41,42,43,44', 'description': 'fortyGigE0/16', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/16', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet20': {'lanes': '45,46,47,48', 'description': 'fortyGigE0/20', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/20', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet24': {'lanes': '5,6,7,8', 'description': 'fortyGigE0/24', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/24', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet28': {'lanes': '1,2,3,4', 'description': 'fortyGigE0/28', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/28', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet32': {'lanes': '9,10,11,12', 'description': 'fortyGigE0/32', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/32', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet36': {'lanes': '13,14,15,16', 'description': 'fortyGigE0/36', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/36', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet40': {'lanes': '21,22,23,24', 'description': 'fortyGigE0/40', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/40', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet44': {'lanes': '17,18,19,20', 'description': 'fortyGigE0/44', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/44', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet48': {'lanes': '49,50,51,52', 'description': 'fortyGigE0/48', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/48', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet52': {'lanes': '53,54,55,56', 'description': 'fortyGigE0/52', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/52', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet56': {'lanes': '61,62,63,64', 'description': 'fortyGigE0/56', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/56', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet60': {'lanes': '57,58,59,60', 'description': 'fortyGigE0/60', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/60', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet64': {'lanes': '65,66,67,68', 'description': 'fortyGigE0/64', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/64', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet68': {'lanes': '69,70,71,72', 'description': 'fortyGigE0/68', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/68', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet72': {'lanes': '77,78,79,80', 'description': 'fortyGigE0/72', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/72', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet76': {'lanes': '73,74,75,76', 'description': 'fortyGigE0/76', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/76', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet80': {'lanes': '105,106,107,108', 'description': 'fortyGigE0/80', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/80', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet84': {'lanes': '109,110,111,112', 'description': 'fortyGigE0/84', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/84', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet88': {'lanes': '117,118,119,120', 'description': 'fortyGigE0/88', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/88', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet92': {'lanes': '113,114,115,116', 'description': 'fortyGigE0/92', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/92', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet96': {'lanes': '121,122,123,124', 'description': 'fortyGigE0/96', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/96', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet100': {'lanes': '125,126,127,128', 'description': 'Servers100:eth0', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/100', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet104': {'alias': 'fortyGigE0/104', 'pfc_asym': 'off', 'lanes': '85,86,87,88', 'description': 'fortyGigE0/104', 'mtu': '9100', 'tpid': '0x8100', 'speed': '40000'}, " + "'Ethernet108': {'alias': 'fortyGigE0/108', 'pfc_asym': 'off', 'lanes': '81,82,83,84', 'description': 'fortyGigE0/108', 'mtu': '9100', 'tpid': '0x8100', 'speed': '40000'}, " + "'Ethernet112': {'lanes': '89,90,91,92', 'description': 'ARISTA01T1:Ethernet1/1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/112', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet116': {'lanes': '93,94,95,96', 'description': 'ARISTA02T1:Ethernet1/1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/116', 'admin_status': 'up', 'speed': '40000'}, " + "'Ethernet120': {'lanes': '97,98,99,100', 'description': 'ARISTA03T1:Ethernet1/1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/120', 'admin_status': 'up', 'speed': '40000'}, " "'Ethernet124': {'lanes': '101,102,103,104', 'fec': 'rs', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/124', 'admin_status': 'up', 'speed': '100000', 'description': 'ARISTA04T1:Ethernet1/1'}}" ) ) @@ -435,38 +437,38 @@ def test_minigraph_port_autonegotiation(self): self.assertEqual( utils.to_dict(output.strip()), utils.to_dict( - "{'Ethernet0': {'lanes': '29,30,31,32', 'description': 'fortyGigE0/0', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/0', 'pfc_asym': 'off', 'autoneg': 'off'}, " + "{'Ethernet0': {'lanes': '29,30,31,32', 'description': 'fortyGigE0/0', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/0', 'pfc_asym': 'off', 'autoneg': 'off', 'speed': '40000'}, " "'Ethernet4': {'lanes': '25,26,27,28', 'description': 'Servers0:eth0', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/4', 'admin_status': 'up', 'autoneg': 'on', 'speed': '100000', 'fec': 'none'}, " - "'Ethernet8': {'lanes': '37,38,39,40', 'description': 'fortyGigE0/8', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/8', 'admin_status': 'up', 'autoneg': 'off', 'fec': 'none'}, " - "'Ethernet12': {'lanes': '33,34,35,36', 'description': 'fortyGigE0/12', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/12', 'admin_status': 'up', 'autoneg': 'off'}, " - "'Ethernet16': {'lanes': '41,42,43,44', 'description': 'fortyGigE0/16', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/16', 'admin_status': 'up', 'autoneg': 'off'}, " - "'Ethernet20': {'lanes': '45,46,47,48', 'description': 'fortyGigE0/20', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/20', 'admin_status': 'up', 'autoneg': 'off'}, " - "'Ethernet24': {'lanes': '5,6,7,8', 'description': 'fortyGigE0/24', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/24', 'admin_status': 'up', 'autoneg': 'off'}, " - "'Ethernet28': {'lanes': '1,2,3,4', 'description': 'fortyGigE0/28', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/28', 'admin_status': 'up', 'autoneg': 'off'}, " - "'Ethernet32': {'lanes': '9,10,11,12', 'description': 'fortyGigE0/32', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/32', 'admin_status': 'up', 'autoneg': 'off'}, " - "'Ethernet36': {'lanes': '13,14,15,16', 'description': 'fortyGigE0/36', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/36', 'admin_status': 'up', 'autoneg': 'off'}, " - "'Ethernet40': {'lanes': '21,22,23,24', 'description': 'fortyGigE0/40', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/40', 'admin_status': 'up', 'autoneg': 'off'}, " - "'Ethernet44': {'lanes': '17,18,19,20', 'description': 'fortyGigE0/44', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/44', 'admin_status': 'up', 'autoneg': 'off'}, " - "'Ethernet48': {'lanes': '49,50,51,52', 'description': 'fortyGigE0/48', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/48', 'admin_status': 'up', 'autoneg': 'off'}, " - "'Ethernet52': {'lanes': '53,54,55,56', 'description': 'fortyGigE0/52', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/52', 'admin_status': 'up', 'autoneg': 'off'}, " - "'Ethernet56': {'lanes': '61,62,63,64', 'description': 'fortyGigE0/56', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/56', 'admin_status': 'up', 'autoneg': 'off'}, " - "'Ethernet60': {'lanes': '57,58,59,60', 'description': 'fortyGigE0/60', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/60', 'admin_status': 'up', 'autoneg': 'off'}, " - "'Ethernet64': {'lanes': '65,66,67,68', 'description': 'fortyGigE0/64', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/64', 'admin_status': 'up', 'autoneg': 'off'}, " - "'Ethernet68': {'lanes': '69,70,71,72', 'description': 'fortyGigE0/68', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/68', 'admin_status': 'up', 'autoneg': 'off'}, " - "'Ethernet72': {'lanes': '77,78,79,80', 'description': 'fortyGigE0/72', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/72', 'admin_status': 'up', 'autoneg': 'off'}, " - "'Ethernet76': {'lanes': '73,74,75,76', 'description': 'fortyGigE0/76', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/76', 'admin_status': 'up', 'autoneg': 'off'}, " - "'Ethernet80': {'lanes': '105,106,107,108', 'description': 'fortyGigE0/80', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/80', 'admin_status': 'up', 'autoneg': 'off'}, " - "'Ethernet84': {'lanes': '109,110,111,112', 'description': 'fortyGigE0/84', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/84', 'admin_status': 'up', 'autoneg': 'off'}, " - "'Ethernet88': {'lanes': '117,118,119,120', 'description': 'fortyGigE0/88', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/88', 'admin_status': 'up', 'autoneg': 'off'}, " - "'Ethernet92': {'lanes': '113,114,115,116', 'description': 'fortyGigE0/92', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/92', 'admin_status': 'up', 'autoneg': 'off'}, " - "'Ethernet96': {'lanes': '121,122,123,124', 'description': 'fortyGigE0/96', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/96', 'admin_status': 'up', 'autoneg': 'off'}, " - "'Ethernet100': {'lanes': '125,126,127,128', 'description': 'Servers100:eth0', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/100', 'admin_status': 'up', 'autoneg': 'off'}, " - "'Ethernet104': {'lanes': '85,86,87,88', 'description': 'fortyGigE0/104', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/104', 'pfc_asym': 'off', 'autoneg': 'off'}, " - "'Ethernet108': {'lanes': '81,82,83,84', 'description': 'fortyGigE0/108', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/108', 'pfc_asym': 'off', 'autoneg': 'off'}, " - "'Ethernet112': {'lanes': '89,90,91,92', 'description': 'ARISTA01T1:Ethernet1/1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/112', 'admin_status': 'up', 'autoneg': 'on'}, " - "'Ethernet116': {'lanes': '93,94,95,96', 'description': 'ARISTA02T1:Ethernet1/1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/116', 'admin_status': 'up', 'autoneg': 'on'}, " - "'Ethernet120': {'lanes': '97,98,99,100', 'description': 'ARISTA03T1:Ethernet1/1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/120', 'admin_status': 'up', 'autoneg': 'on'}, " - "'Ethernet124': {'lanes': '101,102,103,104', 'fec': 'rs', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/124', 'admin_status': 'up', 'autoneg': 'on', 'speed': '100000', 'description': 'ARISTA04T1:Ethernet1/1'}}" + "'Ethernet8': {'lanes': '37,38,39,40', 'description': 'fortyGigE0/8', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/8', 'admin_status': 'up', 'autoneg': 'off', 'fec': 'none', 'speed': '40000'}, " + "'Ethernet12': {'lanes': '33,34,35,36', 'description': 'fortyGigE0/12', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/12', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet16': {'lanes': '41,42,43,44', 'description': 'fortyGigE0/16', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/16', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet20': {'lanes': '45,46,47,48', 'description': 'fortyGigE0/20', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/20', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet24': {'lanes': '5,6,7,8', 'description': 'fortyGigE0/24', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/24', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet28': {'lanes': '1,2,3,4', 'description': 'fortyGigE0/28', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/28', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet32': {'lanes': '9,10,11,12', 'description': 'fortyGigE0/32', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/32', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet36': {'lanes': '13,14,15,16', 'description': 'fortyGigE0/36', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/36', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet40': {'lanes': '21,22,23,24', 'description': 'fortyGigE0/40', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/40', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet44': {'lanes': '17,18,19,20', 'description': 'fortyGigE0/44', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/44', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet48': {'lanes': '49,50,51,52', 'description': 'fortyGigE0/48', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/48', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet52': {'lanes': '53,54,55,56', 'description': 'fortyGigE0/52', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/52', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet56': {'lanes': '61,62,63,64', 'description': 'fortyGigE0/56', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/56', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet60': {'lanes': '57,58,59,60', 'description': 'fortyGigE0/60', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/60', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet64': {'lanes': '65,66,67,68', 'description': 'fortyGigE0/64', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/64', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet68': {'lanes': '69,70,71,72', 'description': 'fortyGigE0/68', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/68', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet72': {'lanes': '77,78,79,80', 'description': 'fortyGigE0/72', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/72', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet76': {'lanes': '73,74,75,76', 'description': 'fortyGigE0/76', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/76', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet80': {'lanes': '105,106,107,108', 'description': 'fortyGigE0/80', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/80', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet84': {'lanes': '109,110,111,112', 'description': 'fortyGigE0/84', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/84', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet88': {'lanes': '117,118,119,120', 'description': 'fortyGigE0/88', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/88', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet92': {'lanes': '113,114,115,116', 'description': 'fortyGigE0/92', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/92', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet96': {'lanes': '121,122,123,124', 'description': 'fortyGigE0/96', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/96', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet100': {'lanes': '125,126,127,128', 'description': 'Servers100:eth0', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/100', 'admin_status': 'up', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet104': {'lanes': '85,86,87,88', 'description': 'fortyGigE0/104', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/104', 'pfc_asym': 'off', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet108': {'lanes': '81,82,83,84', 'description': 'fortyGigE0/108', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/108', 'pfc_asym': 'off', 'autoneg': 'off', 'speed': '40000'}, " + "'Ethernet112': {'lanes': '89,90,91,92', 'description': 'ARISTA01T1:Ethernet1/1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/112', 'admin_status': 'up', 'autoneg': 'on', 'speed': '40000'}, " + "'Ethernet116': {'lanes': '93,94,95,96', 'description': 'ARISTA02T1:Ethernet1/1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/116', 'admin_status': 'up', 'autoneg': 'on', 'speed': '40000'}, " + "'Ethernet120': {'lanes': '97,98,99,100', 'description': 'ARISTA03T1:Ethernet1/1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/120', 'admin_status': 'up', 'autoneg': 'on', 'speed': '40000'}, " + "'Ethernet124': {'lanes': '101,102,103,104', 'fec': 'rs', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/124', 'admin_status': 'up', 'autoneg': 'on', 'speed': '100000', 'description': 'ARISTA04T1:Ethernet1/1', 'speed': '100000'}}" ) ) @@ -530,77 +532,77 @@ def test_minigraph_neighbor_interfaces(self): "'Ethernet4': {'lanes': '25,26,27,28', 'description': 'server1:port1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/4', 'admin_status': 'up', 'speed': '25000', 'autoneg': 'on', 'mux_cable': 'true'}, " "'Ethernet8': {'lanes': '37,38,39,40', 'description': 'Interface description', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/8', 'admin_status': 'up', 'speed': '40000', 'autoneg': 'on', 'mux_cable': 'true'}, " "'Ethernet12': {'lanes': '33,34,35,36', 'description': 'Interface description', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/12', 'admin_status': 'up', 'speed': '10000', 'autoneg': 'on'}, " - "'Ethernet16': {'alias': 'fortyGigE0/16', 'pfc_asym': 'off', 'lanes': '41,42,43,44', 'description': 'fortyGigE0/16', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet20': {'alias': 'fortyGigE0/20', 'pfc_asym': 'off', 'lanes': '45,46,47,48', 'description': 'fortyGigE0/20', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet24': {'alias': 'fortyGigE0/24', 'pfc_asym': 'off', 'lanes': '5,6,7,8', 'description': 'fortyGigE0/24', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet28': {'alias': 'fortyGigE0/28', 'pfc_asym': 'off', 'lanes': '1,2,3,4', 'description': 'fortyGigE0/28', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet32': {'alias': 'fortyGigE0/32', 'pfc_asym': 'off', 'lanes': '9,10,11,12', 'description': 'fortyGigE0/32', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet36': {'alias': 'fortyGigE0/36', 'pfc_asym': 'off', 'lanes': '13,14,15,16', 'description': 'fortyGigE0/36', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet40': {'alias': 'fortyGigE0/40', 'pfc_asym': 'off', 'lanes': '21,22,23,24', 'description': 'fortyGigE0/40', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet44': {'alias': 'fortyGigE0/44', 'pfc_asym': 'off', 'lanes': '17,18,19,20', 'description': 'fortyGigE0/44', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet48': {'alias': 'fortyGigE0/48', 'pfc_asym': 'off', 'lanes': '49,50,51,52', 'description': 'fortyGigE0/48', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet52': {'alias': 'fortyGigE0/52', 'pfc_asym': 'off', 'lanes': '53,54,55,56', 'description': 'fortyGigE0/52', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet56': {'alias': 'fortyGigE0/56', 'pfc_asym': 'off', 'lanes': '61,62,63,64', 'description': 'fortyGigE0/56', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet60': {'alias': 'fortyGigE0/60', 'pfc_asym': 'off', 'lanes': '57,58,59,60', 'description': 'fortyGigE0/60', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet64': {'alias': 'fortyGigE0/64', 'pfc_asym': 'off', 'lanes': '65,66,67,68', 'description': 'fortyGigE0/64', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet68': {'alias': 'fortyGigE0/68', 'pfc_asym': 'off', 'lanes': '69,70,71,72', 'description': 'fortyGigE0/68', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet72': {'alias': 'fortyGigE0/72', 'pfc_asym': 'off', 'lanes': '77,78,79,80', 'description': 'fortyGigE0/72', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet76': {'alias': 'fortyGigE0/76', 'pfc_asym': 'off', 'lanes': '73,74,75,76', 'description': 'fortyGigE0/76', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet80': {'alias': 'fortyGigE0/80', 'pfc_asym': 'off', 'lanes': '105,106,107,108', 'description': 'fortyGigE0/80', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet84': {'alias': 'fortyGigE0/84', 'pfc_asym': 'off', 'lanes': '109,110,111,112', 'description': 'fortyGigE0/84', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet88': {'alias': 'fortyGigE0/88', 'pfc_asym': 'off', 'lanes': '117,118,119,120', 'description': 'fortyGigE0/88', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet92': {'alias': 'fortyGigE0/92', 'pfc_asym': 'off', 'lanes': '113,114,115,116', 'description': 'fortyGigE0/92', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet96': {'alias': 'fortyGigE0/96', 'pfc_asym': 'off', 'lanes': '121,122,123,124', 'description': 'fortyGigE0/96', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet100': {'alias': 'fortyGigE0/100', 'pfc_asym': 'off', 'lanes': '125,126,127,128', 'description': 'fortyGigE0/100', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet104': {'alias': 'fortyGigE0/104', 'pfc_asym': 'off', 'lanes': '85,86,87,88', 'description': 'fortyGigE0/104', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet108': {'alias': 'fortyGigE0/108', 'pfc_asym': 'off', 'lanes': '81,82,83,84', 'description': 'fortyGigE0/108', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet112': {'alias': 'fortyGigE0/112', 'pfc_asym': 'off', 'lanes': '89,90,91,92', 'description': 'fortyGigE0/112', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet116': {'alias': 'fortyGigE0/116', 'pfc_asym': 'off', 'lanes': '93,94,95,96', 'description': 'fortyGigE0/116', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet120': {'alias': 'fortyGigE0/120', 'pfc_asym': 'off', 'lanes': '97,98,99,100', 'description': 'fortyGigE0/120', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet124': {'alias': 'fortyGigE0/124', 'pfc_asym': 'off', 'lanes': '101,102,103,104', 'description': 'fortyGigE0/124', 'mtu': '9100', 'tpid': '0x8100'}}" + "'Ethernet16': {'alias': 'fortyGigE0/16', 'pfc_asym': 'off', 'lanes': '41,42,43,44', 'description': 'fortyGigE0/16', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet20': {'alias': 'fortyGigE0/20', 'pfc_asym': 'off', 'lanes': '45,46,47,48', 'description': 'fortyGigE0/20', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet24': {'alias': 'fortyGigE0/24', 'pfc_asym': 'off', 'lanes': '5,6,7,8', 'description': 'fortyGigE0/24', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet28': {'alias': 'fortyGigE0/28', 'pfc_asym': 'off', 'lanes': '1,2,3,4', 'description': 'fortyGigE0/28', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet32': {'alias': 'fortyGigE0/32', 'pfc_asym': 'off', 'lanes': '9,10,11,12', 'description': 'fortyGigE0/32', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet36': {'alias': 'fortyGigE0/36', 'pfc_asym': 'off', 'lanes': '13,14,15,16', 'description': 'fortyGigE0/36', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet40': {'alias': 'fortyGigE0/40', 'pfc_asym': 'off', 'lanes': '21,22,23,24', 'description': 'fortyGigE0/40', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet44': {'alias': 'fortyGigE0/44', 'pfc_asym': 'off', 'lanes': '17,18,19,20', 'description': 'fortyGigE0/44', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet48': {'alias': 'fortyGigE0/48', 'pfc_asym': 'off', 'lanes': '49,50,51,52', 'description': 'fortyGigE0/48', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet52': {'alias': 'fortyGigE0/52', 'pfc_asym': 'off', 'lanes': '53,54,55,56', 'description': 'fortyGigE0/52', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet56': {'alias': 'fortyGigE0/56', 'pfc_asym': 'off', 'lanes': '61,62,63,64', 'description': 'fortyGigE0/56', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet60': {'alias': 'fortyGigE0/60', 'pfc_asym': 'off', 'lanes': '57,58,59,60', 'description': 'fortyGigE0/60', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet64': {'alias': 'fortyGigE0/64', 'pfc_asym': 'off', 'lanes': '65,66,67,68', 'description': 'fortyGigE0/64', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet68': {'alias': 'fortyGigE0/68', 'pfc_asym': 'off', 'lanes': '69,70,71,72', 'description': 'fortyGigE0/68', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet72': {'alias': 'fortyGigE0/72', 'pfc_asym': 'off', 'lanes': '77,78,79,80', 'description': 'fortyGigE0/72', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet76': {'alias': 'fortyGigE0/76', 'pfc_asym': 'off', 'lanes': '73,74,75,76', 'description': 'fortyGigE0/76', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet80': {'alias': 'fortyGigE0/80', 'pfc_asym': 'off', 'lanes': '105,106,107,108', 'description': 'fortyGigE0/80', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet84': {'alias': 'fortyGigE0/84', 'pfc_asym': 'off', 'lanes': '109,110,111,112', 'description': 'fortyGigE0/84', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet88': {'alias': 'fortyGigE0/88', 'pfc_asym': 'off', 'lanes': '117,118,119,120', 'description': 'fortyGigE0/88', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet92': {'alias': 'fortyGigE0/92', 'pfc_asym': 'off', 'lanes': '113,114,115,116', 'description': 'fortyGigE0/92', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet96': {'alias': 'fortyGigE0/96', 'pfc_asym': 'off', 'lanes': '121,122,123,124', 'description': 'fortyGigE0/96', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet100': {'alias': 'fortyGigE0/100', 'pfc_asym': 'off', 'lanes': '125,126,127,128', 'description': 'fortyGigE0/100', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet104': {'alias': 'fortyGigE0/104', 'pfc_asym': 'off', 'lanes': '85,86,87,88', 'description': 'fortyGigE0/104', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet108': {'alias': 'fortyGigE0/108', 'pfc_asym': 'off', 'lanes': '81,82,83,84', 'description': 'fortyGigE0/108', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet112': {'alias': 'fortyGigE0/112', 'pfc_asym': 'off', 'lanes': '89,90,91,92', 'description': 'fortyGigE0/112', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet116': {'alias': 'fortyGigE0/116', 'pfc_asym': 'off', 'lanes': '93,94,95,96', 'description': 'fortyGigE0/116', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet120': {'alias': 'fortyGigE0/120', 'pfc_asym': 'off', 'lanes': '97,98,99,100', 'description': 'fortyGigE0/120', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet124': {'alias': 'fortyGigE0/124', 'pfc_asym': 'off', 'lanes': '101,102,103,104', 'description': 'fortyGigE0/124', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}}" ) ) def test_minigraph_neighbor_interfaces_config_db(self): # test to check if PORT table is retrieved from config_db - argument = '-m "' + self.sample_graph_simple_case + '" -v "PORT"' + argument = '-m "' + self.sample_graph_simple_case + '" -p "' + self.port_config + '" -v "PORT"' output = self.run_script(argument) self.assertEqual( utils.to_dict(output.strip()), utils.to_dict( - "{'Ethernet0': {'lanes': '29,30,31,32', 'description': 'config_db:switch-01t1:port1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/0', 'admin_status': 'up', 'speed': '10000', 'autoneg': 'on'}, " - "'Ethernet4': {'lanes': '25,26,27,28', 'description': 'config_db:server1:port1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/4', 'admin_status': 'up', 'speed': '25000', 'autoneg': 'on', 'mux_cable': 'true'}, " + "{'Ethernet0': {'lanes': '29,30,31,32', 'description': 'switch-01t1:port1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/0', 'admin_status': 'up', 'speed': '10000', 'autoneg': 'on'}, " + "'Ethernet4': {'lanes': '25,26,27,28', 'description': 'server1:port1', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/4', 'admin_status': 'up', 'speed': '25000', 'autoneg': 'on', 'mux_cable': 'true'}, " "'Ethernet8': {'lanes': '37,38,39,40', 'description': 'Interface description', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/8', 'admin_status': 'up', 'speed': '40000', 'autoneg': 'on', 'mux_cable': 'true'}, " "'Ethernet12': {'lanes': '33,34,35,36', 'description': 'Interface description', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/12', 'admin_status': 'up', 'speed': '10000', 'autoneg': 'on'}, " - "'Ethernet16': {'alias': 'fortyGigE0/16', 'pfc_asym': 'off', 'lanes': '41,42,43,44', 'description': 'config_db:fortyGigE0/16', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet20': {'alias': 'fortyGigE0/20', 'pfc_asym': 'off', 'lanes': '45,46,47,48', 'description': 'config_db:fortyGigE0/20', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet24': {'alias': 'fortyGigE0/24', 'pfc_asym': 'off', 'lanes': '5,6,7,8', 'description': 'config_db:fortyGigE0/24', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet28': {'alias': 'fortyGigE0/28', 'pfc_asym': 'off', 'lanes': '1,2,3,4', 'description': 'config_db:fortyGigE0/28', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet32': {'alias': 'fortyGigE0/32', 'pfc_asym': 'off', 'lanes': '9,10,11,12', 'description': 'config_db:fortyGigE0/32', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet36': {'alias': 'fortyGigE0/36', 'pfc_asym': 'off', 'lanes': '13,14,15,16', 'description': 'config_db:fortyGigE0/36', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet40': {'alias': 'fortyGigE0/40', 'pfc_asym': 'off', 'lanes': '21,22,23,24', 'description': 'config_db:fortyGigE0/40', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet44': {'alias': 'fortyGigE0/44', 'pfc_asym': 'off', 'lanes': '17,18,19,20', 'description': 'config_db:fortyGigE0/44', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet48': {'alias': 'fortyGigE0/48', 'pfc_asym': 'off', 'lanes': '49,50,51,52', 'description': 'config_db:fortyGigE0/48', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet52': {'alias': 'fortyGigE0/52', 'pfc_asym': 'off', 'lanes': '53,54,55,56', 'description': 'config_db:fortyGigE0/52', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet56': {'alias': 'fortyGigE0/56', 'pfc_asym': 'off', 'lanes': '61,62,63,64', 'description': 'config_db:fortyGigE0/56', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet60': {'alias': 'fortyGigE0/60', 'pfc_asym': 'off', 'lanes': '57,58,59,60', 'description': 'config_db:fortyGigE0/60', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet64': {'alias': 'fortyGigE0/64', 'pfc_asym': 'off', 'lanes': '65,66,67,68', 'description': 'config_db:fortyGigE0/64', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet68': {'alias': 'fortyGigE0/68', 'pfc_asym': 'off', 'lanes': '69,70,71,72', 'description': 'config_db:fortyGigE0/68', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet72': {'alias': 'fortyGigE0/72', 'pfc_asym': 'off', 'lanes': '77,78,79,80', 'description': 'config_db:fortyGigE0/72', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet76': {'alias': 'fortyGigE0/76', 'pfc_asym': 'off', 'lanes': '73,74,75,76', 'description': 'config_db:fortyGigE0/76', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet80': {'alias': 'fortyGigE0/80', 'pfc_asym': 'off', 'lanes': '105,106,107,108', 'description': 'config_db:fortyGigE0/80', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet84': {'alias': 'fortyGigE0/84', 'pfc_asym': 'off', 'lanes': '109,110,111,112', 'description': 'config_db:fortyGigE0/84', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet88': {'alias': 'fortyGigE0/88', 'pfc_asym': 'off', 'lanes': '117,118,119,120', 'description': 'config_db:fortyGigE0/88', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet92': {'alias': 'fortyGigE0/92', 'pfc_asym': 'off', 'lanes': '113,114,115,116', 'description': 'config_db:fortyGigE0/92', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet96': {'alias': 'fortyGigE0/96', 'pfc_asym': 'off', 'lanes': '121,122,123,124', 'description': 'config_db:fortyGigE0/96', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet100': {'alias': 'fortyGigE0/100', 'pfc_asym': 'off', 'lanes': '125,126,127,128', 'description': 'config_db:fortyGigE0/100', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet104': {'alias': 'fortyGigE0/104', 'pfc_asym': 'off', 'lanes': '85,86,87,88', 'description': 'config_db:fortyGigE0/104', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet108': {'alias': 'fortyGigE0/108', 'pfc_asym': 'off', 'lanes': '81,82,83,84', 'description': 'config_db:fortyGigE0/108', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet112': {'alias': 'fortyGigE0/112', 'pfc_asym': 'off', 'lanes': '89,90,91,92', 'description': 'config_db:fortyGigE0/112', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet116': {'alias': 'fortyGigE0/116', 'pfc_asym': 'off', 'lanes': '93,94,95,96', 'description': 'config_db:fortyGigE0/116', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet120': {'alias': 'fortyGigE0/120', 'pfc_asym': 'off', 'lanes': '97,98,99,100', 'description': 'config_db:fortyGigE0/120', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet124': {'alias': 'fortyGigE0/124', 'pfc_asym': 'off', 'lanes': '101,102,103,104', 'description': 'config_db:fortyGigE0/124', 'mtu': '9100', 'tpid': '0x8100'}}" + "'Ethernet16': {'alias': 'fortyGigE0/16', 'pfc_asym': 'off', 'lanes': '41,42,43,44', 'description': 'fortyGigE0/16', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet20': {'alias': 'fortyGigE0/20', 'pfc_asym': 'off', 'lanes': '45,46,47,48', 'description': 'fortyGigE0/20', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet24': {'alias': 'fortyGigE0/24', 'pfc_asym': 'off', 'lanes': '5,6,7,8', 'description': 'fortyGigE0/24', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet28': {'alias': 'fortyGigE0/28', 'pfc_asym': 'off', 'lanes': '1,2,3,4', 'description': 'fortyGigE0/28', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet32': {'alias': 'fortyGigE0/32', 'pfc_asym': 'off', 'lanes': '9,10,11,12', 'description': 'fortyGigE0/32', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet36': {'alias': 'fortyGigE0/36', 'pfc_asym': 'off', 'lanes': '13,14,15,16', 'description': 'fortyGigE0/36', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet40': {'alias': 'fortyGigE0/40', 'pfc_asym': 'off', 'lanes': '21,22,23,24', 'description': 'fortyGigE0/40', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet44': {'alias': 'fortyGigE0/44', 'pfc_asym': 'off', 'lanes': '17,18,19,20', 'description': 'fortyGigE0/44', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet48': {'alias': 'fortyGigE0/48', 'pfc_asym': 'off', 'lanes': '49,50,51,52', 'description': 'fortyGigE0/48', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet52': {'alias': 'fortyGigE0/52', 'pfc_asym': 'off', 'lanes': '53,54,55,56', 'description': 'fortyGigE0/52', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet56': {'alias': 'fortyGigE0/56', 'pfc_asym': 'off', 'lanes': '61,62,63,64', 'description': 'fortyGigE0/56', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet60': {'alias': 'fortyGigE0/60', 'pfc_asym': 'off', 'lanes': '57,58,59,60', 'description': 'fortyGigE0/60', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet64': {'alias': 'fortyGigE0/64', 'pfc_asym': 'off', 'lanes': '65,66,67,68', 'description': 'fortyGigE0/64', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet68': {'alias': 'fortyGigE0/68', 'pfc_asym': 'off', 'lanes': '69,70,71,72', 'description': 'fortyGigE0/68', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet72': {'alias': 'fortyGigE0/72', 'pfc_asym': 'off', 'lanes': '77,78,79,80', 'description': 'fortyGigE0/72', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet76': {'alias': 'fortyGigE0/76', 'pfc_asym': 'off', 'lanes': '73,74,75,76', 'description': 'fortyGigE0/76', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet80': {'alias': 'fortyGigE0/80', 'pfc_asym': 'off', 'lanes': '105,106,107,108', 'description': 'fortyGigE0/80', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet84': {'alias': 'fortyGigE0/84', 'pfc_asym': 'off', 'lanes': '109,110,111,112', 'description': 'fortyGigE0/84', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet88': {'alias': 'fortyGigE0/88', 'pfc_asym': 'off', 'lanes': '117,118,119,120', 'description': 'fortyGigE0/88', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet92': {'alias': 'fortyGigE0/92', 'pfc_asym': 'off', 'lanes': '113,114,115,116', 'description': 'fortyGigE0/92', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet96': {'alias': 'fortyGigE0/96', 'pfc_asym': 'off', 'lanes': '121,122,123,124', 'description': 'fortyGigE0/96', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet100': {'alias': 'fortyGigE0/100', 'pfc_asym': 'off', 'lanes': '125,126,127,128', 'description': 'fortyGigE0/100', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet104': {'alias': 'fortyGigE0/104', 'pfc_asym': 'off', 'lanes': '85,86,87,88', 'description': 'fortyGigE0/104', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet108': {'alias': 'fortyGigE0/108', 'pfc_asym': 'off', 'lanes': '81,82,83,84', 'description': 'fortyGigE0/108', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet112': {'alias': 'fortyGigE0/112', 'pfc_asym': 'off', 'lanes': '89,90,91,92', 'description': 'fortyGigE0/112', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet116': {'alias': 'fortyGigE0/116', 'pfc_asym': 'off', 'lanes': '93,94,95,96', 'description': 'fortyGigE0/116', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet120': {'alias': 'fortyGigE0/120', 'pfc_asym': 'off', 'lanes': '97,98,99,100', 'description': 'fortyGigE0/120', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet124': {'alias': 'fortyGigE0/124', 'pfc_asym': 'off', 'lanes': '101,102,103,104', 'description': 'fortyGigE0/124', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}}" ) ) @@ -617,33 +619,33 @@ def test_minigraph_extra_ethernet_interfaces(self, **kwargs): "'Ethernet8': {'lanes': '37,38,39,40', 'description': 'Interface description', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/8', 'admin_status': 'up', 'speed': '1000'}, " "'Ethernet12': {'lanes': '33,34,35,36', 'fec': 'rs', 'pfc_asym': 'off', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/12', 'admin_status': 'up', 'speed': '100000', 'description': 'Interface description'}, " "'Ethernet16': {'lanes': '41,42,43,44', 'pfc_asym': 'off', 'description': 'fortyGigE0/16', 'mtu': '9100', 'tpid': '0x8100', 'alias': 'fortyGigE0/16', 'speed': '1000'}, " - "'Ethernet20': {'alias': 'fortyGigE0/20', 'pfc_asym': 'off', 'lanes': '45,46,47,48', 'description': 'fortyGigE0/20', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet24': {'alias': 'fortyGigE0/24', 'pfc_asym': 'off', 'lanes': '5,6,7,8', 'description': 'fortyGigE0/24', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet28': {'alias': 'fortyGigE0/28', 'pfc_asym': 'off', 'lanes': '1,2,3,4', 'description': 'fortyGigE0/28', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet32': {'alias': 'fortyGigE0/32', 'pfc_asym': 'off', 'lanes': '9,10,11,12', 'description': 'fortyGigE0/32', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet36': {'alias': 'fortyGigE0/36', 'pfc_asym': 'off', 'lanes': '13,14,15,16', 'description': 'fortyGigE0/36', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet40': {'alias': 'fortyGigE0/40', 'pfc_asym': 'off', 'lanes': '21,22,23,24', 'description': 'fortyGigE0/40', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet44': {'alias': 'fortyGigE0/44', 'pfc_asym': 'off', 'lanes': '17,18,19,20', 'description': 'fortyGigE0/44', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet48': {'alias': 'fortyGigE0/48', 'pfc_asym': 'off', 'lanes': '49,50,51,52', 'description': 'fortyGigE0/48', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet52': {'alias': 'fortyGigE0/52', 'pfc_asym': 'off', 'lanes': '53,54,55,56', 'description': 'fortyGigE0/52', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet56': {'alias': 'fortyGigE0/56', 'pfc_asym': 'off', 'lanes': '61,62,63,64', 'description': 'fortyGigE0/56', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet60': {'alias': 'fortyGigE0/60', 'pfc_asym': 'off', 'lanes': '57,58,59,60', 'description': 'fortyGigE0/60', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet64': {'alias': 'fortyGigE0/64', 'pfc_asym': 'off', 'lanes': '65,66,67,68', 'description': 'fortyGigE0/64', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet68': {'alias': 'fortyGigE0/68', 'pfc_asym': 'off', 'lanes': '69,70,71,72', 'description': 'fortyGigE0/68', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet72': {'alias': 'fortyGigE0/72', 'pfc_asym': 'off', 'lanes': '77,78,79,80', 'description': 'fortyGigE0/72', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet76': {'alias': 'fortyGigE0/76', 'pfc_asym': 'off', 'lanes': '73,74,75,76', 'description': 'fortyGigE0/76', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet80': {'alias': 'fortyGigE0/80', 'pfc_asym': 'off', 'lanes': '105,106,107,108', 'description': 'fortyGigE0/80', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet84': {'alias': 'fortyGigE0/84', 'pfc_asym': 'off', 'lanes': '109,110,111,112', 'description': 'fortyGigE0/84', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet88': {'alias': 'fortyGigE0/88', 'pfc_asym': 'off', 'lanes': '117,118,119,120', 'description': 'fortyGigE0/88', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet92': {'alias': 'fortyGigE0/92', 'pfc_asym': 'off', 'lanes': '113,114,115,116', 'description': 'fortyGigE0/92', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet96': {'alias': 'fortyGigE0/96', 'pfc_asym': 'off', 'lanes': '121,122,123,124', 'description': 'fortyGigE0/96', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet100': {'alias': 'fortyGigE0/100', 'pfc_asym': 'off', 'lanes': '125,126,127,128', 'description': 'fortyGigE0/100', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet104': {'alias': 'fortyGigE0/104', 'pfc_asym': 'off', 'lanes': '85,86,87,88', 'description': 'fortyGigE0/104', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet108': {'alias': 'fortyGigE0/108', 'pfc_asym': 'off', 'lanes': '81,82,83,84', 'description': 'fortyGigE0/108', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet112': {'alias': 'fortyGigE0/112', 'pfc_asym': 'off', 'lanes': '89,90,91,92', 'description': 'fortyGigE0/112', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet116': {'alias': 'fortyGigE0/116', 'pfc_asym': 'off', 'lanes': '93,94,95,96', 'description': 'fortyGigE0/116', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet120': {'alias': 'fortyGigE0/120', 'pfc_asym': 'off', 'lanes': '97,98,99,100', 'description': 'fortyGigE0/120', 'mtu': '9100', 'tpid': '0x8100'}, " - "'Ethernet124': {'alias': 'fortyGigE0/124', 'pfc_asym': 'off', 'lanes': '101,102,103,104', 'description': 'fortyGigE0/124', 'mtu': '9100', 'tpid': '0x8100'}}" + "'Ethernet20': {'alias': 'fortyGigE0/20', 'pfc_asym': 'off', 'lanes': '45,46,47,48', 'description': 'fortyGigE0/20', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet24': {'alias': 'fortyGigE0/24', 'pfc_asym': 'off', 'lanes': '5,6,7,8', 'description': 'fortyGigE0/24', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet28': {'alias': 'fortyGigE0/28', 'pfc_asym': 'off', 'lanes': '1,2,3,4', 'description': 'fortyGigE0/28', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet32': {'alias': 'fortyGigE0/32', 'pfc_asym': 'off', 'lanes': '9,10,11,12', 'description': 'fortyGigE0/32', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet36': {'alias': 'fortyGigE0/36', 'pfc_asym': 'off', 'lanes': '13,14,15,16', 'description': 'fortyGigE0/36', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet40': {'alias': 'fortyGigE0/40', 'pfc_asym': 'off', 'lanes': '21,22,23,24', 'description': 'fortyGigE0/40', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet44': {'alias': 'fortyGigE0/44', 'pfc_asym': 'off', 'lanes': '17,18,19,20', 'description': 'fortyGigE0/44', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet48': {'alias': 'fortyGigE0/48', 'pfc_asym': 'off', 'lanes': '49,50,51,52', 'description': 'fortyGigE0/48', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet52': {'alias': 'fortyGigE0/52', 'pfc_asym': 'off', 'lanes': '53,54,55,56', 'description': 'fortyGigE0/52', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet56': {'alias': 'fortyGigE0/56', 'pfc_asym': 'off', 'lanes': '61,62,63,64', 'description': 'fortyGigE0/56', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet60': {'alias': 'fortyGigE0/60', 'pfc_asym': 'off', 'lanes': '57,58,59,60', 'description': 'fortyGigE0/60', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet64': {'alias': 'fortyGigE0/64', 'pfc_asym': 'off', 'lanes': '65,66,67,68', 'description': 'fortyGigE0/64', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet68': {'alias': 'fortyGigE0/68', 'pfc_asym': 'off', 'lanes': '69,70,71,72', 'description': 'fortyGigE0/68', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet72': {'alias': 'fortyGigE0/72', 'pfc_asym': 'off', 'lanes': '77,78,79,80', 'description': 'fortyGigE0/72', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet76': {'alias': 'fortyGigE0/76', 'pfc_asym': 'off', 'lanes': '73,74,75,76', 'description': 'fortyGigE0/76', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet80': {'alias': 'fortyGigE0/80', 'pfc_asym': 'off', 'lanes': '105,106,107,108', 'description': 'fortyGigE0/80', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet84': {'alias': 'fortyGigE0/84', 'pfc_asym': 'off', 'lanes': '109,110,111,112', 'description': 'fortyGigE0/84', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet88': {'alias': 'fortyGigE0/88', 'pfc_asym': 'off', 'lanes': '117,118,119,120', 'description': 'fortyGigE0/88', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet92': {'alias': 'fortyGigE0/92', 'pfc_asym': 'off', 'lanes': '113,114,115,116', 'description': 'fortyGigE0/92', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet96': {'alias': 'fortyGigE0/96', 'pfc_asym': 'off', 'lanes': '121,122,123,124', 'description': 'fortyGigE0/96', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet100': {'alias': 'fortyGigE0/100', 'pfc_asym': 'off', 'lanes': '125,126,127,128', 'description': 'fortyGigE0/100', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet104': {'alias': 'fortyGigE0/104', 'pfc_asym': 'off', 'lanes': '85,86,87,88', 'description': 'fortyGigE0/104', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet108': {'alias': 'fortyGigE0/108', 'pfc_asym': 'off', 'lanes': '81,82,83,84', 'description': 'fortyGigE0/108', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet112': {'alias': 'fortyGigE0/112', 'pfc_asym': 'off', 'lanes': '89,90,91,92', 'description': 'fortyGigE0/112', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet116': {'alias': 'fortyGigE0/116', 'pfc_asym': 'off', 'lanes': '93,94,95,96', 'description': 'fortyGigE0/116', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet120': {'alias': 'fortyGigE0/120', 'pfc_asym': 'off', 'lanes': '97,98,99,100', 'description': 'fortyGigE0/120', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}, " + "'Ethernet124': {'alias': 'fortyGigE0/124', 'pfc_asym': 'off', 'lanes': '101,102,103,104', 'description': 'fortyGigE0/124', 'mtu': '9100', 'tpid': '0x8100', 'fec': 'rs', 'speed': '100000'}}" ) ) @@ -683,7 +685,7 @@ def test_minigraph_bgp_mon(self): output = self.run_script(argument) self.assertEqual( utils.to_dict(output.strip()), - utils.to_dict("{'10.20.30.40': {'rrclient': 0, 'name': 'BGPMonitor', 'local_addr': '10.1.0.32', 'nhopself': 0, 'holdtime': '10', 'asn': '0', 'keepalive': '3'}}") + utils.to_dict("{'10.20.30.40': {'rrclient': 0, 'name': 'BGPMonitor', 'local_addr': '10.1.0.32', 'nhopself': 0, 'holdtime': '10', 'asn': '1', 'keepalive': '3'}}") ) def test_minigraph_bgp_voq_chassis_peer(self): @@ -719,7 +721,7 @@ def test_minigraph_sub_port_no_vlan_member(self, check_stderr=True): else: output = subprocess.check_output("sed -i \'s/%s/%s/g\' %s" % (LEAF_ROUTER, BACKEND_LEAF_ROUTER, self.sample_graph), shell=True) - self.test_jinja_expression(self.sample_graph, BACKEND_LEAF_ROUTER) + self.test_jinja_expression(self.sample_graph, self.port_config, BACKEND_LEAF_ROUTER) self.verify_no_vlan_member() finally: print('\n Change device type back to %s' % (LEAF_ROUTER)) @@ -728,7 +730,7 @@ def test_minigraph_sub_port_no_vlan_member(self, check_stderr=True): else: output = subprocess.check_output("sed -i \'s/%s/%s/g\' %s" % (BACKEND_LEAF_ROUTER, LEAF_ROUTER, self.sample_graph), shell=True) - self.test_jinja_expression(self.sample_graph, LEAF_ROUTER) + self.test_jinja_expression(self.sample_graph, self.port_config, LEAF_ROUTER) def verify_no_vlan_member(self): argument = '-m "' + self.sample_graph + '" -p "' + self.port_config + '" -v "VLAN_MEMBER"' @@ -745,7 +747,7 @@ def verify_sub_intf(self, **kwargs): else: output = subprocess.check_output("sed -i \'s/%s/%s/g\' %s" % (TOR_ROUTER, BACKEND_TOR_ROUTER, graph_file), shell=True) - self.test_jinja_expression(graph_file, BACKEND_TOR_ROUTER) + self.test_jinja_expression(graph_file, self.port_config, BACKEND_TOR_ROUTER) # INTERFACE table does not exist @@ -805,7 +807,7 @@ def verify_sub_intf(self, **kwargs): else: output = subprocess.check_output("sed -i \'s/%s/%s/g\' %s" % (BACKEND_TOR_ROUTER, TOR_ROUTER, graph_file), shell=True) - self.test_jinja_expression(graph_file, TOR_ROUTER) + self.test_jinja_expression(graph_file, self.port_config, TOR_ROUTER) def test_show_run_acl(self): argument = '-a \'{"key1":"value"}\' --var-json ACL_RULE' @@ -818,7 +820,7 @@ def test_show_run_interfaces(self): self.assertEqual(output, '') def test_minigraph_voq_metadata(self): - argument = "-m {} --var-json DEVICE_METADATA".format(self.sample_graph_voq) + argument = "-m {} -p {} --var-json DEVICE_METADATA".format(self.sample_graph_voq, self.voq_port_config) output = json.loads(self.run_script(argument)) self.assertEqual(output['localhost']['asic_name'], 'Asic0') self.assertEqual(output['localhost']['switch_id'], '0') @@ -826,7 +828,7 @@ def test_minigraph_voq_metadata(self): self.assertEqual(output['localhost']['max_cores'], '16') def test_minigraph_voq_system_ports(self): - argument = "-m {} --var-json SYSTEM_PORT".format(self.sample_graph_voq) + argument = "-m {} -p {} --var-json SYSTEM_PORT".format(self.sample_graph_voq, self.voq_port_config) self.assertDictEqual( json.loads(self.run_script(argument)), { @@ -845,7 +847,7 @@ def test_minigraph_voq_system_ports(self): ) def test_minigraph_voq_inband_interface_vlan(self): - argument = "-m {} --var-json VOQ_INBAND_INTERFACE".format(self.sample_graph_voq) + argument = "-m {} -p {} --var-json VOQ_INBAND_INTERFACE".format(self.sample_graph_voq, self.voq_port_config) output = self.run_script(argument) output_dict = utils.to_dict(output.strip()) self.assertDictEqual( @@ -858,7 +860,7 @@ def test_minigraph_voq_inband_interface_vlan(self): ) def test_minigraph_voq_inband_interface_port(self): - argument = "-m {} --var-json VOQ_INBAND_INTERFACE".format(self.sample_graph_voq) + argument = "-m {} -p {} --var-json VOQ_INBAND_INTERFACE".format(self.sample_graph_voq, self.voq_port_config) output = self.run_script(argument) output_dict = utils.to_dict(output.strip()) self.assertDictEqual( @@ -882,7 +884,9 @@ def test_minigraph_voq_inband_port(self): 'mtu': '9100', 'tpid': '0x8100', 'pfc_asym': 'off', - 'admin_status': 'up' + 'admin_status': 'up', + 'fec': 'rs', + 'speed': '100000' } ) diff --git a/src/sonic-config-engine/tests/test_cfggen_platformJson.py b/src/sonic-config-engine/tests/test_cfggen_platformJson.py index fcfae855d0b5..0af361718b99 100644 --- a/src/sonic-config-engine/tests/test_cfggen_platformJson.py +++ b/src/sonic-config-engine/tests/test_cfggen_platformJson.py @@ -49,7 +49,7 @@ def test_dummy_run(self): self.assertEqual(output, '') def test_print_data(self): - argument = '-m "' + self.platform_sample_graph + '" --print-data' + argument = '-m "' + self.platform_sample_graph + '" -p "' + self.platform_json + '" --print-data' output = self.run_script(argument) self.assertTrue(len(output.strip()) > 0) diff --git a/src/sonic-config-engine/tests/test_j2files.py b/src/sonic-config-engine/tests/test_j2files.py index b922ae45dbcf..52d4260dba77 100644 --- a/src/sonic-config-engine/tests/test_j2files.py +++ b/src/sonic-config-engine/tests/test_j2files.py @@ -44,11 +44,11 @@ def run_diff(self, file1, file2): def test_interfaces(self): interfaces_template = os.path.join(self.test_dir, '..', '..', '..', 'files', 'image_config', 'interfaces', 'interfaces.j2') - argument = '-m ' + self.t0_minigraph + ' -a \'{\"hwaddr\":\"e4:1d:2d:a5:f3:ad\"}\' -t ' + interfaces_template + ' > ' + self.output_file + argument = '-m ' + self.t0_minigraph + ' -p ' + self.t0_port_config + ' -a \'{\"hwaddr\":\"e4:1d:2d:a5:f3:ad\"}\' -t ' + interfaces_template + ' > ' + self.output_file self.run_script(argument) self.assertTrue(utils.cmp(os.path.join(self.test_dir, 'sample_output', utils.PYvX_DIR, 'interfaces'), self.output_file)) - argument = '-m ' + self.t0_mvrf_minigraph + ' -a \'{\"hwaddr\":\"e4:1d:2d:a5:f3:ad\"}\' -t ' + interfaces_template + ' > ' + self.output_file + argument = '-m ' + self.t0_mvrf_minigraph + ' -p ' + self.t0_port_config + ' -a \'{\"hwaddr\":\"e4:1d:2d:a5:f3:ad\"}\' -t ' + interfaces_template + ' > ' + self.output_file self.run_script(argument) self.assertTrue(utils.cmp(os.path.join(self.test_dir, 'sample_output', utils.PYvX_DIR, 'mvrf_interfaces'), self.output_file)) @@ -274,6 +274,49 @@ def test_qos_dell6100_render_template(self): sample_output_file = os.path.join(self.test_dir, 'sample_output', utils.PYvX_DIR, 'qos-dell6100.json') assert utils.cmp(sample_output_file, self.output_file), self.run_diff(sample_output_file, self.output_file) + def test_qos_dscp_remapping_render_template(self): + if utils.PYvX_DIR != 'py3': + # Skip on python2 as the change will not be backported to previous version + return + + dir_paths = [ + '../../../device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8', + '../../../device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8', + '../../../device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64' + ] + sample_outputs = [ + 'qos-arista7050cx3-dualtor.json', + 'qos-arista7260-dualtor.json', + 'qos-arista7260-t1.json' + ] + sample_minigraph_files = [ + 'sample-arista-7050cx3-dualtor-minigraph.xml', + 'sample-arista-7260-dualtor-minigraph.xml', + 'sample-arista-7260-t1-minigraph.xml' + ] + for i, path in enumerate(dir_paths): + device_template_path = os.path.join(self.test_dir, path) + sample_output = sample_outputs[i] + sample_minigraph_file = os.path.join(self.test_dir,sample_minigraph_files[i]) + qos_file = os.path.join(device_template_path, 'qos.json.j2') + port_config_ini_file = os.path.join(device_template_path, 'port_config.ini') + test_output = os.path.join(self.test_dir, 'output.json') + + # copy qos_config.j2 to the target directory to have all templates in one directory + qos_config_file = os.path.join(self.test_dir, '..', '..', '..', 'files', 'build_templates', 'qos_config.j2') + shutil.copy2(qos_config_file, device_template_path) + + argument = '-m ' + sample_minigraph_file + ' -p ' + port_config_ini_file + ' -t ' + qos_file + ' > ' + test_output + self.run_script(argument) + + # cleanup + qos_config_file_new = os.path.join(device_template_path, 'qos_config.j2') + os.remove(qos_config_file_new) + + sample_output_file = os.path.join(self.test_dir, 'sample_output', utils.PYvX_DIR, sample_output) + assert utils.cmp(sample_output_file, test_output) + os.remove(test_output) + def _test_buffers_render_template(self, vendor, platform, sku, minigraph, buffer_template, expected): dir_path = os.path.join(self.test_dir, '..', '..', '..', 'device', vendor, platform, sku) buffers_file = os.path.join(dir_path, buffer_template) @@ -326,16 +369,18 @@ def test_swss_switch_render_template(self): test_list = { "t1": { "graph": self.t1_mlnx_minigraph, + "port_config": self.mlnx_port_config, "output": "t1-switch.json" }, "t0": { "graph": self.t0_minigraph, + "port_config": self.t0_port_config, "output": "t0-switch.json" }, } for _, v in test_list.items(): - argument = " -m {} -y {} -t {} > {}".format( - v["graph"], constants_yml, switch_template, self.output_file + argument = " -m {} -p {} -y {} -t {} > {}".format( + v["graph"], v["port_config"], constants_yml, switch_template, self.output_file ) sample_output_file = os.path.join( self.test_dir, 'sample_output', v["output"] diff --git a/src/sonic-config-engine/tests/test_minigraph_case.py b/src/sonic-config-engine/tests/test_minigraph_case.py index 7377498c7078..d18dd0499dab 100644 --- a/src/sonic-config-engine/tests/test_minigraph_case.py +++ b/src/sonic-config-engine/tests/test_minigraph_case.py @@ -45,27 +45,27 @@ def test_dummy_run(self): self.assertEqual(output, '') def test_minigraph_sku(self): - argument = '-v "DEVICE_METADATA[\'localhost\'][\'hwsku\']" -m "' + self.sample_graph + '"' + argument = '-v "DEVICE_METADATA[\'localhost\'][\'hwsku\']" -m "' + self.sample_graph + '" -p "' + self.port_config + '"' output = self.run_script(argument) self.assertEqual(output.strip(), 'Force10-S6000') def test_print_data(self): - argument = '-m "' + self.sample_graph + '" --print-data' + argument = '-m "' + self.sample_graph + '" -p "' + self.port_config + '" --print-data' output = self.run_script(argument) self.assertTrue(len(output.strip()) > 0) def test_jinja_expression(self): - argument = '-m "' + self.sample_graph + '" -v "DEVICE_METADATA[\'localhost\'][\'type\']"' + argument = '-m "' + self.sample_graph + '" -p "' + self.port_config + '" -v "DEVICE_METADATA[\'localhost\'][\'type\']"' output = self.run_script(argument) self.assertEqual(output.strip(), 'ToRRouter') def test_minigraph_subtype(self): - argument = '-m "' + self.sample_graph + '" -v "DEVICE_METADATA[\'localhost\'][\'subtype\']"' + argument = '-m "' + self.sample_graph + '" -p "' + self.port_config + '" -v "DEVICE_METADATA[\'localhost\'][\'subtype\']"' output = self.run_script(argument) self.assertEqual(output.strip(), 'DualToR') def test_minigraph_peer_switch_hostname(self): - argument = '-m "' + self.sample_graph + '" -v "DEVICE_METADATA[\'localhost\'][\'peer_switch\']"' + argument = '-m "' + self.sample_graph + '" -p "' + self.port_config + '" -v "DEVICE_METADATA[\'localhost\'][\'peer_switch\']"' output = self.run_script(argument) self.assertEqual(output.strip(), 'switch2-t0') @@ -157,7 +157,7 @@ def test_minigraph_portchannels(self): ) def test_minigraph_console_mgmt_feature(self): - argument = '-m "' + self.sample_graph + '" -v CONSOLE_SWITCH' + argument = '-m "' + self.sample_graph + '" -p "' + self.port_config + '" -v CONSOLE_SWITCH' output = self.run_script(argument) self.assertEqual( utils.to_dict(output.strip()), diff --git a/src/sonic-config-engine/tests/test_multinpu_cfggen.py b/src/sonic-config-engine/tests/test_multinpu_cfggen.py index 8a79be743848..f39cc9dce1b8 100644 --- a/src/sonic-config-engine/tests/test_multinpu_cfggen.py +++ b/src/sonic-config-engine/tests/test_multinpu_cfggen.py @@ -25,6 +25,7 @@ def setUp(self): self.script_file = utils.PYTHON_INTERPRETTER + ' ' + os.path.join(self.test_dir, '..', 'sonic-cfggen') self.sample_graph = os.path.join(self.test_data_dir, 'sample-minigraph.xml') self.sample_graph1 = os.path.join(self.test_data_dir, 'sample-minigraph-noportchannel.xml') + self.sample_port_config = os.path.join(self.test_data_dir, 'sample_port_config.ini') self.port_config = [] for asic in range(NUM_ASIC): self.port_config.append(os.path.join(self.test_data_dir, "sample_port_config-{}.ini".format(asic))) @@ -80,19 +81,21 @@ def test_dummy_run(self): self.assertEqual(output, '') def test_hwsku(self): - argument = "-v \"DEVICE_METADATA[\'localhost\'][\'hwsku\']\" -m \"{}\"".format(self.sample_graph) + argument = "-v \"DEVICE_METADATA[\'localhost\'][\'hwsku\']\" -m \"{}\" -p \"{}\"".format(self.sample_graph, self.sample_port_config) output = self.run_script(argument) self.assertEqual(output.strip(), SKU) + argument = "-v \"DEVICE_METADATA[\'localhost\'][\'hwsku\']\" -m \"{}\"".format(self.sample_graph) for asic in range(NUM_ASIC): - output = self.run_script_for_asic(argument, asic) + output = self.run_script_for_asic(argument, asic, self.port_config[asic]) self.assertEqual(output.strip(), SKU) def test_print_data(self): - argument = "-m \"{}\" --print-data".format(self.sample_graph) + argument = "-m \"{}\" -p \"{}\" --print-data".format(self.sample_graph, self.sample_port_config) output = self.run_script(argument) self.assertGreater(len(output.strip()) , 0) + argument = "-m \"{}\" --print-data".format(self.sample_graph) for asic in range(NUM_ASIC): - output = self.run_script_for_asic(argument, asic) + output = self.run_script_for_asic(argument, asic, self.port_config[asic]) self.assertGreater(len(output.strip()) , 0) def test_additional_json_data(self): @@ -100,7 +103,7 @@ def test_additional_json_data(self): output = self.run_script(argument) self.assertEqual(output.strip(), 'value1') for asic in range(NUM_ASIC): - output = self.run_script_for_asic(argument, asic) + output = self.run_script_for_asic(argument, asic, self.port_config[asic]) self.assertEqual(output.strip(), 'value1') def test_read_yaml(self): @@ -108,7 +111,7 @@ def test_read_yaml(self): output = yaml.load(self.run_script(argument)) self.assertListEqual(output, ['value1', 'value2']) for asic in range(NUM_ASIC): - output = yaml.load(self.run_script_for_asic(argument, asic)) + output = yaml.load(self.run_script_for_asic(argument, asic, self.port_config[asic])) self.assertListEqual(output, ['value1', 'value2']) def test_render_template(self): @@ -116,32 +119,35 @@ def test_render_template(self): output = self.run_script(argument) self.assertEqual(output.strip(), 'value1\nvalue2') for asic in range(NUM_ASIC): - output = self.run_script_for_asic(argument, asic) + output = self.run_script_for_asic(argument, asic, self.port_config[asic]) self.assertEqual(output.strip(), 'value1\nvalue2') def test_metadata_tacacs(self): - argument = '-m "' + self.sample_graph + '" --var-json "TACPLUS_SERVER"' + argument = '-m "' + self.sample_graph + '" -p "' + self.sample_port_config + '" --var-json "TACPLUS_SERVER"' output = json.loads(self.run_script(argument)) self.assertDictEqual(output, {'123.46.98.21': {'priority': '1', 'tcp_port': '49'}}) #TACPLUS_SERVER not present in the asic configuration. + argument = '-m "' + self.sample_graph + '" --var-json "TACPLUS_SERVER"' for asic in range(NUM_ASIC): output = json.loads(self.run_script_for_asic(argument, asic, self.port_config[asic])) self.assertDictEqual(output, {}) def test_metadata_ntp(self): - argument = '-m "' + self.sample_graph + '" --var-json "NTP_SERVER"' + argument = '-m "' + self.sample_graph + '" -p "' + self.sample_port_config + '" --var-json "NTP_SERVER"' output = json.loads(self.run_script(argument)) self.assertDictEqual(output, {'17.39.1.130': {}, '17.39.1.129': {}}) #NTP data is present only in the host config + argument = '-m "' + self.sample_graph + '" --var-json "NTP_SERVER"' for asic in range(NUM_ASIC): output = json.loads(self.run_script_for_asic(argument, asic, self.port_config[asic])) print("Log:asic{} sku {}".format(asic,output)) self.assertDictEqual(output, {}) def test_mgmt_port(self): - argument = '-m "' + self.sample_graph + '" --var-json "MGMT_PORT"' + argument = '-m "' + self.sample_graph + '" -p "' + self.sample_port_config + '" --var-json "MGMT_PORT"' output = json.loads(self.run_script(argument)) self.assertDictEqual(output, {'eth0': {'alias': 'eth0', 'admin_status': 'up'}}) + argument = '-m "' + self.sample_graph + '" --var-json "MGMT_PORT"' for asic in range(NUM_ASIC): output = json.loads(self.run_script_for_asic(argument, asic, self.port_config[asic])) self.assertDictEqual(output, {'eth0': {'alias': 'eth0', 'admin_status': 'up'}}) @@ -215,17 +221,17 @@ def test_frontend_asic_ports(self): "Ethernet-BP12": { "admin_status": "up", "alias": "Eth7-ASIC0", "asic_port_name": "Eth7-ASIC0", "description": "ASIC3:Eth1-ASIC3", "index": "3", "lanes": "25,26,27,28", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Int", "speed": "40000" }}) def test_frontend_asic_ports_config_db(self): - argument = "-m {} -n asic0 --var-json \"PORT\"".format(self.sample_graph) + argument = "-m {} -p {} -n asic0 --var-json \"PORT\"".format(self.sample_graph, self.port_config[0]) output = json.loads(self.run_script(argument)) self.assertDictEqual(output, - {"Ethernet0": { "admin_status": "up", "alias": "Ethernet1/1", "asic_port_name": "Eth0-ASIC0", "description": "01T2:Ethernet1:config_db", "index": "0", "lanes": "33,34,35,36", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000", "autoneg": "on" }, - "Ethernet4": { "admin_status": "up", "alias": "Ethernet1/2", "asic_port_name": "Eth1-ASIC0", "description": "01T2:Ethernet2:config_db", "index": "1", "lanes": "29,30,31,32", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000", "autoneg": "on" }, - "Ethernet8": { "admin_status": "up", "alias": "Ethernet1/3", "asic_port_name": "Eth2-ASIC0", "description": "Ethernet1/3:config_db", "index": "2", "lanes": "41,42,43,44", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000" }, - "Ethernet12": { "admin_status": "up", "alias": "Ethernet1/4", "asic_port_name": "Eth3-ASIC0", "description": "Ethernet1/4:config_db", "index": "3", "lanes": "37,38,39,40", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000" }, - "Ethernet-BP0": { "admin_status": "up", "alias": "Eth4-ASIC0", "asic_port_name": "Eth4-ASIC0", "description": "ASIC2:Eth0-ASIC2:config_db", "index": "0", "lanes": "13,14,15,16", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Int", "speed": "40000" }, - "Ethernet-BP4": { "admin_status": "up", "alias": "Eth5-ASIC0", "asic_port_name": "Eth5-ASIC0", "description": "ASIC2:Eth1-ASIC2:config_db", "index": "1", "lanes": "17,18,19,20", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Int", "speed": "40000" }, - "Ethernet-BP8": { "admin_status": "up", "alias": "Eth6-ASIC0", "asic_port_name": "Eth6-ASIC0", "description": "ASIC3:Eth0-ASIC3:config_db", "index": "2", "lanes": "21,22,23,24", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Int", "speed": "40000" }, - "Ethernet-BP12": { "admin_status": "up", "alias": "Eth7-ASIC0", "asic_port_name": "Eth7-ASIC0", "description": "ASIC3:Eth1-ASIC3:config_db", "index": "3", "lanes": "25,26,27,28", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Int", "speed": "40000" }}) + {"Ethernet0": { "admin_status": "up", "alias": "Ethernet1/1", "asic_port_name": "Eth0-ASIC0", "description": "01T2:Ethernet1", "index": "0", "lanes": "33,34,35,36", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000", "autoneg": "on" }, + "Ethernet4": { "admin_status": "up", "alias": "Ethernet1/2", "asic_port_name": "Eth1-ASIC0", "description": "01T2:Ethernet2", "index": "1", "lanes": "29,30,31,32", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000", "autoneg": "on" }, + "Ethernet8": { "alias": "Ethernet1/3", "asic_port_name": "Eth2-ASIC0", "description": "Ethernet1/3", "index": "2", "lanes": "41,42,43,44", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000" }, + "Ethernet12": { "alias": "Ethernet1/4", "asic_port_name": "Eth3-ASIC0", "description": "Ethernet1/4", "index": "3", "lanes": "37,38,39,40", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Ext", "speed": "40000" }, + "Ethernet-BP0": { "admin_status": "up", "alias": "Eth4-ASIC0", "asic_port_name": "Eth4-ASIC0", "description": "ASIC2:Eth0-ASIC2", "index": "0", "lanes": "13,14,15,16", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Int", "speed": "40000" }, + "Ethernet-BP4": { "admin_status": "up", "alias": "Eth5-ASIC0", "asic_port_name": "Eth5-ASIC0", "description": "ASIC2:Eth1-ASIC2", "index": "1", "lanes": "17,18,19,20", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Int", "speed": "40000" }, + "Ethernet-BP8": { "admin_status": "up", "alias": "Eth6-ASIC0", "asic_port_name": "Eth6-ASIC0", "description": "ASIC3:Eth0-ASIC3", "index": "2", "lanes": "21,22,23,24", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Int", "speed": "40000" }, + "Ethernet-BP12": { "admin_status": "up", "alias": "Eth7-ASIC0", "asic_port_name": "Eth7-ASIC0", "description": "ASIC3:Eth1-ASIC3", "index": "3", "lanes": "25,26,27,28", "mtu": "9100", "tpid": "0x8100", "pfc_asym": "off", "role": "Int", "speed": "40000" }}) def test_frontend_asic_device_neigh(self): argument = "-m {} -p {} -n asic0 --var-json \"DEVICE_NEIGHBOR\"".format(self.sample_graph, self.port_config[0]) @@ -270,7 +276,7 @@ def test_frontend_bgp_neighbor(self): 'fc00::2': {'rrclient': 0, 'name': '01T2', 'local_addr': 'fc00::1', 'nhopself': 0, 'holdtime': '10', 'asn': '65200', 'keepalive': '3'}}) def test_frontend_asic_bgp_neighbor(self): - argument = "-m {} -p {} -n asic0 --var-json \"BGP_INTERNAL_NEIGHBOR\"".format(self.sample_graph, self.port_config[3]) + argument = "-m {} -p {} -n asic0 --var-json \"BGP_INTERNAL_NEIGHBOR\"".format(self.sample_graph, self.port_config[0]) output = json.loads(self.run_script(argument)) self.assertDictEqual(output, \ {'10.1.0.0': {'rrclient': 0, 'name': 'ASIC2', 'local_addr': '10.1.0.1', 'nhopself': 0, 'admin_status': 'up', 'holdtime': '0', 'asn': '65100', 'keepalive': '0'}, @@ -297,23 +303,38 @@ def test_device_asic_metadata(self): self.assertEqual(output['localhost']['sub_role'], 'BackEnd') def test_global_asic_acl(self): - argument = "-m {} --var-json \"ACL_TABLE\"".format(self.sample_graph) + argument = "-m {} -p {} --var-json \"ACL_TABLE\"".format(self.sample_graph, self.sample_port_config) output = json.loads(self.run_script(argument)) - self.assertDictEqual(output, {\ - 'DATAACL': {'policy_desc': 'DATAACL', 'ports': ['PortChannel0002','PortChannel0008'], 'stage': 'ingress', 'type': 'L3'}, - 'EVERFLOW': {'policy_desc': 'EVERFLOW', 'ports': ['PortChannel0002','PortChannel0008'], 'stage': 'ingress', 'type': 'MIRROR'}, - 'EVERFLOWV6':{'policy_desc': 'EVERFLOWV6', 'ports': ['PortChannel0002','PortChannel0008'], 'stage': 'ingress', 'type': 'MIRRORV6'}, - 'SNMP_ACL': {'policy_desc': 'SNMP_ACL', 'services': ['SNMP'], 'stage': 'ingress', 'type': 'CTRLPLANE'}, - 'SSH_ONLY': {'policy_desc': 'SSH_ONLY', 'services': ['SSH'], 'stage': 'ingress', 'type': 'CTRLPLANE'}}) + exp = {\ + 'SNMP_ACL': {'policy_desc': 'SNMP_ACL', 'type': 'CTRLPLANE', 'stage': 'ingress', 'services': ['SNMP']}, + 'EVERFLOW': {'policy_desc': 'EVERFLOW', 'stage': 'ingress', 'ports': ['PortChannel0002', 'PortChannel0008', 'Ethernet8', 'Ethernet12', 'Ethernet24', 'Ethernet28'], 'type': 'MIRROR'}, + 'EVERFLOWV6': {'policy_desc': 'EVERFLOWV6', 'stage': 'ingress', 'ports': ['PortChannel0002', 'PortChannel0008', 'Ethernet8', 'Ethernet12', 'Ethernet24', 'Ethernet28'], 'type': 'MIRRORV6'}, + 'SSH_ONLY': {'policy_desc': 'SSH_ONLY', 'type': 'CTRLPLANE', 'stage': 'ingress', 'services': ['SSH']}, + 'DATAACL': {'policy_desc': 'DATAACL', 'stage': 'ingress', 'ports': ['PortChannel0002', 'PortChannel0008'], 'type': 'L3'}} + for k, v in output.items(): + if 'ports' in v: + v['ports'].sort() + for k, v in exp.items(): + if 'ports' in v: + v['ports'].sort() + self.assertDictEqual(output, exp) + def test_global_asic_acl1(self): - argument = "-m {} --var-json \"ACL_TABLE\"".format(self.sample_graph1) + argument = "-m {} -p {} --var-json \"ACL_TABLE\"".format(self.sample_graph1, self.sample_port_config) + self.maxDiff = None output = json.loads(self.run_script(argument)) - self.assertDictEqual(output, {\ - 'EVERFLOW': {'policy_desc': 'EVERFLOW', 'ports': [], 'stage': 'ingress', 'type': 'MIRROR'}, - 'EVERFLOWV6':{'policy_desc': 'EVERFLOWV6', 'ports': [], 'stage': 'ingress', 'type': 'MIRRORV6'}, - 'SNMP_ACL': {'policy_desc': 'SNMP_ACL', 'services': ['SNMP'], 'stage': 'ingress', 'type': 'CTRLPLANE'}, - 'SSH_ONLY': {'policy_desc': 'SSH_ONLY', 'services': ['SSH'], 'stage': 'ingress', 'type': 'CTRLPLANE'}}) - + exp = {\ + 'SNMP_ACL': {'policy_desc': 'SNMP_ACL', 'type': 'CTRLPLANE', 'stage': 'ingress', 'services': ['SNMP']}, + 'EVERFLOW': {'policy_desc': 'EVERFLOW', 'stage': 'ingress', 'ports': ['Ethernet0', 'Ethernet4', 'Ethernet8', 'Ethernet12', 'Ethernet16', 'Ethernet20', 'Ethernet24', 'Ethernet28'], 'type': 'MIRROR'}, + 'EVERFLOWV6': {'policy_desc': 'EVERFLOWV6', 'stage': 'ingress', 'ports': ['Ethernet0', 'Ethernet4', 'Ethernet8', 'Ethernet12', 'Ethernet16', 'Ethernet20', 'Ethernet24', 'Ethernet28'], 'type': 'MIRRORV6'}, + 'SSH_ONLY': {'policy_desc': 'SSH_ONLY', 'type': 'CTRLPLANE', 'stage': 'ingress', 'services': ['SSH']}} + for k, v in output.items(): + if 'ports' in v: + v['ports'].sort() + for k, v in exp.items(): + if 'ports' in v: + v['ports'].sort() + self.assertDictEqual(output, exp) def test_front_end_asic_acl(self): argument = "-m {} -p {} -n asic0 --var-json \"ACL_TABLE\"".format(self.sample_graph, self.port_config[0]) @@ -347,7 +368,7 @@ def test_back_end_asic_acl1(self): def test_loopback_intfs(self): - argument = "-m {} --var-json \"LOOPBACK_INTERFACE\"".format(self.sample_graph) + argument = "-m {} -p {} --var-json \"LOOPBACK_INTERFACE\"".format(self.sample_graph, self.sample_port_config) output = json.loads(self.run_script(argument)) self.assertDictEqual(output, {\ "Loopback0": {}, @@ -355,7 +376,7 @@ def test_loopback_intfs(self): "Loopback0|FC00:1::32/128": {}}) # The asic configuration should have 2 loopback interfaces - argument = "-m {} -n asic0 --var-json \"LOOPBACK_INTERFACE\"".format(self.sample_graph) + argument = "-m {} -p {} -n asic0 --var-json \"LOOPBACK_INTERFACE\"".format(self.sample_graph, self.port_config[0]) output = json.loads(self.run_script(argument)) self.assertDictEqual(output, { \ "Loopback0": {}, @@ -365,7 +386,7 @@ def test_loopback_intfs(self): "Loopback4096|8.0.0.0/32": {}, "Loopback4096|FD00:1::32/128": {}}) - argument = "-m {} -n asic3 --var-json \"LOOPBACK_INTERFACE\"".format(self.sample_graph) + argument = "-m {} -p {} -n asic3 --var-json \"LOOPBACK_INTERFACE\"".format(self.sample_graph, self.port_config[3]) output = json.loads(self.run_script(argument)) self.assertDictEqual(output, {\ "Loopback0": {}, diff --git a/src/sonic-device-data/tests/permitted_list b/src/sonic-device-data/tests/permitted_list index c1f70dc7be65..e1a651569b84 100644 --- a/src/sonic-device-data/tests/permitted_list +++ b/src/sonic-device-data/tests/permitted_list @@ -2,6 +2,7 @@ sai_trap_group_priority use_all_splithorizon_groups riot_enable sai_tunnel_support +sai_tunnel_underlay_route_mode riot_overlay_l3_intf_mem_size riot_overlay_l3_egress_mem_size l3_ecmp_levels diff --git a/src/sonic-host-services/scripts/hostcfgd b/src/sonic-host-services/scripts/hostcfgd index 5b6693fbcdf7..7f8f4be0b2e7 100755 --- a/src/sonic-host-services/scripts/hostcfgd +++ b/src/sonic-host-services/scripts/hostcfgd @@ -11,8 +11,7 @@ import signal import jinja2 from sonic_py_common import device_info -from swsscommon.swsscommon import SubscriberStateTable, DBConnector, Select -from swsscommon.swsscommon import ConfigDBConnector, TableConsumable, Table +from swsscommon.swsscommon import ConfigDBConnector, DBConnector, Table # FILE PAM_AUTH_CONF = "/etc/pam.d/common-auth-sonic" @@ -207,21 +206,23 @@ class FeatureHandler(object): else: self.resync_feature_state(self._cached_config[feature_name]) - def sync_state_field(self): + def sync_state_field(self, feature_table): """ Summary: Updates the state field in the FEATURE|* tables as the state field might have to be rendered based on DEVICE_METADATA table """ - feature_table = self._config_db.get_table('FEATURE') for feature_name in feature_table.keys(): if not feature_name: syslog.syslog(syslog.LOG_WARNING, "Feature is None") continue feature = Feature(feature_name, feature_table[feature_name], self._device_config) - if not feature.compare_state(feature_name, feature_table.get(feature_name, {})): - self.resync_feature_state(feature) + + self._cached_config.setdefault(feature_name, feature) + self.update_feature_auto_restart(feature, feature_name) + self.update_feature_state(feature) + self.resync_feature_state(feature) def update_feature_state(self, feature): cached_feature = self._cached_config[feature.name] @@ -406,6 +407,10 @@ class Iptables(object): ''' return (isinstance(key, tuple)) + def load(self, lpbk_table): + for row in lpbk_table: + self.iptables_handler(row, lpbk_table[row]) + def command(self, chain, ip, ver, op): cmd = 'iptables' if ver == '4' else 'ip6tables' cmd += ' -t mangle --{} {} -p tcp --tcp-flags SYN SYN'.format(op, chain) @@ -890,15 +895,13 @@ class KdumpCfg(object): memory = self.kdump_defaults["memory"] if data.get("memory") is not None: memory = data.get("memory") - if data.get("memory") is not None: - run_cmd("sonic-kdump-config --memory " + memory) + run_cmd("sonic-kdump-config --memory " + memory) # Num dumps num_dumps = self.kdump_defaults["num_dumps"] if data.get("num_dumps") is not None: num_dumps = data.get("num_dumps") - if data.get("num_dumps") is not None: - run_cmd("sonic-kdump-config --num_dumps " + num_dumps) + run_cmd("sonic-kdump-config --num_dumps " + num_dumps) class NtpCfg(object): """ @@ -912,6 +915,15 @@ class NtpCfg(object): self.ntp_global = {} self.ntp_servers = set() + def load(self, ntp_global_conf, ntp_server_conf): + syslog.syslog(syslog.LOG_INFO, "NtpCfg load ...") + + for row in ntp_global_conf: + self.ntp_global_update(row, ntp_global_conf[row], is_load=True) + + # Force reload on init + self.ntp_server_update(0, None, is_load=True) + def handle_ntp_source_intf_chg(self, intf_name): # if no ntp server configured, do nothing if not self.ntp_servers: @@ -925,7 +937,7 @@ class NtpCfg(object): cmd = 'systemctl restart ntp-config' run_cmd(cmd) - def ntp_global_update(self, key, data): + def ntp_global_update(self, key, data, is_load=False): syslog.syslog(syslog.LOG_INFO, 'NTP GLOBAL Update') orig_src = self.ntp_global.get('src_intf', '') orig_src_set = set(orig_src.split(";")) @@ -938,6 +950,9 @@ class NtpCfg(object): # Update the Local Cache self.ntp_global = data + # If initial load don't restart daemon + if is_load: return + # check if ntp server configured, if not, do nothing if not self.ntp_servers: syslog.syslog(syslog.LOG_INFO, "No ntp server when global config change, do nothing") @@ -954,16 +969,19 @@ class NtpCfg(object): cmd = 'service ntp restart' run_cmd(cmd) - def ntp_server_update(self, key, op): + def ntp_server_update(self, key, op, is_load=False): syslog.syslog(syslog.LOG_INFO, 'ntp server update key {}'.format(key)) restart_config = False - if op == "SET" and key not in self.ntp_servers: - restart_config = True - self.ntp_servers.add(key) - elif op == "DEL" and key in self.ntp_servers: + if not is_load: + if op == "SET" and key not in self.ntp_servers: + restart_config = True + self.ntp_servers.add(key) + elif op == "DEL" and key in self.ntp_servers: + restart_config = True + self.ntp_servers.remove(key) + else: restart_config = True - self.ntp_servers.remove(key) if restart_config: cmd = 'systemctl restart ntp-config' @@ -1034,31 +1052,24 @@ class HostConfigDaemon: # before moving forward self.config_db = ConfigDBConnector() self.config_db.connect(wait_for_init=True, retry_on=True) - self.dbconn = DBConnector(CFG_DB, 0) - self.state_db_conn = DBConnector(STATE_DB, 0) - self.selector = Select() syslog.syslog(syslog.LOG_INFO, 'ConfigDB connect success') - self.select = Select() - self.callbacks = dict() - self.subscriber_map = dict() - - feature_state_table = Table(self.state_db_conn, 'FEATURE') - # Load DEVICE metadata configurations self.device_config = {} self.device_config['DEVICE_METADATA'] = self.config_db.get_table('DEVICE_METADATA') + # Load feature state table + self.state_db_conn = DBConnector(STATE_DB, 0) + feature_state_table = Table(self.state_db_conn, 'FEATURE') + # Initialize KDump Config and set the config to default if nothing is provided self.kdumpCfg = KdumpCfg(self.config_db) - self.kdumpCfg.load(self.config_db.get_table('KDUMP')) # Initialize IpTables self.iptables = Iptables() # Intialize Feature Handler self.feature_handler = FeatureHandler(self.config_db, feature_state_table, self.device_config) - self.feature_handler.sync_state_field() # Initialize Ntp Config Handler self.ntpcfg = NtpCfg() @@ -1073,21 +1084,28 @@ class HostConfigDaemon: self.pamLimitsCfg = PamLimitsCfg(self.config_db) self.pamLimitsCfg.update_config_file() - def load(self): - aaa = self.config_db.get_table('AAA') - tacacs_global = self.config_db.get_table('TACPLUS') - tacacs_server = self.config_db.get_table('TACPLUS_SERVER') - radius_global = self.config_db.get_table('RADIUS') - radius_server = self.config_db.get_table('RADIUS_SERVER') + def load(self, init_data): + features = init_data['FEATURE'] + aaa = init_data['AAA'] + tacacs_global = init_data['TACPLUS'] + tacacs_server = init_data['TACPLUS_SERVER'] + radius_global = init_data['RADIUS'] + radius_server = init_data['RADIUS_SERVER'] + lpbk_table = init_data['LOOPBACK_INTERFACE'] + ntp_server = init_data['NTP_SERVER'] + ntp_global = init_data['NTP'] + kdump = init_data['KDUMP'] + + self.feature_handler.sync_state_field(features) self.aaacfg.load(aaa, tacacs_global, tacacs_server, radius_global, radius_server) + self.iptables.load(lpbk_table) + self.ntpcfg.load(ntp_global, ntp_server) + self.kdumpCfg.load(kdump) - try: - dev_meta = self.config_db.get_table('DEVICE_METADATA') - if 'localhost' in dev_meta: - if 'hostname' in dev_meta['localhost']: - self.hostname_cache = dev_meta['localhost']['hostname'] - except Exception as e: - pass + dev_meta = self.config_db.get_table('DEVICE_METADATA') + if 'localhost' in dev_meta: + if 'hostname' in dev_meta['localhost']: + self.hostname_cache = dev_meta['localhost']['hostname'] # Update AAA with the hostname self.aaacfg.hostname_update(self.hostname_cache) @@ -1181,40 +1199,38 @@ class HostConfigDaemon: systemctl_cmd = "sudo systemctl is-system-running --wait --quiet" subprocess.call(systemctl_cmd, shell=True) - def subscribe(self, table, callback, pri): - try: - if table not in self.callbacks: - self.callbacks[table] = [] - subscriber = SubscriberStateTable(self.dbconn, table, TableConsumable.DEFAULT_POP_BATCH_SIZE, pri) - self.selector.addSelectable(subscriber) # Add to the Selector - self.subscriber_map[subscriber.getFd()] = (subscriber, table) # Maintain a mapping b/w subscriber & fd + def register_callbacks(self): - self.callbacks[table].append(callback) - except Exception as err: - syslog.syslog(syslog.LOG_ERR, "Subscribe to table {} failed with error {}".format(table, err)) + def make_callback(func): + def callback(table, key, data): + if data is None: + op = "DEL" + else: + op = "SET" + return func(key, op, data) + return callback - def register_callbacks(self): - self.subscribe('KDUMP', lambda table, key, op, data: self.kdump_handler(key, op, data), HOSTCFGD_MAX_PRI) + self.config_db.subscribe('KDUMP', make_callback(self.kdump_handler)) # Handle FEATURE updates before other tables - self.subscribe('FEATURE', lambda table, key, op, data: self.feature_handler.handle(key, op, data), HOSTCFGD_MAX_PRI-1) + self.config_db.subscribe('FEATURE', make_callback(self.feature_handler.handle)) # Handle AAA, TACACS and RADIUS related tables - self.subscribe('AAA', lambda table, key, op, data: self.aaa_handler(key, op, data), HOSTCFGD_MAX_PRI-2) - self.subscribe('TACPLUS', lambda table, key, op, data: self.tacacs_global_handler(key, op, data), HOSTCFGD_MAX_PRI-2) - self.subscribe('TACPLUS_SERVER', lambda table, key, op, data: self.tacacs_server_handler(key, op, data), HOSTCFGD_MAX_PRI-2) - self.subscribe('RADIUS', lambda table, key, op, data: self.radius_global_handler(key, op, data), HOSTCFGD_MAX_PRI-2) - self.subscribe('RADIUS_SERVER', lambda table, key, op, data: self.radius_server_handler(key, op, data), HOSTCFGD_MAX_PRI-2) + self.config_db.subscribe('AAA', make_callback(self.aaa_handler)) + self.config_db.subscribe('TACPLUS', make_callback(self.tacacs_global_handler)) + self.config_db.subscribe('TACPLUS_SERVER', make_callback(self.tacacs_server_handler)) + self.config_db.subscribe('RADIUS', make_callback(self.radius_global_handler)) + self.config_db.subscribe('RADIUS_SERVER', make_callback(self.radius_server_handler)) # Handle IPTables configuration - self.subscribe('LOOPBACK_INTERFACE', lambda table, key, op, data: self.lpbk_handler(key, op, data), HOSTCFGD_MAX_PRI-3) + self.config_db.subscribe('LOOPBACK_INTERFACE', make_callback(self.lpbk_handler)) # Handle NTP & NTP_SERVER updates - self.subscribe('NTP', lambda table, key, op, data: self.ntp_global_handler(key, op, data), HOSTCFGD_MAX_PRI-4) - self.subscribe('NTP_SERVER', lambda table, key, op, data: self.ntp_server_handler(key, op, data), HOSTCFGD_MAX_PRI-4) + self.config_db.subscribe('NTP', make_callback(self.ntp_global_handler)) + self.config_db.subscribe('NTP_SERVER', make_callback(self.ntp_server_handler)) # Handle updates to src intf changes in radius - self.subscribe('MGMT_INTERFACE', lambda table, key, op, data: self.mgmt_intf_handler(key, op, data), HOSTCFGD_MAX_PRI-5) - self.subscribe('VLAN_INTERFACE', lambda table, key, op, data: self.vlan_intf_handler(key, op, data), HOSTCFGD_MAX_PRI-5) - self.subscribe('VLAN_SUB_INTERFACE', lambda table, key, op, data: self.vlan_sub_intf_handler(key, op, data), HOSTCFGD_MAX_PRI-5) - self.subscribe('PORTCHANNEL_INTERFACE', lambda table, key, op, data: self.portchannel_intf_handler(key, op, data), HOSTCFGD_MAX_PRI-5) - self.subscribe('INTERFACE', lambda table, key, op, data: self.phy_intf_handler(key, op, data), HOSTCFGD_MAX_PRI-5) - + self.config_db.subscribe('MGMT_INTERFACE', make_callback(self.mgmt_intf_handler)) + self.config_db.subscribe('VLAN_INTERFACE', make_callback(self.vlan_intf_handler)) + self.config_db.subscribe('VLAN_SUB_INTERFACE', make_callback(self.vlan_sub_intf_handler)) + self.config_db.subscribe('PORTCHANNEL_INTERFACE', make_callback(self.portchannel_intf_handler)) + self.config_db.subscribe('INTERFACE', make_callback(self.phy_intf_handler)) + syslog.syslog(syslog.LOG_INFO, "Waiting for systemctl to finish initialization") self.wait_till_system_init_done() @@ -1222,27 +1238,7 @@ class HostConfigDaemon: "systemctl has finished initialization -- proceeding ...") def start(self): - while True: - state, selectable_ = self.selector.select(DEFAULT_SELECT_TIMEOUT) - if state == self.selector.TIMEOUT: - continue - elif state == self.selector.ERROR: - syslog.syslog(syslog.LOG_ERR, - "error returned by select") - continue - - fd = selectable_.getFd() - # Get the Corresponding subscriber & table - subscriber, table = self.subscriber_map.get(fd, (None, "")) - if not subscriber: - syslog.syslog(syslog.LOG_ERR, - "No Subscriber object found for fd: {}, subscriber map: {}".format(fd, subscriber_map)) - continue - key, op, fvs = subscriber.pop() - # Get the registered callback - cbs = self.callbacks.get(table, None) - for callback in cbs: - callback(table, key, op, dict(fvs)) + self.config_db.listen(init_data_handler=self.load) def main(): @@ -1251,7 +1247,6 @@ def main(): signal.signal(signal.SIGHUP, signal_handler) daemon = HostConfigDaemon() daemon.register_callbacks() - daemon.load() daemon.start() if __name__ == "__main__": diff --git a/src/sonic-host-services/tests/common/mock_configdb.py b/src/sonic-host-services/tests/common/mock_configdb.py index 138869dc3bee..f0b12b11abf9 100644 --- a/src/sonic-host-services/tests/common/mock_configdb.py +++ b/src/sonic-host-services/tests/common/mock_configdb.py @@ -4,9 +4,10 @@ class MockConfigDb(object): """ STATE_DB = None CONFIG_DB = None + event_queue = [] def __init__(self, **kwargs): - pass + self.handlers = {} @staticmethod def set_config_db(test_config_db): @@ -44,73 +45,12 @@ def set_entry(self, key, field, data): def get_table(self, table_name): return MockConfigDb.CONFIG_DB[table_name] + def subscribe(self, table_name, callback): + self.handlers[table_name] = callback -class MockSelect(): - - event_queue = [] - - @staticmethod - def set_event_queue(Q): - MockSelect.event_queue = Q - - @staticmethod - def get_event_queue(): - return MockSelect.event_queue - - @staticmethod - def reset_event_queue(): - MockSelect.event_queue = [] - - def __init__(self): - self.sub_map = {} - self.TIMEOUT = "TIMEOUT" - self.ERROR = "ERROR" - - def addSelectable(self, subscriber): - self.sub_map[subscriber.table] = subscriber - - def select(self, TIMEOUT): - if not MockSelect.get_event_queue(): - raise TimeoutError - table, key = MockSelect.get_event_queue().pop(0) - self.sub_map[table].nextKey(key) - return "OBJECT", self.sub_map[table] - - -class MockSubscriberStateTable(): - - FD_INIT = 0 - - @staticmethod - def generate_fd(): - curr = MockSubscriberStateTable.FD_INIT - MockSubscriberStateTable.FD_INIT = curr + 1 - return curr - - @staticmethod - def reset_fd(): - MockSubscriberStateTable.FD_INIT = 0 - - def __init__(self, conn, table, pop, pri): - self.fd = MockSubscriberStateTable.generate_fd() - self.next_key = '' - self.table = table - - def getFd(self): - return self.fd - - def nextKey(self, key): - self.next_key = key - - def pop(self): - table = MockConfigDb.CONFIG_DB.get(self.table, {}) - if self.next_key not in table: - op = "DEL" - fvs = {} - else: - op = "SET" - fvs = table.get(self.next_key, {}) - return self.next_key, op, fvs + def listen(self, init_data_handler=None): + for e in MockConfigDb.event_queue: + self.handlers[e[0]](e[0], e[1], self.get_entry(e[0], e[1])) class MockDBConnector(): diff --git a/src/sonic-host-services/tests/hostcfgd/hostcfgd_radius_test.py b/src/sonic-host-services/tests/hostcfgd/hostcfgd_radius_test.py index 9738f16852e5..c08cd1829add 100644 --- a/src/sonic-host-services/tests/hostcfgd/hostcfgd_radius_test.py +++ b/src/sonic-host-services/tests/hostcfgd/hostcfgd_radius_test.py @@ -10,8 +10,7 @@ from parameterized import parameterized from unittest import TestCase, mock from tests.hostcfgd.test_radius_vectors import HOSTCFGD_TEST_RADIUS_VECTOR -from tests.common.mock_configdb import MockConfigDb, MockSubscriberStateTable -from tests.common.mock_configdb import MockSelect, MockDBConnector +from tests.common.mock_configdb import MockConfigDb, MockDBConnector test_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) @@ -33,12 +32,9 @@ # Mock swsscommon classes hostcfgd.ConfigDBConnector = MockConfigDb -hostcfgd.SubscriberStateTable = MockSubscriberStateTable -hostcfgd.Select = MockSelect hostcfgd.DBConnector = MockDBConnector hostcfgd.Table = mock.Mock() - class TestHostcfgdRADIUS(TestCase): """ Test hostcfd daemon - RADIUS diff --git a/src/sonic-host-services/tests/hostcfgd/hostcfgd_tacacs_test.py b/src/sonic-host-services/tests/hostcfgd/hostcfgd_tacacs_test.py index 18bf5c17e6c2..a6478c08dc0d 100644 --- a/src/sonic-host-services/tests/hostcfgd/hostcfgd_tacacs_test.py +++ b/src/sonic-host-services/tests/hostcfgd/hostcfgd_tacacs_test.py @@ -10,8 +10,7 @@ from parameterized import parameterized from unittest import TestCase, mock from tests.hostcfgd.test_tacacs_vectors import HOSTCFGD_TEST_TACACS_VECTOR -from tests.common.mock_configdb import MockConfigDb, MockSubscriberStateTable -from tests.common.mock_configdb import MockSelect, MockDBConnector +from tests.common.mock_configdb import MockConfigDb, MockDBConnector test_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) modules_path = os.path.dirname(test_path) @@ -32,8 +31,6 @@ # Mock swsscommon classes hostcfgd.ConfigDBConnector = MockConfigDb -hostcfgd.SubscriberStateTable = MockSubscriberStateTable -hostcfgd.Select = MockSelect hostcfgd.DBConnector = MockDBConnector hostcfgd.Table = mock.Mock() diff --git a/src/sonic-host-services/tests/hostcfgd/hostcfgd_test.py b/src/sonic-host-services/tests/hostcfgd/hostcfgd_test.py index db9a35075a02..28d4f6f8a724 100644 --- a/src/sonic-host-services/tests/hostcfgd/hostcfgd_test.py +++ b/src/sonic-host-services/tests/hostcfgd/hostcfgd_test.py @@ -8,8 +8,7 @@ from unittest import TestCase, mock from .test_vectors import HOSTCFGD_TEST_VECTOR, HOSTCFG_DAEMON_CFG_DB -from tests.common.mock_configdb import MockConfigDb, MockSubscriberStateTable -from tests.common.mock_configdb import MockSelect, MockDBConnector +from tests.common.mock_configdb import MockConfigDb, MockDBConnector from pyfakefs.fake_filesystem_unittest import patchfs from deepdiff import DeepDiff @@ -24,8 +23,6 @@ hostcfgd_path = os.path.join(scripts_path, 'hostcfgd') hostcfgd = load_module_from_source('hostcfgd', hostcfgd_path) hostcfgd.ConfigDBConnector = MockConfigDb -hostcfgd.SubscriberStateTable = MockSubscriberStateTable -hostcfgd.Select = MockSelect hostcfgd.DBConnector = MockDBConnector hostcfgd.Table = mock.Mock() @@ -122,8 +119,8 @@ def test_hostcfgd_feature_handler(self, test_name, test_data, fs): feature_handler = hostcfgd.FeatureHandler(MockConfigDb(), feature_state_table_mock, device_config) # sync the state field and Handle Feature Updates - feature_handler.sync_state_field() features = MockConfigDb.CONFIG_DB['FEATURE'] + feature_handler.sync_state_field(features) for key, fvs in features.items(): feature_handler.handle(key, 'SET', fvs) @@ -227,7 +224,7 @@ def tearDown(self): @patchfs def test_feature_events(self, fs): fs.create_dir(hostcfgd.FeatureHandler.SYSTEMD_SYSTEM_DIR) - MockSelect.event_queue = [('FEATURE', 'dhcp_relay'), + MockConfigDb.event_queue = [('FEATURE', 'dhcp_relay'), ('FEATURE', 'mux'), ('FEATURE', 'telemetry')] daemon = hostcfgd.HostConfigDaemon() @@ -258,7 +255,7 @@ def test_feature_events(self, fs): # Change the state to disabled MockConfigDb.CONFIG_DB['FEATURE']['telemetry']['state'] = 'disabled' - MockSelect.event_queue = [('FEATURE', 'telemetry')] + MockConfigDb.event_queue = [('FEATURE', 'telemetry')] try: daemon.start() except TimeoutError: @@ -273,7 +270,7 @@ def test_feature_events(self, fs): def test_loopback_events(self): MockConfigDb.set_config_db(HOSTCFG_DAEMON_CFG_DB) - MockSelect.event_queue = [('NTP', 'global'), + MockConfigDb.event_queue = [('NTP', 'global'), ('NTP_SERVER', '0.debian.pool.ntp.org'), ('LOOPBACK_INTERFACE', 'Loopback0|10.184.8.233/32')] daemon = hostcfgd.HostConfigDaemon() @@ -296,8 +293,7 @@ def test_kdump_event(self): MockConfigDb.set_config_db(HOSTCFG_DAEMON_CFG_DB) daemon = hostcfgd.HostConfigDaemon() daemon.register_callbacks() - assert MockConfigDb.CONFIG_DB['KDUMP']['config'] - MockSelect.event_queue = [('KDUMP', 'config')] + MockConfigDb.event_queue = [('KDUMP', 'config')] with mock.patch('hostcfgd.subprocess') as mocked_subprocess: popen_mock = mock.Mock() attrs = {'communicate.return_value': ('output', 'error')} diff --git a/src/sonic-platform-common b/src/sonic-platform-common index ee122155e0f6..b70e75979f70 160000 --- a/src/sonic-platform-common +++ b/src/sonic-platform-common @@ -1 +1 @@ -Subproject commit ee122155e0f6e40b483d24737c5f1b729bdbf111 +Subproject commit b70e75979f704e980a3fb20732642ec99f32b0ee diff --git a/src/sonic-py-swsssdk b/src/sonic-py-swsssdk index 96c05900fc6e..653bdba51750 160000 --- a/src/sonic-py-swsssdk +++ b/src/sonic-py-swsssdk @@ -1 +1 @@ -Subproject commit 96c05900fc6e4063c51e3f6256f8a8e765605be4 +Subproject commit 653bdba51750cac95feb3dd47904bf4de2353fec diff --git a/src/sonic-sairedis b/src/sonic-sairedis index 1ccda8d1d982..2ddf41935696 160000 --- a/src/sonic-sairedis +++ b/src/sonic-sairedis @@ -1 +1 @@ -Subproject commit 1ccda8d1d9821a65f73eb5c8f88f9abea0623c0b +Subproject commit 2ddf419356964e4e745d5851cd76b8818cbb149f diff --git a/src/sonic-snmpagent b/src/sonic-snmpagent index 2654f4a66794..890f32f333df 160000 --- a/src/sonic-snmpagent +++ b/src/sonic-snmpagent @@ -1 +1 @@ -Subproject commit 2654f4a667941296d4e56a16e8e1a7d1d5fca7b6 +Subproject commit 890f32f333dfe31c36a8342ff70c0e84910bf9c8 diff --git a/src/sonic-swss b/src/sonic-swss index d80094b248e7..50d5be2b399e 160000 --- a/src/sonic-swss +++ b/src/sonic-swss @@ -1 +1 @@ -Subproject commit d80094b248e7df5ac9df309d785ddf21e0ab92d7 +Subproject commit 50d5be2b399e9bcc43973f99d72d76e4effd8cc0 diff --git a/src/sonic-swss-common b/src/sonic-swss-common index 9eac0ae78093..a7118f259a8b 160000 --- a/src/sonic-swss-common +++ b/src/sonic-swss-common @@ -1 +1 @@ -Subproject commit 9eac0ae7809350f38650ebb29456fe41a93bbf35 +Subproject commit a7118f259a8be93ec802c77ecf3018cd403ad8dc diff --git a/src/sonic-utilities b/src/sonic-utilities index 8389c8137d4f..f70dc27827a8 160000 --- a/src/sonic-utilities +++ b/src/sonic-utilities @@ -1 +1 @@ -Subproject commit 8389c8137d4fdc5a2d1c803c9c06e6dcb4f849c1 +Subproject commit f70dc27827a88d70e91e15ecdcde2ebbc446116d diff --git a/src/sonic-yang-mgmt/sonic_yang_ext.py b/src/sonic-yang-mgmt/sonic_yang_ext.py index aa36ee0a1951..d43e52970302 100644 --- a/src/sonic-yang-mgmt/sonic_yang_ext.py +++ b/src/sonic-yang-mgmt/sonic_yang_ext.py @@ -591,18 +591,23 @@ def _xlateListInContainer(self, model, yang, configC, table, exceptionList): """ def _xlateContainerInContainer(self, model, yang, configC, table): ccontainer = model - #print(ccontainer['@name']) - yang[ccontainer['@name']] = dict() - if not configC.get(ccontainer['@name']): + ccName = ccontainer['@name'] + yang[ccName] = dict() + if ccName not in configC: + # Inner container doesn't exist in config return - self.sysLog(msg="xlateProcessListOfContainer: {}".format(ccontainer['@name'])) - self._xlateContainer(ccontainer, yang[ccontainer['@name']], \ - configC[ccontainer['@name']], table) + if len(configC[ccName]) == 0: + # Empty container, clean config and return + del configC[ccName] + return + self.sysLog(msg="xlateProcessListOfContainer: {}".format(ccName)) + self._xlateContainer(ccontainer, yang[ccName], \ + configC[ccName], table) # clean empty container - if len(yang[ccontainer['@name']]) == 0: - del yang[ccontainer['@name']] + if len(yang[ccName]) == 0: + del yang[ccName] # remove copy after processing - del configC[ccontainer['@name']] + del configC[ccName] return diff --git a/src/sonic-yang-mgmt/tests/libyang-python-tests/test_sonic_yang.py b/src/sonic-yang-mgmt/tests/libyang-python-tests/test_sonic_yang.py index 3eb396594e80..a13d4c02e9a0 100644 --- a/src/sonic-yang-mgmt/tests/libyang-python-tests/test_sonic_yang.py +++ b/src/sonic-yang-mgmt/tests/libyang-python-tests/test_sonic_yang.py @@ -364,5 +364,20 @@ def test_table_with_no_yang(self, sonic_yang_data): return + def test_special_json_with_yang(self, sonic_yang_data): + # in this test, we validate unusual json config and check if + # loadData works successfully + test_file = sonic_yang_data['test_file'] + syc = sonic_yang_data['syc'] + + # read config + jIn = self.readIjsonInput(test_file, 'SAMPLE_CONFIG_DB_SPECIAL_CASE') + jIn = json.loads(jIn) + + # load config and create Data tree + syc.loadData(jIn) + + return + def teardown_class(self): pass diff --git a/src/sonic-yang-models/tests/files/sample_config_db.json b/src/sonic-yang-models/tests/files/sample_config_db.json index d33cf20e2038..6618ed8232b7 100644 --- a/src/sonic-yang-models/tests/files/sample_config_db.json +++ b/src/sonic-yang-models/tests/files/sample_config_db.json @@ -304,7 +304,8 @@ "switch_id": "2", "switch_type": "voq", "max_cores": "8", - "sub_role": "FrondEnd" + "sub_role": "FrontEnd", + "dhcp_server": "disabled" } }, "VLAN": { @@ -1602,7 +1603,8 @@ "tc_to_pg_map": "tc_to_pg_map1", "pfc_to_queue_map": "pfc_prio_to_q_map1", "pfc_to_pg_map" : "pfc_prio_to_pg_map1", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" }, "Ethernet4": { "dot1p_to_tc_map" : "Dot1p_to_tc_map2", @@ -1611,7 +1613,8 @@ "tc_to_pg_map": "tc_to_pg_map2", "pfc_to_queue_map": "pfc_prio_to_q_map2", "pfc_to_pg_map" : "pfc_prio_to_pg_map2", - "pfc_enable" : "3,4" + "pfc_enable" : "3,4", + "pfcwd_sw_enable" : "3,4" } }, @@ -1691,5 +1694,11 @@ "UNKNOWN_TABLE": { "Error": "This Table is for testing, This Table does not have YANG models." } + }, + "SAMPLE_CONFIG_DB_SPECIAL_CASE": { + "TACPLUS": { + "global": { + } + } } } diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests/buffer_pg.json b/src/sonic-yang-models/tests/yang_model_tests/tests/buffer_pg.json index f92a75365c78..e6e4e59a8fdf 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests/buffer_pg.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests/buffer_pg.json @@ -10,6 +10,9 @@ "desc": "BUFFER_PG_WRONG_PG_VALUE pattern failure", "eStr": "Invalid Buffer PG number" }, + "BUFFER_PG_NULL_PROFILE_VALUE": { + "desc": "BUFFER_PG_NULL_PROFILE_VALUE no failure" + }, "BUFFER_PG_WRONG_PORT_VALUE": { "desc": "BUFFER_PG_WRONG_PORT_VALUE pattern failure", "eStr": "wrong" diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests/device_metadata.json b/src/sonic-yang-models/tests/yang_model_tests/tests/device_metadata.json index ecfff6f69a6f..1c39661d056e 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests/device_metadata.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests/device_metadata.json @@ -36,6 +36,9 @@ "DEVICE_METADATA_TYPE_CORRECT_PATTERN": { "desc": "DEVICE_METADATA correct value for Type field" }, + "DEVICE_METADATA_TYPE_BMC_MGMT_TOR_PATTERN": { + "desc": "DEVICE_METADATA value as BmcMgmtToRRouter for Type field" + }, "DEVICE_METADATA_TYPE_NOT_PROVISIONED_PATTERN": { "desc": "DEVICE_METADATA value as not-provisioned for Type field" }, @@ -103,6 +106,13 @@ }, "DEVICE_METADATA_VALID_SUB_ROLE_CONFIG": { "desc": "Verifying valid sub_role configuration." + }, + "DEVICE_METADATA_VALID_DHCP_SERVER": { + "desc": "Verifying dhcp_server configuration." + }, + "DEVICE_METADATA_INVALID_DHCP_SERVER": { + "desc": "Verifying invalid dhcp_server configuration.", + "eStrKey": "InvalidValue" } } diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests/tacacs.json b/src/sonic-yang-models/tests/yang_model_tests/tests/tacacs.json index 5236aab596fe..6888a4e3f326 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests/tacacs.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests/tacacs.json @@ -4,7 +4,7 @@ }, "TACPLUS_INVALID_TIMEOUT_TEST": { "desc": "Tacplus global configuration with invalid timeout value in TACPLUS table.", - "eStr": "TACACS timeout must be 1..60" + "eStr": "TACACS timeout must be 1..60" }, "TACPLUS_NOT_PRESENT_SRC_INTF_TEST": { "desc": "Tacplus global configuration with a non existent port in TACPLUS table.", @@ -15,7 +15,7 @@ }, "TACPLUS_SERVER_INVALID_PRIORITY_TEST": { "desc": "Tacplus server configuration with invalid priority value in TACPLUS_SERVER table.", - "eStr": "TACACS server priority must be 1..64" + "eStr": "TACACS server priority must be 1..64" }, "TACPLUS_SERVER_INVALID_TIMEOUT_TEST" : { "desc": "Tacplus server configuration with invalid timeout value in TACPLUS_SERVER table.", diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/buffer_pg.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/buffer_pg.json index ec3ea73bf76d..cd0a244a0e0e 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/buffer_pg.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/buffer_pg.json @@ -52,6 +52,58 @@ } } }, + "BUFFER_PG_NULL_PROFILE_VALUE": { + "sonic-port:sonic-port": { + "sonic-port:PORT": { + "PORT_LIST": [ + { + "admin_status": "up", + "alias": "eth0", + "description": "Ethernet0", + "lanes": "65", + "mtu": "9000", + "name": "Ethernet4", + "tpid": "0x8100", + "speed": "25000" + } + ] + } + }, + "sonic-buffer-pool:sonic-buffer-pool": { + "sonic-buffer-pool:BUFFER_POOL": { + "BUFFER_POOL_LIST": [ + { + "name": "egress_lossless_pool", + "mode": "static", + "size": "300", + "type": "ingress" + } + ] + } + }, + "sonic-buffer-profile:sonic-buffer-profile": { + "sonic-buffer-profile:BUFFER_PROFILE": { + "BUFFER_PROFILE_LIST": [ + { + "name": "lossless_buffer_profile", + "size": "300", + "pool": "egress_lossless_pool" + } + ] + } + }, + "sonic-buffer-pg:sonic-buffer-pg": { + "sonic-buffer-pg:BUFFER_PG": { + "BUFFER_PG_LIST": [ + { + "port": "Ethernet4", + "pg_num": "3", + "profile": "NULL" + } + ] + } + } + }, "BUFFER_PG_WRONG_PROFILE_VALUE": { "sonic-port:sonic-port": { "sonic-port:PORT": { diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/device_metadata.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/device_metadata.json index de0d4e15dcee..687a745a24c6 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/device_metadata.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/device_metadata.json @@ -54,6 +54,16 @@ } } }, + "DEVICE_METADATA_TYPE_BMC_MGMT_TOR_PATTERN": { + "sonic-device_metadata:sonic-device_metadata": { + "sonic-device_metadata:DEVICE_METADATA": { + "sonic-device_metadata:localhost": { + "bgp_asn": "65002", + "type": "BmcMgmtToRRouter" + } + } + } + }, "DEVICE_METADATA_TYPE_NOT_PROVISIONED_PATTERN": { "sonic-device_metadata:sonic-device_metadata": { "sonic-device_metadata:DEVICE_METADATA": { @@ -283,5 +293,23 @@ } } } + }, + "DEVICE_METADATA_VALID_DHCP_SERVER": { + "sonic-device_metadata:sonic-device_metadata": { + "sonic-device_metadata:DEVICE_METADATA": { + "sonic-device_metadata:localhost": { + "dhcp_server": "enabled" + } + } + } + }, + "DEVICE_METADATA_INVALID_DHCP_SERVER": { + "sonic-device_metadata:sonic-device_metadata": { + "sonic-device_metadata:DEVICE_METADATA": { + "sonic-device_metadata:localhost": { + "dhcp_server": "invalid" + } + } + } } } diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/qosmaps.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/qosmaps.json index fe085ee3c7f9..991675bc3979 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/qosmaps.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/qosmaps.json @@ -621,7 +621,8 @@ "pfc_to_pg_map": "map1", "dscp_to_tc_map": "map1", "dot1p_to_tc_map": "map1", - "pfc_enable": "3,4" + "pfc_enable": "3,4", + "pfcwd_sw_enable" : "3,4" } ] } @@ -657,7 +658,8 @@ "pfc_to_pg_map": "map2", "dscp_to_tc_map": "map2", "dot1p_to_tc_map": "map2", - "pfc_enable": "3,4" + "pfc_enable": "3,4", + "pfcwd_sw_enable" : "3,4" } ] } @@ -714,7 +716,8 @@ "PORT_QOS_MAP_LIST": [ { "ifname": "Ethernet4", - "pfc_enable": "8" + "pfc_enable": "8", + "pfcwd_sw_enable" : "8" } ] } diff --git a/src/sonic-yang-models/yang-models/sonic-buffer-pg.yang b/src/sonic-yang-models/yang-models/sonic-buffer-pg.yang index efe6e34ad0d6..60d06bf6ef6c 100644 --- a/src/sonic-yang-models/yang-models/sonic-buffer-pg.yang +++ b/src/sonic-yang-models/yang-models/sonic-buffer-pg.yang @@ -2,9 +2,7 @@ module sonic-buffer-pg { namespace "http://github.com/Azure/sonic-buffer-pg"; prefix bpg; - import sonic-extension { - prefix sonic-ext; - } + yang-version 1.1; import sonic-port { prefix prt; @@ -54,8 +52,13 @@ module sonic-buffer-pg { leaf profile { default 0; - type leafref { - path "/bpf:sonic-buffer-profile/bpf:BUFFER_PROFILE/bpf:BUFFER_PROFILE_LIST/bpf:name"; + type union { + type leafref { + path "/bpf:sonic-buffer-profile/bpf:BUFFER_PROFILE/bpf:BUFFER_PROFILE_LIST/bpf:name"; + } + type string { + pattern "NULL"; + } } description "Buffer Profile associated with Priority Group number for a port"; } diff --git a/src/sonic-yang-models/yang-models/sonic-device_metadata.yang b/src/sonic-yang-models/yang-models/sonic-device_metadata.yang index 87170850d895..17241005861e 100644 --- a/src/sonic-yang-models/yang-models/sonic-device_metadata.yang +++ b/src/sonic-yang-models/yang-models/sonic-device_metadata.yang @@ -88,7 +88,7 @@ module sonic-device_metadata { leaf type { type string { length 1..255; - pattern "ToRRouter|LeafRouter|SpineChassisFrontendRouter|ChassisBackendRouter|ASIC|MgmtToRRouter|SpineRouter|BackEndToRRouter|BackEndLeafRouter|EPMS|MgmtTsToR|not-provisioned"; + pattern "ToRRouter|LeafRouter|SpineChassisFrontendRouter|ChassisBackendRouter|ASIC|MgmtToRRouter|SpineRouter|BackEndToRRouter|BackEndLeafRouter|EPMS|MgmtTsToR|BmcMgmtToRRouter|not-provisioned"; } } @@ -129,7 +129,7 @@ module sonic-device_metadata { leaf sub_role { type string; - description "sub_role indicates if ASIC is FrondEnd or BackEnd."; + description "sub_role indicates if ASIC is FrontEnd or BackEnd."; } leaf downstream_subrole { @@ -183,6 +183,11 @@ module sonic-device_metadata { type uint8; description "Maximum number of cores in a VoQ Switch (chassis)."; } + + leaf dhcp_server { + type stypes:admin_mode; + description "Indicate whether enable the embedded DHCP server."; + } } /* end of container localhost */ } diff --git a/src/sonic-yang-models/yang-models/sonic-port-qos-map.yang b/src/sonic-yang-models/yang-models/sonic-port-qos-map.yang index b29e2f547087..8f4c2d88f4ed 100644 --- a/src/sonic-yang-models/yang-models/sonic-port-qos-map.yang +++ b/src/sonic-yang-models/yang-models/sonic-port-qos-map.yang @@ -81,6 +81,14 @@ module sonic-port-qos-map { } } + leaf pfcwd_sw_enable { + type string { + pattern "[0-7](,[0-7])?"; + } + description + "Specify the queue(s) on which software pfc watchdog are enabled."; + } + leaf pfc_to_queue_map { type leafref { path "/ppqm:sonic-pfc-priority-queue-map/ppqm:MAP_PFC_PRIORITY_TO_QUEUE/ppqm:MAP_PFC_PRIORITY_TO_QUEUE_LIST/ppqm:name";