Skip to content

[asic_sensors] Generate the asic_sensors polling configuration based on the platform.json (#20826)#499

Closed
Javier-Tan wants to merge 1 commit intoAzure:202405from
Javier-Tan:cherry/master/20826
Closed

[asic_sensors] Generate the asic_sensors polling configuration based on the platform.json (#20826)#499
Javier-Tan wants to merge 1 commit intoAzure:202405from
Javier-Tan:cherry/master/20826

Conversation

@Javier-Tan
Copy link
Copy Markdown

@Javier-Tan Javier-Tan commented Jan 8, 2025

Why I did it

For any platform which supports the asic_sensors pulling, it requires the configuration files (config_db#.json) contain the following configuration to trigger the system to poll the ASIC sensors temperature. Fixes https://github.com/Nokia-ION/ndk/issues/48
Adding Yang model support to fixes sonic-net/sonic-buildimage#20633

Work item tracking
  • Microsoft ADO (number only):

How I did it

  • Add new module src/sonic-config-engine/asic_sensors_config.py with function get_asic_sensors_config(). This function checks if device data platform.json contains the following configuration, it will generate the asic_sensors pulling configuration.
$ cat platform.json
{
...
...
...
   "asic_sensors": {
        "poll_interval": "10",
        "poll_admin_status": "enable"
    }
}
  • Modify the script sonic-cfggen platform option "-H" to call the function get_asic_sensor_config() to generate the asic_sensors pulling configuration.
  • Added new UT test_asic_sensors_config() to test_cfggen.py to test related the implementation.

Notice: For all platforms which support the asic_sensors polling requires to add the following definition to the device data platform.json file

$ cat platform.json
{
...
...
...
   "asic_sensors": {
        "poll_interval": "10",
        "poll_admin_status": "enable"
    }
}

Also add Yang Model support the ASIC_SENSORS configuration. INcluding YangModel UT.

How to verify it

  1. Running the new image on the platform which supports the ASIC_SENSORS
  2. Execute the CLI command "sonic-cfggen -H --print-data", the following code will be generated
{
   "ASIC_SENSORS": {
        "ASIC_SENSORS_POLLER_INTERVAL": {
            "interval": "10"
        },
        "ASIC_SENSORS_POLLER_STATUS": {
            "admin_status": "enable"
        }
    }
}

…on the platform.json (#20826)

For any platform which supports the asic_sensors pulling, it requires the configuration files (config_db#.json) contain the following configuration to trigger the system to poll the ASIC sensors temperature. Fixes Nokia-ION/ndk#48
Adding Yang model support to fixes #20633

---------

Signed-off-by: mlok <[email protected]>
@Javier-Tan
Copy link
Copy Markdown
Author

@Javier-Tan Javier-Tan requested a review from arlakshm January 8, 2025 05:23
@Javier-Tan Javier-Tan closed this Jan 8, 2025
@Javier-Tan Javier-Tan deleted the cherry/master/20826 branch January 8, 2025 05:47
bingwang-ms pushed a commit that referenced this pull request Jan 16, 2026
…lly (#23897)

#### Why I did it
src/sonic-gnmi
```
* 9527897 - (HEAD -> master, origin/master, origin/HEAD) Feature/certificate system (#500) (12 hours ago) [Dawei Huang]
* e3e76a0 - [Show] Implement `show chassis modules midplane-status` & `show system-health dpu` (#499) (7 days ago) [jingwenxie]
```
#### How I did it
#### How to verify it
#### Description for the changelog
bingwang-ms pushed a commit that referenced this pull request Jan 16, 2026
…tomatically (#24286)

#### Why I did it
src/sonic-linux-kernel
```
* 14cd5ce - (HEAD -> master, origin/master, origin/HEAD) Enable TMP464 I2C Temperature Sensor for Nokia H6-64O. (#511) (2 days ago) [JunhongMao]
* 15e4ad9 - Secureboot modifications for ephemeral key signing (#499) (3 days ago) [Brad House - NextHop]
```
#### How I did it
#### How to verify it
#### Description for the changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants