Yang model for xcvr tx power and frequency configuration (#11053)
* Yang model for xcvr tx power and frequency configuration * Add unit test cases * Addressed review comments
This commit is contained in:
parent
9ee2724992
commit
91f3502539
@ -1196,7 +1196,9 @@ optional attributes.
|
||||
"mtu": "9100",
|
||||
"alias": "fortyGigE1/1/1",
|
||||
"speed": "40000",
|
||||
"link_training": "off"
|
||||
"link_training": "off",
|
||||
"laser_freq": "191300",
|
||||
"tx_power": "-27.3"
|
||||
},
|
||||
"Ethernet1": {
|
||||
"index": "1",
|
||||
@ -1206,7 +1208,9 @@ optional attributes.
|
||||
"alias": "fortyGigE1/1/2",
|
||||
"admin_status": "up",
|
||||
"speed": "40000",
|
||||
"link_training": "on"
|
||||
"link_training": "on",
|
||||
"laser_freq": "191300",
|
||||
"tx_power": "-27.3"
|
||||
},
|
||||
"Ethernet63": {
|
||||
"index": "63",
|
||||
@ -1214,7 +1218,9 @@ optional attributes.
|
||||
"description": "fortyGigE1/4/16",
|
||||
"mtu": "9100",
|
||||
"alias": "fortyGigE1/4/16",
|
||||
"speed": "40000"
|
||||
"speed": "40000",
|
||||
"laser_freq": "191300",
|
||||
"tx_power": "-27.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -447,7 +447,9 @@
|
||||
"asic_port_name": "Eth0-ASIC1",
|
||||
"role": "Ext",
|
||||
"macsec": "test",
|
||||
"link_training": "off"
|
||||
"link_training": "off",
|
||||
"laser_freq": "191600",
|
||||
"tx_power": "-26.6"
|
||||
},
|
||||
"Ethernet1": {
|
||||
"alias": "Eth1/2",
|
||||
@ -459,7 +461,9 @@
|
||||
"autoneg": "on",
|
||||
"adv_speeds": "100000,50000",
|
||||
"adv_interface_types": "CR,CR4",
|
||||
"link_training": "on"
|
||||
"link_training": "on",
|
||||
"laser_freq": "191300",
|
||||
"tx_power": "-27.3"
|
||||
},
|
||||
"Ethernet2": {
|
||||
"alias": "Eth1/3",
|
||||
|
@ -69,6 +69,22 @@
|
||||
"desc": "PORT_INVALID_ADVTYPES_TEST_2 must condition failure.",
|
||||
"eStrKey" : "Must"
|
||||
},
|
||||
"PORT_VALID_XCVR_FREQ_TEST": {
|
||||
"desc": "PORT_VALID_XCVR_FREQ_TEST no failure"
|
||||
},
|
||||
"PORT_VALID_XCVR_TX_POWER_TEST": {
|
||||
"desc": "PORT_VALID_XCVR_TX_POWER_TEST no failure"
|
||||
},
|
||||
"PORT_INVALID_XCVR_FREQ_TEST": {
|
||||
"desc": "PORT_INVALID_XCVR_FREQ_TEST non-integer value, expect failure",
|
||||
"eStrKey": "InvalidValue",
|
||||
"eStr": ["laser_freq"]
|
||||
},
|
||||
"PORT_INVALID_XCVR_TX_POWER_TEST": {
|
||||
"desc": "PORT_INVALID_XCVR_TX_POWER_TEST non-float value, expect failure",
|
||||
"eStrKey": "InvalidValue",
|
||||
"eStr": ["tx_power"]
|
||||
},
|
||||
"PORT_VALID_LINK_TRAINING_TEST_1": {
|
||||
"desc": "PORT_VALID_LINK_TRAINING_TEST_1 no failure."
|
||||
},
|
||||
|
@ -311,6 +311,74 @@
|
||||
}
|
||||
},
|
||||
|
||||
"PORT_VALID_XCVR_FREQ_TEST": {
|
||||
"sonic-port:sonic-port": {
|
||||
"sonic-port:PORT": {
|
||||
"PORT_LIST": [
|
||||
{
|
||||
"name": "Ethernet8",
|
||||
"alias": "eth8",
|
||||
"lanes": "65",
|
||||
"speed": 25000,
|
||||
"tpid": "0x8100",
|
||||
"laser_freq": 193100
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"PORT_VALID_XCVR_TX_POWER_TEST": {
|
||||
"sonic-port:sonic-port": {
|
||||
"sonic-port:PORT": {
|
||||
"PORT_LIST": [
|
||||
{
|
||||
"name": "Ethernet8",
|
||||
"alias": "eth8",
|
||||
"lanes": "65",
|
||||
"speed": 25000,
|
||||
"tpid": "0x8100",
|
||||
"tx_power": "27.3"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"PORT_INVALID_XCVR_FREQ_TEST": {
|
||||
"sonic-port:sonic-port": {
|
||||
"sonic-port:PORT": {
|
||||
"PORT_LIST": [
|
||||
{
|
||||
"name": "Ethernet8",
|
||||
"alias": "eth8",
|
||||
"lanes": "65",
|
||||
"speed": 25000,
|
||||
"tpid": "0x8100",
|
||||
"laser_freq": "27.3"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"PORT_INVALID_XCVR_TX_POWER_TEST": {
|
||||
"sonic-port:sonic-port": {
|
||||
"sonic-port:PORT": {
|
||||
"PORT_LIST": [
|
||||
{
|
||||
"name": "Ethernet8",
|
||||
"alias": "eth8",
|
||||
"lanes": "65",
|
||||
"speed": 25000,
|
||||
"tpid": "0x8100",
|
||||
"tx_power": "27/4"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"PORT_VALID_LINK_TRAINING_TEST_1": {
|
||||
"sonic-port:sonic-port": {
|
||||
"sonic-port:PORT": {
|
||||
|
@ -171,6 +171,18 @@ module sonic-port{
|
||||
}
|
||||
}
|
||||
|
||||
leaf tx_power {
|
||||
description "Target output power(dBm) for the 400G ZR transceiver";
|
||||
type decimal64 {
|
||||
fraction-digits 1;
|
||||
}
|
||||
}
|
||||
|
||||
leaf laser_freq {
|
||||
description "Target laser frequency(GHz) for the 400G ZR transceiver";
|
||||
type int32;
|
||||
}
|
||||
|
||||
} /* end of list PORT_LIST */
|
||||
|
||||
} /* end of container PORT */
|
||||
|
Loading…
Reference in New Issue
Block a user