Add support data for fabric monitoring in CONFIG_DB. (#14170)

Added support data for fabric monitoring in CONFIG_DB

The CONFIG_DB now has the FABRIC_MONITOR|FABRIC_MONITOR_DATA table for default value for fabric port monitoring. An example output of getting this table is:

sonic-db-cli CONFIG_DB hgetall "FABRIC_MONITOR|FABRIC_MONITOR_DATA"
{'monErrThreshCrcCells': '1', 'monErrThreshRxCells': '61035156', 'monPollThreshIsolation': '1', 'monPollThreshRecovery': '8'}

The CONFIG_DB now also has a table for each fabric port for its isolate status.
An example output of getting this table is:

sonic-db-cli CONFIG_DB hgetall "FABRIC_PORT|Fabric20"
{'alias': 'Fabric20', 'isolateStatus': 'False', 'lanes': '20'}
This commit is contained in:
jfeng-arista 2023-06-16 15:16:40 -07:00 committed by GitHub
parent 9649a44470
commit 4b31e30924
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 1482 additions and 2 deletions

View File

@ -0,0 +1,8 @@
{
"FABRIC_MONITOR_DATA": {
"monErrThreshCrcCells": 1,
"monErrThreshRxCells": 61035156,
"monPollThreshRecovery": 8,
"monPollThreshIsolation": 1
}
}

View File

@ -0,0 +1,193 @@
# name lanes isolateStatus
Fabric0 0 False
Fabric1 1 False
Fabric2 2 False
Fabric3 3 False
Fabric4 4 False
Fabric5 5 False
Fabric6 6 False
Fabric7 7 False
Fabric8 8 False
Fabric9 9 False
Fabric10 10 False
Fabric11 11 False
Fabric12 12 False
Fabric13 13 False
Fabric14 14 False
Fabric15 15 False
Fabric16 16 False
Fabric17 17 False
Fabric18 18 False
Fabric19 19 False
Fabric20 20 False
Fabric21 21 False
Fabric22 22 False
Fabric23 23 False
Fabric24 24 False
Fabric25 25 False
Fabric26 26 False
Fabric27 27 False
Fabric28 28 False
Fabric29 29 False
Fabric30 30 False
Fabric31 31 False
Fabric32 32 False
Fabric33 33 False
Fabric34 34 False
Fabric35 35 False
Fabric36 36 False
Fabric37 37 False
Fabric38 38 False
Fabric39 39 False
Fabric40 40 False
Fabric41 41 False
Fabric42 42 False
Fabric43 43 False
Fabric44 44 False
Fabric45 45 False
Fabric46 46 False
Fabric47 47 False
Fabric48 48 False
Fabric49 49 False
Fabric50 50 False
Fabric51 51 False
Fabric52 52 False
Fabric53 53 False
Fabric54 54 False
Fabric55 55 False
Fabric56 56 False
Fabric57 57 False
Fabric58 58 False
Fabric59 59 False
Fabric60 60 False
Fabric61 61 False
Fabric62 62 False
Fabric63 63 False
Fabric64 64 False
Fabric65 65 False
Fabric66 66 False
Fabric67 67 False
Fabric68 68 False
Fabric69 69 False
Fabric70 70 False
Fabric71 71 False
Fabric72 72 False
Fabric73 73 False
Fabric74 74 False
Fabric75 75 False
Fabric76 76 False
Fabric77 77 False
Fabric78 78 False
Fabric79 79 False
Fabric80 80 False
Fabric81 81 False
Fabric82 82 False
Fabric83 83 False
Fabric84 84 False
Fabric85 85 False
Fabric86 86 False
Fabric87 87 False
Fabric88 88 False
Fabric89 89 False
Fabric90 90 False
Fabric91 91 False
Fabric92 92 False
Fabric93 93 False
Fabric94 94 False
Fabric95 95 False
Fabric96 96 False
Fabric97 97 False
Fabric98 98 False
Fabric99 99 False
Fabric100 100 False
Fabric101 101 False
Fabric102 102 False
Fabric103 103 False
Fabric104 104 False
Fabric105 105 False
Fabric106 106 False
Fabric107 107 False
Fabric108 108 False
Fabric109 109 False
Fabric110 110 False
Fabric111 111 False
Fabric112 112 False
Fabric113 113 False
Fabric114 114 False
Fabric115 115 False
Fabric116 116 False
Fabric117 117 False
Fabric118 118 False
Fabric119 119 False
Fabric120 120 False
Fabric121 121 False
Fabric122 122 False
Fabric123 123 False
Fabric124 124 False
Fabric125 125 False
Fabric126 126 False
Fabric127 127 False
Fabric128 128 False
Fabric129 129 False
Fabric130 130 False
Fabric131 131 False
Fabric132 132 False
Fabric133 133 False
Fabric134 134 False
Fabric135 135 False
Fabric136 136 False
Fabric137 137 False
Fabric138 138 False
Fabric139 139 False
Fabric140 140 False
Fabric141 141 False
Fabric142 142 False
Fabric143 143 False
Fabric144 144 False
Fabric145 145 False
Fabric146 146 False
Fabric147 147 False
Fabric148 148 False
Fabric149 149 False
Fabric150 150 False
Fabric151 151 False
Fabric152 152 False
Fabric153 153 False
Fabric154 154 False
Fabric155 155 False
Fabric156 156 False
Fabric157 157 False
Fabric158 158 False
Fabric159 159 False
Fabric160 160 False
Fabric161 161 False
Fabric162 162 False
Fabric163 163 False
Fabric164 164 False
Fabric165 165 False
Fabric166 166 False
Fabric167 167 False
Fabric168 168 False
Fabric169 169 False
Fabric170 170 False
Fabric171 171 False
Fabric172 172 False
Fabric173 173 False
Fabric174 174 False
Fabric175 175 False
Fabric176 176 False
Fabric177 177 False
Fabric178 178 False
Fabric179 179 False
Fabric180 180 False
Fabric181 181 False
Fabric182 182 False
Fabric183 183 False
Fabric184 184 False
Fabric185 185 False
Fabric186 186 False
Fabric187 187 False
Fabric188 188 False
Fabric189 189 False
Fabric190 190 False
Fabric191 191 False

View File

@ -0,0 +1,8 @@
{
"FABRIC_MONITOR_DATA": {
"monErrThreshCrcCells": 1,
"monErrThreshRxCells": 61035156,
"monPollThreshRecovery": 8,
"monPollThreshIsolation": 1
}
}

View File

@ -0,0 +1,193 @@
# name lanes isolateStatus
Fabric0 0 False
Fabric1 1 False
Fabric2 2 False
Fabric3 3 False
Fabric4 4 False
Fabric5 5 False
Fabric6 6 False
Fabric7 7 False
Fabric8 8 False
Fabric9 9 False
Fabric10 10 False
Fabric11 11 False
Fabric12 12 False
Fabric13 13 False
Fabric14 14 False
Fabric15 15 False
Fabric16 16 False
Fabric17 17 False
Fabric18 18 False
Fabric19 19 False
Fabric20 20 False
Fabric21 21 False
Fabric22 22 False
Fabric23 23 False
Fabric24 24 False
Fabric25 25 False
Fabric26 26 False
Fabric27 27 False
Fabric28 28 False
Fabric29 29 False
Fabric30 30 False
Fabric31 31 False
Fabric32 32 False
Fabric33 33 False
Fabric34 34 False
Fabric35 35 False
Fabric36 36 False
Fabric37 37 False
Fabric38 38 False
Fabric39 39 False
Fabric40 40 False
Fabric41 41 False
Fabric42 42 False
Fabric43 43 False
Fabric44 44 False
Fabric45 45 False
Fabric46 46 False
Fabric47 47 False
Fabric48 48 False
Fabric49 49 False
Fabric50 50 False
Fabric51 51 False
Fabric52 52 False
Fabric53 53 False
Fabric54 54 False
Fabric55 55 False
Fabric56 56 False
Fabric57 57 False
Fabric58 58 False
Fabric59 59 False
Fabric60 60 False
Fabric61 61 False
Fabric62 62 False
Fabric63 63 False
Fabric64 64 False
Fabric65 65 False
Fabric66 66 False
Fabric67 67 False
Fabric68 68 False
Fabric69 69 False
Fabric70 70 False
Fabric71 71 False
Fabric72 72 False
Fabric73 73 False
Fabric74 74 False
Fabric75 75 False
Fabric76 76 False
Fabric77 77 False
Fabric78 78 False
Fabric79 79 False
Fabric80 80 False
Fabric81 81 False
Fabric82 82 False
Fabric83 83 False
Fabric84 84 False
Fabric85 85 False
Fabric86 86 False
Fabric87 87 False
Fabric88 88 False
Fabric89 89 False
Fabric90 90 False
Fabric91 91 False
Fabric92 92 False
Fabric93 93 False
Fabric94 94 False
Fabric95 95 False
Fabric96 96 False
Fabric97 97 False
Fabric98 98 False
Fabric99 99 False
Fabric100 100 False
Fabric101 101 False
Fabric102 102 False
Fabric103 103 False
Fabric104 104 False
Fabric105 105 False
Fabric106 106 False
Fabric107 107 False
Fabric108 108 False
Fabric109 109 False
Fabric110 110 False
Fabric111 111 False
Fabric112 112 False
Fabric113 113 False
Fabric114 114 False
Fabric115 115 False
Fabric116 116 False
Fabric117 117 False
Fabric118 118 False
Fabric119 119 False
Fabric120 120 False
Fabric121 121 False
Fabric122 122 False
Fabric123 123 False
Fabric124 124 False
Fabric125 125 False
Fabric126 126 False
Fabric127 127 False
Fabric128 128 False
Fabric129 129 False
Fabric130 130 False
Fabric131 131 False
Fabric132 132 False
Fabric133 133 False
Fabric134 134 False
Fabric135 135 False
Fabric136 136 False
Fabric137 137 False
Fabric138 138 False
Fabric139 139 False
Fabric140 140 False
Fabric141 141 False
Fabric142 142 False
Fabric143 143 False
Fabric144 144 False
Fabric145 145 False
Fabric146 146 False
Fabric147 147 False
Fabric148 148 False
Fabric149 149 False
Fabric150 150 False
Fabric151 151 False
Fabric152 152 False
Fabric153 153 False
Fabric154 154 False
Fabric155 155 False
Fabric156 156 False
Fabric157 157 False
Fabric158 158 False
Fabric159 159 False
Fabric160 160 False
Fabric161 161 False
Fabric162 162 False
Fabric163 163 False
Fabric164 164 False
Fabric165 165 False
Fabric166 166 False
Fabric167 167 False
Fabric168 168 False
Fabric169 169 False
Fabric170 170 False
Fabric171 171 False
Fabric172 172 False
Fabric173 173 False
Fabric174 174 False
Fabric175 175 False
Fabric176 176 False
Fabric177 177 False
Fabric178 178 False
Fabric179 179 False
Fabric180 180 False
Fabric181 181 False
Fabric182 182 False
Fabric183 183 False
Fabric184 184 False
Fabric185 185 False
Fabric186 186 False
Fabric187 187 False
Fabric188 188 False
Fabric189 189 False
Fabric190 190 False
Fabric191 191 False

View File

@ -0,0 +1,8 @@
{
"FABRIC_MONITOR_DATA": {
"monErrThreshCrcCells": 1,
"monErrThreshRxCells": 61035156,
"monPollThreshRecovery": 8,
"monPollThreshIsolation": 1
}
}

View File

@ -0,0 +1,193 @@
# name lanes isolateStatus
Fabric0 0 False
Fabric1 1 False
Fabric2 2 False
Fabric3 3 False
Fabric4 4 False
Fabric5 5 False
Fabric6 6 False
Fabric7 7 False
Fabric8 8 False
Fabric9 9 False
Fabric10 10 False
Fabric11 11 False
Fabric12 12 False
Fabric13 13 False
Fabric14 14 False
Fabric15 15 False
Fabric16 16 False
Fabric17 17 False
Fabric18 18 False
Fabric19 19 False
Fabric20 20 False
Fabric21 21 False
Fabric22 22 False
Fabric23 23 False
Fabric24 24 False
Fabric25 25 False
Fabric26 26 False
Fabric27 27 False
Fabric28 28 False
Fabric29 29 False
Fabric30 30 False
Fabric31 31 False
Fabric32 32 False
Fabric33 33 False
Fabric34 34 False
Fabric35 35 False
Fabric36 36 False
Fabric37 37 False
Fabric38 38 False
Fabric39 39 False
Fabric40 40 False
Fabric41 41 False
Fabric42 42 False
Fabric43 43 False
Fabric44 44 False
Fabric45 45 False
Fabric46 46 False
Fabric47 47 False
Fabric48 48 False
Fabric49 49 False
Fabric50 50 False
Fabric51 51 False
Fabric52 52 False
Fabric53 53 False
Fabric54 54 False
Fabric55 55 False
Fabric56 56 False
Fabric57 57 False
Fabric58 58 False
Fabric59 59 False
Fabric60 60 False
Fabric61 61 False
Fabric62 62 False
Fabric63 63 False
Fabric64 64 False
Fabric65 65 False
Fabric66 66 False
Fabric67 67 False
Fabric68 68 False
Fabric69 69 False
Fabric70 70 False
Fabric71 71 False
Fabric72 72 False
Fabric73 73 False
Fabric74 74 False
Fabric75 75 False
Fabric76 76 False
Fabric77 77 False
Fabric78 78 False
Fabric79 79 False
Fabric80 80 False
Fabric81 81 False
Fabric82 82 False
Fabric83 83 False
Fabric84 84 False
Fabric85 85 False
Fabric86 86 False
Fabric87 87 False
Fabric88 88 False
Fabric89 89 False
Fabric90 90 False
Fabric91 91 False
Fabric92 92 False
Fabric93 93 False
Fabric94 94 False
Fabric95 95 False
Fabric96 96 False
Fabric97 97 False
Fabric98 98 False
Fabric99 99 False
Fabric100 100 False
Fabric101 101 False
Fabric102 102 False
Fabric103 103 False
Fabric104 104 False
Fabric105 105 False
Fabric106 106 False
Fabric107 107 False
Fabric108 108 False
Fabric109 109 False
Fabric110 110 False
Fabric111 111 False
Fabric112 112 False
Fabric113 113 False
Fabric114 114 False
Fabric115 115 False
Fabric116 116 False
Fabric117 117 False
Fabric118 118 False
Fabric119 119 False
Fabric120 120 False
Fabric121 121 False
Fabric122 122 False
Fabric123 123 False
Fabric124 124 False
Fabric125 125 False
Fabric126 126 False
Fabric127 127 False
Fabric128 128 False
Fabric129 129 False
Fabric130 130 False
Fabric131 131 False
Fabric132 132 False
Fabric133 133 False
Fabric134 134 False
Fabric135 135 False
Fabric136 136 False
Fabric137 137 False
Fabric138 138 False
Fabric139 139 False
Fabric140 140 False
Fabric141 141 False
Fabric142 142 False
Fabric143 143 False
Fabric144 144 False
Fabric145 145 False
Fabric146 146 False
Fabric147 147 False
Fabric148 148 False
Fabric149 149 False
Fabric150 150 False
Fabric151 151 False
Fabric152 152 False
Fabric153 153 False
Fabric154 154 False
Fabric155 155 False
Fabric156 156 False
Fabric157 157 False
Fabric158 158 False
Fabric159 159 False
Fabric160 160 False
Fabric161 161 False
Fabric162 162 False
Fabric163 163 False
Fabric164 164 False
Fabric165 165 False
Fabric166 166 False
Fabric167 167 False
Fabric168 168 False
Fabric169 169 False
Fabric170 170 False
Fabric171 171 False
Fabric172 172 False
Fabric173 173 False
Fabric174 174 False
Fabric175 175 False
Fabric176 176 False
Fabric177 177 False
Fabric178 178 False
Fabric179 179 False
Fabric180 180 False
Fabric181 181 False
Fabric182 182 False
Fabric183 183 False
Fabric184 184 False
Fabric185 185 False
Fabric186 186 False
Fabric187 187 False
Fabric188 188 False
Fabric189 189 False
Fabric190 190 False
Fabric191 191 False

View File

@ -0,0 +1,8 @@
{
"FABRIC_MONITOR_DATA": {
"monErrThreshCrcCells": 1,
"monErrThreshRxCells": 61035156,
"monPollThreshRecovery": 8,
"monPollThreshIsolation": 1
}
}

View File

@ -0,0 +1,113 @@
# name lanes isolateStatus
Fabric0 0 False
Fabric1 1 False
Fabric2 2 False
Fabric3 3 False
Fabric4 4 False
Fabric5 5 False
Fabric6 6 False
Fabric7 7 False
Fabric8 8 False
Fabric9 9 False
Fabric10 10 False
Fabric11 11 False
Fabric12 12 False
Fabric13 13 False
Fabric14 14 False
Fabric15 15 False
Fabric16 16 False
Fabric17 17 False
Fabric18 18 False
Fabric19 19 False
Fabric20 20 False
Fabric21 21 False
Fabric22 22 False
Fabric23 23 False
Fabric24 24 False
Fabric25 25 False
Fabric26 26 False
Fabric27 27 False
Fabric28 28 False
Fabric29 29 False
Fabric30 30 False
Fabric31 31 False
Fabric32 32 False
Fabric33 33 False
Fabric34 34 False
Fabric35 35 False
Fabric36 36 False
Fabric37 37 False
Fabric38 38 False
Fabric39 39 False
Fabric40 40 False
Fabric41 41 False
Fabric42 42 False
Fabric43 43 False
Fabric44 44 False
Fabric45 45 False
Fabric46 46 False
Fabric47 47 False
Fabric48 48 False
Fabric49 49 False
Fabric50 50 False
Fabric51 51 False
Fabric52 52 False
Fabric53 53 False
Fabric54 54 False
Fabric55 55 False
Fabric56 56 False
Fabric57 57 False
Fabric58 58 False
Fabric59 59 False
Fabric60 60 False
Fabric61 61 False
Fabric62 62 False
Fabric63 63 False
Fabric64 64 False
Fabric65 65 False
Fabric66 66 False
Fabric67 67 False
Fabric68 68 False
Fabric69 69 False
Fabric70 70 False
Fabric71 71 False
Fabric72 72 False
Fabric73 73 False
Fabric74 74 False
Fabric75 75 False
Fabric76 76 False
Fabric77 77 False
Fabric78 78 False
Fabric79 79 False
Fabric80 80 False
Fabric81 81 False
Fabric82 82 False
Fabric83 83 False
Fabric84 84 False
Fabric85 85 False
Fabric86 86 False
Fabric87 87 False
Fabric88 88 False
Fabric89 89 False
Fabric90 90 False
Fabric91 91 False
Fabric92 92 False
Fabric93 93 False
Fabric94 94 False
Fabric95 95 False
Fabric96 96 False
Fabric97 97 False
Fabric98 98 False
Fabric99 99 False
Fabric100 100 False
Fabric101 101 False
Fabric102 102 False
Fabric103 103 False
Fabric104 104 False
Fabric105 105 False
Fabric106 106 False
Fabric107 107 False
Fabric108 108 False
Fabric109 109 False
Fabric110 110 False
Fabric111 111 False

View File

@ -0,0 +1,8 @@
{
"FABRIC_MONITOR_DATA": {
"monErrThreshCrcCells": 1,
"monErrThreshRxCells": 61035156,
"monPollThreshRecovery": 8,
"monPollThreshIsolation": 1
}
}

View File

@ -0,0 +1,113 @@
# name lanes isolateStatus
Fabric0 0 False
Fabric1 1 False
Fabric2 2 False
Fabric3 3 False
Fabric4 4 False
Fabric5 5 False
Fabric6 6 False
Fabric7 7 False
Fabric8 8 False
Fabric9 9 False
Fabric10 10 False
Fabric11 11 False
Fabric12 12 False
Fabric13 13 False
Fabric14 14 False
Fabric15 15 False
Fabric16 16 False
Fabric17 17 False
Fabric18 18 False
Fabric19 19 False
Fabric20 20 False
Fabric21 21 False
Fabric22 22 False
Fabric23 23 False
Fabric24 24 False
Fabric25 25 False
Fabric26 26 False
Fabric27 27 False
Fabric28 28 False
Fabric29 29 False
Fabric30 30 False
Fabric31 31 False
Fabric32 32 False
Fabric33 33 False
Fabric34 34 False
Fabric35 35 False
Fabric36 36 False
Fabric37 37 False
Fabric38 38 False
Fabric39 39 False
Fabric40 40 False
Fabric41 41 False
Fabric42 42 False
Fabric43 43 False
Fabric44 44 False
Fabric45 45 False
Fabric46 46 False
Fabric47 47 False
Fabric48 48 False
Fabric49 49 False
Fabric50 50 False
Fabric51 51 False
Fabric52 52 False
Fabric53 53 False
Fabric54 54 False
Fabric55 55 False
Fabric56 56 False
Fabric57 57 False
Fabric58 58 False
Fabric59 59 False
Fabric60 60 False
Fabric61 61 False
Fabric62 62 False
Fabric63 63 False
Fabric64 64 False
Fabric65 65 False
Fabric66 66 False
Fabric67 67 False
Fabric68 68 False
Fabric69 69 False
Fabric70 70 False
Fabric71 71 False
Fabric72 72 False
Fabric73 73 False
Fabric74 74 False
Fabric75 75 False
Fabric76 76 False
Fabric77 77 False
Fabric78 78 False
Fabric79 79 False
Fabric80 80 False
Fabric81 81 False
Fabric82 82 False
Fabric83 83 False
Fabric84 84 False
Fabric85 85 False
Fabric86 86 False
Fabric87 87 False
Fabric88 88 False
Fabric89 89 False
Fabric90 90 False
Fabric91 91 False
Fabric92 92 False
Fabric93 93 False
Fabric94 94 False
Fabric95 95 False
Fabric96 96 False
Fabric97 97 False
Fabric98 98 False
Fabric99 99 False
Fabric100 100 False
Fabric101 101 False
Fabric102 102 False
Fabric103 103 False
Fabric104 104 False
Fabric105 105 False
Fabric106 106 False
Fabric107 107 False
Fabric108 108 False
Fabric109 109 False
Fabric110 110 False
Fabric111 111 False

View File

@ -0,0 +1,8 @@
{
"FABRIC_MONITOR_DATA": {
"monErrThreshCrcCells": 1,
"monErrThreshRxCells": 61035156,
"monPollThreshRecovery": 8,
"monPollThreshIsolation": 1
}
}

View File

@ -0,0 +1,113 @@
# name lanes isolateStatus
Fabric0 0 False
Fabric1 1 False
Fabric2 2 False
Fabric3 3 False
Fabric4 4 False
Fabric5 5 False
Fabric6 6 False
Fabric7 7 False
Fabric8 8 False
Fabric9 9 False
Fabric10 10 False
Fabric11 11 False
Fabric12 12 False
Fabric13 13 False
Fabric14 14 False
Fabric15 15 False
Fabric16 16 False
Fabric17 17 False
Fabric18 18 False
Fabric19 19 False
Fabric20 20 False
Fabric21 21 False
Fabric22 22 False
Fabric23 23 False
Fabric24 24 False
Fabric25 25 False
Fabric26 26 False
Fabric27 27 False
Fabric28 28 False
Fabric29 29 False
Fabric30 30 False
Fabric31 31 False
Fabric32 32 False
Fabric33 33 False
Fabric34 34 False
Fabric35 35 False
Fabric36 36 False
Fabric37 37 False
Fabric38 38 False
Fabric39 39 False
Fabric40 40 False
Fabric41 41 False
Fabric42 42 False
Fabric43 43 False
Fabric44 44 False
Fabric45 45 False
Fabric46 46 False
Fabric47 47 False
Fabric48 48 False
Fabric49 49 False
Fabric50 50 False
Fabric51 51 False
Fabric52 52 False
Fabric53 53 False
Fabric54 54 False
Fabric55 55 False
Fabric56 56 False
Fabric57 57 False
Fabric58 58 False
Fabric59 59 False
Fabric60 60 False
Fabric61 61 False
Fabric62 62 False
Fabric63 63 False
Fabric64 64 False
Fabric65 65 False
Fabric66 66 False
Fabric67 67 False
Fabric68 68 False
Fabric69 69 False
Fabric70 70 False
Fabric71 71 False
Fabric72 72 False
Fabric73 73 False
Fabric74 74 False
Fabric75 75 False
Fabric76 76 False
Fabric77 77 False
Fabric78 78 False
Fabric79 79 False
Fabric80 80 False
Fabric81 81 False
Fabric82 82 False
Fabric83 83 False
Fabric84 84 False
Fabric85 85 False
Fabric86 86 False
Fabric87 87 False
Fabric88 88 False
Fabric89 89 False
Fabric90 90 False
Fabric91 91 False
Fabric92 92 False
Fabric93 93 False
Fabric94 94 False
Fabric95 95 False
Fabric96 96 False
Fabric97 97 False
Fabric98 98 False
Fabric99 99 False
Fabric100 100 False
Fabric101 101 False
Fabric102 102 False
Fabric103 103 False
Fabric104 104 False
Fabric105 105 False
Fabric106 106 False
Fabric107 107 False
Fabric108 108 False
Fabric109 109 False
Fabric110 110 False
Fabric111 111 False

View File

@ -0,0 +1,8 @@
{
"FABRIC_MONITOR_DATA": {
"monErrThreshCrcCells": 1,
"monErrThreshRxCells": 61035156,
"monPollThreshRecovery": 8,
"monPollThreshIsolation": 1
}
}

View File

@ -0,0 +1,113 @@
# name lanes isolateStatus
Fabric0 0 False
Fabric1 1 False
Fabric2 2 False
Fabric3 3 False
Fabric4 4 False
Fabric5 5 False
Fabric6 6 False
Fabric7 7 False
Fabric8 8 False
Fabric9 9 False
Fabric10 10 False
Fabric11 11 False
Fabric12 12 False
Fabric13 13 False
Fabric14 14 False
Fabric15 15 False
Fabric16 16 False
Fabric17 17 False
Fabric18 18 False
Fabric19 19 False
Fabric20 20 False
Fabric21 21 False
Fabric22 22 False
Fabric23 23 False
Fabric24 24 False
Fabric25 25 False
Fabric26 26 False
Fabric27 27 False
Fabric28 28 False
Fabric29 29 False
Fabric30 30 False
Fabric31 31 False
Fabric32 32 False
Fabric33 33 False
Fabric34 34 False
Fabric35 35 False
Fabric36 36 False
Fabric37 37 False
Fabric38 38 False
Fabric39 39 False
Fabric40 40 False
Fabric41 41 False
Fabric42 42 False
Fabric43 43 False
Fabric44 44 False
Fabric45 45 False
Fabric46 46 False
Fabric47 47 False
Fabric48 48 False
Fabric49 49 False
Fabric50 50 False
Fabric51 51 False
Fabric52 52 False
Fabric53 53 False
Fabric54 54 False
Fabric55 55 False
Fabric56 56 False
Fabric57 57 False
Fabric58 58 False
Fabric59 59 False
Fabric60 60 False
Fabric61 61 False
Fabric62 62 False
Fabric63 63 False
Fabric64 64 False
Fabric65 65 False
Fabric66 66 False
Fabric67 67 False
Fabric68 68 False
Fabric69 69 False
Fabric70 70 False
Fabric71 71 False
Fabric72 72 False
Fabric73 73 False
Fabric74 74 False
Fabric75 75 False
Fabric76 76 False
Fabric77 77 False
Fabric78 78 False
Fabric79 79 False
Fabric80 80 False
Fabric81 81 False
Fabric82 82 False
Fabric83 83 False
Fabric84 84 False
Fabric85 85 False
Fabric86 86 False
Fabric87 87 False
Fabric88 88 False
Fabric89 89 False
Fabric90 90 False
Fabric91 91 False
Fabric92 92 False
Fabric93 93 False
Fabric94 94 False
Fabric95 95 False
Fabric96 96 False
Fabric97 97 False
Fabric98 98 False
Fabric99 99 False
Fabric100 100 False
Fabric101 101 False
Fabric102 102 False
Fabric103 103 False
Fabric104 104 False
Fabric105 105 False
Fabric106 106 False
Fabric107 107 False
Fabric108 108 False
Fabric109 109 False
Fabric110 110 False
Fabric111 111 False

View File

@ -0,0 +1,8 @@
{
"FABRIC_MONITOR_DATA": {
"monErrThreshCrcCells": 1,
"monErrThreshRxCells": 61035156,
"monPollThreshRecovery": 8,
"monPollThreshIsolation": 1
}
}

View File

@ -0,0 +1,193 @@
# name lanes isolateStatus
Fabric0 0 False
Fabric1 1 False
Fabric2 2 False
Fabric3 3 False
Fabric4 4 False
Fabric5 5 False
Fabric6 6 False
Fabric7 7 False
Fabric8 8 False
Fabric9 9 False
Fabric10 10 False
Fabric11 11 False
Fabric12 12 False
Fabric13 13 False
Fabric14 14 False
Fabric15 15 False
Fabric16 16 False
Fabric17 17 False
Fabric18 18 False
Fabric19 19 False
Fabric20 20 False
Fabric21 21 False
Fabric22 22 False
Fabric23 23 False
Fabric24 24 False
Fabric25 25 False
Fabric26 26 False
Fabric27 27 False
Fabric28 28 False
Fabric29 29 False
Fabric30 30 False
Fabric31 31 False
Fabric32 32 False
Fabric33 33 False
Fabric34 34 False
Fabric35 35 False
Fabric36 36 False
Fabric37 37 False
Fabric38 38 False
Fabric39 39 False
Fabric40 40 False
Fabric41 41 False
Fabric42 42 False
Fabric43 43 False
Fabric44 44 False
Fabric45 45 False
Fabric46 46 False
Fabric47 47 False
Fabric48 48 False
Fabric49 49 False
Fabric50 50 False
Fabric51 51 False
Fabric52 52 False
Fabric53 53 False
Fabric54 54 False
Fabric55 55 False
Fabric56 56 False
Fabric57 57 False
Fabric58 58 False
Fabric59 59 False
Fabric60 60 False
Fabric61 61 False
Fabric62 62 False
Fabric63 63 False
Fabric64 64 False
Fabric65 65 False
Fabric66 66 False
Fabric67 67 False
Fabric68 68 False
Fabric69 69 False
Fabric70 70 False
Fabric71 71 False
Fabric72 72 False
Fabric73 73 False
Fabric74 74 False
Fabric75 75 False
Fabric76 76 False
Fabric77 77 False
Fabric78 78 False
Fabric79 79 False
Fabric80 80 False
Fabric81 81 False
Fabric82 82 False
Fabric83 83 False
Fabric84 84 False
Fabric85 85 False
Fabric86 86 False
Fabric87 87 False
Fabric88 88 False
Fabric89 89 False
Fabric90 90 False
Fabric91 91 False
Fabric92 92 False
Fabric93 93 False
Fabric94 94 False
Fabric95 95 False
Fabric96 96 False
Fabric97 97 False
Fabric98 98 False
Fabric99 99 False
Fabric100 100 False
Fabric101 101 False
Fabric102 102 False
Fabric103 103 False
Fabric104 104 False
Fabric105 105 False
Fabric106 106 False
Fabric107 107 False
Fabric108 108 False
Fabric109 109 False
Fabric110 110 False
Fabric111 111 False
Fabric112 112 False
Fabric113 113 False
Fabric114 114 False
Fabric115 115 False
Fabric116 116 False
Fabric117 117 False
Fabric118 118 False
Fabric119 119 False
Fabric120 120 False
Fabric121 121 False
Fabric122 122 False
Fabric123 123 False
Fabric124 124 False
Fabric125 125 False
Fabric126 126 False
Fabric127 127 False
Fabric128 128 False
Fabric129 129 False
Fabric130 130 False
Fabric131 131 False
Fabric132 132 False
Fabric133 133 False
Fabric134 134 False
Fabric135 135 False
Fabric136 136 False
Fabric137 137 False
Fabric138 138 False
Fabric139 139 False
Fabric140 140 False
Fabric141 141 False
Fabric142 142 False
Fabric143 143 False
Fabric144 144 False
Fabric145 145 False
Fabric146 146 False
Fabric147 147 False
Fabric148 148 False
Fabric149 149 False
Fabric150 150 False
Fabric151 151 False
Fabric152 152 False
Fabric153 153 False
Fabric154 154 False
Fabric155 155 False
Fabric156 156 False
Fabric157 157 False
Fabric158 158 False
Fabric159 159 False
Fabric160 160 False
Fabric161 161 False
Fabric162 162 False
Fabric163 163 False
Fabric164 164 False
Fabric165 165 False
Fabric166 166 False
Fabric167 167 False
Fabric168 168 False
Fabric169 169 False
Fabric170 170 False
Fabric171 171 False
Fabric172 172 False
Fabric173 173 False
Fabric174 174 False
Fabric175 175 False
Fabric176 176 False
Fabric177 177 False
Fabric178 178 False
Fabric179 179 False
Fabric180 180 False
Fabric181 181 False
Fabric182 182 False
Fabric183 183 False
Fabric184 184 False
Fabric185 185 False
Fabric186 186 False
Fabric187 187 False
Fabric188 188 False
Fabric189 189 False
Fabric190 190 False
Fabric191 191 False

View File

@ -13,7 +13,7 @@ from lxml.etree import QName
from natsort import natsorted, ns as natsortns
from portconfig import get_port_config
from portconfig import get_port_config, get_fabric_port_config, get_fabric_monitor_config
from sonic_py_common.interface import backplane_prefix
# TODO: Remove this once we no longer support Python 2
@ -1436,7 +1436,7 @@ def select_mmu_profiles(profile, platform, hwsku):
# Main functions
#
###############################################################################
def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hwsku_config_file=None):
def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hwsku_config_file=None, fabric_port_config_file=None ):
""" Parse minigraph xml file.
Keyword arguments:
@ -1445,6 +1445,7 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw
port_config_file -- port config file name
asic_name -- asic name; to parse multi-asic device minigraph to
generate asic specific configuration.
fabric_port_config_file -- fabric port config file name
"""
root = ET.parse(filename).getroot()
@ -1871,6 +1872,16 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw
results['PORT'] = ports
results['CONSOLE_PORT'] = console_ports
# Get the global fabric monitoring data
fabric_monitor = get_fabric_monitor_config(hwsku=hwsku, asic_name=asic_name)
if bool( fabric_monitor ):
results[ 'FABRIC_MONITOR' ] = fabric_monitor
# parse fabric
fabric_ports = get_fabric_port_config(hwsku=hwsku, platform=platform, fabric_port_config_file=fabric_port_config_file, asic_name=asic_name, hwsku_config_file=hwsku_config_file)
if bool( fabric_ports ):
results['FABRIC_PORT'] = fabric_ports
if port_config_file:
port_set = set(ports.keys())
for (pc_name, pc_member) in list(pc_members.keys()):

