Skip to content

Commit

Permalink
removing deviations that are not required and adding code for compone…
Browse files Browse the repository at this point in the history
…nts presence
  • Loading branch information
lvaish05 committed Jan 14, 2025
1 parent a92713a commit 15d674e
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ platform_exceptions: {
vendor: JUNIPER
}
deviations: {
linecard_cpu_utilization_unsupported: true
consistent_component_names_unsupported: true
controller_card_cpu_utilization_unsupported: true
fabric_drop_counter_unsupported: true
linecard_memory_utilization_unsupported: true
qos_voq_drop_counter_unsupported: true
qos_inqueue_drop_counter_unsupported: true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,22 @@ func TestComponentStatus(t *testing.T) {
controllerCards := components.FindComponentsByType(t, dut, controllerCardType)
lineCards := components.FindComponentsByType(t, dut, lineCardType)
fabricCards := components.FindComponentsByType(t, dut, fabricCardType)
fabrics := make([]string, 0)
for _, f := range fabricCards {
compMtyVal, ok := gnmi.Lookup(t, dut, gnmi.OC().Component(f).Empty().State()).Val()
if !compMtyVal && ok {
fabrics = append(fabrics, f)
}
}
fabricCards = fabrics
chassisLineCards := make([]string, 0)
for _, lc := range lineCards {
compMtyVal, ok := gnmi.Lookup(t, dut, gnmi.OC().Component(lc).Empty().State()).Val()
if !compMtyVal && ok {
chassisLineCards = append(chassisLineCards, lc)
}
}
lineCards = chassisLineCards
checkComponents := append(controllerCards, lineCards...)
checkComponents = append(checkComponents, fabricCards...)
if len(checkComponents) == 0 {
Expand Down Expand Up @@ -246,6 +262,14 @@ func TestLineCardsNoHighCPUSpike(t *testing.T) {

lineCards := components.FindComponentsByType(t, dut, lineCardType)
cpuCards := components.FindComponentsByType(t, dut, cpuType)
chassisLineCards := make([]string, 0)
for _, lc := range lineCards {
compMtyVal, ok := gnmi.Lookup(t, dut, gnmi.OC().Component(lc).Empty().State()).Val()
if !compMtyVal && ok {
chassisLineCards = append(chassisLineCards, lc)
}
}
lineCards = chassisLineCards
if len(lineCards) == 0 || len(cpuCards) == 0 {
t.Errorf("ERROR: No controllerCard or cpuCard has been found.")
}
Expand Down Expand Up @@ -288,6 +312,14 @@ func TestComponentsNoHighMemoryUtilization(t *testing.T) {

controllerCards := components.FindComponentsByType(t, dut, controllerCardType)
lineCards := components.FindComponentsByType(t, dut, lineCardType)
chassisLineCards := make([]string, 0)
for _, lc := range lineCards {
compMtyVal, ok := gnmi.Lookup(t, dut, gnmi.OC().Component(lc).Empty().State()).Val()
if !compMtyVal && ok {
chassisLineCards = append(chassisLineCards, lc)
}
}
lineCards = chassisLineCards
cardList := append(controllerCards, lineCards...)
if len(cardList) == 0 {
t.Errorf("ERROR: No card has been found.")
Expand Down

0 comments on commit 15d674e

Please sign in to comment.