Skip to content

Commit 5f4d646

Browse files
committed
Add Device status const comments
Signed-off-by: Lionel Jouin <[email protected]>
1 parent 1d13ff2 commit 5f4d646

File tree

3 files changed

+42
-12
lines changed

3 files changed

+42
-12
lines changed

pkg/apis/resource/types.go

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -989,10 +989,20 @@ type ResourceClaimTemplateList struct {
989989
}
990990

991991
const (
992-
AllocatedDeviceStatusMaxConditions int = 8
993-
AllocatedDeviceStatusDataMaxLength int = OpaqueParametersMaxLength
994-
NetworkDeviceDataMaxIPs int = 16
995-
NetworkDeviceDataInterfaceNameMaxLength int = 256
992+
// AllocatedDeviceStatusMaxConditions represents the maximum number of
993+
// conditions in a device status.
994+
AllocatedDeviceStatusMaxConditions int = 8
995+
// AllocatedDeviceStatusDataMaxLength represents the maximum length of the
996+
// raw data in the Data field in a device status.
997+
AllocatedDeviceStatusDataMaxLength int = 10 * 1024
998+
// NetworkDeviceDataMaxIPs represents the maximum number of IPs in the networkData
999+
// field in a device status.
1000+
NetworkDeviceDataMaxIPs int = 16
1001+
// NetworkDeviceDataInterfaceNameMaxLength represents the maximum number of characters
1002+
// for the networkData.interfaceName field in a device status.
1003+
NetworkDeviceDataInterfaceNameMaxLength int = 256
1004+
// NetworkDeviceDataHardwareAddressMaxLength represents the maximum number of characters
1005+
// for the networkData.hardwareAddress field in a device status.
9961006
NetworkDeviceDataHardwareAddressMaxLength int = 128
9971007
)
9981008

staging/src/k8s.io/api/resource/v1alpha3/types.go

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,10 +1000,20 @@ type ResourceClaimTemplateList struct {
10001000
}
10011001

10021002
const (
1003-
AllocatedDeviceStatusMaxConditions int = 8
1004-
AllocatedDeviceStatusDataMaxLength int = OpaqueParametersMaxLength
1005-
NetworkDeviceDataMaxIPs int = 16
1006-
NetworkDeviceDataInterfaceNameMaxLength int = 256
1003+
// AllocatedDeviceStatusMaxConditions represents the maximum number of
1004+
// conditions in a device status.
1005+
AllocatedDeviceStatusMaxConditions int = 8
1006+
// AllocatedDeviceStatusDataMaxLength represents the maximum length of the
1007+
// raw data in the Data field in a device status.
1008+
AllocatedDeviceStatusDataMaxLength int = 10 * 1024
1009+
// NetworkDeviceDataMaxIPs represents the maximum number of IPs in the networkData
1010+
// field in a device status.
1011+
NetworkDeviceDataMaxIPs int = 16
1012+
// NetworkDeviceDataInterfaceNameMaxLength represents the maximum number of characters
1013+
// for the networkData.interfaceName field in a device status.
1014+
NetworkDeviceDataInterfaceNameMaxLength int = 256
1015+
// NetworkDeviceDataHardwareAddressMaxLength represents the maximum number of characters
1016+
// for the networkData.hardwareAddress field in a device status.
10071017
NetworkDeviceDataHardwareAddressMaxLength int = 128
10081018
)
10091019

staging/src/k8s.io/api/resource/v1beta1/types.go

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,10 +1003,20 @@ type ResourceClaimTemplateList struct {
10031003
}
10041004

10051005
const (
1006-
AllocatedDeviceStatusMaxConditions int = 8
1007-
AllocatedDeviceStatusDataMaxLength int = OpaqueParametersMaxLength
1008-
NetworkDeviceDataMaxIPs int = 16
1009-
NetworkDeviceDataInterfaceNameMaxLength int = 256
1006+
// AllocatedDeviceStatusMaxConditions represents the maximum number of
1007+
// conditions in a device status.
1008+
AllocatedDeviceStatusMaxConditions int = 8
1009+
// AllocatedDeviceStatusDataMaxLength represents the maximum length of the
1010+
// raw data in the Data field in a device status.
1011+
AllocatedDeviceStatusDataMaxLength int = 10 * 1024
1012+
// NetworkDeviceDataMaxIPs represents the maximum number of IPs in the networkData
1013+
// field in a device status.
1014+
NetworkDeviceDataMaxIPs int = 16
1015+
// NetworkDeviceDataInterfaceNameMaxLength represents the maximum number of characters
1016+
// for the networkData.interfaceName field in a device status.
1017+
NetworkDeviceDataInterfaceNameMaxLength int = 256
1018+
// NetworkDeviceDataHardwareAddressMaxLength represents the maximum number of characters
1019+
// for the networkData.hardwareAddress field in a device status.
10101020
NetworkDeviceDataHardwareAddressMaxLength int = 128
10111021
)
10121022

0 commit comments

Comments
 (0)