View File

@ -100,6 +100,74 @@ def get_hwsku_file_name(hwsku=None, platform=None):
return candidate
return None
def get_fabric_monitor_config(hwsku=None, asic_name=None):
config_db = db_connect_configdb(asic_name)
if config_db is not None:
fabric_monitor_global = config_db.get_table("FABRIC_MONITOR")
if bool( fabric_monitor_global ):
return fabric_monitor_global
fabric_monitor_global = {}
if asic_name is not None:
asic_id = str(get_asic_id_from_name(asic_name))
else:
asic_id = None
fabric_monitor_config_file = device_info.get_path_to_fabric_monitor_config_file(hwsku, asic_id)
if not fabric_monitor_config_file:
return fabric_monitor_global
with open( fabric_monitor_config_file, "r" ) as openfile:
fabric_monitor_global = json.load( openfile )
openfile.close()
return fabric_monitor_global
def get_fabric_port_config(hwsku=None, platform=None, fabric_port_config_file=None, hwsku_config_file=None, asic_name=None):
config_db = db_connect_configdb(asic_name)
if config_db is not None and fabric_port_config_file is None:
port_data = config_db.get_table("FABRIC_PORT")
if bool(port_data):
ports = ast.literal_eval(json.dumps(port_data))
return ports
if asic_name is not None:
asic_id = str(get_asic_id_from_name(asic_name))
else:
asic_id = None
if not fabric_port_config_file:
fabric_port_config_file = device_info.get_path_to_fabric_port_config_file(hwsku, asic_id)
if not fabric_port_config_file:
return {}
# else parse fabric_port_config.ini
ports = {}
# Default column definition
# ../../device/arista/x86_64-arista_7800r3_48cq2_lc/Arista-7800R3-48CQ2-C48/fabric_port_config.ini
# # name lanes isolateStatus
# Fabric0 0 False
titles = ['name', 'lanes', 'isolateStatus']
with open(fabric_port_config_file) as data:
for line in data:
if line.startswith('#'):
if "name" in line:
titles = line.strip('#').split()
continue;
tokens = line.split()
if len(tokens) < 2:
continue
name_index = titles.index('name')
name = tokens[name_index]
data = {}
for i, item in enumerate(tokens):
if i == name_index:
continue
data[titles[i]] = item
data.setdefault('alias', name)
ports[name] = data
return ports
def get_port_config(hwsku=None, platform=None, port_config_file=None, hwsku_config_file=None, asic_name=None):
config_db = db_connect_configdb(asic_name)
# If available, Read from CONFIG DB first

