Allow inclusion of persistenced socket in CDI specification

This change adds an include-persistenced-socket flag to the
nvidia-ctk cdi generate command that ensures that a generated
specification includes the nvidia-persistenced socket if present on
the host.

Note that for mangement mode, these sockets are always included
if detected.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar
2024-09-16 11:27:57 +02:00
parent a4bfccc3fe
commit 70da6cfa50
2 changed files with 11 additions and 0 deletions

View File

@@ -132,6 +132,9 @@ func New(opts ...Option) (Interface, error) {
if l.vendor == "" {
l.vendor = "management.nvidia.com"
}
// For management specifications we always allow the fabricmanager and
// persistenced sockets.
WithOptInFeature("include-persistenced-socket", true)(l)
lib = (*managementlib)(l)
case ModeNvml:
lib = (*nvmllib)(l)