Skip to content

Add new fields to DOM_SENSOR table in STATE_DB for C_CMIS#1

Merged
longhuan-cisco merged 2 commits intomasterfrom
add_to_dom_sensor_tbl
Oct 7, 2022
Merged

Add new fields to DOM_SENSOR table in STATE_DB for C_CMIS#1
longhuan-cisco merged 2 commits intomasterfrom
add_to_dom_sensor_tbl

Conversation

@longhuan-cisco
Copy link
Copy Markdown
Owner

@longhuan-cisco longhuan-cisco commented Sep 24, 2022

Add new fields (such as pdl, osnr, esnr, laser_config_freq, laser_curr_freq) to DOM_SENSOR table in STATE_DB for C_CMIS

Warning
Please don't merge. This PR is just for review purpose.

  1. Not just the above mentioned fields(pdl, osnr, esnr, laser_config_freq, laser_curr_freq), all the fields that are supported by c_cmis get_transceiver_bulk_status API but not currently present are added.
  2. Existing code regarding processing of raw data and data filling of DB table is refactored.

Refer to this doc for new DOM_SENSOR table, and this doc for old DOM_SENSOR table.

UT:

  1. new DB output for 400ZR (C_CMIS based):
127.0.0.1:6379[6]> hgetall "TRANSCEIVER_DOM_SENSOR|Ethernet6"
  1) "rx_los"
  2) "False"
  3) "tx_fault"
  4) "False"
  5) "tx_disabled_channel"
  6) "255"
  7) "temperature"
  8) "47.625"
  9) "voltage"
 10) "3.187"
 11) "tx1disable"
 12) "True"
 13) "tx1bias"
 14) "266.696"
 15) "rx1power"
 16) "-9.858996784803795"
 17) "tx1power"
 18) "-33.979400086720375"
 19) "tx2disable"
 20) "True"
 21) "tx2bias"
 22) "0.0"
 23) "rx2power"
 24) "-inf"
 25) "tx2power"
 26) "-inf"
 27) "tx3disable"
 28) "True"
 29) "tx3bias"
 30) "0.0"
 31) "rx3power"
 32) "-inf"
 33) "tx3power"
 34) "-inf"
 35) "tx4disable"
 36) "True"
 37) "tx4bias"
 38) "0.0"
 39) "rx4power"
 40) "-inf"
 41) "tx4power"
 42) "-inf"
 43) "tx5disable"
 44) "True"
 45) "tx5bias"
 46) "0.0"
 47) "rx5power"
 48) "-inf"
 49) "tx5power"
 50) "-inf"
 51) "tx6disable"
 52) "True"
 53) "tx6bias"
 54) "0.0"
 55) "rx6power"
 56) "-inf"
 57) "tx6power"
 58) "-inf"
 59) "tx7disable"
 60) "True"
 61) "tx7bias"
 62) "0.0"
 63) "rx7power"
 64) "-inf"
 65) "tx7power"
 66) "-inf"
 67) "tx8disable"
 68) "True"
 69) "tx8bias"
 70) "0.0"
 71) "rx8power"
 72) "-inf"
 73) "tx8power"
 74) "-inf"
 75) "laser_temperature"
 76) "39.92578125"
 77) "prefec_ber"
 78) "0.0"
 79) "postfec_ber"
 80) "0.0"
 81) "bias_xi"
 82) "69.08369573510338"
 83) "bias_xq"
 84) "58.309300373846035"
 85) "bias_xp"
 86) "54.216830701152055"
 87) "bias_yi"
 88) "52.37354085603113"
 89) "bias_yq"
 90) "44.88288700694285"
 91) "bias_yp"
 92) "64.86762798504616"
 93) "cd_shortlink"
 94) "0"
 95) "cd_longlink"
 96) "0"
 97) "dgd"
 98) "0.0"
 99) "pdl"
100) "0.0"
101) "osnr"
102) "0.0"
103) "esnr"
104) "0.0"
105) "cfo"
106) "0"
107) "tx_curr_power"
108) "-32.81"
109) "rx_tot_power"
110) "-9.58"
111) "laser_config_freq"
112) "193100"
113) "laser_curr_freq"
114) "193100.0"
115) "tx_config_power"
116) "-10.1"
......
  1. For comparison, old DB output for 400ZR (C_CMIS):
127.0.0.1:6379[6]> hgetall "TRANSCEIVER_DOM_SENSOR|Ethernet6"
 1) "temperature"
 2) "47.648"
 3) "voltage"
 4) "3.19"
 5) "rx1power"
 6) "-9.9225222199926"
 7) "rx2power"
 8) "-inf"
 9) "rx3power"