View File

@ -20,6 +20,12 @@ SONIC_VERSION_YAML_PATH = "/etc/sonic/sonic_version.yml"
PORT_CONFIG_FILE = "port_config.ini"
PLATFORM_JSON_FILE = "platform.json"
# Fabric port configuration file names
FABRIC_MONITOR_CONFIG_FILE = "fabric_monitor_config.json"
# Fabric port configuration file names
FABRIC_PORT_CONFIG_FILE = "fabric_port_config.ini"
# HwSKU configuration file name
HWSKU_JSON_FILE = 'hwsku.json'
@ -245,6 +251,113 @@ def get_path_to_hwsku_dir():
return hwsku_path
def get_path_to_fabric_monitor_config_file(hwsku=None, asic=None):
"""
Retrieves the path to the device's fabric monitor configuration file
Args:
hwsku: a string, it is allowed to be passed in args because when loading the
initial configuration on the device, the HwSKU is not yet present in ConfigDB.
asic: a string , asic argument should be passed on multi-ASIC devices only,
it should be omitted on single-ASIC platforms.
Returns:
A string containing the path the the device's fabric monitor configuration file
"""
"""
This platform check is performed to make sure we return a None
in case of unit-tests within sonic-cfggen where platform is not expected to be
present because tests are not run on actual Hardware/Container.
TODO: refactor sonic-cfggen such that we can remove this check
"""
platform = get_platform()
if not platform:
return None
if hwsku:
try:
platform_path = get_path_to_platform_dir()
except OSError:
return None
hwsku_path = os.path.join(platform_path, hwsku)
else:
(platform_path, hwsku_path) = get_paths_to_platform_and_hwsku_dirs()
fabric_monitor_config_candidates = []
# Check for 'hwsku.json' file presence first
hwsku_json_file = os.path.join(hwsku_path, HWSKU_JSON_FILE)
# Check for 'fabric_monitor_config.json' file presence
fabric_monitor_config_candidates.append(os.path.join(hwsku_path, FABRIC_MONITOR_CONFIG_FILE))
for candidate in fabric_monitor_config_candidates:
if os.path.isfile(candidate):
return candidate
return None
def get_path_to_fabric_port_config_file(hwsku=None, asic=None):
"""
Retrieves the path to the device's fabric port configuration file
Args:
hwsku: a string, it is allowed to be passed in args because when loading the
initial configuration on the device, the HwSKU is not yet present in ConfigDB.
asic: a string , asic argument should be passed on multi-ASIC devices only,
it should be omitted on single-ASIC platforms.
Returns:
A string containing the path the the device's fabric port configuration file
"""
"""
This platform check is performed to make sure we return a None
in case of unit-tests within sonic-cfggen where platform is not expected to be
present because tests are not run on actual Hardware/Container.
TODO: refactor sonic-cfggen such that we can remove this check
"""
platform = get_platform()
if not platform:
return None
if hwsku:
try:
platform_path = get_path_to_platform_dir()
except OSError:
return None
hwsku_path = os.path.join(platform_path, hwsku)
else:
(platform_path, hwsku_path) = get_paths_to_platform_and_hwsku_dirs()
fabric_port_config_candidates = []
# Check for 'hwsku.json' file presence first
hwsku_json_file = os.path.join(hwsku_path, HWSKU_JSON_FILE)
# if 'hwsku.json' file is available, Check for 'platform.json' file presence,
# if 'platform.json' is available, APPEND it. Otherwise, SKIP it.
# Check for 'fabric_port_config.ini' file presence in a few locations
if asic:
# Check if there is a file that is specific for the asic.
fabric_port_config_candidates.append(os.path.join(hwsku_path, asic, FABRIC_PORT_CONFIG_FILE))
# Check if there is a file for the hardware type.
fabric_port_config_candidates.append(os.path.join(hwsku_path, FABRIC_PORT_CONFIG_FILE))
else:
fabric_port_config_candidates.append(os.path.join(hwsku_path, FABRIC_PORT_CONFIG_FILE))
for candidate in fabric_port_config_candidates:
if os.path.isfile(candidate):
return candidate
return None
def get_paths_to_platform_and_hwsku_dirs():
"""
Retreives the paths to the device's platform and hardware SKU data