(objs []*unstructured.Unstructured, kind string)
| 465 | } |
| 466 | |
| 467 | func getObjectOfKind(objs []*unstructured.Unstructured, kind string) (*unstructured.Unstructured, error) { |
| 468 | for _, obj := range objs { |
| 469 | if obj.GetKind() == kind { |
| 470 | return obj, nil |
| 471 | } |
| 472 | } |
| 473 | return nil, fmt.Errorf("did not find object of kind '%s' in Object list", kind) |
| 474 | } |
| 475 | |
| 476 | // getDriverName returns a unique name for an NVIDIA driver instance in the format nvidia-<driverType>-driver-<crName>-<osVersion> |
| 477 | func getDriverName(cr *nvidiav1alpha1.NVIDIADriver, osVersion string) string { |
no outgoing calls
no test coverage detected