10) "-inf"
11) "rx4power"
12) "-inf"
13) "rx5power"
14) "-inf"
15) "rx6power"
16) "-inf"
17) "rx7power"
18) "-inf"
19) "rx8power"
20) "-inf"
21) "tx1bias"
22) "266.696"
23) "tx2bias"
24) "0.0"
25) "tx3bias"
26) "0.0"
27) "tx4bias"
28) "0.0"
29) "tx5bias"
30) "0.0"
31) "tx6bias"
32) "0.0"
33) "tx7bias"
34) "0.0"
35) "tx8bias"
36) "0.0"
37) "tx1power"
38) "-10.10550182333308"
39) "tx2power"
40) "-inf"
41) "tx3power"
42) "-inf"
43) "tx4power"
44) "-inf"
45) "tx5power"
46) "-inf"
47) "tx6power"
48) "-inf"
49) "tx7power"
50) "-inf"
51) "tx8power"
52) "-inf"
....
  1. new DB output for 400GBASE-DR4 (CMIS based)
1127.0.0.1:6379[6]> hgetall "TRANSCEIVER_DOM_SENSOR|Ethernet10"
  1) "rx_los"
  2) "False"
  3) "tx_fault"
  4) "N/A"
  5) "tx_disabled_channel"
  6) "0"
  7) "temperature"
  8) "48.137"
  9) "voltage"
 10) "3.248"
 11) "tx1disable"
 12) "False"
 13) "tx1bias"
 14) "75.0"
 15) "rx1power"
 16) "0.438336541331468"
 17) "tx1power"
 18) "1.2920635774752922"
 19) "tx2disable"
 20) "False"
 21) "tx2bias"
 22) "75.0"
 23) "rx2power"
 24) "0.5842602445700535"
 25) "tx2power"
 26) "0.6254438134646483"
 27) "tx3disable"
 28) "False"
 29) "tx3bias"
 30) "75.0"
 31) "rx3power"
 32) "0.49799277918986523"
 33) "tx3power"
 34) "1.0751522565146452"
 35) "tx4disable"
 36) "False"
 37) "tx4bias"
 38) "75.0"
 39) "rx4power"
 40) "0.25346834509827126"
 41) "tx4power"
 42) "0.9394672389058312"
 43) "tx5disable"
 44) "False"
 45) "tx5bias"
 46) "0.0"
 47) "rx5power"
 48) "-inf"
 49) "tx5power"
 50) "-inf"
 51) "tx6disable"
 52) "False"
 53) "tx6bias"
 54) "0.0"
 55) "rx6power"
 56) "-inf"
 57) "tx6power"
 58) "-inf"
 59) "tx7disable"
 60) "False"
 61) "tx7bias"
 62) "0.0"
 63) "rx7power"
 64) "-inf"
 65) "tx7power"
 66) "-inf"
 67) "tx8disable"
 68) "False"
 69) "tx8bias"
 70) "0.0"
 71) "rx8power"
 72) "-inf"
 73) "tx8power"
 74) "-inf"
 75) "laser_temperature"
 76) "60.01953125"
......
  1. old DB output for 400GBASE-DR4 (CMIS)
127.0.0.1:6379[6]> hgetall "TRANSCEIVER_DOM_SENSOR|Ethernet10"
 1) "temperature"
 2) "40.535"
 3) "voltage"
 4) "3.249"
 5) "rx1power"
 6) "0.35109402944575496"
 7) "rx2power"
 8) "0.5576046468773478"
 9) "rx3power"
10) "0.4879127384840971"
11) "rx4power"
12) "0.35629827790438817"
13) "rx5power"
14) "-inf"
15) "rx6power"
16) "-inf"
17) "rx7power"
18) "-inf"
19) "rx8power"
20) "-inf"
21) "tx1bias"
22) "75.0"
23) "tx2bias"
24) "75.0"
25) "tx3bias"
26) "75.0"
27) "tx4bias"
28) "75.0"
29) "tx5bias"
30) "0.0"
31) "tx6bias"
32) "0.0"
33) "tx7bias"
34) "0.0"
35) "tx8bias"
36) "0.0"
37) "tx1power"
38) "1.2224865397805356"
39) "tx2power"
40) "0.6077336326170618"
41) "tx3power"
42) "1.0294796800537362"
43) "tx4power"
44) "0.9555289601940186"
45) "tx5power"
46) "-inf"
47) "tx6power"
48) "-inf"
49) "tx7power"
50) "-inf"
51) "tx8power"
52) "-inf"
......

@shyam77git
Copy link
Copy Markdown
Collaborator

possible to add old output of ""TRANSCEIVER_DOM_SENSOR" to depict/compare what all new fields got added as part of this changeset/PR?

@shyam77git
Copy link
Copy Markdown
Collaborator

Please add as to which optical module this UT was done on?
Can you add outcome of one non-coherent and one coherent (ZR) optics?

@longhuan-cisco
Copy link
Copy Markdown
Owner Author

possible to add old output of ""TRANSCEIVER_DOM_SENSOR" to depict/compare what all new fields got added as part of this changeset/PR?

Added.

Please add as to which optical module this UT was done on?
Can you add outcome of one non-coherent and one coherent (ZR) optics?

It's 400ZR.
Added.

Copy link
Copy Markdown
Collaborator

@shyam77git shyam77git left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@longhuan-cisco longhuan-cisco merged commit 172255f into master Oct 7, 2022
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