Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yang model for xcvr tx power and frequency configuration #11053

Merged
merged 3 commits into from
Jun 12, 2022

Conversation

prgeor
Copy link
Contributor

@prgeor prgeor commented Jun 7, 2022

Why I did it

Add yang model for configuring TX power and laser frequency of ZR transceiver module

How to verify it

root@sonic:~#  config interface transceiver tx_power Ethernet0 -- -27.3
Setting target Tx output power to -27.3 dBm on port Ethernet0
root@sonic:~# redis-cli -n 4 hgetall "PORT|Ethernet0"                  
 1) "admin_status"
 2) "up"
 3) "alias"
 4) "Ethernet1/1"
 5) "index"
 6) "1"
 7) "lanes"
 8) "1,2,3,4,5,6,7,8"
 9) "laser_freq"
10) "170000"
11) "speed"
12) "400000"
13) "tx_power"
14) "-27.3"
root@sonic:~# 
root@sonic:~# config interface transceiver tx_power Ethernet0 -27   
Usage: config interface transceiver tx_power [OPTIONS] <interface_name> <tx-
                                             power>
Try "config interface transceiver tx_power -h" for help.

Error: no such option: -2

root@sonic:~# config interface transceiver frequency Ethernet0 -1
Usage: config interface transceiver frequency [OPTIONS] <interface_name>
                                              <frequency>
Try "config interface transceiver frequency -h" for help.

Error: no such option: -1

root@sonic:~# config interface transceiver frequency Ethernet0 1000
Setting laser frequency to 1000 GHz on port Ethernet0
root@sonic:~# redis-cli -n 4 hgetall "PORT|Ethernet0"              
 1) "admin_status"
 2) "up"
 3) "alias"
 4) "Ethernet1/1"
 5) "index"
 6) "1"
 7) "lanes"
 8) "1,2,3,4,5,6,7,8"
 9) "laser_freq"
10) "1000"
11) "speed"
12) "400000"
13) "tx_power"
14) "-27.0"
root@sonic:~# 
root@sonic:~# 
root@sonic:~# 

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111

Description for the changelog

ConfigDB schema for configuring TX power and laser frequency of ZR transceiver module

Link to config_db schema for YANG module changes

https://github.com/sonic-net/SONiC/wiki/Configuration#port

@prgeor prgeor requested a review from qiluo-msft as a code owner June 7, 2022 05:45
@prgeor prgeor added the YANG YANG model related changes label Jun 7, 2022
@qiluo-msft qiluo-msft requested a review from ganglyu June 7, 2022 07:00
@qiluo-msft
Copy link
Collaborator

qiluo-msft commented Jun 7, 2022

  1. Do you have HLD?
  2. Please update the file https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md#port in this PR.
  3. Please add unit test for this change.

In reply to: 1148274081

@prgeor
Copy link
Contributor Author

prgeor commented Jun 10, 2022

  1. Do you have HLD?
  2. Please update the file https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md#port in this PR.
  3. Please add unit test for this change.

@qiluo-msft can you take a relook?

@qiluo-msft
Copy link
Collaborator

@ganglyu Could you help review?

@ganglyu
Copy link
Contributor

ganglyu commented Jun 11, 2022

Please update tests/files/sample_config_db.json

@prgeor
Copy link
Contributor Author

prgeor commented Jun 11, 2022

Please update tests/files/sample_config_db.json

@ganglyu can you relook

@prgeor prgeor merged commit 201792f into sonic-net:master Jun 12, 2022
yxieca pushed a commit that referenced this pull request Aug 17, 2022
* Yang model for xcvr tx power and frequency configuration

* Add unit test cases

* Addressed review comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants