Skip to content

Yang model for xcvr tx power and frequency configuration#11053

Merged
prgeor merged 3 commits intosonic-net:masterfrom
prgeor:ZR-config
Jun 12, 2022
Merged

Yang model for xcvr tx power and frequency configuration#11053
prgeor merged 3 commits intosonic-net:masterfrom
prgeor:ZR-config

Conversation

@prgeor
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator

@ganglyu Could you help review?

@ganglyu
Copy link
Copy Markdown
Contributor

ganglyu commented Jun 11, 2022

Please update tests/files/sample_config_db.json

@prgeor
Copy link
Copy Markdown
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