vpd

package
v0.0.0-...-f4b31ea Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2025 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package vpd provide ability to read and update VPD values.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsEnrollmentInClean

func IsEnrollmentInClean(ctx context.Context, ha components.HostAccess, timeout time.Duration) (bool, error)

IsEnrollmentInClean checks that the device's is not in enrollment state.

Verify that the device's enrollment state is clean.

The validation based on the value of "check_enrollment" from VPD. Which can be obtained by running:

vpd -g check_enrollment -i RW_VPD

If the value is check_enrollment=1 then the device will perform forced
re-enrollment check and depending on the response from the server might
force the device to enroll again. If the value is check_enrollment=0,
then device can be used like a new device.

func Read

func Read(ctx context.Context, ha components.HostAccess, timeout time.Duration, key string) (string, error)

Read read vpd value of VPD.

func ReadRO

func ReadRO(ctx context.Context, ha components.HostAccess, timeout time.Duration, key string) (string, error)

ReadRO read vpd value of VPD from RO_VPD partition.

func Set

func Set(ctx context.Context, ha components.HostAccess, timeout time.Duration, key, value string) error

Set sets vpd value of VPD by key.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL