merge constants.go into attribute.go

Signed-off-by: Shingo Omura <everpeace@gmail.com>
This commit is contained in:
Shingo Omura
2025-06-18 22:21:29 +09:00
parent 73d65f830a
commit caa64afd01
2 changed files with 12 additions and 33 deletions

View File

@@ -20,6 +20,18 @@ import (
resourceapi "k8s.io/dynamic-resource-allocation/api"
)
const (
// StandardDeviceAttributePrefix is the prefix used for standard device attributes.
StandardDeviceAttributePrefix = "resource.kubernetes.io/"
// StandardDeviceAttributePCIeRoot is a standard device attribute name
// which describe PCIe Root Complex of the PCIe device.
// The value is a string value in the format `pci<domain>:<bus>`,
// referring to a PCIe (Peripheral Component Interconnect Express) Root Complex.
// This attribute can be used to identify devices that share the same PCIe Root Complex.
StandardDeviceAttributePCIeRoot resourceapi.QualifiedName = StandardDeviceAttributePrefix + "pcieRoot"
)
// DeviceAttribute represents a device attribute name and its value
type DeviceAttribute struct {
// Name is the qualified name of the device attribute.

View File

@@ -1,33 +0,0 @@
/*
Copyright 2025 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package deviceattribute
import (
resourceapi "k8s.io/dynamic-resource-allocation/api"
)
const (
// StandardDeviceAttributePrefix is the prefix used for standard device attributes.
StandardDeviceAttributePrefix = "resource.kubernetes.io/"
// StandardDeviceAttributePCIeRoot is a standard device attribute name
// which describe PCIe Root Complex of the PCIe device.
// The value is a string value in the format `pci<domain>:<bus>`,
// referring to a PCIe (Peripheral Component Interconnect Express) Root Complex.
// This attribute can be used to identify devices that share the same PCIe Root Complex.
StandardDeviceAttributePCIeRoot resourceapi.QualifiedName = StandardDeviceAttributePrefix + "pcieRoot"
)