MCPcopy Create free account
hub / github.com/NVIDIA/gpu-operator / validateComponent

Function validateComponent

cmd/nvidia-validator/main.go:532–646  ·  view source on GitHub ↗
(ctx context.Context, componentFlag string)

Source from the content-addressed store, hash-verified

530}
531
532func validateComponent(ctx context.Context, componentFlag string) error {
533 switch componentFlag {
534 case "driver":
535 driver := &Driver{
536 ctx: ctx,
537 }
538 err := driver.validate()
539 if err != nil {
540 return fmt.Errorf("error validating driver installation: %w", err)
541 }
542 return nil
543 case NVIDIAFS:
544 nvidiaFs := &NvidiaFs{}
545 err := nvidiaFs.validate()
546 if err != nil {
547 return fmt.Errorf("error validating nvidia-fs driver installation: %w", err)
548 }
549 return nil
550 case GDRCOPY:
551 gdrcopy := &GDRCopy{}
552 err := gdrcopy.validate()
553 if err != nil {
554 return fmt.Errorf("error validating gdrcopy driver installation: %w", err)
555 }
556 return nil
557 case NVIDIAPEERMEM:
558 nvidiaPeermem := &NvidiaPeermem{}
559 err := nvidiaPeermem.validate()
560 if err != nil {
561 return fmt.Errorf("error validating nvidia-peermem driver installation: %w", err)
562 }
563 return nil
564 case "toolkit":
565 toolkit := &Toolkit{}
566 err := toolkit.validate()
567 if err != nil {
568 return fmt.Errorf("error validating toolkit installation: %w", err)
569 }
570 return nil
571 case "cuda":
572 cuda := &CUDA{
573 ctx: ctx,
574 }
575 err := cuda.validate()
576 if err != nil {
577 return fmt.Errorf("error validating cuda workload: %w", err)
578 }
579 return nil
580 case "plugin":
581 plugin := &Plugin{
582 ctx: ctx,
583 }
584 err := plugin.validate()
585 if err != nil {
586 return fmt.Errorf("error validating plugin installation: %w", err)
587 }
588 return nil
589 case "mofed":

Callers 2

startFunction · 0.85

Calls 13

validateMethod · 0.95
validateMethod · 0.95
validateMethod · 0.95
validateMethod · 0.95
validateMethod · 0.95
validateMethod · 0.95
validateMethod · 0.95
validateMethod · 0.95
runMethod · 0.95
validateMethod · 0.95
validateMethod · 0.95
validateMethod · 0.95

Tested by

no test coverage detected