diff --git a/pkg/apis/resourceplugin/v1alpha1/api.pb.go b/pkg/apis/resourceplugin/v1alpha1/api.pb.go index 6ccca95c..2b0dc8b9 100644 --- a/pkg/apis/resourceplugin/v1alpha1/api.pb.go +++ b/pkg/apis/resourceplugin/v1alpha1/api.pb.go @@ -109,7 +109,9 @@ type ResourcePluginOptions struct { // Indicates if the resource this plugin managed needs topology alignment WithTopologyAlignment bool `protobuf:"varint,2,opt,name=with_topology_alignment,json=withTopologyAlignment,proto3" json:"with_topology_alignment,omitempty"` // Indicates if the resource needs reconciling allocation result - NeedReconcile bool `protobuf:"varint,3,opt,name=need_reconcile,json=needReconcile,proto3" json:"need_reconcile,omitempty"` + NeedReconcile bool `protobuf:"varint,3,opt,name=need_reconcile,json=needReconcile,proto3" json:"need_reconcile,omitempty"` + // Indicates the devices that this plugin needs to allocate + AssociatedDevices []string `protobuf:"bytes,4,rep,name=associated_devices,json=associatedDevices,proto3" json:"associated_devices,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } @@ -167,6 +169,13 @@ func (m *ResourcePluginOptions) GetNeedReconcile() bool { return false } +func (m *ResourcePluginOptions) GetAssociatedDevices() []string { + if m != nil { + return m.AssociatedDevices + } + return nil +} + type RegisterRequest struct { // Version of the API the Resource Plugin was built against Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` @@ -2035,10 +2044,10 @@ func (m *AllocatableTopologyAwareResource) GetTopologyAwareCapacityQuantityList( return nil } -// - PreStartContainer is expected to be called before each container start if indicated by plugin during registration phase. -// - PreStartContainer allows kubelet to pass reinitialized resources to containers. -// - PreStartContainer allows Resource Plugin to run resource specific operations on -// the resources requested +// - PreStartContainer is expected to be called before each container start if indicated by plugin during registration phase. +// - PreStartContainer allows kubelet to pass reinitialized resources to containers. +// - PreStartContainer allows Resource Plugin to run resource specific operations on +// the resources requested type PreStartContainerRequest struct { PodUid string `protobuf:"bytes,1,opt,name=pod_uid,json=podUid,proto3" json:"pod_uid,omitempty"` PodNamespace string `protobuf:"bytes,2,opt,name=pod_namespace,json=podNamespace,proto3" json:"pod_namespace,omitempty"` @@ -2146,1250 +2155,1488 @@ func (m *PreStartContainerResponse) XXX_DiscardUnknown() { var xxx_messageInfo_PreStartContainerResponse proto.InternalMessageInfo -func init() { - proto.RegisterEnum("resourceplugin.v1alpha1.ContainerType", ContainerType_name, ContainerType_value) - proto.RegisterEnum("resourceplugin.v1alpha1.TopologyLevel", TopologyLevel_name, TopologyLevel_value) - proto.RegisterType((*ResourcePluginOptions)(nil), "resourceplugin.v1alpha1.ResourcePluginOptions") - proto.RegisterType((*RegisterRequest)(nil), "resourceplugin.v1alpha1.RegisterRequest") - proto.RegisterType((*ResourceRequest)(nil), "resourceplugin.v1alpha1.ResourceRequest") - proto.RegisterMapType((map[string]string)(nil), "resourceplugin.v1alpha1.ResourceRequest.AnnotationsEntry") - proto.RegisterMapType((map[string]string)(nil), "resourceplugin.v1alpha1.ResourceRequest.LabelsEntry") - proto.RegisterMapType((map[string]float64)(nil), "resourceplugin.v1alpha1.ResourceRequest.ResourceRequestsEntry") - proto.RegisterType((*PodResourceRequest)(nil), "resourceplugin.v1alpha1.PodResourceRequest") - proto.RegisterMapType((map[string]string)(nil), "resourceplugin.v1alpha1.PodResourceRequest.AnnotationsEntry") - proto.RegisterMapType((map[string]string)(nil), "resourceplugin.v1alpha1.PodResourceRequest.LabelsEntry") - proto.RegisterMapType((map[string]float64)(nil), "resourceplugin.v1alpha1.PodResourceRequest.ResourceRequestsEntry") - proto.RegisterType((*PodResourceHintsResponse)(nil), "resourceplugin.v1alpha1.PodResourceHintsResponse") - proto.RegisterMapType((map[string]string)(nil), "resourceplugin.v1alpha1.PodResourceHintsResponse.AnnotationsEntry") - proto.RegisterMapType((map[string]string)(nil), "resourceplugin.v1alpha1.PodResourceHintsResponse.LabelsEntry") - proto.RegisterMapType((map[string]*ListOfTopologyHints)(nil), "resourceplugin.v1alpha1.PodResourceHintsResponse.ResourceHintsEntry") - proto.RegisterType((*ResourceHintsResponse)(nil), "resourceplugin.v1alpha1.ResourceHintsResponse") - proto.RegisterMapType((map[string]string)(nil), "resourceplugin.v1alpha1.ResourceHintsResponse.AnnotationsEntry") - proto.RegisterMapType((map[string]string)(nil), "resourceplugin.v1alpha1.ResourceHintsResponse.LabelsEntry") - proto.RegisterMapType((map[string]*ListOfTopologyHints)(nil), "resourceplugin.v1alpha1.ResourceHintsResponse.ResourceHintsEntry") - proto.RegisterType((*ResourceAllocationResponse)(nil), "resourceplugin.v1alpha1.ResourceAllocationResponse") - proto.RegisterMapType((map[string]string)(nil), "resourceplugin.v1alpha1.ResourceAllocationResponse.AnnotationsEntry") - proto.RegisterMapType((map[string]string)(nil), "resourceplugin.v1alpha1.ResourceAllocationResponse.LabelsEntry") - proto.RegisterType((*PodResourceAllocationResponse)(nil), "resourceplugin.v1alpha1.PodResourceAllocationResponse") - proto.RegisterMapType((map[string]string)(nil), "resourceplugin.v1alpha1.PodResourceAllocationResponse.AnnotationsEntry") - proto.RegisterMapType((map[string]string)(nil), "resourceplugin.v1alpha1.PodResourceAllocationResponse.LabelsEntry") - proto.RegisterType((*ListOfTopologyHints)(nil), "resourceplugin.v1alpha1.ListOfTopologyHints") - proto.RegisterType((*TopologyHint)(nil), "resourceplugin.v1alpha1.TopologyHint") - proto.RegisterType((*Empty)(nil), "resourceplugin.v1alpha1.Empty") - proto.RegisterType((*RemovePodRequest)(nil), "resourceplugin.v1alpha1.RemovePodRequest") - proto.RegisterType((*RemovePodResponse)(nil), "resourceplugin.v1alpha1.RemovePodResponse") - proto.RegisterType((*GetResourcesAllocationRequest)(nil), "resourceplugin.v1alpha1.GetResourcesAllocationRequest") - proto.RegisterType((*GetResourcesAllocationResponse)(nil), "resourceplugin.v1alpha1.GetResourcesAllocationResponse") - proto.RegisterMapType((map[string]*ContainerResources)(nil), "resourceplugin.v1alpha1.GetResourcesAllocationResponse.PodResourcesEntry") - proto.RegisterType((*ContainerResources)(nil), "resourceplugin.v1alpha1.ContainerResources") - proto.RegisterMapType((map[string]*ResourceAllocation)(nil), "resourceplugin.v1alpha1.ContainerResources.ContainerResourcesEntry") - proto.RegisterType((*ResourceAllocation)(nil), "resourceplugin.v1alpha1.ResourceAllocation") - proto.RegisterMapType((map[string]*ResourceAllocationInfo)(nil), "resourceplugin.v1alpha1.ResourceAllocation.ResourceAllocationEntry") - proto.RegisterType((*ResourceAllocationInfo)(nil), "resourceplugin.v1alpha1.ResourceAllocationInfo") - proto.RegisterMapType((map[string]string)(nil), "resourceplugin.v1alpha1.ResourceAllocationInfo.AnnotationsEntry") - proto.RegisterMapType((map[string]string)(nil), "resourceplugin.v1alpha1.ResourceAllocationInfo.EnvsEntry") - proto.RegisterMapType((map[uint64]uint64)(nil), "resourceplugin.v1alpha1.ResourceAllocationInfo.TopologyAssignmentsEntry") - proto.RegisterType((*GetTopologyAwareResourcesRequest)(nil), "resourceplugin.v1alpha1.GetTopologyAwareResourcesRequest") - proto.RegisterType((*GetTopologyAwareResourcesResponse)(nil), "resourceplugin.v1alpha1.GetTopologyAwareResourcesResponse") - proto.RegisterType((*ContainerTopologyAwareResources)(nil), "resourceplugin.v1alpha1.ContainerTopologyAwareResources") - proto.RegisterMapType((map[string]*TopologyAwareResource)(nil), "resourceplugin.v1alpha1.ContainerTopologyAwareResources.AllocatedResourcesEntry") - proto.RegisterType((*TopologyAwareResource)(nil), "resourceplugin.v1alpha1.TopologyAwareResource") - proto.RegisterType((*TopologyAwareQuantity)(nil), "resourceplugin.v1alpha1.TopologyAwareQuantity") - proto.RegisterMapType((map[string]string)(nil), "resourceplugin.v1alpha1.TopologyAwareQuantity.AnnotationsEntry") - proto.RegisterType((*GetTopologyAwareAllocatableResourcesRequest)(nil), "resourceplugin.v1alpha1.GetTopologyAwareAllocatableResourcesRequest") - proto.RegisterType((*GetTopologyAwareAllocatableResourcesResponse)(nil), "resourceplugin.v1alpha1.GetTopologyAwareAllocatableResourcesResponse") - proto.RegisterMapType((map[string]*AllocatableTopologyAwareResource)(nil), "resourceplugin.v1alpha1.GetTopologyAwareAllocatableResourcesResponse.AllocatableResourcesEntry") - proto.RegisterType((*AllocatableTopologyAwareResource)(nil), "resourceplugin.v1alpha1.AllocatableTopologyAwareResource") - proto.RegisterType((*PreStartContainerRequest)(nil), "resourceplugin.v1alpha1.PreStartContainerRequest") - proto.RegisterType((*PreStartContainerResponse)(nil), "resourceplugin.v1alpha1.PreStartContainerResponse") +// AssociatedDevice represents a device that is associated with a resource and can be used by a container. +type AssociatedDevice struct { + // ID is a unique identifier assigned by the device plugin to identify the device. + // The maximum length of this field is 63 characters. + ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` + // Health indicates the health of the device (e.g., healthy or unhealthy). + // See constants.go for possible values. + Health string `protobuf:"bytes,2,opt,name=health,proto3" json:"health,omitempty"` + // Topology provides the NUMA affinity of the device. + Topology *TopologyInfo `protobuf:"bytes,3,opt,name=topology,proto3" json:"topology,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AssociatedDevice) Reset() { *m = AssociatedDevice{} } +func (*AssociatedDevice) ProtoMessage() {} +func (*AssociatedDevice) Descriptor() ([]byte, []int) { + return fileDescriptor_00212fb1f9d3bf1c, []int{28} +} +func (m *AssociatedDevice) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } - -func init() { proto.RegisterFile("api.proto", fileDescriptor_00212fb1f9d3bf1c) } - -var fileDescriptor_00212fb1f9d3bf1c = []byte{ - // 2217 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcd, 0x6f, 0x1b, 0xc7, - 0x15, 0xe7, 0x52, 0x14, 0x3f, 0x9e, 0x2c, 0x99, 0x1a, 0xd9, 0x11, 0xb5, 0xb5, 0x69, 0x65, 0x1b, - 0xa5, 0xac, 0x65, 0xd3, 0xb0, 0x52, 0xd8, 0xb1, 0xdb, 0xc6, 0xa6, 0x25, 0xda, 0x16, 0xaa, 0xaf, - 0xac, 0xe4, 0xb4, 0x48, 0x81, 0x12, 0x2b, 0x72, 0x44, 0x2d, 0xbc, 0xda, 0x59, 0xef, 0x2e, 0xe9, - 0x0a, 0xed, 0x21, 0x0d, 0xda, 0x5e, 0x0a, 0x14, 0x39, 0xf4, 0xd4, 0x53, 0x0b, 0xf4, 0xde, 0x53, - 0x7b, 0xec, 0xa5, 0x97, 0xa0, 0xa7, 0x9e, 0x8a, 0x1e, 0x1b, 0xa7, 0xc7, 0x02, 0xfd, 0x0f, 0x82, - 0x62, 0x67, 0xf6, 0x93, 0x3b, 0x4b, 0x72, 0xe9, 0x8f, 0x24, 0x48, 0x6f, 0xbb, 0x33, 0x6f, 0xde, - 0xd7, 0xbc, 0xdf, 0x7b, 0xf3, 0x66, 0x17, 0x4a, 0x8a, 0xa1, 0xd6, 0x0d, 0x93, 0xd8, 0x04, 0x2d, - 0x9a, 0xd8, 0x22, 0x3d, 0xb3, 0x8d, 0x0d, 0xad, 0xd7, 0x55, 0xf5, 0x7a, 0xff, 0xba, 0xa2, 0x19, - 0xc7, 0xca, 0x75, 0xf1, 0x6a, 0x57, 0xb5, 0x8f, 0x7b, 0x87, 0xf5, 0x36, 0x39, 0xb9, 0xd6, 0x25, - 0x5d, 0x72, 0x8d, 0xd2, 0x1f, 0xf6, 0x8e, 0xe8, 0x1b, 0x7d, 0xa1, 0x4f, 0x8c, 0x8f, 0xf4, 0x07, - 0x01, 0xce, 0xcb, 0x2e, 0xab, 0x3d, 0xca, 0x6a, 0xd7, 0xb0, 0x55, 0xa2, 0x5b, 0xe8, 0x0a, 0x20, - 0xc3, 0xc4, 0x2d, 0xcb, 0x56, 0x4c, 0xbb, 0x65, 0xe2, 0x27, 0x3d, 0xd5, 0xc4, 0x9d, 0x8a, 0xb0, - 0x2c, 0xd4, 0x8a, 0x72, 0xd9, 0x30, 0xf1, 0xbe, 0x33, 0x21, 0xbb, 0xe3, 0xe8, 0x06, 0x2c, 0x3e, - 0x55, 0xed, 0xe3, 0x96, 0x4d, 0x0c, 0xa2, 0x91, 0xee, 0x69, 0x4b, 0xd1, 0xd4, 0xae, 0x7e, 0x82, - 0x75, 0xbb, 0x92, 0xa5, 0x4b, 0xce, 0x3b, 0xd3, 0x07, 0xee, 0x6c, 0xc3, 0x9b, 0x44, 0x2b, 0x30, - 0xa7, 0x63, 0xdc, 0x69, 0x99, 0xb8, 0x4d, 0xf4, 0xb6, 0xaa, 0xe1, 0xca, 0x14, 0x25, 0x9f, 0x75, - 0x46, 0x65, 0x6f, 0x50, 0xfa, 0xb3, 0x00, 0x67, 0x65, 0xdc, 0x55, 0x2d, 0x1b, 0x9b, 0x8e, 0x4c, - 0x6c, 0xd9, 0xa8, 0x02, 0x85, 0x3e, 0x36, 0x2d, 0x95, 0xe8, 0x54, 0xab, 0x92, 0xec, 0xbd, 0x22, - 0x11, 0x8a, 0x58, 0xef, 0x18, 0x44, 0x75, 0xa5, 0x97, 0x64, 0xff, 0x1d, 0x7d, 0x1d, 0x66, 0x3d, - 0xd7, 0xb5, 0x74, 0xe5, 0x84, 0xc9, 0x2b, 0xc9, 0x67, 0xbc, 0xc1, 0x1d, 0xe5, 0x04, 0xa3, 0x87, - 0x50, 0x20, 0xcc, 0x0d, 0x95, 0xdc, 0xb2, 0x50, 0x9b, 0x59, 0xab, 0xd7, 0x13, 0xfc, 0x5d, 0xe7, - 0x3a, 0x4f, 0xf6, 0x96, 0x4b, 0xbf, 0x2f, 0x38, 0x8a, 0x33, 0x12, 0x4f, 0xf1, 0x45, 0x28, 0x18, - 0xa4, 0xd3, 0xea, 0xa9, 0x1d, 0x57, 0xf1, 0xbc, 0x41, 0x3a, 0x8f, 0xd4, 0x8e, 0xa3, 0x9b, 0x33, - 0xe1, 0xa8, 0x65, 0x19, 0x4a, 0x1b, 0xbb, 0xca, 0x9f, 0x31, 0x48, 0x67, 0xc7, 0x1b, 0x43, 0x4b, - 0x50, 0xf4, 0x88, 0x5c, 0xdd, 0x0b, 0xee, 0xbc, 0xe3, 0xcc, 0x36, 0xd1, 0x6d, 0x45, 0xd5, 0xb1, - 0xc9, 0x08, 0x72, 0x94, 0x60, 0xd6, 0x1f, 0xa5, 0x64, 0xdb, 0x61, 0x32, 0xfb, 0xd4, 0xc0, 0x95, - 0xe9, 0x65, 0xa1, 0x36, 0xb7, 0xf6, 0x66, 0xa2, 0x91, 0xeb, 0x1e, 0xf9, 0xc1, 0xa9, 0x81, 0x43, - 0xec, 0x9c, 0x57, 0xf4, 0x0d, 0x38, 0x1b, 0xb0, 0x53, 0xf5, 0x0e, 0xfe, 0x71, 0x25, 0xbf, 0x2c, - 0xd4, 0x72, 0x72, 0x20, 0x65, 0xd3, 0x19, 0xf5, 0x34, 0x37, 0x89, 0x86, 0x2b, 0x05, 0x5f, 0x73, - 0x99, 0x68, 0xbe, 0x51, 0x54, 0x99, 0xa2, 0x3f, 0x45, 0xd9, 0xc7, 0x36, 0xac, 0xc4, 0xd9, 0xb0, - 0x5b, 0x90, 0x3b, 0x76, 0x76, 0x1b, 0xe8, 0x6e, 0xad, 0x24, 0x1a, 0xe2, 0x05, 0xe0, 0x43, 0x55, - 0xb7, 0x65, 0xba, 0x04, 0x3d, 0x86, 0x79, 0x9f, 0xbf, 0xc9, 0x76, 0xc8, 0xaa, 0xcc, 0x2c, 0x4f, - 0xd5, 0x66, 0xd6, 0xde, 0x19, 0xb9, 0xeb, 0xee, 0x96, 0x0e, 0xbe, 0x5b, 0x4d, 0xdd, 0x36, 0x4f, - 0xe5, 0xb2, 0x39, 0x30, 0x8c, 0xb6, 0x20, 0xaf, 0x29, 0x87, 0x58, 0xb3, 0x2a, 0x67, 0xa8, 0x84, - 0x6f, 0x8d, 0x2d, 0x61, 0x8b, 0x2e, 0x63, 0x7c, 0x5d, 0x1e, 0xe8, 0x87, 0x30, 0xa3, 0xe8, 0x3a, - 0xb1, 0x15, 0x16, 0xaa, 0xb3, 0x94, 0xe5, 0xad, 0xb1, 0x59, 0x36, 0x82, 0xb5, 0x8c, 0x6f, 0x98, - 0x1b, 0xaa, 0x41, 0x59, 0x57, 0x6c, 0xb5, 0x8f, 0x5b, 0x4f, 0x88, 0xd5, 0x6a, 0x6b, 0x8a, 0x65, - 0x55, 0xe6, 0xa8, 0xeb, 0xe7, 0xd8, 0xf8, 0xbb, 0xc4, 0x5a, 0x77, 0x46, 0xc5, 0xf5, 0x20, 0x85, - 0x44, 0xec, 0x47, 0x65, 0x98, 0x7a, 0x8c, 0x4f, 0xdd, 0x20, 0x77, 0x1e, 0xd1, 0x39, 0x98, 0xee, - 0x2b, 0x5a, 0x8f, 0x45, 0xb6, 0x20, 0xb3, 0x97, 0xdb, 0xd9, 0xb7, 0x05, 0xf1, 0x16, 0xcc, 0x84, - 0x4c, 0x1c, 0xb5, 0xb4, 0x14, 0x5e, 0xfa, 0x0e, 0x94, 0x07, 0x4d, 0x49, 0xb3, 0x5e, 0xfa, 0xf7, - 0x34, 0xa0, 0x3d, 0xd2, 0x79, 0x65, 0x30, 0x0d, 0xe3, 0x20, 0x97, 0x8c, 0x83, 0xe9, 0x11, 0x38, - 0xc8, 0x0f, 0xc1, 0x41, 0x21, 0x3d, 0x0e, 0x74, 0x1e, 0x0e, 0x8a, 0x34, 0xa4, 0x1a, 0x89, 0x7c, - 0xe2, 0x6e, 0x1b, 0x1b, 0x0a, 0xbb, 0x3e, 0x14, 0x4a, 0x54, 0xc8, 0xcd, 0x34, 0x42, 0x78, 0x68, - 0xf8, 0x51, 0x14, 0x0d, 0x40, 0xb9, 0x7e, 0x27, 0x0d, 0xd7, 0xa1, 0x80, 0xf8, 0xd2, 0x87, 0xf9, - 0xa7, 0xd3, 0x50, 0x09, 0x19, 0xed, 0x6c, 0xbd, 0x25, 0x63, 0xcb, 0x20, 0xba, 0x85, 0xbf, 0x94, - 0xc1, 0xfe, 0x18, 0xe6, 0x7c, 0x22, 0x27, 0x84, 0xad, 0x4a, 0x81, 0xee, 0xf9, 0xc6, 0x38, 0x7b, - 0x1e, 0x31, 0xbf, 0x1e, 0x19, 0x65, 0x7b, 0xef, 0x2b, 0x40, 0xc7, 0xd0, 0x23, 0x3f, 0x5c, 0x19, - 0x26, 0xbe, 0x9b, 0x5e, 0x08, 0x2f, 0x68, 0x3b, 0xd1, 0xa0, 0x65, 0x50, 0xb8, 0x97, 0x9e, 0xf7, - 0xf0, 0xd0, 0xd5, 0x01, 0xc5, 0x2d, 0xe4, 0x04, 0xcf, 0xbd, 0x70, 0xf0, 0xcc, 0xac, 0x5d, 0x49, - 0xd4, 0x63, 0x4b, 0xb5, 0xec, 0xdd, 0xa3, 0x70, 0x16, 0xb1, 0xbe, 0x20, 0x51, 0xfe, 0xbb, 0x42, - 0x00, 0xd3, 0x57, 0x14, 0xe2, 0x5f, 0xdd, 0x63, 0xd7, 0x71, 0x0c, 0x81, 0x30, 0xa2, 0x60, 0x4c, - 0x0a, 0x3f, 0xd9, 0x87, 0x1f, 0x3b, 0x9a, 0xdd, 0x4e, 0x29, 0x81, 0x87, 0x3d, 0x25, 0x8a, 0x3d, - 0x76, 0x22, 0xbb, 0x93, 0x92, 0x71, 0xfa, 0x43, 0xd4, 0x2c, 0xf7, 0x10, 0xf5, 0x15, 0x82, 0xe8, - 0x1f, 0xf3, 0x20, 0x7a, 0xb6, 0x36, 0x34, 0x8d, 0xb4, 0x29, 0xa3, 0xff, 0xe3, 0xf4, 0xe5, 0xe1, - 0xf4, 0x07, 0x30, 0xaf, 0xf8, 0x8e, 0x6e, 0x99, 0xd8, 0xea, 0x69, 0x5e, 0xaf, 0xb4, 0x3a, 0x32, - 0xde, 0x43, 0x5b, 0x54, 0x56, 0xc2, 0xdb, 0xd5, 0xd3, 0x6c, 0xf4, 0xfd, 0x01, 0x5c, 0xde, 0x49, - 0xc3, 0x6e, 0x18, 0x38, 0x8f, 0x78, 0xe0, 0xdc, 0x98, 0x84, 0xfb, 0x8b, 0x42, 0xe8, 0xe7, 0x88, - 0x98, 0xff, 0xe6, 0xe0, 0x62, 0xa8, 0xf4, 0xbf, 0x4a, 0xd0, 0xbc, 0xc4, 0xf3, 0x1b, 0x37, 0x2a, - 0x0b, 0x2f, 0x22, 0x2a, 0xdf, 0x1f, 0x38, 0xac, 0x8d, 0x75, 0xa0, 0x1a, 0x33, 0x30, 0x55, 0xde, - 0x89, 0xed, 0xc1, 0x84, 0x02, 0x86, 0x1f, 0xdb, 0x3e, 0xc7, 0x88, 0x93, 0x61, 0x81, 0x53, 0x40, - 0xd0, 0xb7, 0x61, 0x9a, 0xd5, 0x79, 0x81, 0x9a, 0x3d, 0x66, 0x83, 0xc9, 0xd6, 0x48, 0xf7, 0xe0, - 0x4c, 0x78, 0xd8, 0x91, 0xae, 0x93, 0x0e, 0x66, 0xcc, 0x72, 0x32, 0x7b, 0x41, 0x17, 0xa0, 0x64, - 0x98, 0xf8, 0x08, 0x9b, 0x26, 0xee, 0xb8, 0x77, 0x87, 0xc1, 0x80, 0x54, 0x80, 0xe9, 0xe6, 0x89, - 0x61, 0x9f, 0x4a, 0xab, 0x50, 0x96, 0xf1, 0x09, 0xe9, 0x63, 0xea, 0xe0, 0xe1, 0x1d, 0xbb, 0xb4, - 0x00, 0xf3, 0x21, 0x62, 0xe6, 0x7b, 0xe9, 0x12, 0x5c, 0x7c, 0x80, 0x6d, 0x6f, 0x73, 0xac, 0xf0, - 0xee, 0x50, 0x76, 0xd2, 0x67, 0x02, 0x54, 0x93, 0x28, 0x5c, 0xd8, 0xe9, 0x0c, 0x5d, 0x9e, 0x17, - 0x3c, 0xbf, 0x6c, 0x26, 0xfa, 0x65, 0x38, 0xbf, 0x70, 0xb4, 0xb8, 0x01, 0xe1, 0x00, 0xd5, 0x1f, - 0x12, 0x35, 0x98, 0x8f, 0x91, 0x70, 0xf6, 0xb5, 0x11, 0x3d, 0x24, 0xac, 0x8e, 0xae, 0x5c, 0x3e, - 0xcb, 0x70, 0x10, 0x7c, 0x26, 0x00, 0x8a, 0x53, 0x20, 0x1b, 0x16, 0x82, 0x8a, 0x36, 0x68, 0xfa, - 0x7a, 0x0a, 0x59, 0x9c, 0x21, 0x66, 0x34, 0x6a, 0xc7, 0x26, 0x44, 0x13, 0x16, 0x13, 0xc8, 0x9f, - 0xc7, 0x01, 0x1c, 0x6c, 0x86, 0x1c, 0xf0, 0x61, 0x36, 0x38, 0x95, 0x05, 0x14, 0x8e, 0x03, 0xfc, - 0xec, 0x16, 0xe4, 0x9e, 0x91, 0x0e, 0x88, 0x73, 0xe2, 0x0c, 0xb9, 0x0e, 0x30, 0x63, 0x13, 0x62, - 0x1f, 0x16, 0x13, 0xc8, 0x39, 0x0e, 0x68, 0x46, 0x1d, 0x70, 0x2d, 0x85, 0x52, 0x9b, 0xfa, 0x11, - 0x09, 0x3b, 0xe1, 0x2f, 0x79, 0x78, 0x8d, 0x4f, 0x85, 0x2e, 0xc3, 0x3c, 0x69, 0xab, 0x2d, 0xc3, - 0x24, 0x06, 0x36, 0xed, 0x53, 0x96, 0xea, 0x99, 0x16, 0x67, 0x49, 0x5b, 0xdd, 0x73, 0xc7, 0x69, - 0xb6, 0xaf, 0x41, 0x59, 0xb5, 0x5a, 0x0e, 0xc6, 0xfd, 0x98, 0x71, 0xe1, 0x3d, 0xa7, 0x5a, 0x3b, - 0xa4, 0x83, 0x3d, 0x19, 0xe8, 0x0a, 0x20, 0xd5, 0x6a, 0x59, 0x6d, 0x45, 0x53, 0x82, 0xf8, 0x72, - 0xbf, 0x0b, 0x94, 0x55, 0x6b, 0x9f, 0x4e, 0xf8, 0xd4, 0x57, 0x01, 0xb9, 0x7b, 0x80, 0x3b, 0xad, - 0x27, 0x3d, 0x45, 0xb7, 0x55, 0xfb, 0x94, 0x96, 0x2a, 0x41, 0x9e, 0xf7, 0x67, 0xde, 0x75, 0x27, - 0xd0, 0x2a, 0xaf, 0xe8, 0xb0, 0xea, 0x15, 0xaf, 0x23, 0xdb, 0x90, 0xc3, 0x7a, 0xdf, 0xaa, 0xe4, - 0xc7, 0xbc, 0x59, 0x8d, 0xba, 0xa7, 0xde, 0xd4, 0xfb, 0x6e, 0x40, 0x53, 0x36, 0xe8, 0x30, 0x5a, - 0x3a, 0xd8, 0x6d, 0xc5, 0xdd, 0xb4, 0x5c, 0x87, 0x9f, 0x67, 0xf6, 0x63, 0x2d, 0x59, 0x71, 0x82, - 0x46, 0x61, 0xa0, 0xfb, 0xfa, 0x09, 0x9c, 0x0b, 0x3e, 0xec, 0x58, 0x96, 0xfb, 0xf1, 0xc6, 0x2b, - 0x7e, 0x0f, 0xd3, 0x5a, 0xe0, 0x7f, 0x06, 0x0a, 0x58, 0x31, 0x4b, 0x16, 0xec, 0xf8, 0x8c, 0x78, - 0x13, 0x4a, 0xbe, 0x23, 0x5f, 0x65, 0x0d, 0x14, 0xef, 0x43, 0x25, 0x49, 0xd3, 0x30, 0x9f, 0x1c, - 0x87, 0x4f, 0x2e, 0x0c, 0xa0, 0x43, 0x58, 0x7e, 0x80, 0x6d, 0x9f, 0xd5, 0x53, 0xc5, 0xc4, 0x41, - 0xba, 0x1d, 0x75, 0xd9, 0x1c, 0x6f, 0x5a, 0xb2, 0x9c, 0xa6, 0x45, 0xfa, 0x79, 0x16, 0x5e, 0x1f, - 0x22, 0x64, 0xd4, 0x29, 0x31, 0x7c, 0x00, 0xcc, 0x46, 0x0f, 0x80, 0xb1, 0x03, 0xe4, 0x14, 0xe7, - 0x00, 0xf9, 0x0b, 0x01, 0xa4, 0x50, 0xd3, 0xe4, 0xc7, 0x8a, 0xa3, 0x46, 0xa8, 0x44, 0xb0, 0x8f, - 0x69, 0x6f, 0x8f, 0xd1, 0x48, 0xf1, 0xed, 0xb8, 0xd4, 0x1e, 0x4e, 0x20, 0xfd, 0x35, 0x0b, 0x97, - 0x46, 0x30, 0xe1, 0x78, 0x54, 0xe0, 0xb5, 0x81, 0x3f, 0x13, 0x60, 0x21, 0x48, 0x2c, 0x81, 0x0d, - 0x59, 0x1a, 0xf3, 0x7b, 0x93, 0xda, 0x50, 0x6f, 0x78, 0x3c, 0x07, 0x6b, 0x9e, 0x12, 0x9b, 0x10, - 0x7b, 0xb0, 0x98, 0x40, 0xce, 0x09, 0xe4, 0x8d, 0x68, 0xca, 0xaf, 0x8f, 0x3c, 0x9b, 0x45, 0x14, - 0x0b, 0x07, 0xec, 0x3f, 0xa6, 0xe0, 0x3c, 0x97, 0x88, 0x9b, 0xc4, 0x85, 0x14, 0x49, 0x3c, 0x9b, - 0x90, 0xc4, 0xaf, 0xc1, 0x82, 0xd2, 0xed, 0x9a, 0xb8, 0x1b, 0xcd, 0xe2, 0x53, 0x34, 0x8b, 0xa3, - 0x60, 0xca, 0x4f, 0xe3, 0x77, 0xe1, 0x02, 0x31, 0xd5, 0xae, 0xaa, 0x2b, 0x5a, 0x8b, 0xb7, 0x92, - 0xe5, 0x7f, 0xd1, 0xa3, 0x69, 0xc4, 0x39, 0x10, 0xb8, 0x30, 0x10, 0xa7, 0xde, 0xe2, 0x96, 0xa6, - 0x5a, 0x4e, 0x4d, 0x98, 0x1a, 0xdf, 0x8b, 0x1e, 0x57, 0x79, 0xc9, 0xe6, 0x0d, 0x3b, 0x29, 0x16, - 0x7d, 0x20, 0xc0, 0x8a, 0xaf, 0xf3, 0x50, 0xd1, 0xf9, 0x89, 0x44, 0xbf, 0xee, 0x31, 0x3f, 0x48, - 0x52, 0x41, 0xfa, 0x4f, 0x76, 0x60, 0x63, 0x7d, 0x6f, 0xac, 0x84, 0xca, 0x06, 0x8b, 0x22, 0x81, - 0x7a, 0xd0, 0x2f, 0x04, 0xef, 0x39, 0x83, 0x08, 0x41, 0xce, 0xd9, 0x7c, 0x37, 0xc7, 0xd1, 0x67, - 0x3a, 0x16, 0x34, 0x8e, 0xf4, 0xd9, 0x19, 0xa3, 0x6d, 0x21, 0xeb, 0x18, 0xe9, 0x33, 0xda, 0x86, - 0x39, 0xdf, 0x6a, 0x0d, 0xf7, 0xb1, 0x36, 0xf2, 0x5e, 0xc5, 0x53, 0x75, 0xcb, 0xa1, 0x96, 0x67, - 0xed, 0xf0, 0xeb, 0xe0, 0xed, 0x5d, 0x7e, 0xc4, 0xf5, 0x03, 0xd7, 0xec, 0x11, 0xfd, 0xd7, 0xf3, - 0x36, 0x51, 0x57, 0x61, 0x75, 0x30, 0x27, 0xbb, 0x70, 0x56, 0x0e, 0xb5, 0x58, 0x0d, 0x90, 0xfe, - 0x96, 0x85, 0x2b, 0xe3, 0xd1, 0xbb, 0xe9, 0xfc, 0x37, 0x02, 0x9c, 0x57, 0x02, 0x82, 0xd8, 0x59, - 0xbc, 0x35, 0xac, 0x0d, 0x19, 0x5b, 0x4c, 0x9d, 0x37, 0xc9, 0xbc, 0x75, 0x4e, 0xe1, 0x4c, 0x89, - 0x1f, 0x0a, 0xb0, 0x94, 0xb8, 0x86, 0xe3, 0xc0, 0xdd, 0x68, 0xe2, 0x4a, 0x3e, 0x66, 0x85, 0x98, - 0x8e, 0xcc, 0x61, 0x1f, 0xe5, 0x60, 0x79, 0x14, 0xfd, 0x4b, 0x4b, 0x67, 0xf7, 0xe1, 0x52, 0x28, - 0x29, 0x85, 0xb7, 0x68, 0x20, 0xb5, 0x5d, 0x0c, 0xc8, 0x42, 0xca, 0xfa, 0xa8, 0xfc, 0xa5, 0x00, - 0xb5, 0x81, 0x4c, 0xc1, 0x63, 0xc6, 0xb2, 0x46, 0x6e, 0xa2, 0xac, 0xf1, 0x86, 0x9d, 0x10, 0x07, - 0x91, 0xdc, 0x75, 0x17, 0x2e, 0x84, 0x0c, 0x6a, 0x2b, 0x86, 0xd2, 0x76, 0xe4, 0xfa, 0xd6, 0x4c, - 0xb3, 0x74, 0x1b, 0xd0, 0xac, 0xbb, 0x24, 0xbe, 0x29, 0x4e, 0xf6, 0x1b, 0x30, 0x25, 0xc6, 0xe6, - 0xb9, 0xb2, 0x5f, 0xc4, 0x8e, 0x41, 0xf1, 0x34, 0xfb, 0xfd, 0x56, 0x80, 0xca, 0x9e, 0xfb, 0xe3, - 0x52, 0xa8, 0x95, 0xfc, 0x42, 0xfc, 0x94, 0x23, 0x7d, 0x0d, 0x96, 0x38, 0xba, 0x31, 0x04, 0x5e, - 0xbe, 0x03, 0xb3, 0x91, 0x3b, 0x66, 0x54, 0x84, 0xdc, 0xe6, 0xce, 0xe6, 0x41, 0x39, 0xe3, 0x3c, - 0x6d, 0x37, 0x36, 0x77, 0xca, 0x02, 0x9a, 0x81, 0xc2, 0xfe, 0xe6, 0x46, 0x73, 0xbd, 0x21, 0x97, - 0xb3, 0x68, 0x16, 0x4a, 0xcd, 0xbd, 0x87, 0xcd, 0xed, 0xa6, 0xdc, 0xd8, 0x2a, 0x4f, 0x5d, 0x5e, - 0x81, 0xd9, 0x48, 0x32, 0x75, 0x96, 0xed, 0x3c, 0xda, 0x6e, 0x94, 0x33, 0x08, 0x20, 0xbf, 0xbf, - 0xbb, 0xfe, 0xbd, 0xe6, 0x41, 0x59, 0x58, 0x3b, 0x82, 0x33, 0xec, 0x2f, 0x2b, 0x93, 0x35, 0xba, - 0xef, 0x41, 0xd1, 0xfb, 0xeb, 0x0a, 0xd5, 0x86, 0x9c, 0xf2, 0x23, 0x3f, 0x66, 0x89, 0xd5, 0x44, - 0x4a, 0x76, 0x75, 0x93, 0x59, 0xfb, 0x35, 0xc0, 0x5c, 0xf4, 0xc7, 0x29, 0xa4, 0x43, 0x39, 0x94, - 0x94, 0x58, 0xdb, 0x51, 0x1b, 0xf7, 0x57, 0x16, 0xb1, 0x9e, 0xee, 0xab, 0x8d, 0x94, 0x41, 0x4f, - 0x61, 0xe1, 0x01, 0xb6, 0xf7, 0x48, 0x27, 0x2a, 0x72, 0x35, 0xc5, 0xff, 0x02, 0xe2, 0xf5, 0xd4, - 0xdf, 0x69, 0xa5, 0x0c, 0xea, 0x40, 0xc9, 0xbf, 0x8b, 0x42, 0xdf, 0x1c, 0xa2, 0x77, 0xf4, 0x72, - 0x4b, 0xbc, 0x3c, 0x0e, 0xa9, 0x2f, 0xe5, 0x57, 0x02, 0xbc, 0xc6, 0xbf, 0x6b, 0x42, 0x37, 0x52, - 0x5f, 0x4e, 0x31, 0x05, 0x6e, 0x4e, 0x78, 0xa9, 0x25, 0x65, 0x9c, 0x42, 0xb5, 0x94, 0xd8, 0x9d, - 0xa0, 0x5b, 0x63, 0x97, 0xa9, 0xc1, 0x92, 0x29, 0xde, 0x9e, 0x64, 0xa9, 0xaf, 0xd6, 0x9f, 0x04, - 0x78, 0x63, 0x9c, 0x4a, 0x88, 0x36, 0x9e, 0xb3, 0x90, 0x32, 0x65, 0x9b, 0x2f, 0xa4, 0x1c, 0x4b, - 0x19, 0xa4, 0x41, 0x25, 0xe4, 0xf2, 0xe8, 0x6f, 0x9b, 0x23, 0xc0, 0x27, 0xa6, 0xfc, 0x93, 0x51, - 0xca, 0xa0, 0xc7, 0x50, 0xf4, 0x9a, 0x90, 0x14, 0x88, 0x7c, 0x6b, 0x82, 0x4f, 0x35, 0x14, 0x96, - 0x73, 0x9e, 0xb0, 0xfb, 0xc4, 0x74, 0x20, 0x92, 0x0a, 0x91, 0x37, 0x26, 0xbb, 0x87, 0x97, 0x32, - 0xe8, 0xa7, 0x30, 0x1f, 0xcb, 0xbf, 0x68, 0x08, 0xc0, 0x13, 0xea, 0x88, 0xb8, 0x96, 0x66, 0x89, - 0x27, 0xfd, 0xde, 0x9b, 0x1f, 0x7f, 0x52, 0x15, 0xfe, 0xf9, 0x49, 0x35, 0xf3, 0xc1, 0xb3, 0xaa, - 0xf0, 0xf1, 0xb3, 0xaa, 0xf0, 0xf7, 0x67, 0x55, 0xe1, 0x5f, 0xcf, 0xaa, 0xc2, 0x47, 0x9f, 0x56, - 0x33, 0xef, 0x17, 0x3d, 0x1e, 0x87, 0x79, 0xfa, 0xd7, 0xee, 0x5b, 0xff, 0x0b, 0x00, 0x00, 0xff, - 0xff, 0x4c, 0xef, 0x3f, 0xf7, 0x0a, 0x2c, 0x00, 0x00, +func (m *AssociatedDevice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AssociatedDevice.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// RegistrationClient is the client API for Registration service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type RegistrationClient interface { - Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*Empty, error) +func (m *AssociatedDevice) XXX_Merge(src proto.Message) { + xxx_messageInfo_AssociatedDevice.Merge(m, src) } - -type registrationClient struct { - cc *grpc.ClientConn +func (m *AssociatedDevice) XXX_Size() int { + return m.Size() } - -func NewRegistrationClient(cc *grpc.ClientConn) RegistrationClient { - return ®istrationClient{cc} +func (m *AssociatedDevice) XXX_DiscardUnknown() { + xxx_messageInfo_AssociatedDevice.DiscardUnknown(m) } -func (c *registrationClient) Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*Empty, error) { - out := new(Empty) - err := c.cc.Invoke(ctx, "/resourceplugin.v1alpha1.Registration/Register", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_AssociatedDevice proto.InternalMessageInfo + +func (m *AssociatedDevice) GetID() string { + if m != nil { + return m.ID } - return out, nil + return "" } -// RegistrationServer is the server API for Registration service. -type RegistrationServer interface { - Register(context.Context, *RegisterRequest) (*Empty, error) +func (m *AssociatedDevice) GetHealth() string { + if m != nil { + return m.Health + } + return "" } -// UnimplementedRegistrationServer can be embedded to have forward compatible implementations. -type UnimplementedRegistrationServer struct { +func (m *AssociatedDevice) GetTopology() *TopologyInfo { + if m != nil { + return m.Topology + } + return nil } -func (*UnimplementedRegistrationServer) Register(ctx context.Context, req *RegisterRequest) (*Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method Register not implemented") +// TopologyInfo contains the NUMA node information for a device. +type TopologyInfo struct { + Nodes []*NUMANode `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` } -func RegisterRegistrationServer(s *grpc.Server, srv RegistrationServer) { - s.RegisterService(&_Registration_serviceDesc, srv) +func (m *TopologyInfo) Reset() { *m = TopologyInfo{} } +func (*TopologyInfo) ProtoMessage() {} +func (*TopologyInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_00212fb1f9d3bf1c, []int{29} } - -func _Registration_Register_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RegisterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RegistrationServer).Register(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/resourceplugin.v1alpha1.Registration/Register", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RegistrationServer).Register(ctx, req.(*RegisterRequest)) +func (m *TopologyInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TopologyInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TopologyInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return interceptor(ctx, in, info, handler) } - -var _Registration_serviceDesc = grpc.ServiceDesc{ - ServiceName: "resourceplugin.v1alpha1.Registration", - HandlerType: (*RegistrationServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Register", - Handler: _Registration_Register_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "api.proto", +func (m *TopologyInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_TopologyInfo.Merge(m, src) } - -// ResourcePluginClient is the client API for ResourcePlugin service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ResourcePluginClient interface { - // GetTopologyHints returns hints of corresponding resources - GetTopologyHints(ctx context.Context, in *ResourceRequest, opts ...grpc.CallOption) (*ResourceHintsResponse, error) - // GetPodTopologyHints returns hints of corresponding resources for pod - GetPodTopologyHints(ctx context.Context, in *PodResourceRequest, opts ...grpc.CallOption) (*PodResourceHintsResponse, error) - // Notify the resource plugin that the pod has beed deleted, - // and the plugin should do some clear-up work. - RemovePod(ctx context.Context, in *RemovePodRequest, opts ...grpc.CallOption) (*RemovePodResponse, error) - // GetResourcesAllocation returns allocation results of corresponding resources - GetResourcesAllocation(ctx context.Context, in *GetResourcesAllocationRequest, opts ...grpc.CallOption) (*GetResourcesAllocationResponse, error) - // GetTopologyAwareResources returns allocation results of corresponding resources as topology aware format - GetTopologyAwareResources(ctx context.Context, in *GetTopologyAwareResourcesRequest, opts ...grpc.CallOption) (*GetTopologyAwareResourcesResponse, error) - // GetTopologyAwareResources returns corresponding allocatable resources as topology aware format - GetTopologyAwareAllocatableResources(ctx context.Context, in *GetTopologyAwareAllocatableResourcesRequest, opts ...grpc.CallOption) (*GetTopologyAwareAllocatableResourcesResponse, error) - // GetResourcePluginOptions returns options to be communicated with Resource - // Manager - GetResourcePluginOptions(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ResourcePluginOptions, error) - // Allocate is called during pod admit so that the resource - // plugin can allocate corresponding resource for the container - // according to resource request - Allocate(ctx context.Context, in *ResourceRequest, opts ...grpc.CallOption) (*ResourceAllocationResponse, error) - // AllocateForPod is called during pod admit so that the resource - // plugin can allocate corresponding resource for the pod - // according to resource request - AllocateForPod(ctx context.Context, in *PodResourceRequest, opts ...grpc.CallOption) (*PodResourceAllocationResponse, error) - // PreStartContainer is called, if indicated by resource plugin during registeration phase, - // before each container start. Resource plugin can run resource specific operations - // such as resetting the resource before making resources available to the container - PreStartContainer(ctx context.Context, in *PreStartContainerRequest, opts ...grpc.CallOption) (*PreStartContainerResponse, error) +func (m *TopologyInfo) XXX_Size() int { + return m.Size() } - -type resourcePluginClient struct { - cc *grpc.ClientConn +func (m *TopologyInfo) XXX_DiscardUnknown() { + xxx_messageInfo_TopologyInfo.DiscardUnknown(m) } -func NewResourcePluginClient(cc *grpc.ClientConn) ResourcePluginClient { - return &resourcePluginClient{cc} -} +var xxx_messageInfo_TopologyInfo proto.InternalMessageInfo -func (c *resourcePluginClient) GetTopologyHints(ctx context.Context, in *ResourceRequest, opts ...grpc.CallOption) (*ResourceHintsResponse, error) { - out := new(ResourceHintsResponse) - err := c.cc.Invoke(ctx, "/resourceplugin.v1alpha1.ResourcePlugin/GetTopologyHints", in, out, opts...) - if err != nil { - return nil, err +func (m *TopologyInfo) GetNodes() []*NUMANode { + if m != nil { + return m.Nodes } - return out, nil + return nil } -func (c *resourcePluginClient) GetPodTopologyHints(ctx context.Context, in *PodResourceRequest, opts ...grpc.CallOption) (*PodResourceHintsResponse, error) { - out := new(PodResourceHintsResponse) - err := c.cc.Invoke(ctx, "/resourceplugin.v1alpha1.ResourcePlugin/GetPodTopologyHints", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +// NUMANode represents a NUMA node. +type NUMANode struct { + ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (c *resourcePluginClient) RemovePod(ctx context.Context, in *RemovePodRequest, opts ...grpc.CallOption) (*RemovePodResponse, error) { - out := new(RemovePodResponse) - err := c.cc.Invoke(ctx, "/resourceplugin.v1alpha1.ResourcePlugin/RemovePod", in, out, opts...) - if err != nil { - return nil, err +func (m *NUMANode) Reset() { *m = NUMANode{} } +func (*NUMANode) ProtoMessage() {} +func (*NUMANode) Descriptor() ([]byte, []int) { + return fileDescriptor_00212fb1f9d3bf1c, []int{30} +} +func (m *NUMANode) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NUMANode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NUMANode.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *NUMANode) XXX_Merge(src proto.Message) { + xxx_messageInfo_NUMANode.Merge(m, src) +} +func (m *NUMANode) XXX_Size() int { + return m.Size() +} +func (m *NUMANode) XXX_DiscardUnknown() { + xxx_messageInfo_NUMANode.DiscardUnknown(m) } -func (c *resourcePluginClient) GetResourcesAllocation(ctx context.Context, in *GetResourcesAllocationRequest, opts ...grpc.CallOption) (*GetResourcesAllocationResponse, error) { - out := new(GetResourcesAllocationResponse) - err := c.cc.Invoke(ctx, "/resourceplugin.v1alpha1.ResourcePlugin/GetResourcesAllocation", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_NUMANode proto.InternalMessageInfo + +func (m *NUMANode) GetID() int64 { + if m != nil { + return m.ID } - return out, nil + return 0 } -func (c *resourcePluginClient) GetTopologyAwareResources(ctx context.Context, in *GetTopologyAwareResourcesRequest, opts ...grpc.CallOption) (*GetTopologyAwareResourcesResponse, error) { - out := new(GetTopologyAwareResourcesResponse) - err := c.cc.Invoke(ctx, "/resourceplugin.v1alpha1.ResourcePlugin/GetTopologyAwareResources", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +// UpdateAllocatableAssociatedDevicesRequest is the request sent to a resource plugin +// to update its knowledge of allocatable devices. +type UpdateAllocatableAssociatedDevicesRequest struct { + DeviceName string `protobuf:"bytes,1,opt,name=device_name,json=deviceName,proto3" json:"device_name,omitempty"` + Devices []*AssociatedDevice `protobuf:"bytes,2,rep,name=devices,proto3" json:"devices,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (c *resourcePluginClient) GetTopologyAwareAllocatableResources(ctx context.Context, in *GetTopologyAwareAllocatableResourcesRequest, opts ...grpc.CallOption) (*GetTopologyAwareAllocatableResourcesResponse, error) { - out := new(GetTopologyAwareAllocatableResourcesResponse) - err := c.cc.Invoke(ctx, "/resourceplugin.v1alpha1.ResourcePlugin/GetTopologyAwareAllocatableResources", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +func (m *UpdateAllocatableAssociatedDevicesRequest) Reset() { + *m = UpdateAllocatableAssociatedDevicesRequest{} } - -func (c *resourcePluginClient) GetResourcePluginOptions(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ResourcePluginOptions, error) { - out := new(ResourcePluginOptions) - err := c.cc.Invoke(ctx, "/resourceplugin.v1alpha1.ResourcePlugin/GetResourcePluginOptions", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +func (*UpdateAllocatableAssociatedDevicesRequest) ProtoMessage() {} +func (*UpdateAllocatableAssociatedDevicesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_00212fb1f9d3bf1c, []int{31} } - -func (c *resourcePluginClient) Allocate(ctx context.Context, in *ResourceRequest, opts ...grpc.CallOption) (*ResourceAllocationResponse, error) { - out := new(ResourceAllocationResponse) - err := c.cc.Invoke(ctx, "/resourceplugin.v1alpha1.ResourcePlugin/Allocate", in, out, opts...) - if err != nil { - return nil, err +func (m *UpdateAllocatableAssociatedDevicesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UpdateAllocatableAssociatedDevicesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UpdateAllocatableAssociatedDevicesRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *UpdateAllocatableAssociatedDevicesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateAllocatableAssociatedDevicesRequest.Merge(m, src) +} +func (m *UpdateAllocatableAssociatedDevicesRequest) XXX_Size() int { + return m.Size() +} +func (m *UpdateAllocatableAssociatedDevicesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateAllocatableAssociatedDevicesRequest.DiscardUnknown(m) } -func (c *resourcePluginClient) AllocateForPod(ctx context.Context, in *PodResourceRequest, opts ...grpc.CallOption) (*PodResourceAllocationResponse, error) { - out := new(PodResourceAllocationResponse) - err := c.cc.Invoke(ctx, "/resourceplugin.v1alpha1.ResourcePlugin/AllocateForPod", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_UpdateAllocatableAssociatedDevicesRequest proto.InternalMessageInfo + +func (m *UpdateAllocatableAssociatedDevicesRequest) GetDeviceName() string { + if m != nil { + return m.DeviceName } - return out, nil + return "" } -func (c *resourcePluginClient) PreStartContainer(ctx context.Context, in *PreStartContainerRequest, opts ...grpc.CallOption) (*PreStartContainerResponse, error) { - out := new(PreStartContainerResponse) - err := c.cc.Invoke(ctx, "/resourceplugin.v1alpha1.ResourcePlugin/PreStartContainer", in, out, opts...) - if err != nil { - return nil, err +func (m *UpdateAllocatableAssociatedDevicesRequest) GetDevices() []*AssociatedDevice { + if m != nil { + return m.Devices } - return out, nil + return nil } -// ResourcePluginServer is the server API for ResourcePlugin service. -type ResourcePluginServer interface { - // GetTopologyHints returns hints of corresponding resources - GetTopologyHints(context.Context, *ResourceRequest) (*ResourceHintsResponse, error) - // GetPodTopologyHints returns hints of corresponding resources for pod - GetPodTopologyHints(context.Context, *PodResourceRequest) (*PodResourceHintsResponse, error) - // Notify the resource plugin that the pod has beed deleted, - // and the plugin should do some clear-up work. - RemovePod(context.Context, *RemovePodRequest) (*RemovePodResponse, error) - // GetResourcesAllocation returns allocation results of corresponding resources - GetResourcesAllocation(context.Context, *GetResourcesAllocationRequest) (*GetResourcesAllocationResponse, error) - // GetTopologyAwareResources returns allocation results of corresponding resources as topology aware format - GetTopologyAwareResources(context.Context, *GetTopologyAwareResourcesRequest) (*GetTopologyAwareResourcesResponse, error) - // GetTopologyAwareResources returns corresponding allocatable resources as topology aware format - GetTopologyAwareAllocatableResources(context.Context, *GetTopologyAwareAllocatableResourcesRequest) (*GetTopologyAwareAllocatableResourcesResponse, error) - // GetResourcePluginOptions returns options to be communicated with Resource - // Manager - GetResourcePluginOptions(context.Context, *Empty) (*ResourcePluginOptions, error) - // Allocate is called during pod admit so that the resource - // plugin can allocate corresponding resource for the container - // according to resource request - Allocate(context.Context, *ResourceRequest) (*ResourceAllocationResponse, error) - // AllocateForPod is called during pod admit so that the resource - // plugin can allocate corresponding resource for the pod - // according to resource request - AllocateForPod(context.Context, *PodResourceRequest) (*PodResourceAllocationResponse, error) - // PreStartContainer is called, if indicated by resource plugin during registeration phase, - // before each container start. Resource plugin can run resource specific operations - // such as resetting the resource before making resources available to the container - PreStartContainer(context.Context, *PreStartContainerRequest) (*PreStartContainerResponse, error) +// UpdateAllocatableAssociatedDevicesResponse is the empty response from the resource plugin. +type UpdateAllocatableAssociatedDevicesResponse struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` } -// UnimplementedResourcePluginServer can be embedded to have forward compatible implementations. -type UnimplementedResourcePluginServer struct { +func (m *UpdateAllocatableAssociatedDevicesResponse) Reset() { + *m = UpdateAllocatableAssociatedDevicesResponse{} } - -func (*UnimplementedResourcePluginServer) GetTopologyHints(ctx context.Context, req *ResourceRequest) (*ResourceHintsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTopologyHints not implemented") +func (*UpdateAllocatableAssociatedDevicesResponse) ProtoMessage() {} +func (*UpdateAllocatableAssociatedDevicesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_00212fb1f9d3bf1c, []int{32} } -func (*UnimplementedResourcePluginServer) GetPodTopologyHints(ctx context.Context, req *PodResourceRequest) (*PodResourceHintsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPodTopologyHints not implemented") +func (m *UpdateAllocatableAssociatedDevicesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } -func (*UnimplementedResourcePluginServer) RemovePod(ctx context.Context, req *RemovePodRequest) (*RemovePodResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RemovePod not implemented") +func (m *UpdateAllocatableAssociatedDevicesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UpdateAllocatableAssociatedDevicesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (*UnimplementedResourcePluginServer) GetResourcesAllocation(ctx context.Context, req *GetResourcesAllocationRequest) (*GetResourcesAllocationResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetResourcesAllocation not implemented") +func (m *UpdateAllocatableAssociatedDevicesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateAllocatableAssociatedDevicesResponse.Merge(m, src) } -func (*UnimplementedResourcePluginServer) GetTopologyAwareResources(ctx context.Context, req *GetTopologyAwareResourcesRequest) (*GetTopologyAwareResourcesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTopologyAwareResources not implemented") +func (m *UpdateAllocatableAssociatedDevicesResponse) XXX_Size() int { + return m.Size() } -func (*UnimplementedResourcePluginServer) GetTopologyAwareAllocatableResources(ctx context.Context, req *GetTopologyAwareAllocatableResourcesRequest) (*GetTopologyAwareAllocatableResourcesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTopologyAwareAllocatableResources not implemented") +func (m *UpdateAllocatableAssociatedDevicesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateAllocatableAssociatedDevicesResponse.DiscardUnknown(m) } -func (*UnimplementedResourcePluginServer) GetResourcePluginOptions(ctx context.Context, req *Empty) (*ResourcePluginOptions, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetResourcePluginOptions not implemented") + +var xxx_messageInfo_UpdateAllocatableAssociatedDevicesResponse proto.InternalMessageInfo + +// AssociatedDeviceRequest is the request sent to a resource plugin to allocate an associated device. +type AssociatedDeviceRequest struct { + ResourceRequest *ResourceRequest `protobuf:"bytes,1,opt,name=resource_request,json=resourceRequest,proto3" json:"resource_request,omitempty"` + DeviceRequest *DeviceRequest `protobuf:"bytes,2,opt,name=device_request,json=deviceRequest,proto3" json:"device_request,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (*UnimplementedResourcePluginServer) Allocate(ctx context.Context, req *ResourceRequest) (*ResourceAllocationResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Allocate not implemented") + +func (m *AssociatedDeviceRequest) Reset() { *m = AssociatedDeviceRequest{} } +func (*AssociatedDeviceRequest) ProtoMessage() {} +func (*AssociatedDeviceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_00212fb1f9d3bf1c, []int{33} } -func (*UnimplementedResourcePluginServer) AllocateForPod(ctx context.Context, req *PodResourceRequest) (*PodResourceAllocationResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AllocateForPod not implemented") +func (m *AssociatedDeviceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } -func (*UnimplementedResourcePluginServer) PreStartContainer(ctx context.Context, req *PreStartContainerRequest) (*PreStartContainerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PreStartContainer not implemented") +func (m *AssociatedDeviceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AssociatedDeviceRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } - -func RegisterResourcePluginServer(s *grpc.Server, srv ResourcePluginServer) { - s.RegisterService(&_ResourcePlugin_serviceDesc, srv) +func (m *AssociatedDeviceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_AssociatedDeviceRequest.Merge(m, src) +} +func (m *AssociatedDeviceRequest) XXX_Size() int { + return m.Size() +} +func (m *AssociatedDeviceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_AssociatedDeviceRequest.DiscardUnknown(m) } -func _ResourcePlugin_GetTopologyHints_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ResourceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ResourcePluginServer).GetTopologyHints(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/resourceplugin.v1alpha1.ResourcePlugin/GetTopologyHints", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ResourcePluginServer).GetTopologyHints(ctx, req.(*ResourceRequest)) +var xxx_messageInfo_AssociatedDeviceRequest proto.InternalMessageInfo + +func (m *AssociatedDeviceRequest) GetResourceRequest() *ResourceRequest { + if m != nil { + return m.ResourceRequest } - return interceptor(ctx, in, info, handler) + return nil } -func _ResourcePlugin_GetPodTopologyHints_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PodResourceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ResourcePluginServer).GetPodTopologyHints(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/resourceplugin.v1alpha1.ResourcePlugin/GetPodTopologyHints", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ResourcePluginServer).GetPodTopologyHints(ctx, req.(*PodResourceRequest)) +func (m *AssociatedDeviceRequest) GetDeviceRequest() *DeviceRequest { + if m != nil { + return m.DeviceRequest } - return interceptor(ctx, in, info, handler) + return nil } -func _ResourcePlugin_RemovePod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RemovePodRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ResourcePluginServer).RemovePod(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/resourceplugin.v1alpha1.ResourcePlugin/RemovePod", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ResourcePluginServer).RemovePod(ctx, req.(*RemovePodRequest)) - } - return interceptor(ctx, in, info, handler) +type DeviceRequest struct { + DeviceName string `protobuf:"bytes,1,opt,name=device_name,json=deviceName,proto3" json:"device_name,omitempty"` + Hint *TopologyHint `protobuf:"bytes,2,opt,name=hint,proto3" json:"hint,omitempty"` + AvailableDevices []string `protobuf:"bytes,3,rep,name=available_devices,json=availableDevices,proto3" json:"available_devices,omitempty"` + ReusableDevices []string `protobuf:"bytes,4,rep,name=reusable_devices,json=reusableDevices,proto3" json:"reusable_devices,omitempty"` + DeviceRequest uint64 `protobuf:"varint,5,opt,name=device_request,json=deviceRequest,proto3" json:"device_request,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` } -func _ResourcePlugin_GetResourcesAllocation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetResourcesAllocationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ResourcePluginServer).GetResourcesAllocation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/resourceplugin.v1alpha1.ResourcePlugin/GetResourcesAllocation", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ResourcePluginServer).GetResourcesAllocation(ctx, req.(*GetResourcesAllocationRequest)) +func (m *DeviceRequest) Reset() { *m = DeviceRequest{} } +func (*DeviceRequest) ProtoMessage() {} +func (*DeviceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_00212fb1f9d3bf1c, []int{34} +} +func (m *DeviceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeviceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeviceRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return interceptor(ctx, in, info, handler) +} +func (m *DeviceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeviceRequest.Merge(m, src) +} +func (m *DeviceRequest) XXX_Size() int { + return m.Size() +} +func (m *DeviceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DeviceRequest.DiscardUnknown(m) } -func _ResourcePlugin_GetTopologyAwareResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetTopologyAwareResourcesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ResourcePluginServer).GetTopologyAwareResources(ctx, in) +var xxx_messageInfo_DeviceRequest proto.InternalMessageInfo + +func (m *DeviceRequest) GetDeviceName() string { + if m != nil { + return m.DeviceName } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/resourceplugin.v1alpha1.ResourcePlugin/GetTopologyAwareResources", + return "" +} + +func (m *DeviceRequest) GetHint() *TopologyHint { + if m != nil { + return m.Hint } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ResourcePluginServer).GetTopologyAwareResources(ctx, req.(*GetTopologyAwareResourcesRequest)) + return nil +} + +func (m *DeviceRequest) GetAvailableDevices() []string { + if m != nil { + return m.AvailableDevices } - return interceptor(ctx, in, info, handler) + return nil } -func _ResourcePlugin_GetTopologyAwareAllocatableResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetTopologyAwareAllocatableResourcesRequest) - if err := dec(in); err != nil { - return nil, err +func (m *DeviceRequest) GetReusableDevices() []string { + if m != nil { + return m.ReusableDevices } - if interceptor == nil { - return srv.(ResourcePluginServer).GetTopologyAwareAllocatableResources(ctx, in) + return nil +} + +func (m *DeviceRequest) GetDeviceRequest() uint64 { + if m != nil { + return m.DeviceRequest } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/resourceplugin.v1alpha1.ResourcePlugin/GetTopologyAwareAllocatableResources", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ResourcePluginServer).GetTopologyAwareAllocatableResources(ctx, req.(*GetTopologyAwareAllocatableResourcesRequest)) - } - return interceptor(ctx, in, info, handler) + return 0 } -func _ResourcePlugin_GetResourcePluginOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ResourcePluginServer).GetResourcePluginOptions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/resourceplugin.v1alpha1.ResourcePlugin/GetResourcePluginOptions", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ResourcePluginServer).GetResourcePluginOptions(ctx, req.(*Empty)) - } - return interceptor(ctx, in, info, handler) +// AssociatedDeviceAllocationResponse contains the result of an associated device allocation. +type AssociatedDeviceAllocationResponse struct { + AllocationResult *AssociatedDeviceAllocation `protobuf:"bytes,1,opt,name=allocation_result,json=allocationResult,proto3" json:"allocation_result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` } -func _ResourcePlugin_Allocate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ResourceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ResourcePluginServer).Allocate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/resourceplugin.v1alpha1.ResourcePlugin/Allocate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ResourcePluginServer).Allocate(ctx, req.(*ResourceRequest)) +func (m *AssociatedDeviceAllocationResponse) Reset() { *m = AssociatedDeviceAllocationResponse{} } +func (*AssociatedDeviceAllocationResponse) ProtoMessage() {} +func (*AssociatedDeviceAllocationResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_00212fb1f9d3bf1c, []int{35} +} +func (m *AssociatedDeviceAllocationResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AssociatedDeviceAllocationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AssociatedDeviceAllocationResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return interceptor(ctx, in, info, handler) +} +func (m *AssociatedDeviceAllocationResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_AssociatedDeviceAllocationResponse.Merge(m, src) +} +func (m *AssociatedDeviceAllocationResponse) XXX_Size() int { + return m.Size() +} +func (m *AssociatedDeviceAllocationResponse) XXX_DiscardUnknown() { + xxx_messageInfo_AssociatedDeviceAllocationResponse.DiscardUnknown(m) } -func _ResourcePlugin_AllocateForPod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PodResourceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ResourcePluginServer).AllocateForPod(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/resourceplugin.v1alpha1.ResourcePlugin/AllocateForPod", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ResourcePluginServer).AllocateForPod(ctx, req.(*PodResourceRequest)) +var xxx_messageInfo_AssociatedDeviceAllocationResponse proto.InternalMessageInfo + +func (m *AssociatedDeviceAllocationResponse) GetAllocationResult() *AssociatedDeviceAllocation { + if m != nil { + return m.AllocationResult } - return interceptor(ctx, in, info, handler) + return nil } -func _ResourcePlugin_PreStartContainer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PreStartContainerRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ResourcePluginServer).PreStartContainer(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/resourceplugin.v1alpha1.ResourcePlugin/PreStartContainer", +// AssociatedDeviceAllocation represents the result of an allocation. +type AssociatedDeviceAllocation struct { + AllocatedDevices []string `protobuf:"bytes,1,rep,name=allocated_devices,json=allocatedDevices,proto3" json:"allocated_devices,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AssociatedDeviceAllocation) Reset() { *m = AssociatedDeviceAllocation{} } +func (*AssociatedDeviceAllocation) ProtoMessage() {} +func (*AssociatedDeviceAllocation) Descriptor() ([]byte, []int) { + return fileDescriptor_00212fb1f9d3bf1c, []int{36} +} +func (m *AssociatedDeviceAllocation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AssociatedDeviceAllocation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AssociatedDeviceAllocation.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ResourcePluginServer).PreStartContainer(ctx, req.(*PreStartContainerRequest)) +} +func (m *AssociatedDeviceAllocation) XXX_Merge(src proto.Message) { + xxx_messageInfo_AssociatedDeviceAllocation.Merge(m, src) +} +func (m *AssociatedDeviceAllocation) XXX_Size() int { + return m.Size() +} +func (m *AssociatedDeviceAllocation) XXX_DiscardUnknown() { + xxx_messageInfo_AssociatedDeviceAllocation.DiscardUnknown(m) +} + +var xxx_messageInfo_AssociatedDeviceAllocation proto.InternalMessageInfo + +func (m *AssociatedDeviceAllocation) GetAllocatedDevices() []string { + if m != nil { + return m.AllocatedDevices } - return interceptor(ctx, in, info, handler) + return nil } -var _ResourcePlugin_serviceDesc = grpc.ServiceDesc{ - ServiceName: "resourceplugin.v1alpha1.ResourcePlugin", - HandlerType: (*ResourcePluginServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetTopologyHints", - Handler: _ResourcePlugin_GetTopologyHints_Handler, - }, - { - MethodName: "GetPodTopologyHints", - Handler: _ResourcePlugin_GetPodTopologyHints_Handler, - }, - { - MethodName: "RemovePod", - Handler: _ResourcePlugin_RemovePod_Handler, - }, - { - MethodName: "GetResourcesAllocation", - Handler: _ResourcePlugin_GetResourcesAllocation_Handler, - }, - { - MethodName: "GetTopologyAwareResources", - Handler: _ResourcePlugin_GetTopologyAwareResources_Handler, - }, - { - MethodName: "GetTopologyAwareAllocatableResources", - Handler: _ResourcePlugin_GetTopologyAwareAllocatableResources_Handler, - }, - { - MethodName: "GetResourcePluginOptions", - Handler: _ResourcePlugin_GetResourcePluginOptions_Handler, - }, - { - MethodName: "Allocate", - Handler: _ResourcePlugin_Allocate_Handler, - }, - { - MethodName: "AllocateForPod", - Handler: _ResourcePlugin_AllocateForPod_Handler, - }, - { - MethodName: "PreStartContainer", - Handler: _ResourcePlugin_PreStartContainer_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "api.proto", +type AssociatedDeviceHintsResponse struct { + PodUid string `protobuf:"bytes,1,opt,name=pod_uid,json=podUid,proto3" json:"pod_uid,omitempty"` + PodNamespace string `protobuf:"bytes,2,opt,name=pod_namespace,json=podNamespace,proto3" json:"pod_namespace,omitempty"` + PodName string `protobuf:"bytes,3,opt,name=pod_name,json=podName,proto3" json:"pod_name,omitempty"` + ContainerName string `protobuf:"bytes,4,opt,name=container_name,json=containerName,proto3" json:"container_name,omitempty"` + ContainerType ContainerType `protobuf:"varint,5,opt,name=container_type,json=containerType,proto3,enum=resourceplugin.v1alpha1.ContainerType" json:"container_type,omitempty"` + ContainerIndex uint64 `protobuf:"varint,6,opt,name=container_index,json=containerIndex,proto3" json:"container_index,omitempty"` + PodRole string `protobuf:"bytes,7,opt,name=pod_role,json=podRole,proto3" json:"pod_role,omitempty"` + PodType string `protobuf:"bytes,8,opt,name=pod_type,json=podType,proto3" json:"pod_type,omitempty"` + DeviceName string `protobuf:"bytes,9,opt,name=device_name,json=deviceName,proto3" json:"device_name,omitempty"` + DeviceHints *ListOfTopologyHints `protobuf:"bytes,10,opt,name=device_hints,json=deviceHints,proto3" json:"device_hints,omitempty"` + Labels map[string]string `protobuf:"bytes,11,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Annotations map[string]string `protobuf:"bytes,12,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AssociatedDeviceHintsResponse) Reset() { *m = AssociatedDeviceHintsResponse{} } +func (*AssociatedDeviceHintsResponse) ProtoMessage() {} +func (*AssociatedDeviceHintsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_00212fb1f9d3bf1c, []int{37} +} +func (m *AssociatedDeviceHintsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AssociatedDeviceHintsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AssociatedDeviceHintsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *AssociatedDeviceHintsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_AssociatedDeviceHintsResponse.Merge(m, src) +} +func (m *AssociatedDeviceHintsResponse) XXX_Size() int { + return m.Size() +} +func (m *AssociatedDeviceHintsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_AssociatedDeviceHintsResponse.DiscardUnknown(m) } -func (m *ResourcePluginOptions) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +var xxx_messageInfo_AssociatedDeviceHintsResponse proto.InternalMessageInfo + +func (m *AssociatedDeviceHintsResponse) GetPodUid() string { + if m != nil { + return m.PodUid } - return dAtA[:n], nil + return "" } -func (m *ResourcePluginOptions) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *AssociatedDeviceHintsResponse) GetPodNamespace() string { + if m != nil { + return m.PodNamespace + } + return "" } -func (m *ResourcePluginOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.NeedReconcile { - i-- - if m.NeedReconcile { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 +func (m *AssociatedDeviceHintsResponse) GetPodName() string { + if m != nil { + return m.PodName } - if m.WithTopologyAlignment { - i-- - if m.WithTopologyAlignment { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 + return "" +} + +func (m *AssociatedDeviceHintsResponse) GetContainerName() string { + if m != nil { + return m.ContainerName } - if m.PreStartRequired { - i-- - if m.PreStartRequired { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 + return "" +} + +func (m *AssociatedDeviceHintsResponse) GetContainerType() ContainerType { + if m != nil { + return m.ContainerType } - return len(dAtA) - i, nil + return ContainerType_INIT } -func (m *RegisterRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *AssociatedDeviceHintsResponse) GetContainerIndex() uint64 { + if m != nil { + return m.ContainerIndex } - return dAtA[:n], nil + return 0 } -func (m *RegisterRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *AssociatedDeviceHintsResponse) GetPodRole() string { + if m != nil { + return m.PodRole + } + return "" } -func (m *RegisterRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Options != nil { - { - size, err := m.Options.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApi(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 +func (m *AssociatedDeviceHintsResponse) GetPodType() string { + if m != nil { + return m.PodType } - if len(m.ResourceName) > 0 { - i -= len(m.ResourceName) - copy(dAtA[i:], m.ResourceName) - i = encodeVarintApi(dAtA, i, uint64(len(m.ResourceName))) - i-- - dAtA[i] = 0x1a + return "" +} + +func (m *AssociatedDeviceHintsResponse) GetDeviceName() string { + if m != nil { + return m.DeviceName } - if len(m.Endpoint) > 0 { - i -= len(m.Endpoint) - copy(dAtA[i:], m.Endpoint) - i = encodeVarintApi(dAtA, i, uint64(len(m.Endpoint))) - i-- - dAtA[i] = 0x12 + return "" +} + +func (m *AssociatedDeviceHintsResponse) GetDeviceHints() *ListOfTopologyHints { + if m != nil { + return m.DeviceHints } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintApi(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0xa + return nil +} + +func (m *AssociatedDeviceHintsResponse) GetLabels() map[string]string { + if m != nil { + return m.Labels } - return len(dAtA) - i, nil + return nil } -func (m *ResourceRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (m *AssociatedDeviceHintsResponse) GetAnnotations() map[string]string { + if m != nil { + return m.Annotations + } + return nil +} + +func init() { + proto.RegisterEnum("resourceplugin.v1alpha1.ContainerType", ContainerType_name, ContainerType_value) + proto.RegisterEnum("resourceplugin.v1alpha1.TopologyLevel", TopologyLevel_name, TopologyLevel_value) + proto.RegisterType((*ResourcePluginOptions)(nil), "resourceplugin.v1alpha1.ResourcePluginOptions") + proto.RegisterType((*RegisterRequest)(nil), "resourceplugin.v1alpha1.RegisterRequest") + proto.RegisterType((*ResourceRequest)(nil), "resourceplugin.v1alpha1.ResourceRequest") + proto.RegisterMapType((map[string]string)(nil), "resourceplugin.v1alpha1.ResourceRequest.AnnotationsEntry") + proto.RegisterMapType((map[string]string)(nil), "resourceplugin.v1alpha1.ResourceRequest.LabelsEntry") + proto.RegisterMapType((map[string]float64)(nil), "resourceplugin.v1alpha1.ResourceRequest.ResourceRequestsEntry") + proto.RegisterType((*PodResourceRequest)(nil), "resourceplugin.v1alpha1.PodResourceRequest") + proto.RegisterMapType((map[string]string)(nil), "resourceplugin.v1alpha1.PodResourceRequest.AnnotationsEntry") + proto.RegisterMapType((map[string]string)(nil), "resourceplugin.v1alpha1.PodResourceRequest.LabelsEntry") + proto.RegisterMapType((map[string]float64)(nil), "resourceplugin.v1alpha1.PodResourceRequest.ResourceRequestsEntry") + proto.RegisterType((*PodResourceHintsResponse)(nil), "resourceplugin.v1alpha1.PodResourceHintsResponse") + proto.RegisterMapType((map[string]string)(nil), "resourceplugin.v1alpha1.PodResourceHintsResponse.AnnotationsEntry") + proto.RegisterMapType((map[string]string)(nil), "resourceplugin.v1alpha1.PodResourceHintsResponse.LabelsEntry") + proto.RegisterMapType((map[string]*ListOfTopologyHints)(nil), "resourceplugin.v1alpha1.PodResourceHintsResponse.ResourceHintsEntry") + proto.RegisterType((*ResourceHintsResponse)(nil), "resourceplugin.v1alpha1.ResourceHintsResponse") + proto.RegisterMapType((map[string]string)(nil), "resourceplugin.v1alpha1.ResourceHintsResponse.AnnotationsEntry") + proto.RegisterMapType((map[string]string)(nil), "resourceplugin.v1alpha1.ResourceHintsResponse.LabelsEntry") + proto.RegisterMapType((map[string]*ListOfTopologyHints)(nil), "resourceplugin.v1alpha1.ResourceHintsResponse.ResourceHintsEntry") + proto.RegisterType((*ResourceAllocationResponse)(nil), "resourceplugin.v1alpha1.ResourceAllocationResponse") + proto.RegisterMapType((map[string]string)(nil), "resourceplugin.v1alpha1.ResourceAllocationResponse.AnnotationsEntry") + proto.RegisterMapType((map[string]string)(nil), "resourceplugin.v1alpha1.ResourceAllocationResponse.LabelsEntry") + proto.RegisterType((*PodResourceAllocationResponse)(nil), "resourceplugin.v1alpha1.PodResourceAllocationResponse") + proto.RegisterMapType((map[string]string)(nil), "resourceplugin.v1alpha1.PodResourceAllocationResponse.AnnotationsEntry") + proto.RegisterMapType((map[string]string)(nil), "resourceplugin.v1alpha1.PodResourceAllocationResponse.LabelsEntry") + proto.RegisterType((*ListOfTopologyHints)(nil), "resourceplugin.v1alpha1.ListOfTopologyHints") + proto.RegisterType((*TopologyHint)(nil), "resourceplugin.v1alpha1.TopologyHint") + proto.RegisterType((*Empty)(nil), "resourceplugin.v1alpha1.Empty") + proto.RegisterType((*RemovePodRequest)(nil), "resourceplugin.v1alpha1.RemovePodRequest") + proto.RegisterType((*RemovePodResponse)(nil), "resourceplugin.v1alpha1.RemovePodResponse") + proto.RegisterType((*GetResourcesAllocationRequest)(nil), "resourceplugin.v1alpha1.GetResourcesAllocationRequest") + proto.RegisterType((*GetResourcesAllocationResponse)(nil), "resourceplugin.v1alpha1.GetResourcesAllocationResponse") + proto.RegisterMapType((map[string]*ContainerResources)(nil), "resourceplugin.v1alpha1.GetResourcesAllocationResponse.PodResourcesEntry") + proto.RegisterType((*ContainerResources)(nil), "resourceplugin.v1alpha1.ContainerResources") + proto.RegisterMapType((map[string]*ResourceAllocation)(nil), "resourceplugin.v1alpha1.ContainerResources.ContainerResourcesEntry") + proto.RegisterType((*ResourceAllocation)(nil), "resourceplugin.v1alpha1.ResourceAllocation") + proto.RegisterMapType((map[string]*ResourceAllocationInfo)(nil), "resourceplugin.v1alpha1.ResourceAllocation.ResourceAllocationEntry") + proto.RegisterType((*ResourceAllocationInfo)(nil), "resourceplugin.v1alpha1.ResourceAllocationInfo") + proto.RegisterMapType((map[string]string)(nil), "resourceplugin.v1alpha1.ResourceAllocationInfo.AnnotationsEntry") + proto.RegisterMapType((map[string]string)(nil), "resourceplugin.v1alpha1.ResourceAllocationInfo.EnvsEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "resourceplugin.v1alpha1.ResourceAllocationInfo.TopologyAssignmentsEntry") + proto.RegisterType((*GetTopologyAwareResourcesRequest)(nil), "resourceplugin.v1alpha1.GetTopologyAwareResourcesRequest") + proto.RegisterType((*GetTopologyAwareResourcesResponse)(nil), "resourceplugin.v1alpha1.GetTopologyAwareResourcesResponse") + proto.RegisterType((*ContainerTopologyAwareResources)(nil), "resourceplugin.v1alpha1.ContainerTopologyAwareResources") + proto.RegisterMapType((map[string]*TopologyAwareResource)(nil), "resourceplugin.v1alpha1.ContainerTopologyAwareResources.AllocatedResourcesEntry") + proto.RegisterType((*TopologyAwareResource)(nil), "resourceplugin.v1alpha1.TopologyAwareResource") + proto.RegisterType((*TopologyAwareQuantity)(nil), "resourceplugin.v1alpha1.TopologyAwareQuantity") + proto.RegisterMapType((map[string]string)(nil), "resourceplugin.v1alpha1.TopologyAwareQuantity.AnnotationsEntry") + proto.RegisterType((*GetTopologyAwareAllocatableResourcesRequest)(nil), "resourceplugin.v1alpha1.GetTopologyAwareAllocatableResourcesRequest") + proto.RegisterType((*GetTopologyAwareAllocatableResourcesResponse)(nil), "resourceplugin.v1alpha1.GetTopologyAwareAllocatableResourcesResponse") + proto.RegisterMapType((map[string]*AllocatableTopologyAwareResource)(nil), "resourceplugin.v1alpha1.GetTopologyAwareAllocatableResourcesResponse.AllocatableResourcesEntry") + proto.RegisterType((*AllocatableTopologyAwareResource)(nil), "resourceplugin.v1alpha1.AllocatableTopologyAwareResource") + proto.RegisterType((*PreStartContainerRequest)(nil), "resourceplugin.v1alpha1.PreStartContainerRequest") + proto.RegisterType((*PreStartContainerResponse)(nil), "resourceplugin.v1alpha1.PreStartContainerResponse") + proto.RegisterType((*AssociatedDevice)(nil), "resourceplugin.v1alpha1.AssociatedDevice") + proto.RegisterType((*TopologyInfo)(nil), "resourceplugin.v1alpha1.TopologyInfo") + proto.RegisterType((*NUMANode)(nil), "resourceplugin.v1alpha1.NUMANode") + proto.RegisterType((*UpdateAllocatableAssociatedDevicesRequest)(nil), "resourceplugin.v1alpha1.UpdateAllocatableAssociatedDevicesRequest") + proto.RegisterType((*UpdateAllocatableAssociatedDevicesResponse)(nil), "resourceplugin.v1alpha1.UpdateAllocatableAssociatedDevicesResponse") + proto.RegisterType((*AssociatedDeviceRequest)(nil), "resourceplugin.v1alpha1.AssociatedDeviceRequest") + proto.RegisterType((*DeviceRequest)(nil), "resourceplugin.v1alpha1.DeviceRequest") + proto.RegisterType((*AssociatedDeviceAllocationResponse)(nil), "resourceplugin.v1alpha1.AssociatedDeviceAllocationResponse") + proto.RegisterType((*AssociatedDeviceAllocation)(nil), "resourceplugin.v1alpha1.AssociatedDeviceAllocation") + proto.RegisterType((*AssociatedDeviceHintsResponse)(nil), "resourceplugin.v1alpha1.AssociatedDeviceHintsResponse") + proto.RegisterMapType((map[string]string)(nil), "resourceplugin.v1alpha1.AssociatedDeviceHintsResponse.AnnotationsEntry") + proto.RegisterMapType((map[string]string)(nil), "resourceplugin.v1alpha1.AssociatedDeviceHintsResponse.LabelsEntry") +} + +func init() { proto.RegisterFile("api.proto", fileDescriptor_00212fb1f9d3bf1c) } + +var fileDescriptor_00212fb1f9d3bf1c = []byte{ + // 2629 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x3b, 0xcb, 0x6f, 0x1b, 0xc7, + 0xf9, 0x5c, 0x8a, 0xe2, 0xe3, 0x93, 0x28, 0x53, 0xa3, 0x38, 0xa2, 0xf7, 0x67, 0xcb, 0xf2, 0xfe, + 0xa2, 0x54, 0xb6, 0x6c, 0xba, 0x96, 0x0b, 0x3b, 0x76, 0xda, 0xd8, 0xb4, 0x24, 0xcb, 0x42, 0xad, + 0x47, 0x56, 0x76, 0x5a, 0xb8, 0x40, 0xd9, 0x15, 0x39, 0xa2, 0x16, 0x5e, 0xed, 0xae, 0x77, 0x97, + 0x74, 0x85, 0xb6, 0x40, 0x12, 0xb4, 0xb9, 0x14, 0x28, 0x52, 0xa0, 0xa7, 0x9e, 0xda, 0xbf, 0x20, + 0xa7, 0xf6, 0xd6, 0x5e, 0x7a, 0x09, 0x7a, 0x2a, 0x50, 0xa0, 0xe8, 0xad, 0x8d, 0xd3, 0x53, 0x51, + 0xa0, 0xff, 0x41, 0x50, 0xec, 0xcc, 0x3e, 0x66, 0x5f, 0xe4, 0x2e, 0xfd, 0x88, 0x83, 0xe4, 0xc6, + 0x9d, 0xf9, 0xe6, 0x9b, 0xef, 0xfd, 0x98, 0x19, 0x42, 0x45, 0xd2, 0xe5, 0x86, 0x6e, 0x68, 0x96, + 0x86, 0x66, 0x0d, 0x6c, 0x6a, 0x3d, 0xa3, 0x8d, 0x75, 0xa5, 0xd7, 0x95, 0xd5, 0x46, 0xff, 0x92, + 0xa4, 0xe8, 0x07, 0xd2, 0x25, 0xfe, 0x42, 0x57, 0xb6, 0x0e, 0x7a, 0x7b, 0x8d, 0xb6, 0x76, 0x78, + 0xb1, 0xab, 0x75, 0xb5, 0x8b, 0x04, 0x7e, 0xaf, 0xb7, 0x4f, 0xbe, 0xc8, 0x07, 0xf9, 0x45, 0xf1, + 0x08, 0x7f, 0xe5, 0xe0, 0xb8, 0xe8, 0xa0, 0xda, 0x21, 0xa8, 0xb6, 0x75, 0x4b, 0xd6, 0x54, 0x13, + 0x9d, 0x07, 0xa4, 0x1b, 0xb8, 0x65, 0x5a, 0x92, 0x61, 0xb5, 0x0c, 0xfc, 0xa8, 0x27, 0x1b, 0xb8, + 0x53, 0xe7, 0xe6, 0xb9, 0xc5, 0xb2, 0x58, 0xd3, 0x0d, 0xbc, 0x6b, 0x4f, 0x88, 0xce, 0x38, 0xba, + 0x02, 0xb3, 0x8f, 0x65, 0xeb, 0xa0, 0x65, 0x69, 0xba, 0xa6, 0x68, 0xdd, 0xa3, 0x96, 0xa4, 0xc8, + 0x5d, 0xf5, 0x10, 0xab, 0x56, 0x3d, 0x4f, 0x96, 0x1c, 0xb7, 0xa7, 0xef, 0x39, 0xb3, 0x4d, 0x77, + 0x12, 0x2d, 0xc0, 0x94, 0x8a, 0x71, 0xa7, 0x65, 0xe0, 0xb6, 0xa6, 0xb6, 0x65, 0x05, 0xd7, 0xc7, + 0x08, 0x78, 0xd5, 0x1e, 0x15, 0xdd, 0x41, 0x74, 0x01, 0x90, 0x64, 0x9a, 0x5a, 0x5b, 0x96, 0x2c, + 0xdc, 0x69, 0x75, 0x70, 0x5f, 0x6e, 0x63, 0xb3, 0x5e, 0x98, 0x1f, 0x5b, 0xac, 0x88, 0xd3, 0xfe, + 0xcc, 0x2a, 0x9d, 0x10, 0x7e, 0xcf, 0xc1, 0x31, 0x11, 0x77, 0x65, 0xd3, 0xc2, 0x86, 0x4d, 0x22, + 0x36, 0x2d, 0x54, 0x87, 0x52, 0x1f, 0x1b, 0xa6, 0xac, 0xa9, 0x84, 0x89, 0x8a, 0xe8, 0x7e, 0x22, + 0x1e, 0xca, 0x58, 0xed, 0xe8, 0x9a, 0xec, 0x10, 0x5b, 0x11, 0xbd, 0x6f, 0xf4, 0xff, 0x50, 0x75, + 0x25, 0xdd, 0x52, 0xa5, 0x43, 0x4a, 0x5e, 0x45, 0x9c, 0x74, 0x07, 0xb7, 0xa4, 0x43, 0x8c, 0xee, + 0x40, 0x49, 0xa3, 0x52, 0xab, 0x17, 0xe6, 0xb9, 0xc5, 0x89, 0xe5, 0x46, 0x23, 0x41, 0x3d, 0x8d, + 0x58, 0x59, 0x8b, 0xee, 0x72, 0xe1, 0xb7, 0x25, 0x9b, 0x70, 0x0a, 0xe2, 0x12, 0x3e, 0x0b, 0x25, + 0x5d, 0xeb, 0xb4, 0x7a, 0x72, 0xc7, 0x21, 0xbc, 0xa8, 0x6b, 0x9d, 0xfb, 0x72, 0xc7, 0xa6, 0xcd, + 0x9e, 0xb0, 0xc9, 0x32, 0x75, 0xa9, 0x8d, 0x1d, 0xe2, 0x27, 0x75, 0xad, 0xb3, 0xe5, 0x8e, 0xa1, + 0x13, 0x50, 0x76, 0x81, 0x1c, 0xda, 0x4b, 0xce, 0xbc, 0x2d, 0xfb, 0xb6, 0xa6, 0x5a, 0x92, 0xac, + 0x62, 0x83, 0x02, 0x14, 0x08, 0x40, 0xd5, 0x1b, 0x25, 0x60, 0x9b, 0x2c, 0x98, 0x75, 0xa4, 0xe3, + 0xfa, 0xf8, 0x3c, 0xb7, 0x38, 0xb5, 0xfc, 0x7a, 0x22, 0x93, 0x2b, 0x2e, 0xf8, 0xbd, 0x23, 0x1d, + 0x33, 0xe8, 0xec, 0x4f, 0xf4, 0x35, 0x38, 0xe6, 0xa3, 0x93, 0xd5, 0x0e, 0xfe, 0x61, 0xbd, 0x38, + 0xcf, 0x2d, 0x16, 0x44, 0x7f, 0x97, 0x0d, 0x7b, 0xd4, 0xa5, 0xdc, 0xd0, 0x14, 0x5c, 0x2f, 0x79, + 0x94, 0x8b, 0x9a, 0xe2, 0x31, 0x45, 0x88, 0x29, 0x7b, 0x53, 0x04, 0x7d, 0x44, 0x61, 0x95, 0x18, + 0x85, 0x5d, 0x83, 0xc2, 0x81, 0xad, 0x6d, 0x20, 0xda, 0x5a, 0x48, 0x64, 0xc4, 0xb5, 0xd7, 0x3b, + 0xb2, 0x6a, 0x89, 0x64, 0x09, 0x7a, 0x08, 0xd3, 0x1e, 0x7e, 0x83, 0x6a, 0xc8, 0xac, 0x4f, 0xcc, + 0x8f, 0x2d, 0x4e, 0x2c, 0xbf, 0x35, 0x54, 0xeb, 0x8e, 0x4a, 0xc3, 0xdf, 0xe6, 0x9a, 0x6a, 0x19, + 0x47, 0x62, 0xcd, 0x08, 0x0d, 0xa3, 0xbb, 0x50, 0x54, 0xa4, 0x3d, 0xac, 0x98, 0xf5, 0x49, 0xb2, + 0xc3, 0x37, 0x52, 0xef, 0x70, 0x97, 0x2c, 0xa3, 0x78, 0x1d, 0x1c, 0xe8, 0x7b, 0x30, 0x21, 0xa9, + 0xaa, 0x66, 0x49, 0xd4, 0x54, 0xab, 0x04, 0xe5, 0xb5, 0xd4, 0x28, 0x9b, 0xfe, 0x5a, 0x8a, 0x97, + 0xc5, 0x86, 0x16, 0xa1, 0xa6, 0x4a, 0x96, 0xdc, 0xc7, 0xad, 0x47, 0x9a, 0xd9, 0x6a, 0x2b, 0x92, + 0x69, 0xd6, 0xa7, 0x88, 0xe8, 0xa7, 0xe8, 0xf8, 0xdb, 0x9a, 0xb9, 0x62, 0x8f, 0xf2, 0x2b, 0x7e, + 0xc4, 0x09, 0xf0, 0x8f, 0x6a, 0x30, 0xf6, 0x10, 0x1f, 0x39, 0x46, 0x6e, 0xff, 0x44, 0xaf, 0xc0, + 0x78, 0x5f, 0x52, 0x7a, 0xd4, 0xb2, 0x39, 0x91, 0x7e, 0x5c, 0xcf, 0xbf, 0xc1, 0xf1, 0xd7, 0x60, + 0x82, 0x61, 0x71, 0xd8, 0xd2, 0x0a, 0xbb, 0xf4, 0x2d, 0xa8, 0x85, 0x59, 0xc9, 0xb2, 0x5e, 0xf8, + 0xd7, 0x38, 0xa0, 0x1d, 0xad, 0xf3, 0xc2, 0xdc, 0x94, 0xf5, 0x83, 0x42, 0xb2, 0x1f, 0x8c, 0x0f, + 0xf1, 0x83, 0xe2, 0x00, 0x3f, 0x28, 0x65, 0xf7, 0x03, 0x35, 0xce, 0x0f, 0xca, 0xc4, 0xa4, 0x9a, + 0x89, 0x78, 0xa2, 0x62, 0x4b, 0xed, 0x0a, 0xdb, 0x9e, 0x2b, 0x54, 0xc8, 0x26, 0x57, 0xb3, 0x6c, + 0x12, 0xe7, 0x0d, 0xdf, 0x0f, 0x7a, 0x03, 0x10, 0xac, 0xdf, 0xcc, 0x82, 0x75, 0xa0, 0x43, 0x7c, + 0xe1, 0xcd, 0xfc, 0xd3, 0x71, 0xa8, 0x33, 0x4c, 0xdb, 0xaa, 0x37, 0x45, 0x6c, 0xea, 0x9a, 0x6a, + 0xe2, 0x2f, 0xa4, 0xb1, 0x3f, 0x84, 0x29, 0x0f, 0xc8, 0x36, 0x61, 0xb3, 0x5e, 0x22, 0x3a, 0x5f, + 0x4d, 0xa3, 0xf3, 0x00, 0xfb, 0x8d, 0xc0, 0x28, 0xd5, 0xbd, 0x47, 0x00, 0x19, 0x43, 0xf7, 0x3d, + 0x73, 0xa5, 0x3e, 0xf1, 0xad, 0xec, 0x9b, 0xc4, 0x19, 0x6d, 0x27, 0x68, 0xb4, 0xd4, 0x15, 0x6e, + 0x65, 0xc7, 0x3d, 0xd8, 0x74, 0x55, 0x40, 0x51, 0x0e, 0x63, 0x8c, 0xe7, 0x16, 0x6b, 0x3c, 0x13, + 0xcb, 0xe7, 0x13, 0xe9, 0xb8, 0x2b, 0x9b, 0xd6, 0xf6, 0x3e, 0x1b, 0x45, 0xcc, 0x97, 0xc4, 0xca, + 0x7f, 0x53, 0xf2, 0xdd, 0xf4, 0x05, 0x99, 0xf8, 0x97, 0xb7, 0xec, 0x3a, 0x88, 0x78, 0x20, 0x0c, + 0x49, 0x18, 0xa3, 0xba, 0x9f, 0xe8, 0xb9, 0x1f, 0x2d, 0xcd, 0xae, 0x67, 0xdc, 0x21, 0xce, 0xf7, + 0xa4, 0xa0, 0xef, 0xd1, 0x8a, 0xec, 0x46, 0x46, 0xc4, 0xd9, 0x8b, 0xa8, 0x6a, 0x6c, 0x11, 0xf5, + 0x25, 0x72, 0xd1, 0x8f, 0x8a, 0xc0, 0xbb, 0xbc, 0x36, 0x15, 0x45, 0x6b, 0x13, 0x44, 0x5f, 0xf9, + 0xe9, 0xf3, 0xf3, 0xd3, 0xef, 0xc2, 0xb4, 0xe4, 0x09, 0xba, 0x65, 0x60, 0xb3, 0xa7, 0xb8, 0xbd, + 0xd2, 0xd2, 0x50, 0x7b, 0x67, 0x54, 0x54, 0x93, 0x58, 0x75, 0xf5, 0x14, 0x0b, 0x7d, 0x27, 0xe4, + 0x97, 0x37, 0xb2, 0xa0, 0x1b, 0xe4, 0x9c, 0xfb, 0x71, 0xce, 0xb9, 0x3a, 0x0a, 0xf6, 0x67, 0xe5, + 0xa1, 0x9f, 0xa3, 0xc7, 0xfc, 0xb7, 0x00, 0xa7, 0x98, 0xd4, 0xff, 0x22, 0x9d, 0xe6, 0x39, 0xd6, + 0x6f, 0xb1, 0x56, 0x59, 0x7a, 0x16, 0x56, 0xf9, 0x20, 0x54, 0xac, 0xa5, 0x2a, 0xa8, 0x52, 0x1a, + 0xa6, 0x1c, 0x57, 0xb1, 0xad, 0x8f, 0xb8, 0xc1, 0xe0, 0xb2, 0xed, 0x73, 0xb4, 0x38, 0x11, 0x66, + 0x62, 0x12, 0x08, 0x7a, 0x13, 0xc6, 0x69, 0x9e, 0xe7, 0x08, 0xdb, 0x29, 0x1b, 0x4c, 0xba, 0x46, + 0xb8, 0x05, 0x93, 0xec, 0xb0, 0xbd, 0xbb, 0xaa, 0x75, 0x30, 0x45, 0x56, 0x10, 0xe9, 0x07, 0x3a, + 0x09, 0x15, 0xdd, 0xc0, 0xfb, 0xd8, 0x30, 0x70, 0xc7, 0x39, 0x6a, 0xf4, 0x07, 0x84, 0x12, 0x8c, + 0xaf, 0x1d, 0xea, 0xd6, 0x91, 0xb0, 0x04, 0x35, 0x11, 0x1f, 0x6a, 0x7d, 0x4c, 0x04, 0x3c, 0xb8, + 0x63, 0x17, 0x66, 0x60, 0x9a, 0x01, 0xa6, 0xb2, 0x17, 0x4e, 0xc3, 0xa9, 0x75, 0x6c, 0xb9, 0xca, + 0x31, 0x59, 0xed, 0x10, 0x74, 0xc2, 0x67, 0x1c, 0xcc, 0x25, 0x41, 0x38, 0x6e, 0xa7, 0x52, 0xef, + 0x72, 0xa5, 0xe0, 0xca, 0x65, 0x23, 0x51, 0x2e, 0x83, 0xf1, 0xb1, 0xd6, 0xe2, 0x18, 0x84, 0xed, + 0xa8, 0xde, 0x10, 0xaf, 0xc0, 0x74, 0x04, 0x24, 0x46, 0xaf, 0xcd, 0x60, 0x91, 0xb0, 0x34, 0x3c, + 0x73, 0x79, 0x28, 0x59, 0x23, 0xf8, 0x8c, 0x03, 0x14, 0x85, 0x40, 0x16, 0xcc, 0xf8, 0x19, 0x2d, + 0xcc, 0xfa, 0x4a, 0x86, 0xbd, 0x62, 0x86, 0x28, 0xd3, 0xa8, 0x1d, 0x99, 0xe0, 0x0d, 0x98, 0x4d, + 0x00, 0x7f, 0x1a, 0x01, 0xc4, 0xf8, 0x26, 0x23, 0x80, 0xf7, 0xf3, 0x7e, 0x55, 0xe6, 0x43, 0xd8, + 0x02, 0xf0, 0xa2, 0x9b, 0x1f, 0x7b, 0x86, 0x0a, 0x20, 0x8a, 0x29, 0x66, 0xc8, 0x11, 0x80, 0x11, + 0x99, 0xe0, 0xfb, 0x30, 0x9b, 0x00, 0x1e, 0x23, 0x80, 0xb5, 0xa0, 0x00, 0x2e, 0x66, 0x20, 0x6a, + 0x43, 0xdd, 0xd7, 0x58, 0x21, 0xfc, 0xb1, 0x08, 0xaf, 0xc6, 0x43, 0xa1, 0x73, 0x30, 0xad, 0xb5, + 0xe5, 0x96, 0x6e, 0x68, 0x3a, 0x36, 0xac, 0x23, 0x1a, 0xea, 0x29, 0x15, 0xc7, 0xb4, 0xb6, 0xbc, + 0xe3, 0x8c, 0x93, 0x68, 0xbf, 0x08, 0x35, 0xd9, 0x6c, 0xd9, 0x3e, 0xee, 0xd9, 0x8c, 0xe3, 0xde, + 0x53, 0xb2, 0xb9, 0xa5, 0x75, 0xb0, 0xbb, 0x07, 0x3a, 0x0f, 0x48, 0x36, 0x5b, 0x66, 0x5b, 0x52, + 0x24, 0xdf, 0xbe, 0x9c, 0x6b, 0x84, 0x9a, 0x6c, 0xee, 0x92, 0x09, 0x0f, 0xfa, 0x02, 0x20, 0x47, + 0x07, 0xb8, 0xd3, 0x7a, 0xd4, 0x93, 0x54, 0x4b, 0xb6, 0x8e, 0x48, 0xaa, 0xe2, 0xc4, 0x69, 0x6f, + 0xe6, 0x6d, 0x67, 0x02, 0x2d, 0xc5, 0x25, 0x1d, 0x9a, 0xbd, 0xa2, 0x79, 0x64, 0x13, 0x0a, 0x58, + 0xed, 0x9b, 0xf5, 0x62, 0xca, 0x93, 0xd5, 0xa0, 0x78, 0x1a, 0x6b, 0x6a, 0xdf, 0x31, 0x68, 0x82, + 0x06, 0xed, 0x05, 0x53, 0x07, 0x3d, 0xad, 0xb8, 0x99, 0x15, 0xeb, 0xe0, 0x7a, 0x66, 0x37, 0xd2, + 0x92, 0x95, 0x47, 0x68, 0x14, 0x42, 0xdd, 0xd7, 0x8f, 0xe0, 0x15, 0xff, 0x1e, 0xc8, 0x34, 0x9d, + 0xbb, 0x1e, 0x37, 0xf9, 0xdd, 0xc9, 0xca, 0x81, 0x77, 0x6b, 0xe4, 0xa3, 0xa2, 0x9c, 0xcc, 0x58, + 0xd1, 0x19, 0xfe, 0x2a, 0x54, 0x3c, 0x41, 0xbe, 0xc8, 0x1c, 0xc8, 0xdf, 0x86, 0x7a, 0x12, 0xa5, + 0x2c, 0x9e, 0x42, 0x0c, 0x9e, 0x02, 0xeb, 0x40, 0x7b, 0x30, 0xbf, 0x8e, 0x2d, 0x0f, 0xd5, 0x63, + 0xc9, 0xc0, 0x7e, 0xb8, 0x1d, 0x76, 0xd8, 0x1c, 0x6d, 0x5a, 0xf2, 0x31, 0x4d, 0x8b, 0xf0, 0xd3, + 0x3c, 0x9c, 0x19, 0xb0, 0xc9, 0xb0, 0x2a, 0x91, 0x2d, 0x00, 0xf3, 0xc1, 0x02, 0x30, 0x52, 0x40, + 0x8e, 0xc5, 0x14, 0x90, 0x3f, 0xe3, 0x40, 0x60, 0x9a, 0x26, 0xcf, 0x56, 0x6c, 0x32, 0x98, 0x14, + 0x41, 0x2f, 0xd3, 0xde, 0x48, 0xd1, 0x48, 0xc5, 0xf3, 0x71, 0xba, 0x3d, 0x18, 0x40, 0xf8, 0x53, + 0x1e, 0x4e, 0x0f, 0x41, 0x12, 0x23, 0x51, 0x2e, 0xae, 0x0d, 0x7c, 0x8f, 0x83, 0x19, 0x3f, 0xb0, + 0xf8, 0x3c, 0xe4, 0x89, 0xcd, 0xef, 0x8c, 0xca, 0x43, 0xa3, 0xe9, 0xe2, 0x0c, 0xe7, 0x3c, 0x29, + 0x32, 0xc1, 0xf7, 0x60, 0x36, 0x01, 0x3c, 0xc6, 0x90, 0x57, 0x83, 0x21, 0xbf, 0x31, 0xb4, 0x36, + 0x0b, 0x10, 0xc6, 0x1a, 0xec, 0xdf, 0xc6, 0xe0, 0x78, 0x2c, 0x50, 0x6c, 0x10, 0xe7, 0x32, 0x04, + 0xf1, 0x7c, 0x42, 0x10, 0xbf, 0x08, 0x33, 0x52, 0xb7, 0x6b, 0xe0, 0x6e, 0x30, 0x8a, 0x8f, 0x91, + 0x28, 0x8e, 0xfc, 0x29, 0x2f, 0x8c, 0xdf, 0x84, 0x93, 0x9a, 0x21, 0x77, 0x65, 0x55, 0x52, 0x5a, + 0x71, 0x2b, 0x69, 0xfc, 0xe7, 0x5d, 0x98, 0x66, 0x14, 0x83, 0x06, 0x27, 0x43, 0x76, 0xea, 0x2e, + 0x6e, 0x29, 0xb2, 0x69, 0xe7, 0x84, 0xb1, 0xf4, 0x52, 0x74, 0xb1, 0x8a, 0x27, 0xac, 0xb8, 0x61, + 0x3b, 0xc4, 0xa2, 0x77, 0x39, 0x58, 0xf0, 0x68, 0x1e, 0xb8, 0x75, 0x71, 0xa4, 0xad, 0xcf, 0xb8, + 0xc8, 0xef, 0x25, 0x91, 0x20, 0xfc, 0x27, 0x1f, 0x52, 0xac, 0x27, 0x8d, 0x05, 0x26, 0x6d, 0x50, + 0x2b, 0xe2, 0x88, 0x04, 0xbd, 0x44, 0xf0, 0x8e, 0x3d, 0x88, 0x10, 0x14, 0x6c, 0xe5, 0x3b, 0x31, + 0x8e, 0xfc, 0x26, 0x63, 0x7e, 0xe3, 0x48, 0x7e, 0xdb, 0x63, 0xa4, 0x2d, 0xa4, 0x1d, 0x23, 0xf9, + 0x8d, 0x36, 0x61, 0xca, 0xe3, 0x5a, 0xc1, 0x7d, 0xac, 0x0c, 0x3d, 0x57, 0x71, 0x49, 0xbd, 0x6b, + 0x43, 0x8b, 0x55, 0x8b, 0xfd, 0x0c, 0x9f, 0xde, 0x15, 0x87, 0x1c, 0x3f, 0xc4, 0xb2, 0x3d, 0xa4, + 0xff, 0x7a, 0xda, 0x26, 0xea, 0x02, 0x2c, 0x85, 0x63, 0xb2, 0xe3, 0xce, 0xd2, 0x9e, 0x12, 0xc9, + 0x01, 0xc2, 0x9f, 0xf3, 0x70, 0x3e, 0x1d, 0xbc, 0x13, 0xce, 0x7f, 0xc5, 0xc1, 0x71, 0xc9, 0x07, + 0x88, 0xd4, 0xe2, 0xad, 0x41, 0x6d, 0x48, 0xea, 0x6d, 0x1a, 0x71, 0x93, 0x54, 0x5a, 0xaf, 0x48, + 0x31, 0x53, 0xfc, 0xfb, 0x1c, 0x9c, 0x48, 0x5c, 0x13, 0x23, 0xc0, 0xed, 0x60, 0xe0, 0x4a, 0x2e, + 0xb3, 0x18, 0xa4, 0x43, 0x63, 0xd8, 0x87, 0x05, 0x98, 0x1f, 0x06, 0xff, 0xdc, 0xc2, 0xd9, 0x6d, + 0x38, 0xcd, 0x04, 0x25, 0x56, 0x45, 0xa1, 0xd0, 0x76, 0xca, 0x07, 0x63, 0x88, 0xf5, 0xbc, 0xf2, + 0x03, 0x0e, 0x16, 0x43, 0x91, 0x22, 0x0e, 0x19, 0x8d, 0x1a, 0x85, 0x91, 0xa2, 0xc6, 0x6b, 0x56, + 0x82, 0x1d, 0x04, 0x62, 0xd7, 0x4d, 0x38, 0xc9, 0x30, 0xd4, 0x96, 0x74, 0xa9, 0x6d, 0xef, 0xeb, + 0x71, 0x33, 0x4e, 0xc3, 0xad, 0x0f, 0xb3, 0xe2, 0x80, 0x78, 0xac, 0xd8, 0xd1, 0x2f, 0xc4, 0x4a, + 0x04, 0xcd, 0x53, 0x45, 0xbf, 0x00, 0x1f, 0xe1, 0xed, 0x49, 0xf4, 0xfb, 0x35, 0x07, 0xf5, 0x1d, + 0xe7, 0x9d, 0x13, 0xd3, 0x4a, 0xbe, 0x14, 0x8f, 0x72, 0x84, 0xff, 0x83, 0x13, 0x31, 0xb4, 0x39, + 0x47, 0x15, 0x3f, 0x81, 0x5a, 0x33, 0xf4, 0x26, 0x0a, 0x4d, 0x41, 0x7e, 0x63, 0xd5, 0xa1, 0x35, + 0xbf, 0xb1, 0x8a, 0x5e, 0x85, 0xe2, 0x01, 0x96, 0x14, 0xeb, 0xc0, 0x21, 0xd0, 0xf9, 0x42, 0x4d, + 0x28, 0xbb, 0xa2, 0x21, 0xa4, 0xa5, 0x39, 0xb5, 0x21, 0x2d, 0xa0, 0xb7, 0x4c, 0x58, 0xf7, 0x0f, + 0x6e, 0x48, 0xdb, 0x77, 0x95, 0x3d, 0xb8, 0x99, 0x58, 0x3e, 0x93, 0x88, 0x6f, 0xeb, 0xfe, 0x66, + 0x93, 0xb8, 0x11, 0x85, 0x17, 0x78, 0x28, 0xbb, 0x43, 0x0c, 0xfd, 0x63, 0x36, 0xfd, 0xc2, 0x2f, + 0x39, 0x38, 0x7b, 0x5f, 0xef, 0x48, 0x16, 0x6b, 0x84, 0x61, 0xae, 0xbd, 0x7a, 0xf9, 0x34, 0x4c, + 0xd0, 0x47, 0x63, 0x6c, 0x05, 0x07, 0x74, 0x88, 0x88, 0x7d, 0x05, 0x4a, 0xee, 0xab, 0x32, 0x5a, + 0xb1, 0x9d, 0x4d, 0x0e, 0x2b, 0xa1, 0x4d, 0x44, 0x77, 0xa5, 0x70, 0x1e, 0xce, 0xa5, 0x21, 0xc9, + 0xd1, 0xd2, 0x1f, 0x38, 0x98, 0x8d, 0xe0, 0x72, 0xe8, 0xdd, 0x85, 0x5a, 0xf8, 0x75, 0x05, 0x21, + 0x7a, 0x62, 0x79, 0x31, 0xed, 0x7b, 0x1d, 0xf1, 0x58, 0xe8, 0x0d, 0x85, 0x9d, 0x51, 0x1d, 0x21, + 0xb8, 0x28, 0x69, 0x04, 0x4d, 0xce, 0xa8, 0x01, 0xa2, 0xc4, 0x6a, 0x87, 0xfd, 0x14, 0xfe, 0xcd, + 0x41, 0x35, 0x48, 0xf5, 0x50, 0x29, 0xbb, 0xef, 0x4d, 0xf2, 0xd9, 0xdf, 0x9b, 0xd8, 0x8d, 0x78, + 0x5f, 0x92, 0x15, 0x12, 0xc9, 0x5c, 0x55, 0x8d, 0x91, 0x07, 0x80, 0x35, 0x6f, 0xc2, 0x11, 0x31, + 0x3a, 0x6b, 0x8b, 0xaf, 0x67, 0x06, 0x60, 0xe9, 0x63, 0xc1, 0x63, 0xee, 0xb8, 0x0b, 0xba, 0x10, + 0x11, 0xca, 0x38, 0x29, 0x56, 0x42, 0xcc, 0x7e, 0xc0, 0x81, 0x10, 0x56, 0x56, 0xcc, 0x01, 0xdf, + 0x0f, 0xe2, 0x8e, 0x0b, 0xa8, 0xe2, 0x2e, 0xa7, 0x36, 0xa8, 0x41, 0x67, 0xd5, 0xc2, 0x06, 0xf0, + 0xc9, 0xf0, 0xcc, 0x71, 0x05, 0xf3, 0x4c, 0x92, 0x73, 0xa4, 0xe4, 0x4e, 0xb8, 0xaf, 0x24, 0xdf, + 0x2b, 0xc2, 0xa9, 0x30, 0xae, 0xaf, 0xee, 0xc0, 0x47, 0xbf, 0x5b, 0x0b, 0x99, 0x7f, 0x25, 0x62, + 0xfe, 0xdb, 0x30, 0xe9, 0x00, 0xb8, 0xb7, 0xdf, 0xd9, 0x8f, 0x5a, 0x9c, 0x2d, 0xe8, 0x41, 0xcb, + 0x83, 0xd0, 0x75, 0xda, 0xad, 0xd4, 0x36, 0x36, 0xfc, 0xba, 0x5b, 0x8e, 0xbb, 0x51, 0x5b, 0x1f, + 0x71, 0x83, 0x97, 0xf5, 0xe2, 0xe2, 0xdc, 0x0d, 0xa8, 0x06, 0x4c, 0x06, 0x95, 0xa1, 0xb0, 0xb1, + 0xb5, 0x71, 0xaf, 0x96, 0xb3, 0x7f, 0x6d, 0x36, 0x37, 0xb6, 0x6a, 0x1c, 0x9a, 0x80, 0xd2, 0xee, + 0xc6, 0xea, 0xda, 0x4a, 0x53, 0xac, 0xe5, 0x51, 0x15, 0x2a, 0x6b, 0x3b, 0x77, 0xd6, 0x36, 0xd7, + 0xc4, 0xe6, 0xdd, 0xda, 0xd8, 0xb9, 0x05, 0xa8, 0x06, 0xfa, 0x0e, 0x7b, 0x99, 0x9d, 0xb4, 0x6a, + 0x39, 0x04, 0x50, 0xdc, 0xdd, 0x5e, 0xf9, 0xf6, 0xda, 0xbd, 0x1a, 0xb7, 0xbc, 0x0f, 0x93, 0xf4, + 0x41, 0xb2, 0x41, 0x1d, 0xf5, 0x1d, 0x28, 0xbb, 0x0f, 0x94, 0xd1, 0xa0, 0x90, 0x1e, 0x78, 0xc3, + 0xcc, 0xcf, 0x25, 0x42, 0xd2, 0x5b, 0x8e, 0xdc, 0xf2, 0x3f, 0xaa, 0x30, 0x15, 0x7c, 0x63, 0x8c, + 0x54, 0xa8, 0x31, 0xf5, 0x3b, 0x35, 0x9c, 0xd4, 0x59, 0x84, 0x6f, 0x64, 0x7b, 0xe0, 0x20, 0xe4, + 0xd0, 0x63, 0x98, 0x59, 0xc7, 0xd6, 0x8e, 0xd6, 0x09, 0x6e, 0xb9, 0x94, 0xe1, 0x69, 0x1d, 0x7f, + 0x29, 0xf3, 0x93, 0x26, 0x21, 0x87, 0x3a, 0x50, 0xf1, 0xae, 0x6d, 0xd0, 0xd9, 0x01, 0x74, 0x07, + 0xef, 0x81, 0xf8, 0x73, 0x69, 0x40, 0xbd, 0x5d, 0x7e, 0xce, 0xc1, 0xab, 0xf1, 0xd7, 0x32, 0xe8, + 0x4a, 0xe6, 0x7b, 0x1c, 0x4a, 0xc0, 0xd5, 0x11, 0xef, 0x7f, 0x84, 0x9c, 0xdd, 0xd3, 0x9d, 0x48, + 0x3c, 0xc8, 0x43, 0xd7, 0x52, 0x77, 0x74, 0xe1, 0xee, 0x92, 0xbf, 0x3e, 0xca, 0x52, 0x8f, 0xac, + 0xdf, 0x71, 0xf0, 0x5a, 0x9a, 0xa6, 0x11, 0xad, 0x3e, 0x65, 0xcf, 0x49, 0x89, 0x5d, 0x7b, 0x26, + 0x9d, 0xab, 0x90, 0x43, 0x0a, 0xd4, 0x19, 0x91, 0x07, 0xff, 0x10, 0x31, 0xc4, 0xf9, 0xf8, 0x8c, + 0x8f, 0xfe, 0x85, 0x1c, 0x7a, 0x08, 0x65, 0xf7, 0xbc, 0x2e, 0x83, 0x47, 0x5e, 0x1e, 0xe1, 0x55, + 0x03, 0x71, 0xcb, 0x29, 0x77, 0xb3, 0xdb, 0x9a, 0x61, 0xbb, 0x48, 0x26, 0x8f, 0xbc, 0x32, 0xda, + 0x95, 0xb5, 0x90, 0x43, 0x3f, 0x86, 0xe9, 0x48, 0xab, 0x82, 0x06, 0x38, 0x78, 0x42, 0xcb, 0xc5, + 0x2f, 0x67, 0x59, 0xe2, 0xed, 0xfe, 0x0b, 0x8e, 0x1c, 0xa7, 0x87, 0xd3, 0x53, 0x30, 0x36, 0x7d, + 0x3d, 0x7d, 0xb1, 0x3f, 0x54, 0x1c, 0x03, 0x13, 0xa1, 0x90, 0x43, 0x1f, 0x71, 0x20, 0x0c, 0xef, + 0x12, 0x50, 0x72, 0x2a, 0x4f, 0xdd, 0xf5, 0xf0, 0x2b, 0x4f, 0x85, 0x83, 0x8d, 0x78, 0x75, 0xd7, + 0x74, 0x22, 0x7d, 0x65, 0x76, 0xd1, 0xbd, 0x39, 0x4a, 0x21, 0xec, 0x51, 0x73, 0xeb, 0xf5, 0x8f, + 0x3f, 0x99, 0xe3, 0xfe, 0xfe, 0xc9, 0x5c, 0xee, 0xdd, 0x27, 0x73, 0xdc, 0xc7, 0x4f, 0xe6, 0xb8, + 0xbf, 0x3c, 0x99, 0xe3, 0xfe, 0xf9, 0x64, 0x8e, 0xfb, 0xf0, 0xd3, 0xb9, 0xdc, 0x83, 0xb2, 0x8b, + 0x6c, 0xaf, 0x48, 0xfe, 0xe0, 0x74, 0xf9, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x1d, 0xfb, 0x94, + 0x6d, 0x35, 0x35, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// RegistrationClient is the client API for Registration service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type RegistrationClient interface { + Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*Empty, error) +} + +type registrationClient struct { + cc *grpc.ClientConn +} + +func NewRegistrationClient(cc *grpc.ClientConn) RegistrationClient { + return ®istrationClient{cc} +} + +func (c *registrationClient) Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*Empty, error) { + out := new(Empty) + err := c.cc.Invoke(ctx, "/resourceplugin.v1alpha1.Registration/Register", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *ResourceRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +// RegistrationServer is the server API for Registration service. +type RegistrationServer interface { + Register(context.Context, *RegisterRequest) (*Empty, error) } -func (m *ResourceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.NativeQosClass) > 0 { - i -= len(m.NativeQosClass) - copy(dAtA[i:], m.NativeQosClass) - i = encodeVarintApi(dAtA, i, uint64(len(m.NativeQosClass))) - i-- - dAtA[i] = 0x72 +// UnimplementedRegistrationServer can be embedded to have forward compatible implementations. +type UnimplementedRegistrationServer struct { +} + +func (*UnimplementedRegistrationServer) Register(ctx context.Context, req *RegisterRequest) (*Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method Register not implemented") +} + +func RegisterRegistrationServer(s *grpc.Server, srv RegistrationServer) { + s.RegisterService(&_Registration_serviceDesc, srv) +} + +func _Registration_Register_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RegisterRequest) + if err := dec(in); err != nil { + return nil, err } - if len(m.Annotations) > 0 { - for k := range m.Annotations { - v := m.Annotations[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintApi(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintApi(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintApi(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x6a - } + if interceptor == nil { + return srv.(RegistrationServer).Register(ctx, in) } - if len(m.Labels) > 0 { - for k := range m.Labels { - v := m.Labels[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintApi(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintApi(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintApi(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x62 - } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/resourceplugin.v1alpha1.Registration/Register", } - if len(m.ResourceRequests) > 0 { - for k := range m.ResourceRequests { - v := m.ResourceRequests[k] - baseI := i - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) - i-- - dAtA[i] = 0x11 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintApi(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintApi(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x5a - } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RegistrationServer).Register(ctx, req.(*RegisterRequest)) } - if m.Hint != nil { + return interceptor(ctx, in, info, handler) +} + +var _Registration_serviceDesc = grpc.ServiceDesc{ + ServiceName: "resourceplugin.v1alpha1.Registration", + HandlerType: (*RegistrationServer)(nil), + Methods: []grpc.MethodDesc{ { - size, err := m.Hint.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApi(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - } - if len(m.ResourceName) > 0 { - i -= len(m.ResourceName) - copy(dAtA[i:], m.ResourceName) - i = encodeVarintApi(dAtA, i, uint64(len(m.ResourceName))) - i-- - dAtA[i] = 0x4a + MethodName: "Register", + Handler: _Registration_Register_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "api.proto", +} + +// ResourcePluginClient is the client API for ResourcePlugin service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ResourcePluginClient interface { + // GetTopologyHints returns hints of corresponding resources + GetTopologyHints(ctx context.Context, in *ResourceRequest, opts ...grpc.CallOption) (*ResourceHintsResponse, error) + // GetPodTopologyHints returns hints of corresponding resources for pod + GetPodTopologyHints(ctx context.Context, in *PodResourceRequest, opts ...grpc.CallOption) (*PodResourceHintsResponse, error) + // Notify the resource plugin that the pod has beed deleted, + // and the plugin should do some clear-up work. + RemovePod(ctx context.Context, in *RemovePodRequest, opts ...grpc.CallOption) (*RemovePodResponse, error) + // GetResourcesAllocation returns allocation results of corresponding resources + GetResourcesAllocation(ctx context.Context, in *GetResourcesAllocationRequest, opts ...grpc.CallOption) (*GetResourcesAllocationResponse, error) + // GetTopologyAwareResources returns allocation results of corresponding resources as topology aware format + GetTopologyAwareResources(ctx context.Context, in *GetTopologyAwareResourcesRequest, opts ...grpc.CallOption) (*GetTopologyAwareResourcesResponse, error) + // GetTopologyAwareResources returns corresponding allocatable resources as topology aware format + GetTopologyAwareAllocatableResources(ctx context.Context, in *GetTopologyAwareAllocatableResourcesRequest, opts ...grpc.CallOption) (*GetTopologyAwareAllocatableResourcesResponse, error) + // GetResourcePluginOptions returns options to be communicated with Resource + // Manager + GetResourcePluginOptions(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ResourcePluginOptions, error) + // Allocate is called during pod admit so that the resource + // plugin can allocate corresponding resource for the container + // according to resource request + Allocate(ctx context.Context, in *ResourceRequest, opts ...grpc.CallOption) (*ResourceAllocationResponse, error) + // AllocateForPod is called during pod admit so that the resource + // plugin can allocate corresponding resource for the pod + // according to resource request + AllocateForPod(ctx context.Context, in *PodResourceRequest, opts ...grpc.CallOption) (*PodResourceAllocationResponse, error) + // PreStartContainer is called, if indicated by resource plugin during registeration phase, + // before each container start. Resource plugin can run resource specific operations + // such as resetting the resource before making resources available to the container + PreStartContainer(ctx context.Context, in *PreStartContainerRequest, opts ...grpc.CallOption) (*PreStartContainerResponse, error) + // GetAssociatedDeviceTopologyHints gets associated device for the container + GetAssociatedDeviceTopologyHints(ctx context.Context, in *AssociatedDeviceRequest, opts ...grpc.CallOption) (*AssociatedDeviceHintsResponse, error) + // UpdateAllocatableAssociatedDevices updates the allocatable associated devices for the resource plugin + // This is called when the device plugin reports the allocatable devices + UpdateAllocatableAssociatedDevices(ctx context.Context, in *UpdateAllocatableAssociatedDevicesRequest, opts ...grpc.CallOption) (*UpdateAllocatableAssociatedDevicesResponse, error) + // AllocateAssociatedDevice allocates the associated device for the container + AllocateAssociatedDevice(ctx context.Context, in *AssociatedDeviceRequest, opts ...grpc.CallOption) (*AssociatedDeviceAllocationResponse, error) +} + +type resourcePluginClient struct { + cc *grpc.ClientConn +} + +func NewResourcePluginClient(cc *grpc.ClientConn) ResourcePluginClient { + return &resourcePluginClient{cc} +} + +func (c *resourcePluginClient) GetTopologyHints(ctx context.Context, in *ResourceRequest, opts ...grpc.CallOption) (*ResourceHintsResponse, error) { + out := new(ResourceHintsResponse) + err := c.cc.Invoke(ctx, "/resourceplugin.v1alpha1.ResourcePlugin/GetTopologyHints", in, out, opts...) + if err != nil { + return nil, err } - if len(m.PodType) > 0 { - i -= len(m.PodType) - copy(dAtA[i:], m.PodType) - i = encodeVarintApi(dAtA, i, uint64(len(m.PodType))) - i-- - dAtA[i] = 0x42 + return out, nil +} + +func (c *resourcePluginClient) GetPodTopologyHints(ctx context.Context, in *PodResourceRequest, opts ...grpc.CallOption) (*PodResourceHintsResponse, error) { + out := new(PodResourceHintsResponse) + err := c.cc.Invoke(ctx, "/resourceplugin.v1alpha1.ResourcePlugin/GetPodTopologyHints", in, out, opts...) + if err != nil { + return nil, err } - if len(m.PodRole) > 0 { - i -= len(m.PodRole) - copy(dAtA[i:], m.PodRole) - i = encodeVarintApi(dAtA, i, uint64(len(m.PodRole))) - i-- - dAtA[i] = 0x3a + return out, nil +} + +func (c *resourcePluginClient) RemovePod(ctx context.Context, in *RemovePodRequest, opts ...grpc.CallOption) (*RemovePodResponse, error) { + out := new(RemovePodResponse) + err := c.cc.Invoke(ctx, "/resourceplugin.v1alpha1.ResourcePlugin/RemovePod", in, out, opts...) + if err != nil { + return nil, err } - if m.ContainerIndex != 0 { - i = encodeVarintApi(dAtA, i, uint64(m.ContainerIndex)) - i-- - dAtA[i] = 0x30 + return out, nil +} + +func (c *resourcePluginClient) GetResourcesAllocation(ctx context.Context, in *GetResourcesAllocationRequest, opts ...grpc.CallOption) (*GetResourcesAllocationResponse, error) { + out := new(GetResourcesAllocationResponse) + err := c.cc.Invoke(ctx, "/resourceplugin.v1alpha1.ResourcePlugin/GetResourcesAllocation", in, out, opts...) + if err != nil { + return nil, err } - if m.ContainerType != 0 { - i = encodeVarintApi(dAtA, i, uint64(m.ContainerType)) - i-- - dAtA[i] = 0x28 + return out, nil +} + +func (c *resourcePluginClient) GetTopologyAwareResources(ctx context.Context, in *GetTopologyAwareResourcesRequest, opts ...grpc.CallOption) (*GetTopologyAwareResourcesResponse, error) { + out := new(GetTopologyAwareResourcesResponse) + err := c.cc.Invoke(ctx, "/resourceplugin.v1alpha1.ResourcePlugin/GetTopologyAwareResources", in, out, opts...) + if err != nil { + return nil, err } - if len(m.ContainerName) > 0 { - i -= len(m.ContainerName) - copy(dAtA[i:], m.ContainerName) - i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerName))) - i-- - dAtA[i] = 0x22 + return out, nil +} + +func (c *resourcePluginClient) GetTopologyAwareAllocatableResources(ctx context.Context, in *GetTopologyAwareAllocatableResourcesRequest, opts ...grpc.CallOption) (*GetTopologyAwareAllocatableResourcesResponse, error) { + out := new(GetTopologyAwareAllocatableResourcesResponse) + err := c.cc.Invoke(ctx, "/resourceplugin.v1alpha1.ResourcePlugin/GetTopologyAwareAllocatableResources", in, out, opts...) + if err != nil { + return nil, err } - if len(m.PodName) > 0 { - i -= len(m.PodName) - copy(dAtA[i:], m.PodName) - i = encodeVarintApi(dAtA, i, uint64(len(m.PodName))) - i-- - dAtA[i] = 0x1a + return out, nil +} + +func (c *resourcePluginClient) GetResourcePluginOptions(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ResourcePluginOptions, error) { + out := new(ResourcePluginOptions) + err := c.cc.Invoke(ctx, "/resourceplugin.v1alpha1.ResourcePlugin/GetResourcePluginOptions", in, out, opts...) + if err != nil { + return nil, err } - if len(m.PodNamespace) > 0 { - i -= len(m.PodNamespace) - copy(dAtA[i:], m.PodNamespace) - i = encodeVarintApi(dAtA, i, uint64(len(m.PodNamespace))) - i-- - dAtA[i] = 0x12 + return out, nil +} + +func (c *resourcePluginClient) Allocate(ctx context.Context, in *ResourceRequest, opts ...grpc.CallOption) (*ResourceAllocationResponse, error) { + out := new(ResourceAllocationResponse) + err := c.cc.Invoke(ctx, "/resourceplugin.v1alpha1.ResourcePlugin/Allocate", in, out, opts...) + if err != nil { + return nil, err } - if len(m.PodUid) > 0 { - i -= len(m.PodUid) - copy(dAtA[i:], m.PodUid) - i = encodeVarintApi(dAtA, i, uint64(len(m.PodUid))) - i-- - dAtA[i] = 0xa + return out, nil +} + +func (c *resourcePluginClient) AllocateForPod(ctx context.Context, in *PodResourceRequest, opts ...grpc.CallOption) (*PodResourceAllocationResponse, error) { + out := new(PodResourceAllocationResponse) + err := c.cc.Invoke(ctx, "/resourceplugin.v1alpha1.ResourcePlugin/AllocateForPod", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *PodResourceRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *resourcePluginClient) PreStartContainer(ctx context.Context, in *PreStartContainerRequest, opts ...grpc.CallOption) (*PreStartContainerResponse, error) { + out := new(PreStartContainerResponse) + err := c.cc.Invoke(ctx, "/resourceplugin.v1alpha1.ResourcePlugin/PreStartContainer", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *PodResourceRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (c *resourcePluginClient) GetAssociatedDeviceTopologyHints(ctx context.Context, in *AssociatedDeviceRequest, opts ...grpc.CallOption) (*AssociatedDeviceHintsResponse, error) { + out := new(AssociatedDeviceHintsResponse) + err := c.cc.Invoke(ctx, "/resourceplugin.v1alpha1.ResourcePlugin/GetAssociatedDeviceTopologyHints", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *PodResourceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Annotations) > 0 { - for k := range m.Annotations { - v := m.Annotations[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintApi(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintApi(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintApi(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x52 - } +func (c *resourcePluginClient) UpdateAllocatableAssociatedDevices(ctx context.Context, in *UpdateAllocatableAssociatedDevicesRequest, opts ...grpc.CallOption) (*UpdateAllocatableAssociatedDevicesResponse, error) { + out := new(UpdateAllocatableAssociatedDevicesResponse) + err := c.cc.Invoke(ctx, "/resourceplugin.v1alpha1.ResourcePlugin/UpdateAllocatableAssociatedDevices", in, out, opts...) + if err != nil { + return nil, err } - if len(m.Labels) > 0 { - for k := range m.Labels { - v := m.Labels[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintApi(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintApi(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintApi(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x4a - } + return out, nil +} + +func (c *resourcePluginClient) AllocateAssociatedDevice(ctx context.Context, in *AssociatedDeviceRequest, opts ...grpc.CallOption) (*AssociatedDeviceAllocationResponse, error) { + out := new(AssociatedDeviceAllocationResponse) + err := c.cc.Invoke(ctx, "/resourceplugin.v1alpha1.ResourcePlugin/AllocateAssociatedDevice", in, out, opts...) + if err != nil { + return nil, err } - if len(m.ResourceRequests) > 0 { - for k := range m.ResourceRequests { - v := m.ResourceRequests[k] - baseI := i - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) - i-- - dAtA[i] = 0x11 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintApi(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintApi(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x42 - } + return out, nil +} + +// ResourcePluginServer is the server API for ResourcePlugin service. +type ResourcePluginServer interface { + // GetTopologyHints returns hints of corresponding resources + GetTopologyHints(context.Context, *ResourceRequest) (*ResourceHintsResponse, error) + // GetPodTopologyHints returns hints of corresponding resources for pod + GetPodTopologyHints(context.Context, *PodResourceRequest) (*PodResourceHintsResponse, error) + // Notify the resource plugin that the pod has beed deleted, + // and the plugin should do some clear-up work. + RemovePod(context.Context, *RemovePodRequest) (*RemovePodResponse, error) + // GetResourcesAllocation returns allocation results of corresponding resources + GetResourcesAllocation(context.Context, *GetResourcesAllocationRequest) (*GetResourcesAllocationResponse, error) + // GetTopologyAwareResources returns allocation results of corresponding resources as topology aware format + GetTopologyAwareResources(context.Context, *GetTopologyAwareResourcesRequest) (*GetTopologyAwareResourcesResponse, error) + // GetTopologyAwareResources returns corresponding allocatable resources as topology aware format + GetTopologyAwareAllocatableResources(context.Context, *GetTopologyAwareAllocatableResourcesRequest) (*GetTopologyAwareAllocatableResourcesResponse, error) + // GetResourcePluginOptions returns options to be communicated with Resource + // Manager + GetResourcePluginOptions(context.Context, *Empty) (*ResourcePluginOptions, error) + // Allocate is called during pod admit so that the resource + // plugin can allocate corresponding resource for the container + // according to resource request + Allocate(context.Context, *ResourceRequest) (*ResourceAllocationResponse, error) + // AllocateForPod is called during pod admit so that the resource + // plugin can allocate corresponding resource for the pod + // according to resource request + AllocateForPod(context.Context, *PodResourceRequest) (*PodResourceAllocationResponse, error) + // PreStartContainer is called, if indicated by resource plugin during registeration phase, + // before each container start. Resource plugin can run resource specific operations + // such as resetting the resource before making resources available to the container + PreStartContainer(context.Context, *PreStartContainerRequest) (*PreStartContainerResponse, error) + // GetAssociatedDeviceTopologyHints gets associated device for the container + GetAssociatedDeviceTopologyHints(context.Context, *AssociatedDeviceRequest) (*AssociatedDeviceHintsResponse, error) + // UpdateAllocatableAssociatedDevices updates the allocatable associated devices for the resource plugin + // This is called when the device plugin reports the allocatable devices + UpdateAllocatableAssociatedDevices(context.Context, *UpdateAllocatableAssociatedDevicesRequest) (*UpdateAllocatableAssociatedDevicesResponse, error) + // AllocateAssociatedDevice allocates the associated device for the container + AllocateAssociatedDevice(context.Context, *AssociatedDeviceRequest) (*AssociatedDeviceAllocationResponse, error) +} + +// UnimplementedResourcePluginServer can be embedded to have forward compatible implementations. +type UnimplementedResourcePluginServer struct { +} + +func (*UnimplementedResourcePluginServer) GetTopologyHints(ctx context.Context, req *ResourceRequest) (*ResourceHintsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTopologyHints not implemented") +} +func (*UnimplementedResourcePluginServer) GetPodTopologyHints(ctx context.Context, req *PodResourceRequest) (*PodResourceHintsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPodTopologyHints not implemented") +} +func (*UnimplementedResourcePluginServer) RemovePod(ctx context.Context, req *RemovePodRequest) (*RemovePodResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemovePod not implemented") +} +func (*UnimplementedResourcePluginServer) GetResourcesAllocation(ctx context.Context, req *GetResourcesAllocationRequest) (*GetResourcesAllocationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetResourcesAllocation not implemented") +} +func (*UnimplementedResourcePluginServer) GetTopologyAwareResources(ctx context.Context, req *GetTopologyAwareResourcesRequest) (*GetTopologyAwareResourcesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTopologyAwareResources not implemented") +} +func (*UnimplementedResourcePluginServer) GetTopologyAwareAllocatableResources(ctx context.Context, req *GetTopologyAwareAllocatableResourcesRequest) (*GetTopologyAwareAllocatableResourcesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTopologyAwareAllocatableResources not implemented") +} +func (*UnimplementedResourcePluginServer) GetResourcePluginOptions(ctx context.Context, req *Empty) (*ResourcePluginOptions, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetResourcePluginOptions not implemented") +} +func (*UnimplementedResourcePluginServer) Allocate(ctx context.Context, req *ResourceRequest) (*ResourceAllocationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Allocate not implemented") +} +func (*UnimplementedResourcePluginServer) AllocateForPod(ctx context.Context, req *PodResourceRequest) (*PodResourceAllocationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllocateForPod not implemented") +} +func (*UnimplementedResourcePluginServer) PreStartContainer(ctx context.Context, req *PreStartContainerRequest) (*PreStartContainerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PreStartContainer not implemented") +} +func (*UnimplementedResourcePluginServer) GetAssociatedDeviceTopologyHints(ctx context.Context, req *AssociatedDeviceRequest) (*AssociatedDeviceHintsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAssociatedDeviceTopologyHints not implemented") +} +func (*UnimplementedResourcePluginServer) UpdateAllocatableAssociatedDevices(ctx context.Context, req *UpdateAllocatableAssociatedDevicesRequest) (*UpdateAllocatableAssociatedDevicesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateAllocatableAssociatedDevices not implemented") +} +func (*UnimplementedResourcePluginServer) AllocateAssociatedDevice(ctx context.Context, req *AssociatedDeviceRequest) (*AssociatedDeviceAllocationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllocateAssociatedDevice not implemented") +} + +func RegisterResourcePluginServer(s *grpc.Server, srv ResourcePluginServer) { + s.RegisterService(&_ResourcePlugin_serviceDesc, srv) +} + +func _ResourcePlugin_GetTopologyHints_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResourceRequest) + if err := dec(in); err != nil { + return nil, err } - if m.Hint != nil { - { - size, err := m.Hint.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApi(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a + if interceptor == nil { + return srv.(ResourcePluginServer).GetTopologyHints(ctx, in) } - if len(m.ResourceName) > 0 { - i -= len(m.ResourceName) - copy(dAtA[i:], m.ResourceName) - i = encodeVarintApi(dAtA, i, uint64(len(m.ResourceName))) - i-- - dAtA[i] = 0x32 + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/resourceplugin.v1alpha1.ResourcePlugin/GetTopologyHints", } - if len(m.PodType) > 0 { - i -= len(m.PodType) - copy(dAtA[i:], m.PodType) - i = encodeVarintApi(dAtA, i, uint64(len(m.PodType))) - i-- - dAtA[i] = 0x2a + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ResourcePluginServer).GetTopologyHints(ctx, req.(*ResourceRequest)) } - if len(m.PodRole) > 0 { - i -= len(m.PodRole) - copy(dAtA[i:], m.PodRole) - i = encodeVarintApi(dAtA, i, uint64(len(m.PodRole))) - i-- - dAtA[i] = 0x22 + return interceptor(ctx, in, info, handler) +} + +func _ResourcePlugin_GetPodTopologyHints_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PodResourceRequest) + if err := dec(in); err != nil { + return nil, err } - if len(m.PodName) > 0 { - i -= len(m.PodName) - copy(dAtA[i:], m.PodName) - i = encodeVarintApi(dAtA, i, uint64(len(m.PodName))) - i-- - dAtA[i] = 0x1a + if interceptor == nil { + return srv.(ResourcePluginServer).GetPodTopologyHints(ctx, in) } - if len(m.PodNamespace) > 0 { - i -= len(m.PodNamespace) - copy(dAtA[i:], m.PodNamespace) - i = encodeVarintApi(dAtA, i, uint64(len(m.PodNamespace))) - i-- - dAtA[i] = 0x12 + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/resourceplugin.v1alpha1.ResourcePlugin/GetPodTopologyHints", } - if len(m.PodUid) > 0 { - i -= len(m.PodUid) - copy(dAtA[i:], m.PodUid) - i = encodeVarintApi(dAtA, i, uint64(len(m.PodUid))) - i-- - dAtA[i] = 0xa + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ResourcePluginServer).GetPodTopologyHints(ctx, req.(*PodResourceRequest)) } - return len(dAtA) - i, nil + return interceptor(ctx, in, info, handler) } -func (m *PodResourceHintsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _ResourcePlugin_RemovePod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemovePodRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil + if interceptor == nil { + return srv.(ResourcePluginServer).RemovePod(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/resourceplugin.v1alpha1.ResourcePlugin/RemovePod", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ResourcePluginServer).RemovePod(ctx, req.(*RemovePodRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *PodResourceHintsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func _ResourcePlugin_GetResourcesAllocation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetResourcesAllocationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ResourcePluginServer).GetResourcesAllocation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/resourceplugin.v1alpha1.ResourcePlugin/GetResourcesAllocation", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ResourcePluginServer).GetResourcesAllocation(ctx, req.(*GetResourcesAllocationRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *PodResourceHintsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Annotations) > 0 { - for k := range m.Annotations { - v := m.Annotations[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintApi(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintApi(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintApi(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x4a - } +func _ResourcePlugin_GetTopologyAwareResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTopologyAwareResourcesRequest) + if err := dec(in); err != nil { + return nil, err } - if len(m.Labels) > 0 { - for k := range m.Labels { - v := m.Labels[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintApi(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintApi(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintApi(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x42 - } + if interceptor == nil { + return srv.(ResourcePluginServer).GetTopologyAwareResources(ctx, in) } - if len(m.ResourceHints) > 0 { - for k := range m.ResourceHints { - v := m.ResourceHints[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApi(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintApi(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintApi(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x3a - } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/resourceplugin.v1alpha1.ResourcePlugin/GetTopologyAwareResources", } - if len(m.ResourceName) > 0 { - i -= len(m.ResourceName) - copy(dAtA[i:], m.ResourceName) - i = encodeVarintApi(dAtA, i, uint64(len(m.ResourceName))) - i-- - dAtA[i] = 0x32 + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ResourcePluginServer).GetTopologyAwareResources(ctx, req.(*GetTopologyAwareResourcesRequest)) } - if len(m.PodType) > 0 { - i -= len(m.PodType) - copy(dAtA[i:], m.PodType) - i = encodeVarintApi(dAtA, i, uint64(len(m.PodType))) - i-- - dAtA[i] = 0x2a + return interceptor(ctx, in, info, handler) +} + +func _ResourcePlugin_GetTopologyAwareAllocatableResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTopologyAwareAllocatableResourcesRequest) + if err := dec(in); err != nil { + return nil, err } - if len(m.PodRole) > 0 { - i -= len(m.PodRole) - copy(dAtA[i:], m.PodRole) - i = encodeVarintApi(dAtA, i, uint64(len(m.PodRole))) - i-- - dAtA[i] = 0x22 + if interceptor == nil { + return srv.(ResourcePluginServer).GetTopologyAwareAllocatableResources(ctx, in) } - if len(m.PodName) > 0 { - i -= len(m.PodName) - copy(dAtA[i:], m.PodName) - i = encodeVarintApi(dAtA, i, uint64(len(m.PodName))) - i-- - dAtA[i] = 0x1a + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/resourceplugin.v1alpha1.ResourcePlugin/GetTopologyAwareAllocatableResources", } - if len(m.PodNamespace) > 0 { - i -= len(m.PodNamespace) - copy(dAtA[i:], m.PodNamespace) - i = encodeVarintApi(dAtA, i, uint64(len(m.PodNamespace))) - i-- - dAtA[i] = 0x12 + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ResourcePluginServer).GetTopologyAwareAllocatableResources(ctx, req.(*GetTopologyAwareAllocatableResourcesRequest)) } - if len(m.PodUid) > 0 { - i -= len(m.PodUid) - copy(dAtA[i:], m.PodUid) - i = encodeVarintApi(dAtA, i, uint64(len(m.PodUid))) - i-- - dAtA[i] = 0xa + return interceptor(ctx, in, info, handler) +} + +func _ResourcePlugin_GetResourcePluginOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err } - return len(dAtA) - i, nil + if interceptor == nil { + return srv.(ResourcePluginServer).GetResourcePluginOptions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/resourceplugin.v1alpha1.ResourcePlugin/GetResourcePluginOptions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ResourcePluginServer).GetResourcePluginOptions(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) } -func (m *ResourceHintsResponse) Marshal() (dAtA []byte, err error) { +func _ResourcePlugin_Allocate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResourceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ResourcePluginServer).Allocate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/resourceplugin.v1alpha1.ResourcePlugin/Allocate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ResourcePluginServer).Allocate(ctx, req.(*ResourceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ResourcePlugin_AllocateForPod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PodResourceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ResourcePluginServer).AllocateForPod(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/resourceplugin.v1alpha1.ResourcePlugin/AllocateForPod", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ResourcePluginServer).AllocateForPod(ctx, req.(*PodResourceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ResourcePlugin_PreStartContainer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PreStartContainerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ResourcePluginServer).PreStartContainer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/resourceplugin.v1alpha1.ResourcePlugin/PreStartContainer", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ResourcePluginServer).PreStartContainer(ctx, req.(*PreStartContainerRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ResourcePlugin_GetAssociatedDeviceTopologyHints_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AssociatedDeviceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ResourcePluginServer).GetAssociatedDeviceTopologyHints(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/resourceplugin.v1alpha1.ResourcePlugin/GetAssociatedDeviceTopologyHints", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ResourcePluginServer).GetAssociatedDeviceTopologyHints(ctx, req.(*AssociatedDeviceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ResourcePlugin_UpdateAllocatableAssociatedDevices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateAllocatableAssociatedDevicesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ResourcePluginServer).UpdateAllocatableAssociatedDevices(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/resourceplugin.v1alpha1.ResourcePlugin/UpdateAllocatableAssociatedDevices", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ResourcePluginServer).UpdateAllocatableAssociatedDevices(ctx, req.(*UpdateAllocatableAssociatedDevicesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ResourcePlugin_AllocateAssociatedDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AssociatedDeviceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ResourcePluginServer).AllocateAssociatedDevice(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/resourceplugin.v1alpha1.ResourcePlugin/AllocateAssociatedDevice", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ResourcePluginServer).AllocateAssociatedDevice(ctx, req.(*AssociatedDeviceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _ResourcePlugin_serviceDesc = grpc.ServiceDesc{ + ServiceName: "resourceplugin.v1alpha1.ResourcePlugin", + HandlerType: (*ResourcePluginServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetTopologyHints", + Handler: _ResourcePlugin_GetTopologyHints_Handler, + }, + { + MethodName: "GetPodTopologyHints", + Handler: _ResourcePlugin_GetPodTopologyHints_Handler, + }, + { + MethodName: "RemovePod", + Handler: _ResourcePlugin_RemovePod_Handler, + }, + { + MethodName: "GetResourcesAllocation", + Handler: _ResourcePlugin_GetResourcesAllocation_Handler, + }, + { + MethodName: "GetTopologyAwareResources", + Handler: _ResourcePlugin_GetTopologyAwareResources_Handler, + }, + { + MethodName: "GetTopologyAwareAllocatableResources", + Handler: _ResourcePlugin_GetTopologyAwareAllocatableResources_Handler, + }, + { + MethodName: "GetResourcePluginOptions", + Handler: _ResourcePlugin_GetResourcePluginOptions_Handler, + }, + { + MethodName: "Allocate", + Handler: _ResourcePlugin_Allocate_Handler, + }, + { + MethodName: "AllocateForPod", + Handler: _ResourcePlugin_AllocateForPod_Handler, + }, + { + MethodName: "PreStartContainer", + Handler: _ResourcePlugin_PreStartContainer_Handler, + }, + { + MethodName: "GetAssociatedDeviceTopologyHints", + Handler: _ResourcePlugin_GetAssociatedDeviceTopologyHints_Handler, + }, + { + MethodName: "UpdateAllocatableAssociatedDevices", + Handler: _ResourcePlugin_UpdateAllocatableAssociatedDevices_Handler, + }, + { + MethodName: "AllocateAssociatedDevice", + Handler: _ResourcePlugin_AllocateAssociatedDevice_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "api.proto", +} + +func (m *ResourcePluginOptions) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3399,28 +3646,146 @@ func (m *ResourceHintsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceHintsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *ResourcePluginOptions) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceHintsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ResourcePluginOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.NativeQosClass) > 0 { - i -= len(m.NativeQosClass) - copy(dAtA[i:], m.NativeQosClass) - i = encodeVarintApi(dAtA, i, uint64(len(m.NativeQosClass))) + if len(m.AssociatedDevices) > 0 { + for iNdEx := len(m.AssociatedDevices) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AssociatedDevices[iNdEx]) + copy(dAtA[i:], m.AssociatedDevices[iNdEx]) + i = encodeVarintApi(dAtA, i, uint64(len(m.AssociatedDevices[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if m.NeedReconcile { i-- - dAtA[i] = 0x6a + if m.NeedReconcile { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 } - if len(m.Annotations) > 0 { - for k := range m.Annotations { - v := m.Annotations[k] - baseI := i - i -= len(v) + if m.WithTopologyAlignment { + i-- + if m.WithTopologyAlignment { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if m.PreStartRequired { + i-- + if m.PreStartRequired { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *RegisterRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RegisterRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RegisterRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Options != nil { + { + size, err := m.Options.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.ResourceName) > 0 { + i -= len(m.ResourceName) + copy(dAtA[i:], m.ResourceName) + i = encodeVarintApi(dAtA, i, uint64(len(m.ResourceName))) + i-- + dAtA[i] = 0x1a + } + if len(m.Endpoint) > 0 { + i -= len(m.Endpoint) + copy(dAtA[i:], m.Endpoint) + i = encodeVarintApi(dAtA, i, uint64(len(m.Endpoint))) + i-- + dAtA[i] = 0x12 + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintApi(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ResourceRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.NativeQosClass) > 0 { + i -= len(m.NativeQosClass) + copy(dAtA[i:], m.NativeQosClass) + i = encodeVarintApi(dAtA, i, uint64(len(m.NativeQosClass))) + i-- + dAtA[i] = 0x72 + } + if len(m.Annotations) > 0 { + for k := range m.Annotations { + v := m.Annotations[k] + baseI := i + i -= len(v) copy(dAtA[i:], v) i = encodeVarintApi(dAtA, i, uint64(len(v))) i-- @@ -3432,7 +3797,7 @@ func (m *ResourceHintsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0xa i = encodeVarintApi(dAtA, i, uint64(baseI-i)) i-- - dAtA[i] = 0x62 + dAtA[i] = 0x6a } } if len(m.Labels) > 0 { @@ -3451,25 +3816,17 @@ func (m *ResourceHintsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0xa i = encodeVarintApi(dAtA, i, uint64(baseI-i)) i-- - dAtA[i] = 0x5a + dAtA[i] = 0x62 } } - if len(m.ResourceHints) > 0 { - for k := range m.ResourceHints { - v := m.ResourceHints[k] + if len(m.ResourceRequests) > 0 { + for k := range m.ResourceRequests { + v := m.ResourceRequests[k] baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApi(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) + i-- + dAtA[i] = 0x11 i -= len(k) copy(dAtA[i:], k) i = encodeVarintApi(dAtA, i, uint64(len(k))) @@ -3477,8 +3834,20 @@ func (m *ResourceHintsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0xa i = encodeVarintApi(dAtA, i, uint64(baseI-i)) i-- - dAtA[i] = 0x52 + dAtA[i] = 0x5a + } + } + if m.Hint != nil { + { + size, err := m.Hint.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x52 } if len(m.ResourceName) > 0 { i -= len(m.ResourceName) @@ -3542,7 +3911,7 @@ func (m *ResourceHintsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ResourceAllocationResponse) Marshal() (dAtA []byte, err error) { +func (m *PodResourceRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3552,23 +3921,16 @@ func (m *ResourceAllocationResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceAllocationResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *PodResourceRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceAllocationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *PodResourceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.NativeQosClass) > 0 { - i -= len(m.NativeQosClass) - copy(dAtA[i:], m.NativeQosClass) - i = encodeVarintApi(dAtA, i, uint64(len(m.NativeQosClass))) - i-- - dAtA[i] = 0x6a - } if len(m.Annotations) > 0 { for k := range m.Annotations { v := m.Annotations[k] @@ -3585,7 +3947,7 @@ func (m *ResourceAllocationResponse) MarshalToSizedBuffer(dAtA []byte) (int, err dAtA[i] = 0xa i = encodeVarintApi(dAtA, i, uint64(baseI-i)) i-- - dAtA[i] = 0x62 + dAtA[i] = 0x52 } } if len(m.Labels) > 0 { @@ -3604,12 +3966,30 @@ func (m *ResourceAllocationResponse) MarshalToSizedBuffer(dAtA []byte) (int, err dAtA[i] = 0xa i = encodeVarintApi(dAtA, i, uint64(baseI-i)) i-- - dAtA[i] = 0x5a + dAtA[i] = 0x4a } } - if m.AllocationResult != nil { + if len(m.ResourceRequests) > 0 { + for k := range m.ResourceRequests { + v := m.ResourceRequests[k] + baseI := i + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) + i-- + dAtA[i] = 0x11 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintApi(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintApi(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x42 + } + } + if m.Hint != nil { { - size, err := m.AllocationResult.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Hint.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -3617,44 +3997,27 @@ func (m *ResourceAllocationResponse) MarshalToSizedBuffer(dAtA []byte) (int, err i = encodeVarintApi(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x52 + dAtA[i] = 0x3a } if len(m.ResourceName) > 0 { i -= len(m.ResourceName) copy(dAtA[i:], m.ResourceName) i = encodeVarintApi(dAtA, i, uint64(len(m.ResourceName))) i-- - dAtA[i] = 0x4a + dAtA[i] = 0x32 } if len(m.PodType) > 0 { i -= len(m.PodType) copy(dAtA[i:], m.PodType) i = encodeVarintApi(dAtA, i, uint64(len(m.PodType))) i-- - dAtA[i] = 0x42 + dAtA[i] = 0x2a } if len(m.PodRole) > 0 { i -= len(m.PodRole) copy(dAtA[i:], m.PodRole) i = encodeVarintApi(dAtA, i, uint64(len(m.PodRole))) i-- - dAtA[i] = 0x3a - } - if m.ContainerIndex != 0 { - i = encodeVarintApi(dAtA, i, uint64(m.ContainerIndex)) - i-- - dAtA[i] = 0x30 - } - if m.ContainerType != 0 { - i = encodeVarintApi(dAtA, i, uint64(m.ContainerType)) - i-- - dAtA[i] = 0x28 - } - if len(m.ContainerName) > 0 { - i -= len(m.ContainerName) - copy(dAtA[i:], m.ContainerName) - i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerName))) - i-- dAtA[i] = 0x22 } if len(m.PodName) > 0 { @@ -3681,7 +4044,7 @@ func (m *ResourceAllocationResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } -func (m *PodResourceAllocationResponse) Marshal() (dAtA []byte, err error) { +func (m *PodResourceHintsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3691,12 +4054,12 @@ func (m *PodResourceAllocationResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PodResourceAllocationResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *PodResourceHintsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PodResourceAllocationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *PodResourceHintsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -3739,17 +4102,31 @@ func (m *PodResourceAllocationResponse) MarshalToSizedBuffer(dAtA []byte) (int, dAtA[i] = 0x42 } } - if m.AllocationResult != nil { - { - size, err := m.AllocationResult.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.ResourceHints) > 0 { + for k := range m.ResourceHints { + v := m.ResourceHints[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } - i -= size - i = encodeVarintApi(dAtA, i, uint64(size)) + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintApi(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintApi(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x3a } - i-- - dAtA[i] = 0x3a } if len(m.ResourceName) > 0 { i -= len(m.ResourceName) @@ -3796,7 +4173,7 @@ func (m *PodResourceAllocationResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *ListOfTopologyHints) Marshal() (dAtA []byte, err error) { +func (m *ResourceHintsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3806,127 +4183,139 @@ func (m *ListOfTopologyHints) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ListOfTopologyHints) MarshalTo(dAtA []byte) (int, error) { +func (m *ResourceHintsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ListOfTopologyHints) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ResourceHintsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Hints) > 0 { - for iNdEx := len(m.Hints) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Hints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.NativeQosClass) > 0 { + i -= len(m.NativeQosClass) + copy(dAtA[i:], m.NativeQosClass) + i = encodeVarintApi(dAtA, i, uint64(len(m.NativeQosClass))) + i-- + dAtA[i] = 0x6a + } + if len(m.Annotations) > 0 { + for k := range m.Annotations { + v := m.Annotations[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintApi(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintApi(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintApi(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x62 + } + } + if len(m.Labels) > 0 { + for k := range m.Labels { + v := m.Labels[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintApi(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintApi(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintApi(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x5a + } + } + if len(m.ResourceHints) > 0 { + for k := range m.ResourceHints { + v := m.ResourceHints[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintApi(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintApi(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa + i = encodeVarintApi(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x52 } } - return len(dAtA) - i, nil -} - -func (m *TopologyHint) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if len(m.ResourceName) > 0 { + i -= len(m.ResourceName) + copy(dAtA[i:], m.ResourceName) + i = encodeVarintApi(dAtA, i, uint64(len(m.ResourceName))) + i-- + dAtA[i] = 0x4a } - return dAtA[:n], nil -} - -func (m *TopologyHint) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TopologyHint) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Preferred { + if len(m.PodType) > 0 { + i -= len(m.PodType) + copy(dAtA[i:], m.PodType) + i = encodeVarintApi(dAtA, i, uint64(len(m.PodType))) i-- - if m.Preferred { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + dAtA[i] = 0x42 + } + if len(m.PodRole) > 0 { + i -= len(m.PodRole) + copy(dAtA[i:], m.PodRole) + i = encodeVarintApi(dAtA, i, uint64(len(m.PodRole))) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x3a } - if len(m.Nodes) > 0 { - dAtA9 := make([]byte, len(m.Nodes)*10) - var j8 int - for _, num := range m.Nodes { - for num >= 1<<7 { - dAtA9[j8] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j8++ - } - dAtA9[j8] = uint8(num) - j8++ - } - i -= j8 - copy(dAtA[i:], dAtA9[:j8]) - i = encodeVarintApi(dAtA, i, uint64(j8)) + if m.ContainerIndex != 0 { + i = encodeVarintApi(dAtA, i, uint64(m.ContainerIndex)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x30 } - return len(dAtA) - i, nil -} - -func (m *Empty) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if m.ContainerType != 0 { + i = encodeVarintApi(dAtA, i, uint64(m.ContainerType)) + i-- + dAtA[i] = 0x28 } - return dAtA[:n], nil -} - -func (m *Empty) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Empty) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *RemovePodRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if len(m.ContainerName) > 0 { + i -= len(m.ContainerName) + copy(dAtA[i:], m.ContainerName) + i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerName))) + i-- + dAtA[i] = 0x22 + } + if len(m.PodName) > 0 { + i -= len(m.PodName) + copy(dAtA[i:], m.PodName) + i = encodeVarintApi(dAtA, i, uint64(len(m.PodName))) + i-- + dAtA[i] = 0x1a + } + if len(m.PodNamespace) > 0 { + i -= len(m.PodNamespace) + copy(dAtA[i:], m.PodNamespace) + i = encodeVarintApi(dAtA, i, uint64(len(m.PodNamespace))) + i-- + dAtA[i] = 0x12 } - return dAtA[:n], nil -} - -func (m *RemovePodRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RemovePodRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l if len(m.PodUid) > 0 { i -= len(m.PodUid) copy(dAtA[i:], m.PodUid) @@ -3937,30 +4326,7 @@ func (m *RemovePodRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *RemovePodResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RemovePodResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RemovePodResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *GetResourcesAllocationRequest) Marshal() (dAtA []byte, err error) { +func (m *ResourceAllocationResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3970,55 +4336,32 @@ func (m *GetResourcesAllocationRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GetResourcesAllocationRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *ResourceAllocationResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *GetResourcesAllocationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ResourceAllocationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - return len(dAtA) - i, nil -} - -func (m *GetResourcesAllocationResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if len(m.NativeQosClass) > 0 { + i -= len(m.NativeQosClass) + copy(dAtA[i:], m.NativeQosClass) + i = encodeVarintApi(dAtA, i, uint64(len(m.NativeQosClass))) + i-- + dAtA[i] = 0x6a } - return dAtA[:n], nil -} - -func (m *GetResourcesAllocationResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetResourcesAllocationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.PodResources) > 0 { - for k := range m.PodResources { - v := m.PodResources[k] + if len(m.Annotations) > 0 { + for k := range m.Annotations { + v := m.Annotations[k] baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApi(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintApi(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = encodeVarintApi(dAtA, i, uint64(len(k))) @@ -4026,48 +4369,18 @@ func (m *GetResourcesAllocationResponse) MarshalToSizedBuffer(dAtA []byte) (int, dAtA[i] = 0xa i = encodeVarintApi(dAtA, i, uint64(baseI-i)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x62 } } - return len(dAtA) - i, nil -} - -func (m *ContainerResources) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ContainerResources) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ContainerResources) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ContainerResources) > 0 { - for k := range m.ContainerResources { - v := m.ContainerResources[k] + if len(m.Labels) > 0 { + for k := range m.Labels { + v := m.Labels[k] baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApi(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintApi(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = encodeVarintApi(dAtA, i, uint64(len(k))) @@ -4075,62 +4388,84 @@ func (m *ContainerResources) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0xa i = encodeVarintApi(dAtA, i, uint64(baseI-i)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x5a } } - return len(dAtA) - i, nil -} - -func (m *ResourceAllocation) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourceAllocation) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResourceAllocation) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ResourceAllocation) > 0 { - for k := range m.ResourceAllocation { - v := m.ResourceAllocation[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApi(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 + if m.AllocationResult != nil { + { + size, err := m.AllocationResult.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintApi(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintApi(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0xa + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x52 + } + if len(m.ResourceName) > 0 { + i -= len(m.ResourceName) + copy(dAtA[i:], m.ResourceName) + i = encodeVarintApi(dAtA, i, uint64(len(m.ResourceName))) + i-- + dAtA[i] = 0x4a + } + if len(m.PodType) > 0 { + i -= len(m.PodType) + copy(dAtA[i:], m.PodType) + i = encodeVarintApi(dAtA, i, uint64(len(m.PodType))) + i-- + dAtA[i] = 0x42 + } + if len(m.PodRole) > 0 { + i -= len(m.PodRole) + copy(dAtA[i:], m.PodRole) + i = encodeVarintApi(dAtA, i, uint64(len(m.PodRole))) + i-- + dAtA[i] = 0x3a + } + if m.ContainerIndex != 0 { + i = encodeVarintApi(dAtA, i, uint64(m.ContainerIndex)) + i-- + dAtA[i] = 0x30 + } + if m.ContainerType != 0 { + i = encodeVarintApi(dAtA, i, uint64(m.ContainerType)) + i-- + dAtA[i] = 0x28 + } + if len(m.ContainerName) > 0 { + i -= len(m.ContainerName) + copy(dAtA[i:], m.ContainerName) + i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerName))) + i-- + dAtA[i] = 0x22 + } + if len(m.PodName) > 0 { + i -= len(m.PodName) + copy(dAtA[i:], m.PodName) + i = encodeVarintApi(dAtA, i, uint64(len(m.PodName))) + i-- + dAtA[i] = 0x1a + } + if len(m.PodNamespace) > 0 { + i -= len(m.PodNamespace) + copy(dAtA[i:], m.PodNamespace) + i = encodeVarintApi(dAtA, i, uint64(len(m.PodNamespace))) + i-- + dAtA[i] = 0x12 + } + if len(m.PodUid) > 0 { + i -= len(m.PodUid) + copy(dAtA[i:], m.PodUid) + i = encodeVarintApi(dAtA, i, uint64(len(m.PodUid))) + i-- + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *ResourceAllocationInfo) Marshal() (dAtA []byte, err error) { +func (m *PodResourceAllocationResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4140,43 +4475,16 @@ func (m *ResourceAllocationInfo) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceAllocationInfo) MarshalTo(dAtA []byte) (int, error) { +func (m *PodResourceAllocationResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceAllocationInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *PodResourceAllocationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.TopologyAssignments) > 0 { - for k := range m.TopologyAssignments { - v := m.TopologyAssignments[k] - baseI := i - i = encodeVarintApi(dAtA, i, uint64(v)) - i-- - dAtA[i] = 0x10 - i = encodeVarintApi(dAtA, i, uint64(k)) - i-- - dAtA[i] = 0x8 - i = encodeVarintApi(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x4a - } - } - if m.ResourceHints != nil { - { - size, err := m.ResourceHints.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApi(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } if len(m.Annotations) > 0 { for k := range m.Annotations { v := m.Annotations[k] @@ -4193,12 +4501,12 @@ func (m *ResourceAllocationInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) dAtA[i] = 0xa i = encodeVarintApi(dAtA, i, uint64(baseI-i)) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x4a } } - if len(m.Envs) > 0 { - for k := range m.Envs { - v := m.Envs[k] + if len(m.Labels) > 0 { + for k := range m.Labels { + v := m.Labels[k] baseI := i i -= len(v) copy(dAtA[i:], v) @@ -4212,53 +4520,67 @@ func (m *ResourceAllocationInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) dAtA[i] = 0xa i = encodeVarintApi(dAtA, i, uint64(baseI-i)) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x42 } } - if len(m.AllocationResult) > 0 { - i -= len(m.AllocationResult) - copy(dAtA[i:], m.AllocationResult) - i = encodeVarintApi(dAtA, i, uint64(len(m.AllocationResult))) + if m.AllocationResult != nil { + { + size, err := m.AllocationResult.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) + } i-- - dAtA[i] = 0x2a + dAtA[i] = 0x3a } - if m.AllocatedQuantity != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.AllocatedQuantity)))) + if len(m.ResourceName) > 0 { + i -= len(m.ResourceName) + copy(dAtA[i:], m.ResourceName) + i = encodeVarintApi(dAtA, i, uint64(len(m.ResourceName))) i-- - dAtA[i] = 0x21 + dAtA[i] = 0x32 } - if m.IsScalarResource { + if len(m.PodType) > 0 { + i -= len(m.PodType) + copy(dAtA[i:], m.PodType) + i = encodeVarintApi(dAtA, i, uint64(len(m.PodType))) i-- - if m.IsScalarResource { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + dAtA[i] = 0x2a + } + if len(m.PodRole) > 0 { + i -= len(m.PodRole) + copy(dAtA[i:], m.PodRole) + i = encodeVarintApi(dAtA, i, uint64(len(m.PodRole))) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x22 } - if m.IsNodeResource { + if len(m.PodName) > 0 { + i -= len(m.PodName) + copy(dAtA[i:], m.PodName) + i = encodeVarintApi(dAtA, i, uint64(len(m.PodName))) i-- - if m.IsNodeResource { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + dAtA[i] = 0x1a + } + if len(m.PodNamespace) > 0 { + i -= len(m.PodNamespace) + copy(dAtA[i:], m.PodNamespace) + i = encodeVarintApi(dAtA, i, uint64(len(m.PodNamespace))) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x12 } - if len(m.OciPropertyName) > 0 { - i -= len(m.OciPropertyName) - copy(dAtA[i:], m.OciPropertyName) - i = encodeVarintApi(dAtA, i, uint64(len(m.OciPropertyName))) + if len(m.PodUid) > 0 { + i -= len(m.PodUid) + copy(dAtA[i:], m.PodUid) + i = encodeVarintApi(dAtA, i, uint64(len(m.PodUid))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *GetTopologyAwareResourcesRequest) Marshal() (dAtA []byte, err error) { +func (m *ListOfTopologyHints) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4268,34 +4590,34 @@ func (m *GetTopologyAwareResourcesRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GetTopologyAwareResourcesRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *ListOfTopologyHints) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *GetTopologyAwareResourcesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ListOfTopologyHints) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.ContainerName) > 0 { - i -= len(m.ContainerName) - copy(dAtA[i:], m.ContainerName) - i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerName))) - i-- - dAtA[i] = 0x12 - } - if len(m.PodUid) > 0 { - i -= len(m.PodUid) - copy(dAtA[i:], m.PodUid) - i = encodeVarintApi(dAtA, i, uint64(len(m.PodUid))) - i-- - dAtA[i] = 0xa + if len(m.Hints) > 0 { + for iNdEx := len(m.Hints) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Hints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } } return len(dAtA) - i, nil } -func (m *GetTopologyAwareResourcesResponse) Marshal() (dAtA []byte, err error) { +func (m *TopologyHint) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4305,42 +4627,90 @@ func (m *GetTopologyAwareResourcesResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GetTopologyAwareResourcesResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *TopologyHint) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *GetTopologyAwareResourcesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TopologyHint) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.ContainerTopologyAwareResources != nil { - { - size, err := m.ContainerTopologyAwareResources.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApi(dAtA, i, uint64(size)) + if m.Preferred { + i-- + if m.Preferred { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x10 } - if len(m.PodNamespace) > 0 { - i -= len(m.PodNamespace) - copy(dAtA[i:], m.PodNamespace) - i = encodeVarintApi(dAtA, i, uint64(len(m.PodNamespace))) + if len(m.Nodes) > 0 { + dAtA9 := make([]byte, len(m.Nodes)*10) + var j8 int + for _, num := range m.Nodes { + for num >= 1<<7 { + dAtA9[j8] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j8++ + } + dAtA9[j8] = uint8(num) + j8++ + } + i -= j8 + copy(dAtA[i:], dAtA9[:j8]) + i = encodeVarintApi(dAtA, i, uint64(j8)) i-- - dAtA[i] = 0x1a + dAtA[i] = 0xa } - if len(m.PodName) > 0 { - i -= len(m.PodName) - copy(dAtA[i:], m.PodName) - i = encodeVarintApi(dAtA, i, uint64(len(m.PodName))) - i-- - dAtA[i] = 0x12 + return len(dAtA) - i, nil +} + +func (m *Empty) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Empty) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Empty) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RemovePodRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *RemovePodRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RemovePodRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l if len(m.PodUid) > 0 { i -= len(m.PodUid) copy(dAtA[i:], m.PodUid) @@ -4351,7 +4721,7 @@ func (m *GetTopologyAwareResourcesResponse) MarshalToSizedBuffer(dAtA []byte) (i return len(dAtA) - i, nil } -func (m *ContainerTopologyAwareResources) Marshal() (dAtA []byte, err error) { +func (m *RemovePodResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4361,19 +4731,65 @@ func (m *ContainerTopologyAwareResources) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ContainerTopologyAwareResources) MarshalTo(dAtA []byte) (int, error) { +func (m *RemovePodResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ContainerTopologyAwareResources) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *RemovePodResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.AllocatedResources) > 0 { - for k := range m.AllocatedResources { - v := m.AllocatedResources[k] + return len(dAtA) - i, nil +} + +func (m *GetResourcesAllocationRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetResourcesAllocationRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetResourcesAllocationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *GetResourcesAllocationResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetResourcesAllocationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetResourcesAllocationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PodResources) > 0 { + for k := range m.PodResources { + v := m.PodResources[k] baseI := i if v != nil { { @@ -4394,20 +4810,13 @@ func (m *ContainerTopologyAwareResources) MarshalToSizedBuffer(dAtA []byte) (int dAtA[i] = 0xa i = encodeVarintApi(dAtA, i, uint64(baseI-i)) i-- - dAtA[i] = 0x12 + dAtA[i] = 0xa } } - if len(m.ContainerName) > 0 { - i -= len(m.ContainerName) - copy(dAtA[i:], m.ContainerName) - i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerName))) - i-- - dAtA[i] = 0xa - } return len(dAtA) - i, nil } -func (m *TopologyAwareResource) Marshal() (dAtA []byte, err error) { +func (m *ContainerResources) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4417,80 +4826,95 @@ func (m *TopologyAwareResource) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TopologyAwareResource) MarshalTo(dAtA []byte) (int, error) { +func (m *ContainerResources) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TopologyAwareResource) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ContainerResources) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.OriginalTopologyAwareQuantityList) > 0 { - for iNdEx := len(m.OriginalTopologyAwareQuantityList) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.OriginalTopologyAwareQuantityList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApi(dAtA, i, uint64(size)) + if len(m.ContainerResources) > 0 { + for k := range m.ContainerResources { + v := m.ContainerResources[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintApi(dAtA, i, uint64(len(k))) i-- - dAtA[i] = 0x32 + dAtA[i] = 0xa + i = encodeVarintApi(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa } } - if len(m.TopologyAwareQuantityList) > 0 { - for iNdEx := len(m.TopologyAwareQuantityList) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.TopologyAwareQuantityList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + return len(dAtA) - i, nil +} + +func (m *ResourceAllocation) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceAllocation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceAllocation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ResourceAllocation) > 0 { + for k := range m.ResourceAllocation { + v := m.ResourceAllocation[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintApi(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintApi(dAtA, i, uint64(len(k))) i-- - dAtA[i] = 0x2a - } - } - if m.OriginalAggregatedQuantity != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.OriginalAggregatedQuantity)))) - i-- - dAtA[i] = 0x21 - } - if m.AggregatedQuantity != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.AggregatedQuantity)))) - i-- - dAtA[i] = 0x19 - } - if m.IsScalarResource { - i-- - if m.IsScalarResource { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if m.IsNodeResource { - i-- - if m.IsNodeResource { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + dAtA[i] = 0xa + i = encodeVarintApi(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa } - i-- - dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *TopologyAwareQuantity) Marshal() (dAtA []byte, err error) { +func (m *ResourceAllocationInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4500,16 +4924,43 @@ func (m *TopologyAwareQuantity) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TopologyAwareQuantity) MarshalTo(dAtA []byte) (int, error) { +func (m *ResourceAllocationInfo) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TopologyAwareQuantity) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ResourceAllocationInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + if len(m.TopologyAssignments) > 0 { + for k := range m.TopologyAssignments { + v := m.TopologyAssignments[k] + baseI := i + i = encodeVarintApi(dAtA, i, uint64(v)) + i-- + dAtA[i] = 0x10 + i = encodeVarintApi(dAtA, i, uint64(k)) + i-- + dAtA[i] = 0x8 + i = encodeVarintApi(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x4a + } + } + if m.ResourceHints != nil { + { + size, err := m.ResourceHints.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } if len(m.Annotations) > 0 { for k := range m.Annotations { v := m.Annotations[k] @@ -4526,43 +4977,72 @@ func (m *TopologyAwareQuantity) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0xa i = encodeVarintApi(dAtA, i, uint64(baseI-i)) i-- + dAtA[i] = 0x3a + } + } + if len(m.Envs) > 0 { + for k := range m.Envs { + v := m.Envs[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintApi(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintApi(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintApi(dAtA, i, uint64(baseI-i)) + i-- dAtA[i] = 0x32 } } - if m.TopologyLevel != 0 { - i = encodeVarintApi(dAtA, i, uint64(m.TopologyLevel)) + if len(m.AllocationResult) > 0 { + i -= len(m.AllocationResult) + copy(dAtA[i:], m.AllocationResult) + i = encodeVarintApi(dAtA, i, uint64(len(m.AllocationResult))) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x2a } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintApi(dAtA, i, uint64(len(m.Type))) + if m.AllocatedQuantity != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.AllocatedQuantity)))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x21 } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintApi(dAtA, i, uint64(len(m.Name))) + if m.IsScalarResource { i-- - dAtA[i] = 0x1a + if m.IsScalarResource { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 } - if m.Node != 0 { - i = encodeVarintApi(dAtA, i, uint64(m.Node)) + if m.IsNodeResource { + i-- + if m.IsNodeResource { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } i-- dAtA[i] = 0x10 } - if m.ResourceValue != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.ResourceValue)))) + if len(m.OciPropertyName) > 0 { + i -= len(m.OciPropertyName) + copy(dAtA[i:], m.OciPropertyName) + i = encodeVarintApi(dAtA, i, uint64(len(m.OciPropertyName))) i-- - dAtA[i] = 0x9 + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *GetTopologyAwareAllocatableResourcesRequest) Marshal() (dAtA []byte, err error) { +func (m *GetTopologyAwareResourcesRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4572,20 +5052,34 @@ func (m *GetTopologyAwareAllocatableResourcesRequest) Marshal() (dAtA []byte, er return dAtA[:n], nil } -func (m *GetTopologyAwareAllocatableResourcesRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *GetTopologyAwareResourcesRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *GetTopologyAwareAllocatableResourcesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *GetTopologyAwareResourcesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + if len(m.ContainerName) > 0 { + i -= len(m.ContainerName) + copy(dAtA[i:], m.ContainerName) + i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerName))) + i-- + dAtA[i] = 0x12 + } + if len(m.PodUid) > 0 { + i -= len(m.PodUid) + copy(dAtA[i:], m.PodUid) + i = encodeVarintApi(dAtA, i, uint64(len(m.PodUid))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } -func (m *GetTopologyAwareAllocatableResourcesResponse) Marshal() (dAtA []byte, err error) { +func (m *GetTopologyAwareResourcesResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4595,31 +5089,87 @@ func (m *GetTopologyAwareAllocatableResourcesResponse) Marshal() (dAtA []byte, e return dAtA[:n], nil } -func (m *GetTopologyAwareAllocatableResourcesResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *GetTopologyAwareResourcesResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *GetTopologyAwareAllocatableResourcesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *GetTopologyAwareResourcesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.AllocatableResources) > 0 { - for k := range m.AllocatableResources { - v := m.AllocatableResources[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApi(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 + if m.ContainerTopologyAwareResources != nil { + { + size, err := m.ContainerTopologyAwareResources.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.PodNamespace) > 0 { + i -= len(m.PodNamespace) + copy(dAtA[i:], m.PodNamespace) + i = encodeVarintApi(dAtA, i, uint64(len(m.PodNamespace))) + i-- + dAtA[i] = 0x1a + } + if len(m.PodName) > 0 { + i -= len(m.PodName) + copy(dAtA[i:], m.PodName) + i = encodeVarintApi(dAtA, i, uint64(len(m.PodName))) + i-- + dAtA[i] = 0x12 + } + if len(m.PodUid) > 0 { + i -= len(m.PodUid) + copy(dAtA[i:], m.PodUid) + i = encodeVarintApi(dAtA, i, uint64(len(m.PodUid))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ContainerTopologyAwareResources) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContainerTopologyAwareResources) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ContainerTopologyAwareResources) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AllocatedResources) > 0 { + for k := range m.AllocatedResources { + v := m.AllocatedResources[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } i -= len(k) copy(dAtA[i:], k) @@ -4628,13 +5178,20 @@ func (m *GetTopologyAwareAllocatableResourcesResponse) MarshalToSizedBuffer(dAtA dAtA[i] = 0xa i = encodeVarintApi(dAtA, i, uint64(baseI-i)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 } } + if len(m.ContainerName) > 0 { + i -= len(m.ContainerName) + copy(dAtA[i:], m.ContainerName) + i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerName))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } -func (m *AllocatableTopologyAwareResource) Marshal() (dAtA []byte, err error) { +func (m *TopologyAwareResource) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4644,20 +5201,20 @@ func (m *AllocatableTopologyAwareResource) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *AllocatableTopologyAwareResource) MarshalTo(dAtA []byte) (int, error) { +func (m *TopologyAwareResource) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *AllocatableTopologyAwareResource) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TopologyAwareResource) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.TopologyAwareCapacityQuantityList) > 0 { - for iNdEx := len(m.TopologyAwareCapacityQuantityList) - 1; iNdEx >= 0; iNdEx-- { + if len(m.OriginalTopologyAwareQuantityList) > 0 { + for iNdEx := len(m.OriginalTopologyAwareQuantityList) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.TopologyAwareCapacityQuantityList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.OriginalTopologyAwareQuantityList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -4668,16 +5225,10 @@ func (m *AllocatableTopologyAwareResource) MarshalToSizedBuffer(dAtA []byte) (in dAtA[i] = 0x32 } } - if m.AggregatedCapacityQuantity != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.AggregatedCapacityQuantity)))) - i-- - dAtA[i] = 0x29 - } - if len(m.TopologyAwareAllocatableQuantityList) > 0 { - for iNdEx := len(m.TopologyAwareAllocatableQuantityList) - 1; iNdEx >= 0; iNdEx-- { + if len(m.TopologyAwareQuantityList) > 0 { + for iNdEx := len(m.TopologyAwareQuantityList) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.TopologyAwareAllocatableQuantityList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.TopologyAwareQuantityList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -4685,12 +5236,18 @@ func (m *AllocatableTopologyAwareResource) MarshalToSizedBuffer(dAtA []byte) (in i = encodeVarintApi(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x2a } } - if m.AggregatedAllocatableQuantity != 0 { + if m.OriginalAggregatedQuantity != 0 { i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.AggregatedAllocatableQuantity)))) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.OriginalAggregatedQuantity)))) + i-- + dAtA[i] = 0x21 + } + if m.AggregatedQuantity != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.AggregatedQuantity)))) i-- dAtA[i] = 0x19 } @@ -4717,7 +5274,7 @@ func (m *AllocatableTopologyAwareResource) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } -func (m *PreStartContainerRequest) Marshal() (dAtA []byte, err error) { +func (m *TopologyAwareQuantity) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4727,48 +5284,69 @@ func (m *PreStartContainerRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PreStartContainerRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *TopologyAwareQuantity) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PreStartContainerRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TopologyAwareQuantity) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.ContainerName) > 0 { - i -= len(m.ContainerName) - copy(dAtA[i:], m.ContainerName) - i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerName))) + if len(m.Annotations) > 0 { + for k := range m.Annotations { + v := m.Annotations[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintApi(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintApi(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintApi(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x32 + } + } + if m.TopologyLevel != 0 { + i = encodeVarintApi(dAtA, i, uint64(m.TopologyLevel)) + i-- + dAtA[i] = 0x28 + } + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintApi(dAtA, i, uint64(len(m.Type))) i-- dAtA[i] = 0x22 } - if len(m.PodName) > 0 { - i -= len(m.PodName) - copy(dAtA[i:], m.PodName) - i = encodeVarintApi(dAtA, i, uint64(len(m.PodName))) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintApi(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0x1a } - if len(m.PodNamespace) > 0 { - i -= len(m.PodNamespace) - copy(dAtA[i:], m.PodNamespace) - i = encodeVarintApi(dAtA, i, uint64(len(m.PodNamespace))) + if m.Node != 0 { + i = encodeVarintApi(dAtA, i, uint64(m.Node)) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x10 } - if len(m.PodUid) > 0 { - i -= len(m.PodUid) - copy(dAtA[i:], m.PodUid) - i = encodeVarintApi(dAtA, i, uint64(len(m.PodUid))) + if m.ResourceValue != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.ResourceValue)))) i-- - dAtA[i] = 0xa + dAtA[i] = 0x9 } return len(dAtA) - i, nil } -func (m *PreStartContainerResponse) Marshal() (dAtA []byte, err error) { +func (m *GetTopologyAwareAllocatableResourcesRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4778,12 +5356,12 @@ func (m *PreStartContainerResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PreStartContainerResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *GetTopologyAwareAllocatableResourcesRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PreStartContainerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *GetTopologyAwareAllocatableResourcesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -4791,649 +5369,840 @@ func (m *PreStartContainerResponse) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } -func encodeVarintApi(dAtA []byte, offset int, v uint64) int { - offset -= sovApi(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *GetTopologyAwareAllocatableResourcesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *ResourcePluginOptions) Size() (n int) { - if m == nil { - return 0 - } + +func (m *GetTopologyAwareAllocatableResourcesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetTopologyAwareAllocatableResourcesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.PreStartRequired { - n += 2 - } - if m.WithTopologyAlignment { - n += 2 - } - if m.NeedReconcile { - n += 2 + if len(m.AllocatableResources) > 0 { + for k := range m.AllocatableResources { + v := m.AllocatableResources[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintApi(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintApi(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa + } } - return n + return len(dAtA) - i, nil } -func (m *RegisterRequest) Size() (n int) { - if m == nil { - return 0 +func (m *AllocatableTopologyAwareResource) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - l = len(m.Version) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.Endpoint) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.ResourceName) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - if m.Options != nil { - l = m.Options.Size() - n += 1 + l + sovApi(uint64(l)) - } - return n + return dAtA[:n], nil } -func (m *ResourceRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *AllocatableTopologyAwareResource) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AllocatableTopologyAwareResource) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.PodUid) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.PodNamespace) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.PodName) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.ContainerName) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - if m.ContainerType != 0 { - n += 1 + sovApi(uint64(m.ContainerType)) - } - if m.ContainerIndex != 0 { - n += 1 + sovApi(uint64(m.ContainerIndex)) - } - l = len(m.PodRole) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.PodType) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.ResourceName) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) + if len(m.TopologyAwareCapacityQuantityList) > 0 { + for iNdEx := len(m.TopologyAwareCapacityQuantityList) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TopologyAwareCapacityQuantityList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } } - if m.Hint != nil { - l = m.Hint.Size() - n += 1 + l + sovApi(uint64(l)) + if m.AggregatedCapacityQuantity != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.AggregatedCapacityQuantity)))) + i-- + dAtA[i] = 0x29 } - if len(m.ResourceRequests) > 0 { - for k, v := range m.ResourceRequests { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + 8 - n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + if len(m.TopologyAwareAllocatableQuantityList) > 0 { + for iNdEx := len(m.TopologyAwareAllocatableQuantityList) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TopologyAwareAllocatableQuantityList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 } } - if len(m.Labels) > 0 { - for k, v := range m.Labels { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) - n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) - } + if m.AggregatedAllocatableQuantity != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.AggregatedAllocatableQuantity)))) + i-- + dAtA[i] = 0x19 } - if len(m.Annotations) > 0 { - for k, v := range m.Annotations { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) - n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + if m.IsScalarResource { + i-- + if m.IsScalarResource { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i-- + dAtA[i] = 0x10 } - l = len(m.NativeQosClass) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) + if m.IsNodeResource { + i-- + if m.IsNodeResource { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 } - return n + return len(dAtA) - i, nil } -func (m *PodResourceRequest) Size() (n int) { - if m == nil { - return 0 +func (m *PreStartContainerRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *PreStartContainerRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PreStartContainerRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.PodUid) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.PodNamespace) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.PodName) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.PodRole) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.PodType) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.ResourceName) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - if m.Hint != nil { - l = m.Hint.Size() - n += 1 + l + sovApi(uint64(l)) + if len(m.ContainerName) > 0 { + i -= len(m.ContainerName) + copy(dAtA[i:], m.ContainerName) + i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerName))) + i-- + dAtA[i] = 0x22 } - if len(m.ResourceRequests) > 0 { - for k, v := range m.ResourceRequests { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + 8 - n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) - } + if len(m.PodName) > 0 { + i -= len(m.PodName) + copy(dAtA[i:], m.PodName) + i = encodeVarintApi(dAtA, i, uint64(len(m.PodName))) + i-- + dAtA[i] = 0x1a } - if len(m.Labels) > 0 { - for k, v := range m.Labels { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) - n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) - } + if len(m.PodNamespace) > 0 { + i -= len(m.PodNamespace) + copy(dAtA[i:], m.PodNamespace) + i = encodeVarintApi(dAtA, i, uint64(len(m.PodNamespace))) + i-- + dAtA[i] = 0x12 } - if len(m.Annotations) > 0 { - for k, v := range m.Annotations { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) - n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) - } + if len(m.PodUid) > 0 { + i -= len(m.PodUid) + copy(dAtA[i:], m.PodUid) + i = encodeVarintApi(dAtA, i, uint64(len(m.PodUid))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *PodResourceHintsResponse) Size() (n int) { - if m == nil { - return 0 +func (m *PreStartContainerResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *PreStartContainerResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PreStartContainerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.PodUid) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.PodNamespace) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.PodName) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.PodRole) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.PodType) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.ResourceName) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) + return len(dAtA) - i, nil +} + +func (m *AssociatedDevice) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - if len(m.ResourceHints) > 0 { - for k, v := range m.ResourceHints { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovApi(uint64(l)) + return dAtA[:n], nil +} + +func (m *AssociatedDevice) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AssociatedDevice) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Topology != nil { + { + size, err := m.Topology.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + l - n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a } - if len(m.Labels) > 0 { - for k, v := range m.Labels { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) - n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) - } + if len(m.Health) > 0 { + i -= len(m.Health) + copy(dAtA[i:], m.Health) + i = encodeVarintApi(dAtA, i, uint64(len(m.Health))) + i-- + dAtA[i] = 0x12 } - if len(m.Annotations) > 0 { - for k, v := range m.Annotations { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) - n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) - } + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintApi(dAtA, i, uint64(len(m.ID))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *ResourceHintsResponse) Size() (n int) { - if m == nil { - return 0 +func (m *TopologyInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *TopologyInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TopologyInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.PodUid) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.PodNamespace) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.PodName) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.ContainerName) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - if m.ContainerType != 0 { - n += 1 + sovApi(uint64(m.ContainerType)) - } - if m.ContainerIndex != 0 { - n += 1 + sovApi(uint64(m.ContainerIndex)) + if len(m.Nodes) > 0 { + for iNdEx := len(m.Nodes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Nodes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } } - l = len(m.PodRole) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) + return len(dAtA) - i, nil +} + +func (m *NUMANode) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - l = len(m.PodType) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) + return dAtA[:n], nil +} + +func (m *NUMANode) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NUMANode) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ID != 0 { + i = encodeVarintApi(dAtA, i, uint64(m.ID)) + i-- + dAtA[i] = 0x8 } - l = len(m.ResourceName) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) + return len(dAtA) - i, nil +} + +func (m *UpdateAllocatableAssociatedDevicesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - if len(m.ResourceHints) > 0 { - for k, v := range m.ResourceHints { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovApi(uint64(l)) + return dAtA[:n], nil +} + +func (m *UpdateAllocatableAssociatedDevicesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateAllocatableAssociatedDevicesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Devices) > 0 { + for iNdEx := len(m.Devices) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Devices[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) } - mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + l - n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) - } - } - if len(m.Labels) > 0 { - for k, v := range m.Labels { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) - n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) - } - } - if len(m.Annotations) > 0 { - for k, v := range m.Annotations { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) - n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + i-- + dAtA[i] = 0x12 } } - l = len(m.NativeQosClass) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) + if len(m.DeviceName) > 0 { + i -= len(m.DeviceName) + copy(dAtA[i:], m.DeviceName) + i = encodeVarintApi(dAtA, i, uint64(len(m.DeviceName))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *ResourceAllocationResponse) Size() (n int) { - if m == nil { - return 0 +func (m *UpdateAllocatableAssociatedDevicesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *UpdateAllocatableAssociatedDevicesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateAllocatableAssociatedDevicesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.PodUid) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.PodNamespace) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.PodName) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) + return len(dAtA) - i, nil +} + +func (m *AssociatedDeviceRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - l = len(m.ContainerName) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - if m.ContainerType != 0 { - n += 1 + sovApi(uint64(m.ContainerType)) - } - if m.ContainerIndex != 0 { - n += 1 + sovApi(uint64(m.ContainerIndex)) - } - l = len(m.PodRole) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.PodType) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.ResourceName) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - if m.AllocationResult != nil { - l = m.AllocationResult.Size() - n += 1 + l + sovApi(uint64(l)) - } - if len(m.Labels) > 0 { - for k, v := range m.Labels { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) - n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + return dAtA[:n], nil +} + +func (m *AssociatedDeviceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AssociatedDeviceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.DeviceRequest != nil { + { + size, err := m.DeviceRequest.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x12 } - if len(m.Annotations) > 0 { - for k, v := range m.Annotations { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) - n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + if m.ResourceRequest != nil { + { + size, err := m.ResourceRequest.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa } - l = len(m.NativeQosClass) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - return n + return len(dAtA) - i, nil } -func (m *PodResourceAllocationResponse) Size() (n int) { - if m == nil { - return 0 +func (m *DeviceRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *DeviceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeviceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.PodUid) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.PodNamespace) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.PodName) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.PodRole) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.PodType) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.ResourceName) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) + if m.DeviceRequest != 0 { + i = encodeVarintApi(dAtA, i, uint64(m.DeviceRequest)) + i-- + dAtA[i] = 0x28 } - if m.AllocationResult != nil { - l = m.AllocationResult.Size() - n += 1 + l + sovApi(uint64(l)) + if len(m.ReusableDevices) > 0 { + for iNdEx := len(m.ReusableDevices) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ReusableDevices[iNdEx]) + copy(dAtA[i:], m.ReusableDevices[iNdEx]) + i = encodeVarintApi(dAtA, i, uint64(len(m.ReusableDevices[iNdEx]))) + i-- + dAtA[i] = 0x22 + } } - if len(m.Labels) > 0 { - for k, v := range m.Labels { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) - n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + if len(m.AvailableDevices) > 0 { + for iNdEx := len(m.AvailableDevices) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AvailableDevices[iNdEx]) + copy(dAtA[i:], m.AvailableDevices[iNdEx]) + i = encodeVarintApi(dAtA, i, uint64(len(m.AvailableDevices[iNdEx]))) + i-- + dAtA[i] = 0x1a } } - if len(m.Annotations) > 0 { - for k, v := range m.Annotations { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) - n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + if m.Hint != nil { + { + size, err := m.Hint.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x12 } - return n + if len(m.DeviceName) > 0 { + i -= len(m.DeviceName) + copy(dAtA[i:], m.DeviceName) + i = encodeVarintApi(dAtA, i, uint64(len(m.DeviceName))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *ListOfTopologyHints) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Hints) > 0 { - for _, e := range m.Hints { - l = e.Size() - n += 1 + l + sovApi(uint64(l)) - } +func (m *AssociatedDeviceAllocationResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - return n + return dAtA[:n], nil } -func (m *TopologyHint) Size() (n int) { - if m == nil { - return 0 - } +func (m *AssociatedDeviceAllocationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AssociatedDeviceAllocationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.Nodes) > 0 { - l = 0 - for _, e := range m.Nodes { - l += sovApi(uint64(e)) + if m.AllocationResult != nil { + { + size, err := m.AllocationResult.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) } - n += 1 + sovApi(uint64(l)) + l - } - if m.Preferred { - n += 2 + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *Empty) Size() (n int) { - if m == nil { - return 0 +func (m *AssociatedDeviceAllocation) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - return n + return dAtA[:n], nil } -func (m *RemovePodRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *AssociatedDeviceAllocation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AssociatedDeviceAllocation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.PodUid) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) + if len(m.AllocatedDevices) > 0 { + for iNdEx := len(m.AllocatedDevices) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AllocatedDevices[iNdEx]) + copy(dAtA[i:], m.AllocatedDevices[iNdEx]) + i = encodeVarintApi(dAtA, i, uint64(len(m.AllocatedDevices[iNdEx]))) + i-- + dAtA[i] = 0xa + } } - return n + return len(dAtA) - i, nil } -func (m *RemovePodResponse) Size() (n int) { - if m == nil { - return 0 +func (m *AssociatedDeviceHintsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - return n + return dAtA[:n], nil } -func (m *GetResourcesAllocationRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n +func (m *AssociatedDeviceHintsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *GetResourcesAllocationResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *AssociatedDeviceHintsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.PodResources) > 0 { - for k, v := range m.PodResources { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovApi(uint64(l)) + if len(m.Annotations) > 0 { + for k := range m.Annotations { + v := m.Annotations[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintApi(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintApi(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintApi(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x62 + } + } + if len(m.Labels) > 0 { + for k := range m.Labels { + v := m.Labels[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintApi(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintApi(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintApi(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x5a + } + } + if m.DeviceHints != nil { + { + size, err := m.DeviceHints.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + l - n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x52 } - return n + if len(m.DeviceName) > 0 { + i -= len(m.DeviceName) + copy(dAtA[i:], m.DeviceName) + i = encodeVarintApi(dAtA, i, uint64(len(m.DeviceName))) + i-- + dAtA[i] = 0x4a + } + if len(m.PodType) > 0 { + i -= len(m.PodType) + copy(dAtA[i:], m.PodType) + i = encodeVarintApi(dAtA, i, uint64(len(m.PodType))) + i-- + dAtA[i] = 0x42 + } + if len(m.PodRole) > 0 { + i -= len(m.PodRole) + copy(dAtA[i:], m.PodRole) + i = encodeVarintApi(dAtA, i, uint64(len(m.PodRole))) + i-- + dAtA[i] = 0x3a + } + if m.ContainerIndex != 0 { + i = encodeVarintApi(dAtA, i, uint64(m.ContainerIndex)) + i-- + dAtA[i] = 0x30 + } + if m.ContainerType != 0 { + i = encodeVarintApi(dAtA, i, uint64(m.ContainerType)) + i-- + dAtA[i] = 0x28 + } + if len(m.ContainerName) > 0 { + i -= len(m.ContainerName) + copy(dAtA[i:], m.ContainerName) + i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerName))) + i-- + dAtA[i] = 0x22 + } + if len(m.PodName) > 0 { + i -= len(m.PodName) + copy(dAtA[i:], m.PodName) + i = encodeVarintApi(dAtA, i, uint64(len(m.PodName))) + i-- + dAtA[i] = 0x1a + } + if len(m.PodNamespace) > 0 { + i -= len(m.PodNamespace) + copy(dAtA[i:], m.PodNamespace) + i = encodeVarintApi(dAtA, i, uint64(len(m.PodNamespace))) + i-- + dAtA[i] = 0x12 + } + if len(m.PodUid) > 0 { + i -= len(m.PodUid) + copy(dAtA[i:], m.PodUid) + i = encodeVarintApi(dAtA, i, uint64(len(m.PodUid))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *ContainerResources) Size() (n int) { +func encodeVarintApi(dAtA []byte, offset int, v uint64) int { + offset -= sovApi(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ResourcePluginOptions) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.ContainerResources) > 0 { - for k, v := range m.ContainerResources { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovApi(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + l - n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + if m.PreStartRequired { + n += 2 + } + if m.WithTopologyAlignment { + n += 2 + } + if m.NeedReconcile { + n += 2 + } + if len(m.AssociatedDevices) > 0 { + for _, s := range m.AssociatedDevices { + l = len(s) + n += 1 + l + sovApi(uint64(l)) } } return n } -func (m *ResourceAllocation) Size() (n int) { +func (m *RegisterRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.ResourceAllocation) > 0 { - for k, v := range m.ResourceAllocation { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovApi(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + l - n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) - } + l = len(m.Version) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Endpoint) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.ResourceName) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.Options != nil { + l = m.Options.Size() + n += 1 + l + sovApi(uint64(l)) } return n } -func (m *ResourceAllocationInfo) Size() (n int) { +func (m *ResourceRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.OciPropertyName) + l = len(m.PodUid) if l > 0 { n += 1 + l + sovApi(uint64(l)) } - if m.IsNodeResource { - n += 2 + l = len(m.PodNamespace) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) } - if m.IsScalarResource { - n += 2 + l = len(m.PodName) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) } - if m.AllocatedQuantity != 0 { - n += 9 + l = len(m.ContainerName) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) } - l = len(m.AllocationResult) + if m.ContainerType != 0 { + n += 1 + sovApi(uint64(m.ContainerType)) + } + if m.ContainerIndex != 0 { + n += 1 + sovApi(uint64(m.ContainerIndex)) + } + l = len(m.PodRole) if l > 0 { n += 1 + l + sovApi(uint64(l)) } - if len(m.Envs) > 0 { - for k, v := range m.Envs { + l = len(m.PodType) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.ResourceName) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.Hint != nil { + l = m.Hint.Size() + n += 1 + l + sovApi(uint64(l)) + } + if len(m.ResourceRequests) > 0 { + for k, v := range m.ResourceRequests { _ = k _ = v - mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + 8 n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) } } - if len(m.Annotations) > 0 { - for k, v := range m.Annotations { + if len(m.Labels) > 0 { + for k, v := range m.Labels { _ = k _ = v mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) } } - if m.ResourceHints != nil { - l = m.ResourceHints.Size() - n += 1 + l + sovApi(uint64(l)) - } - if len(m.TopologyAssignments) > 0 { - for k, v := range m.TopologyAssignments { + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { _ = k _ = v - mapEntrySize := 1 + sovApi(uint64(k)) + 1 + sovApi(uint64(v)) + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) } } + l = len(m.NativeQosClass) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } return n } -func (m *GetTopologyAwareResourcesRequest) Size() (n int) { +func (m *PodResourceRequest) Size() (n int) { if m == nil { return 0 } @@ -5443,50 +6212,89 @@ func (m *GetTopologyAwareResourcesRequest) Size() (n int) { if l > 0 { n += 1 + l + sovApi(uint64(l)) } - l = len(m.ContainerName) + l = len(m.PodNamespace) if l > 0 { n += 1 + l + sovApi(uint64(l)) } - return n -} - -func (m *GetTopologyAwareResourcesResponse) Size() (n int) { - if m == nil { - return 0 + l = len(m.PodName) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) } - var l int - _ = l - l = len(m.PodUid) + l = len(m.PodRole) if l > 0 { n += 1 + l + sovApi(uint64(l)) } - l = len(m.PodName) + l = len(m.PodType) if l > 0 { n += 1 + l + sovApi(uint64(l)) } - l = len(m.PodNamespace) + l = len(m.ResourceName) if l > 0 { n += 1 + l + sovApi(uint64(l)) } - if m.ContainerTopologyAwareResources != nil { - l = m.ContainerTopologyAwareResources.Size() + if m.Hint != nil { + l = m.Hint.Size() n += 1 + l + sovApi(uint64(l)) } + if len(m.ResourceRequests) > 0 { + for k, v := range m.ResourceRequests { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + if len(m.Labels) > 0 { + for k, v := range m.Labels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } return n } -func (m *ContainerTopologyAwareResources) Size() (n int) { +func (m *PodResourceHintsResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.ContainerName) + l = len(m.PodUid) if l > 0 { n += 1 + l + sovApi(uint64(l)) } - if len(m.AllocatedResources) > 0 { - for k, v := range m.AllocatedResources { + l = len(m.PodNamespace) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.PodName) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.PodRole) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.PodType) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.ResourceName) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if len(m.ResourceHints) > 0 { + for k, v := range m.ResourceHints { _ = k _ = v l = 0 @@ -5498,93 +6306,67 @@ func (m *ContainerTopologyAwareResources) Size() (n int) { n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) } } - return n -} - -func (m *TopologyAwareResource) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IsNodeResource { - n += 2 - } - if m.IsScalarResource { - n += 2 - } - if m.AggregatedQuantity != 0 { - n += 9 - } - if m.OriginalAggregatedQuantity != 0 { - n += 9 - } - if len(m.TopologyAwareQuantityList) > 0 { - for _, e := range m.TopologyAwareQuantityList { - l = e.Size() - n += 1 + l + sovApi(uint64(l)) + if len(m.Labels) > 0 { + for k, v := range m.Labels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) } } - if len(m.OriginalTopologyAwareQuantityList) > 0 { - for _, e := range m.OriginalTopologyAwareQuantityList { - l = e.Size() - n += 1 + l + sovApi(uint64(l)) + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) } } return n } -func (m *TopologyAwareQuantity) Size() (n int) { +func (m *ResourceHintsResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.ResourceValue != 0 { - n += 9 + l = len(m.PodUid) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) } - if m.Node != 0 { - n += 1 + sovApi(uint64(m.Node)) + l = len(m.PodNamespace) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) } - l = len(m.Name) + l = len(m.PodName) if l > 0 { n += 1 + l + sovApi(uint64(l)) } - l = len(m.Type) + l = len(m.ContainerName) if l > 0 { n += 1 + l + sovApi(uint64(l)) } - if m.TopologyLevel != 0 { - n += 1 + sovApi(uint64(m.TopologyLevel)) + if m.ContainerType != 0 { + n += 1 + sovApi(uint64(m.ContainerType)) } - if len(m.Annotations) > 0 { - for k, v := range m.Annotations { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) - n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) - } + if m.ContainerIndex != 0 { + n += 1 + sovApi(uint64(m.ContainerIndex)) } - return n -} - -func (m *GetTopologyAwareAllocatableResourcesRequest) Size() (n int) { - if m == nil { - return 0 + l = len(m.PodRole) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) } - var l int - _ = l - return n -} - -func (m *GetTopologyAwareAllocatableResourcesResponse) Size() (n int) { - if m == nil { - return 0 + l = len(m.PodType) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) } - var l int - _ = l - if len(m.AllocatableResources) > 0 { - for k, v := range m.AllocatableResources { + l = len(m.ResourceName) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if len(m.ResourceHints) > 0 { + for k, v := range m.ResourceHints { _ = k _ = v l = 0 @@ -5596,43 +6378,97 @@ func (m *GetTopologyAwareAllocatableResourcesResponse) Size() (n int) { n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) } } + if len(m.Labels) > 0 { + for k, v := range m.Labels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + l = len(m.NativeQosClass) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } return n } -func (m *AllocatableTopologyAwareResource) Size() (n int) { +func (m *ResourceAllocationResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.IsNodeResource { - n += 2 + l = len(m.PodUid) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) } - if m.IsScalarResource { - n += 2 + l = len(m.PodNamespace) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) } - if m.AggregatedAllocatableQuantity != 0 { - n += 9 + l = len(m.PodName) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) } - if len(m.TopologyAwareAllocatableQuantityList) > 0 { - for _, e := range m.TopologyAwareAllocatableQuantityList { - l = e.Size() - n += 1 + l + sovApi(uint64(l)) - } + l = len(m.ContainerName) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) } - if m.AggregatedCapacityQuantity != 0 { - n += 9 + if m.ContainerType != 0 { + n += 1 + sovApi(uint64(m.ContainerType)) } - if len(m.TopologyAwareCapacityQuantityList) > 0 { - for _, e := range m.TopologyAwareCapacityQuantityList { - l = e.Size() - n += 1 + l + sovApi(uint64(l)) + if m.ContainerIndex != 0 { + n += 1 + sovApi(uint64(m.ContainerIndex)) + } + l = len(m.PodRole) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.PodType) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.ResourceName) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.AllocationResult != nil { + l = m.AllocationResult.Size() + n += 1 + l + sovApi(uint64(l)) + } + if len(m.Labels) > 0 { + for k, v := range m.Labels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) } } + l = len(m.NativeQosClass) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } return n } -func (m *PreStartContainerRequest) Size() (n int) { +func (m *PodResourceAllocationResponse) Size() (n int) { if m == nil { return 0 } @@ -5650,686 +6486,2561 @@ func (m *PreStartContainerRequest) Size() (n int) { if l > 0 { n += 1 + l + sovApi(uint64(l)) } - l = len(m.ContainerName) + l = len(m.PodRole) if l > 0 { n += 1 + l + sovApi(uint64(l)) } - return n -} - -func (m *PreStartContainerResponse) Size() (n int) { - if m == nil { - return 0 + l = len(m.PodType) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) } - var l int + l = len(m.ResourceName) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.AllocationResult != nil { + l = m.AllocationResult.Size() + n += 1 + l + sovApi(uint64(l)) + } + if len(m.Labels) > 0 { + for k, v := range m.Labels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + return n +} + +func (m *ListOfTopologyHints) Size() (n int) { + if m == nil { + return 0 + } + var l int _ = l + if len(m.Hints) > 0 { + for _, e := range m.Hints { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } return n } -func sovApi(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 +func (m *TopologyHint) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Nodes) > 0 { + l = 0 + for _, e := range m.Nodes { + l += sovApi(uint64(e)) + } + n += 1 + sovApi(uint64(l)) + l + } + if m.Preferred { + n += 2 + } + return n } -func sozApi(x uint64) (n int) { - return sovApi(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + +func (m *Empty) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n } -func (this *ResourcePluginOptions) String() string { - if this == nil { - return "nil" + +func (m *RemovePodRequest) Size() (n int) { + if m == nil { + return 0 } - s := strings.Join([]string{`&ResourcePluginOptions{`, - `PreStartRequired:` + fmt.Sprintf("%v", this.PreStartRequired) + `,`, - `WithTopologyAlignment:` + fmt.Sprintf("%v", this.WithTopologyAlignment) + `,`, - `NeedReconcile:` + fmt.Sprintf("%v", this.NeedReconcile) + `,`, - `}`, - }, "") - return s + var l int + _ = l + l = len(m.PodUid) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n } -func (this *RegisterRequest) String() string { - if this == nil { - return "nil" + +func (m *RemovePodResponse) Size() (n int) { + if m == nil { + return 0 } - s := strings.Join([]string{`&RegisterRequest{`, - `Version:` + fmt.Sprintf("%v", this.Version) + `,`, - `Endpoint:` + fmt.Sprintf("%v", this.Endpoint) + `,`, - `ResourceName:` + fmt.Sprintf("%v", this.ResourceName) + `,`, - `Options:` + strings.Replace(this.Options.String(), "ResourcePluginOptions", "ResourcePluginOptions", 1) + `,`, - `}`, - }, "") - return s + var l int + _ = l + return n } -func (this *ResourceRequest) String() string { - if this == nil { - return "nil" + +func (m *GetResourcesAllocationRequest) Size() (n int) { + if m == nil { + return 0 } - keysForResourceRequests := make([]string, 0, len(this.ResourceRequests)) - for k := range this.ResourceRequests { - keysForResourceRequests = append(keysForResourceRequests, k) + var l int + _ = l + return n +} + +func (m *GetResourcesAllocationResponse) Size() (n int) { + if m == nil { + return 0 } - github_com_gogo_protobuf_sortkeys.Strings(keysForResourceRequests) - mapStringForResourceRequests := "map[string]float64{" - for _, k := range keysForResourceRequests { - mapStringForResourceRequests += fmt.Sprintf("%v: %v,", k, this.ResourceRequests[k]) + var l int + _ = l + if len(m.PodResources) > 0 { + for k, v := range m.PodResources { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovApi(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + l + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } } - mapStringForResourceRequests += "}" - keysForLabels := make([]string, 0, len(this.Labels)) - for k := range this.Labels { - keysForLabels = append(keysForLabels, k) + return n +} + +func (m *ContainerResources) Size() (n int) { + if m == nil { + return 0 } - github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) - mapStringForLabels := "map[string]string{" - for _, k := range keysForLabels { - mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + var l int + _ = l + if len(m.ContainerResources) > 0 { + for k, v := range m.ContainerResources { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovApi(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + l + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } } - mapStringForLabels += "}" - keysForAnnotations := make([]string, 0, len(this.Annotations)) - for k := range this.Annotations { - keysForAnnotations = append(keysForAnnotations, k) + return n +} + +func (m *ResourceAllocation) Size() (n int) { + if m == nil { + return 0 } - github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) - mapStringForAnnotations := "map[string]string{" - for _, k := range keysForAnnotations { - mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + var l int + _ = l + if len(m.ResourceAllocation) > 0 { + for k, v := range m.ResourceAllocation { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovApi(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + l + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } } - mapStringForAnnotations += "}" - s := strings.Join([]string{`&ResourceRequest{`, - `PodUid:` + fmt.Sprintf("%v", this.PodUid) + `,`, - `PodNamespace:` + fmt.Sprintf("%v", this.PodNamespace) + `,`, - `PodName:` + fmt.Sprintf("%v", this.PodName) + `,`, - `ContainerName:` + fmt.Sprintf("%v", this.ContainerName) + `,`, - `ContainerType:` + fmt.Sprintf("%v", this.ContainerType) + `,`, - `ContainerIndex:` + fmt.Sprintf("%v", this.ContainerIndex) + `,`, - `PodRole:` + fmt.Sprintf("%v", this.PodRole) + `,`, - `PodType:` + fmt.Sprintf("%v", this.PodType) + `,`, - `ResourceName:` + fmt.Sprintf("%v", this.ResourceName) + `,`, - `Hint:` + strings.Replace(this.Hint.String(), "TopologyHint", "TopologyHint", 1) + `,`, - `ResourceRequests:` + mapStringForResourceRequests + `,`, - `Labels:` + mapStringForLabels + `,`, - `Annotations:` + mapStringForAnnotations + `,`, - `NativeQosClass:` + fmt.Sprintf("%v", this.NativeQosClass) + `,`, - `}`, - }, "") - return s + return n } -func (this *PodResourceRequest) String() string { - if this == nil { - return "nil" - } - keysForResourceRequests := make([]string, 0, len(this.ResourceRequests)) - for k := range this.ResourceRequests { - keysForResourceRequests = append(keysForResourceRequests, k) + +func (m *ResourceAllocationInfo) Size() (n int) { + if m == nil { + return 0 } - github_com_gogo_protobuf_sortkeys.Strings(keysForResourceRequests) - mapStringForResourceRequests := "map[string]float64{" - for _, k := range keysForResourceRequests { - mapStringForResourceRequests += fmt.Sprintf("%v: %v,", k, this.ResourceRequests[k]) + var l int + _ = l + l = len(m.OciPropertyName) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) } - mapStringForResourceRequests += "}" - keysForLabels := make([]string, 0, len(this.Labels)) - for k := range this.Labels { - keysForLabels = append(keysForLabels, k) + if m.IsNodeResource { + n += 2 } - github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) - mapStringForLabels := "map[string]string{" - for _, k := range keysForLabels { - mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + if m.IsScalarResource { + n += 2 } - mapStringForLabels += "}" - keysForAnnotations := make([]string, 0, len(this.Annotations)) - for k := range this.Annotations { - keysForAnnotations = append(keysForAnnotations, k) + if m.AllocatedQuantity != 0 { + n += 9 } - github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) - mapStringForAnnotations := "map[string]string{" - for _, k := range keysForAnnotations { - mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + l = len(m.AllocationResult) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) } - mapStringForAnnotations += "}" - s := strings.Join([]string{`&PodResourceRequest{`, - `PodUid:` + fmt.Sprintf("%v", this.PodUid) + `,`, - `PodNamespace:` + fmt.Sprintf("%v", this.PodNamespace) + `,`, - `PodName:` + fmt.Sprintf("%v", this.PodName) + `,`, - `PodRole:` + fmt.Sprintf("%v", this.PodRole) + `,`, - `PodType:` + fmt.Sprintf("%v", this.PodType) + `,`, - `ResourceName:` + fmt.Sprintf("%v", this.ResourceName) + `,`, - `Hint:` + strings.Replace(this.Hint.String(), "TopologyHint", "TopologyHint", 1) + `,`, - `ResourceRequests:` + mapStringForResourceRequests + `,`, - `Labels:` + mapStringForLabels + `,`, - `Annotations:` + mapStringForAnnotations + `,`, - `}`, - }, "") - return s -} -func (this *PodResourceHintsResponse) String() string { - if this == nil { - return "nil" + if len(m.Envs) > 0 { + for k, v := range m.Envs { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } } - keysForResourceHints := make([]string, 0, len(this.ResourceHints)) - for k := range this.ResourceHints { - keysForResourceHints = append(keysForResourceHints, k) + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } } - github_com_gogo_protobuf_sortkeys.Strings(keysForResourceHints) - mapStringForResourceHints := "map[string]*ListOfTopologyHints{" - for _, k := range keysForResourceHints { - mapStringForResourceHints += fmt.Sprintf("%v: %v,", k, this.ResourceHints[k]) + if m.ResourceHints != nil { + l = m.ResourceHints.Size() + n += 1 + l + sovApi(uint64(l)) } - mapStringForResourceHints += "}" - keysForLabels := make([]string, 0, len(this.Labels)) - for k := range this.Labels { - keysForLabels = append(keysForLabels, k) + if len(m.TopologyAssignments) > 0 { + for k, v := range m.TopologyAssignments { + _ = k + _ = v + mapEntrySize := 1 + sovApi(uint64(k)) + 1 + sovApi(uint64(v)) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } } - github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) - mapStringForLabels := "map[string]string{" - for _, k := range keysForLabels { - mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + return n +} + +func (m *GetTopologyAwareResourcesRequest) Size() (n int) { + if m == nil { + return 0 } - mapStringForLabels += "}" - keysForAnnotations := make([]string, 0, len(this.Annotations)) - for k := range this.Annotations { - keysForAnnotations = append(keysForAnnotations, k) + var l int + _ = l + l = len(m.PodUid) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) - mapStringForAnnotations := "map[string]string{" - for _, k := range keysForAnnotations { - mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + l = len(m.ContainerName) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) } - mapStringForAnnotations += "}" - s := strings.Join([]string{`&PodResourceHintsResponse{`, - `PodUid:` + fmt.Sprintf("%v", this.PodUid) + `,`, - `PodNamespace:` + fmt.Sprintf("%v", this.PodNamespace) + `,`, - `PodName:` + fmt.Sprintf("%v", this.PodName) + `,`, - `PodRole:` + fmt.Sprintf("%v", this.PodRole) + `,`, - `PodType:` + fmt.Sprintf("%v", this.PodType) + `,`, - `ResourceName:` + fmt.Sprintf("%v", this.ResourceName) + `,`, - `ResourceHints:` + mapStringForResourceHints + `,`, - `Labels:` + mapStringForLabels + `,`, - `Annotations:` + mapStringForAnnotations + `,`, - `}`, - }, "") - return s + return n } -func (this *ResourceHintsResponse) String() string { - if this == nil { - return "nil" + +func (m *GetTopologyAwareResourcesResponse) Size() (n int) { + if m == nil { + return 0 } - keysForResourceHints := make([]string, 0, len(this.ResourceHints)) - for k := range this.ResourceHints { - keysForResourceHints = append(keysForResourceHints, k) + var l int + _ = l + l = len(m.PodUid) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForResourceHints) - mapStringForResourceHints := "map[string]*ListOfTopologyHints{" - for _, k := range keysForResourceHints { - mapStringForResourceHints += fmt.Sprintf("%v: %v,", k, this.ResourceHints[k]) + l = len(m.PodName) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) } - mapStringForResourceHints += "}" - keysForLabels := make([]string, 0, len(this.Labels)) - for k := range this.Labels { - keysForLabels = append(keysForLabels, k) + l = len(m.PodNamespace) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) - mapStringForLabels := "map[string]string{" - for _, k := range keysForLabels { - mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + if m.ContainerTopologyAwareResources != nil { + l = m.ContainerTopologyAwareResources.Size() + n += 1 + l + sovApi(uint64(l)) } - mapStringForLabels += "}" - keysForAnnotations := make([]string, 0, len(this.Annotations)) - for k := range this.Annotations { - keysForAnnotations = append(keysForAnnotations, k) + return n +} + +func (m *ContainerTopologyAwareResources) Size() (n int) { + if m == nil { + return 0 } - github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) - mapStringForAnnotations := "map[string]string{" - for _, k := range keysForAnnotations { - mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + var l int + _ = l + l = len(m.ContainerName) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) } - mapStringForAnnotations += "}" - s := strings.Join([]string{`&ResourceHintsResponse{`, - `PodUid:` + fmt.Sprintf("%v", this.PodUid) + `,`, - `PodNamespace:` + fmt.Sprintf("%v", this.PodNamespace) + `,`, - `PodName:` + fmt.Sprintf("%v", this.PodName) + `,`, - `ContainerName:` + fmt.Sprintf("%v", this.ContainerName) + `,`, - `ContainerType:` + fmt.Sprintf("%v", this.ContainerType) + `,`, - `ContainerIndex:` + fmt.Sprintf("%v", this.ContainerIndex) + `,`, - `PodRole:` + fmt.Sprintf("%v", this.PodRole) + `,`, - `PodType:` + fmt.Sprintf("%v", this.PodType) + `,`, - `ResourceName:` + fmt.Sprintf("%v", this.ResourceName) + `,`, - `ResourceHints:` + mapStringForResourceHints + `,`, - `Labels:` + mapStringForLabels + `,`, - `Annotations:` + mapStringForAnnotations + `,`, - `NativeQosClass:` + fmt.Sprintf("%v", this.NativeQosClass) + `,`, - `}`, - }, "") - return s + if len(m.AllocatedResources) > 0 { + for k, v := range m.AllocatedResources { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovApi(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + l + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + return n } -func (this *ResourceAllocationResponse) String() string { - if this == nil { - return "nil" + +func (m *TopologyAwareResource) Size() (n int) { + if m == nil { + return 0 } - keysForLabels := make([]string, 0, len(this.Labels)) - for k := range this.Labels { - keysForLabels = append(keysForLabels, k) + var l int + _ = l + if m.IsNodeResource { + n += 2 } - github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) - mapStringForLabels := "map[string]string{" - for _, k := range keysForLabels { - mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + if m.IsScalarResource { + n += 2 } - mapStringForLabels += "}" - keysForAnnotations := make([]string, 0, len(this.Annotations)) - for k := range this.Annotations { - keysForAnnotations = append(keysForAnnotations, k) + if m.AggregatedQuantity != 0 { + n += 9 } - github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) - mapStringForAnnotations := "map[string]string{" - for _, k := range keysForAnnotations { - mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + if m.OriginalAggregatedQuantity != 0 { + n += 9 } - mapStringForAnnotations += "}" - s := strings.Join([]string{`&ResourceAllocationResponse{`, - `PodUid:` + fmt.Sprintf("%v", this.PodUid) + `,`, - `PodNamespace:` + fmt.Sprintf("%v", this.PodNamespace) + `,`, - `PodName:` + fmt.Sprintf("%v", this.PodName) + `,`, - `ContainerName:` + fmt.Sprintf("%v", this.ContainerName) + `,`, - `ContainerType:` + fmt.Sprintf("%v", this.ContainerType) + `,`, - `ContainerIndex:` + fmt.Sprintf("%v", this.ContainerIndex) + `,`, - `PodRole:` + fmt.Sprintf("%v", this.PodRole) + `,`, - `PodType:` + fmt.Sprintf("%v", this.PodType) + `,`, - `ResourceName:` + fmt.Sprintf("%v", this.ResourceName) + `,`, - `AllocationResult:` + strings.Replace(this.AllocationResult.String(), "ResourceAllocation", "ResourceAllocation", 1) + `,`, - `Labels:` + mapStringForLabels + `,`, - `Annotations:` + mapStringForAnnotations + `,`, - `NativeQosClass:` + fmt.Sprintf("%v", this.NativeQosClass) + `,`, - `}`, - }, "") - return s -} -func (this *PodResourceAllocationResponse) String() string { - if this == nil { - return "nil" + if len(m.TopologyAwareQuantityList) > 0 { + for _, e := range m.TopologyAwareQuantityList { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } } - keysForLabels := make([]string, 0, len(this.Labels)) - for k := range this.Labels { - keysForLabels = append(keysForLabels, k) + if len(m.OriginalTopologyAwareQuantityList) > 0 { + for _, e := range m.OriginalTopologyAwareQuantityList { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } } - github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) - mapStringForLabels := "map[string]string{" - for _, k := range keysForLabels { - mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + return n +} + +func (m *TopologyAwareQuantity) Size() (n int) { + if m == nil { + return 0 } - mapStringForLabels += "}" - keysForAnnotations := make([]string, 0, len(this.Annotations)) - for k := range this.Annotations { - keysForAnnotations = append(keysForAnnotations, k) + var l int + _ = l + if m.ResourceValue != 0 { + n += 9 } - github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) - mapStringForAnnotations := "map[string]string{" - for _, k := range keysForAnnotations { - mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + if m.Node != 0 { + n += 1 + sovApi(uint64(m.Node)) } - mapStringForAnnotations += "}" - s := strings.Join([]string{`&PodResourceAllocationResponse{`, - `PodUid:` + fmt.Sprintf("%v", this.PodUid) + `,`, - `PodNamespace:` + fmt.Sprintf("%v", this.PodNamespace) + `,`, - `PodName:` + fmt.Sprintf("%v", this.PodName) + `,`, - `PodRole:` + fmt.Sprintf("%v", this.PodRole) + `,`, - `PodType:` + fmt.Sprintf("%v", this.PodType) + `,`, - `ResourceName:` + fmt.Sprintf("%v", this.ResourceName) + `,`, - `AllocationResult:` + strings.Replace(this.AllocationResult.String(), "ResourceAllocation", "ResourceAllocation", 1) + `,`, - `Labels:` + mapStringForLabels + `,`, - `Annotations:` + mapStringForAnnotations + `,`, - `}`, - }, "") - return s -} -func (this *ListOfTopologyHints) String() string { - if this == nil { - return "nil" + l = len(m.Name) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) } - repeatedStringForHints := "[]*TopologyHint{" - for _, f := range this.Hints { - repeatedStringForHints += strings.Replace(f.String(), "TopologyHint", "TopologyHint", 1) + "," + l = len(m.Type) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) } - repeatedStringForHints += "}" - s := strings.Join([]string{`&ListOfTopologyHints{`, - `Hints:` + repeatedStringForHints + `,`, - `}`, - }, "") - return s -} -func (this *TopologyHint) String() string { - if this == nil { - return "nil" + if m.TopologyLevel != 0 { + n += 1 + sovApi(uint64(m.TopologyLevel)) } - s := strings.Join([]string{`&TopologyHint{`, - `Nodes:` + fmt.Sprintf("%v", this.Nodes) + `,`, - `Preferred:` + fmt.Sprintf("%v", this.Preferred) + `,`, - `}`, - }, "") - return s -} -func (this *Empty) String() string { - if this == nil { - return "nil" + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } } - s := strings.Join([]string{`&Empty{`, - `}`, - }, "") - return s + return n } -func (this *RemovePodRequest) String() string { - if this == nil { - return "nil" + +func (m *GetTopologyAwareAllocatableResourcesRequest) Size() (n int) { + if m == nil { + return 0 } - s := strings.Join([]string{`&RemovePodRequest{`, - `PodUid:` + fmt.Sprintf("%v", this.PodUid) + `,`, - `}`, - }, "") - return s + var l int + _ = l + return n } -func (this *RemovePodResponse) String() string { - if this == nil { - return "nil" + +func (m *GetTopologyAwareAllocatableResourcesResponse) Size() (n int) { + if m == nil { + return 0 } - s := strings.Join([]string{`&RemovePodResponse{`, - `}`, - }, "") - return s -} -func (this *GetResourcesAllocationRequest) String() string { - if this == nil { - return "nil" + var l int + _ = l + if len(m.AllocatableResources) > 0 { + for k, v := range m.AllocatableResources { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovApi(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + l + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } } - s := strings.Join([]string{`&GetResourcesAllocationRequest{`, - `}`, - }, "") - return s + return n } -func (this *GetResourcesAllocationResponse) String() string { - if this == nil { - return "nil" + +func (m *AllocatableTopologyAwareResource) Size() (n int) { + if m == nil { + return 0 } - keysForPodResources := make([]string, 0, len(this.PodResources)) - for k := range this.PodResources { - keysForPodResources = append(keysForPodResources, k) + var l int + _ = l + if m.IsNodeResource { + n += 2 } - github_com_gogo_protobuf_sortkeys.Strings(keysForPodResources) - mapStringForPodResources := "map[string]*ContainerResources{" - for _, k := range keysForPodResources { - mapStringForPodResources += fmt.Sprintf("%v: %v,", k, this.PodResources[k]) + if m.IsScalarResource { + n += 2 } - mapStringForPodResources += "}" - s := strings.Join([]string{`&GetResourcesAllocationResponse{`, - `PodResources:` + mapStringForPodResources + `,`, - `}`, - }, "") - return s -} -func (this *ContainerResources) String() string { - if this == nil { - return "nil" + if m.AggregatedAllocatableQuantity != 0 { + n += 9 } - keysForContainerResources := make([]string, 0, len(this.ContainerResources)) - for k := range this.ContainerResources { - keysForContainerResources = append(keysForContainerResources, k) + if len(m.TopologyAwareAllocatableQuantityList) > 0 { + for _, e := range m.TopologyAwareAllocatableQuantityList { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } } - github_com_gogo_protobuf_sortkeys.Strings(keysForContainerResources) - mapStringForContainerResources := "map[string]*ResourceAllocation{" - for _, k := range keysForContainerResources { - mapStringForContainerResources += fmt.Sprintf("%v: %v,", k, this.ContainerResources[k]) + if m.AggregatedCapacityQuantity != 0 { + n += 9 } - mapStringForContainerResources += "}" - s := strings.Join([]string{`&ContainerResources{`, - `ContainerResources:` + mapStringForContainerResources + `,`, - `}`, - }, "") - return s + if len(m.TopologyAwareCapacityQuantityList) > 0 { + for _, e := range m.TopologyAwareCapacityQuantityList { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + return n } -func (this *ResourceAllocation) String() string { - if this == nil { - return "nil" + +func (m *PreStartContainerRequest) Size() (n int) { + if m == nil { + return 0 } - keysForResourceAllocation := make([]string, 0, len(this.ResourceAllocation)) - for k := range this.ResourceAllocation { - keysForResourceAllocation = append(keysForResourceAllocation, k) + var l int + _ = l + l = len(m.PodUid) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForResourceAllocation) - mapStringForResourceAllocation := "map[string]*ResourceAllocationInfo{" - for _, k := range keysForResourceAllocation { - mapStringForResourceAllocation += fmt.Sprintf("%v: %v,", k, this.ResourceAllocation[k]) + l = len(m.PodNamespace) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) } - mapStringForResourceAllocation += "}" - s := strings.Join([]string{`&ResourceAllocation{`, - `ResourceAllocation:` + mapStringForResourceAllocation + `,`, - `}`, - }, "") - return s -} -func (this *ResourceAllocationInfo) String() string { - if this == nil { - return "nil" + l = len(m.PodName) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) } - keysForEnvs := make([]string, 0, len(this.Envs)) - for k := range this.Envs { - keysForEnvs = append(keysForEnvs, k) + l = len(m.ContainerName) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForEnvs) - mapStringForEnvs := "map[string]string{" - for _, k := range keysForEnvs { - mapStringForEnvs += fmt.Sprintf("%v: %v,", k, this.Envs[k]) + return n +} + +func (m *PreStartContainerResponse) Size() (n int) { + if m == nil { + return 0 } - mapStringForEnvs += "}" - keysForAnnotations := make([]string, 0, len(this.Annotations)) - for k := range this.Annotations { - keysForAnnotations = append(keysForAnnotations, k) + var l int + _ = l + return n +} + +func (m *AssociatedDevice) Size() (n int) { + if m == nil { + return 0 } - github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) - mapStringForAnnotations := "map[string]string{" - for _, k := range keysForAnnotations { - mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + var l int + _ = l + l = len(m.ID) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) } - mapStringForAnnotations += "}" - keysForTopologyAssignments := make([]uint64, 0, len(this.TopologyAssignments)) - for k := range this.TopologyAssignments { - keysForTopologyAssignments = append(keysForTopologyAssignments, k) + l = len(m.Health) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) } - github_com_gogo_protobuf_sortkeys.Uint64s(keysForTopologyAssignments) - mapStringForTopologyAssignments := "map[uint64]uint64{" - for _, k := range keysForTopologyAssignments { - mapStringForTopologyAssignments += fmt.Sprintf("%v: %v,", k, this.TopologyAssignments[k]) + if m.Topology != nil { + l = m.Topology.Size() + n += 1 + l + sovApi(uint64(l)) } - mapStringForTopologyAssignments += "}" - s := strings.Join([]string{`&ResourceAllocationInfo{`, - `OciPropertyName:` + fmt.Sprintf("%v", this.OciPropertyName) + `,`, - `IsNodeResource:` + fmt.Sprintf("%v", this.IsNodeResource) + `,`, - `IsScalarResource:` + fmt.Sprintf("%v", this.IsScalarResource) + `,`, - `AllocatedQuantity:` + fmt.Sprintf("%v", this.AllocatedQuantity) + `,`, - `AllocationResult:` + fmt.Sprintf("%v", this.AllocationResult) + `,`, - `Envs:` + mapStringForEnvs + `,`, - `Annotations:` + mapStringForAnnotations + `,`, - `ResourceHints:` + strings.Replace(this.ResourceHints.String(), "ListOfTopologyHints", "ListOfTopologyHints", 1) + `,`, - `TopologyAssignments:` + mapStringForTopologyAssignments + `,`, - `}`, - }, "") - return s + return n } -func (this *GetTopologyAwareResourcesRequest) String() string { - if this == nil { - return "nil" + +func (m *TopologyInfo) Size() (n int) { + if m == nil { + return 0 } - s := strings.Join([]string{`&GetTopologyAwareResourcesRequest{`, - `PodUid:` + fmt.Sprintf("%v", this.PodUid) + `,`, - `ContainerName:` + fmt.Sprintf("%v", this.ContainerName) + `,`, - `}`, - }, "") - return s -} -func (this *GetTopologyAwareResourcesResponse) String() string { - if this == nil { - return "nil" + var l int + _ = l + if len(m.Nodes) > 0 { + for _, e := range m.Nodes { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } } - s := strings.Join([]string{`&GetTopologyAwareResourcesResponse{`, - `PodUid:` + fmt.Sprintf("%v", this.PodUid) + `,`, - `PodName:` + fmt.Sprintf("%v", this.PodName) + `,`, - `PodNamespace:` + fmt.Sprintf("%v", this.PodNamespace) + `,`, - `ContainerTopologyAwareResources:` + strings.Replace(this.ContainerTopologyAwareResources.String(), "ContainerTopologyAwareResources", "ContainerTopologyAwareResources", 1) + `,`, - `}`, - }, "") - return s + return n } -func (this *ContainerTopologyAwareResources) String() string { - if this == nil { - return "nil" - } - keysForAllocatedResources := make([]string, 0, len(this.AllocatedResources)) - for k := range this.AllocatedResources { - keysForAllocatedResources = append(keysForAllocatedResources, k) + +func (m *NUMANode) Size() (n int) { + if m == nil { + return 0 } - github_com_gogo_protobuf_sortkeys.Strings(keysForAllocatedResources) - mapStringForAllocatedResources := "map[string]*TopologyAwareResource{" - for _, k := range keysForAllocatedResources { - mapStringForAllocatedResources += fmt.Sprintf("%v: %v,", k, this.AllocatedResources[k]) + var l int + _ = l + if m.ID != 0 { + n += 1 + sovApi(uint64(m.ID)) } - mapStringForAllocatedResources += "}" - s := strings.Join([]string{`&ContainerTopologyAwareResources{`, - `ContainerName:` + fmt.Sprintf("%v", this.ContainerName) + `,`, - `AllocatedResources:` + mapStringForAllocatedResources + `,`, - `}`, - }, "") - return s + return n } -func (this *TopologyAwareResource) String() string { - if this == nil { - return "nil" + +func (m *UpdateAllocatableAssociatedDevicesRequest) Size() (n int) { + if m == nil { + return 0 } - repeatedStringForTopologyAwareQuantityList := "[]*TopologyAwareQuantity{" - for _, f := range this.TopologyAwareQuantityList { - repeatedStringForTopologyAwareQuantityList += strings.Replace(f.String(), "TopologyAwareQuantity", "TopologyAwareQuantity", 1) + "," + var l int + _ = l + l = len(m.DeviceName) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) } - repeatedStringForTopologyAwareQuantityList += "}" - repeatedStringForOriginalTopologyAwareQuantityList := "[]*TopologyAwareQuantity{" - for _, f := range this.OriginalTopologyAwareQuantityList { - repeatedStringForOriginalTopologyAwareQuantityList += strings.Replace(f.String(), "TopologyAwareQuantity", "TopologyAwareQuantity", 1) + "," + if len(m.Devices) > 0 { + for _, e := range m.Devices { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } } - repeatedStringForOriginalTopologyAwareQuantityList += "}" - s := strings.Join([]string{`&TopologyAwareResource{`, - `IsNodeResource:` + fmt.Sprintf("%v", this.IsNodeResource) + `,`, - `IsScalarResource:` + fmt.Sprintf("%v", this.IsScalarResource) + `,`, - `AggregatedQuantity:` + fmt.Sprintf("%v", this.AggregatedQuantity) + `,`, - `OriginalAggregatedQuantity:` + fmt.Sprintf("%v", this.OriginalAggregatedQuantity) + `,`, - `TopologyAwareQuantityList:` + repeatedStringForTopologyAwareQuantityList + `,`, - `OriginalTopologyAwareQuantityList:` + repeatedStringForOriginalTopologyAwareQuantityList + `,`, - `}`, - }, "") - return s + return n } -func (this *TopologyAwareQuantity) String() string { - if this == nil { - return "nil" + +func (m *UpdateAllocatableAssociatedDevicesResponse) Size() (n int) { + if m == nil { + return 0 } - keysForAnnotations := make([]string, 0, len(this.Annotations)) - for k := range this.Annotations { - keysForAnnotations = append(keysForAnnotations, k) + var l int + _ = l + return n +} + +func (m *AssociatedDeviceRequest) Size() (n int) { + if m == nil { + return 0 } - github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) - mapStringForAnnotations := "map[string]string{" - for _, k := range keysForAnnotations { - mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + var l int + _ = l + if m.ResourceRequest != nil { + l = m.ResourceRequest.Size() + n += 1 + l + sovApi(uint64(l)) } - mapStringForAnnotations += "}" - s := strings.Join([]string{`&TopologyAwareQuantity{`, - `ResourceValue:` + fmt.Sprintf("%v", this.ResourceValue) + `,`, - `Node:` + fmt.Sprintf("%v", this.Node) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `TopologyLevel:` + fmt.Sprintf("%v", this.TopologyLevel) + `,`, - `Annotations:` + mapStringForAnnotations + `,`, - `}`, - }, "") - return s -} -func (this *GetTopologyAwareAllocatableResourcesRequest) String() string { - if this == nil { - return "nil" + if m.DeviceRequest != nil { + l = m.DeviceRequest.Size() + n += 1 + l + sovApi(uint64(l)) } - s := strings.Join([]string{`&GetTopologyAwareAllocatableResourcesRequest{`, - `}`, - }, "") - return s + return n } -func (this *GetTopologyAwareAllocatableResourcesResponse) String() string { - if this == nil { - return "nil" + +func (m *DeviceRequest) Size() (n int) { + if m == nil { + return 0 } - keysForAllocatableResources := make([]string, 0, len(this.AllocatableResources)) - for k := range this.AllocatableResources { - keysForAllocatableResources = append(keysForAllocatableResources, k) + var l int + _ = l + l = len(m.DeviceName) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) } - github_com_gogo_protobuf_sortkeys.Strings(keysForAllocatableResources) - mapStringForAllocatableResources := "map[string]*AllocatableTopologyAwareResource{" - for _, k := range keysForAllocatableResources { - mapStringForAllocatableResources += fmt.Sprintf("%v: %v,", k, this.AllocatableResources[k]) + if m.Hint != nil { + l = m.Hint.Size() + n += 1 + l + sovApi(uint64(l)) } - mapStringForAllocatableResources += "}" - s := strings.Join([]string{`&GetTopologyAwareAllocatableResourcesResponse{`, - `AllocatableResources:` + mapStringForAllocatableResources + `,`, - `}`, - }, "") - return s -} -func (this *AllocatableTopologyAwareResource) String() string { - if this == nil { - return "nil" + if len(m.AvailableDevices) > 0 { + for _, s := range m.AvailableDevices { + l = len(s) + n += 1 + l + sovApi(uint64(l)) + } } - repeatedStringForTopologyAwareAllocatableQuantityList := "[]*TopologyAwareQuantity{" - for _, f := range this.TopologyAwareAllocatableQuantityList { - repeatedStringForTopologyAwareAllocatableQuantityList += strings.Replace(f.String(), "TopologyAwareQuantity", "TopologyAwareQuantity", 1) + "," + if len(m.ReusableDevices) > 0 { + for _, s := range m.ReusableDevices { + l = len(s) + n += 1 + l + sovApi(uint64(l)) + } } - repeatedStringForTopologyAwareAllocatableQuantityList += "}" - repeatedStringForTopologyAwareCapacityQuantityList := "[]*TopologyAwareQuantity{" - for _, f := range this.TopologyAwareCapacityQuantityList { - repeatedStringForTopologyAwareCapacityQuantityList += strings.Replace(f.String(), "TopologyAwareQuantity", "TopologyAwareQuantity", 1) + "," + if m.DeviceRequest != 0 { + n += 1 + sovApi(uint64(m.DeviceRequest)) } - repeatedStringForTopologyAwareCapacityQuantityList += "}" - s := strings.Join([]string{`&AllocatableTopologyAwareResource{`, - `IsNodeResource:` + fmt.Sprintf("%v", this.IsNodeResource) + `,`, - `IsScalarResource:` + fmt.Sprintf("%v", this.IsScalarResource) + `,`, - `AggregatedAllocatableQuantity:` + fmt.Sprintf("%v", this.AggregatedAllocatableQuantity) + `,`, - `TopologyAwareAllocatableQuantityList:` + repeatedStringForTopologyAwareAllocatableQuantityList + `,`, - `AggregatedCapacityQuantity:` + fmt.Sprintf("%v", this.AggregatedCapacityQuantity) + `,`, - `TopologyAwareCapacityQuantityList:` + repeatedStringForTopologyAwareCapacityQuantityList + `,`, - `}`, - }, "") - return s + return n } -func (this *PreStartContainerRequest) String() string { - if this == nil { - return "nil" + +func (m *AssociatedDeviceAllocationResponse) Size() (n int) { + if m == nil { + return 0 } - s := strings.Join([]string{`&PreStartContainerRequest{`, - `PodUid:` + fmt.Sprintf("%v", this.PodUid) + `,`, - `PodNamespace:` + fmt.Sprintf("%v", this.PodNamespace) + `,`, - `PodName:` + fmt.Sprintf("%v", this.PodName) + `,`, - `ContainerName:` + fmt.Sprintf("%v", this.ContainerName) + `,`, - `}`, - }, "") - return s + var l int + _ = l + if m.AllocationResult != nil { + l = m.AllocationResult.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n } -func (this *PreStartContainerResponse) String() string { - if this == nil { - return "nil" + +func (m *AssociatedDeviceAllocation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.AllocatedDevices) > 0 { + for _, s := range m.AllocatedDevices { + l = len(s) + n += 1 + l + sovApi(uint64(l)) + } + } + return n +} + +func (m *AssociatedDeviceHintsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PodUid) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.PodNamespace) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.PodName) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.ContainerName) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.ContainerType != 0 { + n += 1 + sovApi(uint64(m.ContainerType)) + } + if m.ContainerIndex != 0 { + n += 1 + sovApi(uint64(m.ContainerIndex)) + } + l = len(m.PodRole) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.PodType) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.DeviceName) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.DeviceHints != nil { + l = m.DeviceHints.Size() + n += 1 + l + sovApi(uint64(l)) + } + if len(m.Labels) > 0 { + for k, v := range m.Labels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + return n +} + +func sovApi(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozApi(x uint64) (n int) { + return sovApi(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *ResourcePluginOptions) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourcePluginOptions{`, + `PreStartRequired:` + fmt.Sprintf("%v", this.PreStartRequired) + `,`, + `WithTopologyAlignment:` + fmt.Sprintf("%v", this.WithTopologyAlignment) + `,`, + `NeedReconcile:` + fmt.Sprintf("%v", this.NeedReconcile) + `,`, + `AssociatedDevices:` + fmt.Sprintf("%v", this.AssociatedDevices) + `,`, + `}`, + }, "") + return s +} +func (this *RegisterRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RegisterRequest{`, + `Version:` + fmt.Sprintf("%v", this.Version) + `,`, + `Endpoint:` + fmt.Sprintf("%v", this.Endpoint) + `,`, + `ResourceName:` + fmt.Sprintf("%v", this.ResourceName) + `,`, + `Options:` + strings.Replace(this.Options.String(), "ResourcePluginOptions", "ResourcePluginOptions", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceRequest) String() string { + if this == nil { + return "nil" + } + keysForResourceRequests := make([]string, 0, len(this.ResourceRequests)) + for k := range this.ResourceRequests { + keysForResourceRequests = append(keysForResourceRequests, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForResourceRequests) + mapStringForResourceRequests := "map[string]float64{" + for _, k := range keysForResourceRequests { + mapStringForResourceRequests += fmt.Sprintf("%v: %v,", k, this.ResourceRequests[k]) + } + mapStringForResourceRequests += "}" + keysForLabels := make([]string, 0, len(this.Labels)) + for k := range this.Labels { + keysForLabels = append(keysForLabels, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) + mapStringForLabels := "map[string]string{" + for _, k := range keysForLabels { + mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + } + mapStringForLabels += "}" + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" + s := strings.Join([]string{`&ResourceRequest{`, + `PodUid:` + fmt.Sprintf("%v", this.PodUid) + `,`, + `PodNamespace:` + fmt.Sprintf("%v", this.PodNamespace) + `,`, + `PodName:` + fmt.Sprintf("%v", this.PodName) + `,`, + `ContainerName:` + fmt.Sprintf("%v", this.ContainerName) + `,`, + `ContainerType:` + fmt.Sprintf("%v", this.ContainerType) + `,`, + `ContainerIndex:` + fmt.Sprintf("%v", this.ContainerIndex) + `,`, + `PodRole:` + fmt.Sprintf("%v", this.PodRole) + `,`, + `PodType:` + fmt.Sprintf("%v", this.PodType) + `,`, + `ResourceName:` + fmt.Sprintf("%v", this.ResourceName) + `,`, + `Hint:` + strings.Replace(this.Hint.String(), "TopologyHint", "TopologyHint", 1) + `,`, + `ResourceRequests:` + mapStringForResourceRequests + `,`, + `Labels:` + mapStringForLabels + `,`, + `Annotations:` + mapStringForAnnotations + `,`, + `NativeQosClass:` + fmt.Sprintf("%v", this.NativeQosClass) + `,`, + `}`, + }, "") + return s +} +func (this *PodResourceRequest) String() string { + if this == nil { + return "nil" + } + keysForResourceRequests := make([]string, 0, len(this.ResourceRequests)) + for k := range this.ResourceRequests { + keysForResourceRequests = append(keysForResourceRequests, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForResourceRequests) + mapStringForResourceRequests := "map[string]float64{" + for _, k := range keysForResourceRequests { + mapStringForResourceRequests += fmt.Sprintf("%v: %v,", k, this.ResourceRequests[k]) + } + mapStringForResourceRequests += "}" + keysForLabels := make([]string, 0, len(this.Labels)) + for k := range this.Labels { + keysForLabels = append(keysForLabels, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) + mapStringForLabels := "map[string]string{" + for _, k := range keysForLabels { + mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + } + mapStringForLabels += "}" + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" + s := strings.Join([]string{`&PodResourceRequest{`, + `PodUid:` + fmt.Sprintf("%v", this.PodUid) + `,`, + `PodNamespace:` + fmt.Sprintf("%v", this.PodNamespace) + `,`, + `PodName:` + fmt.Sprintf("%v", this.PodName) + `,`, + `PodRole:` + fmt.Sprintf("%v", this.PodRole) + `,`, + `PodType:` + fmt.Sprintf("%v", this.PodType) + `,`, + `ResourceName:` + fmt.Sprintf("%v", this.ResourceName) + `,`, + `Hint:` + strings.Replace(this.Hint.String(), "TopologyHint", "TopologyHint", 1) + `,`, + `ResourceRequests:` + mapStringForResourceRequests + `,`, + `Labels:` + mapStringForLabels + `,`, + `Annotations:` + mapStringForAnnotations + `,`, + `}`, + }, "") + return s +} +func (this *PodResourceHintsResponse) String() string { + if this == nil { + return "nil" + } + keysForResourceHints := make([]string, 0, len(this.ResourceHints)) + for k := range this.ResourceHints { + keysForResourceHints = append(keysForResourceHints, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForResourceHints) + mapStringForResourceHints := "map[string]*ListOfTopologyHints{" + for _, k := range keysForResourceHints { + mapStringForResourceHints += fmt.Sprintf("%v: %v,", k, this.ResourceHints[k]) + } + mapStringForResourceHints += "}" + keysForLabels := make([]string, 0, len(this.Labels)) + for k := range this.Labels { + keysForLabels = append(keysForLabels, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) + mapStringForLabels := "map[string]string{" + for _, k := range keysForLabels { + mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + } + mapStringForLabels += "}" + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" + s := strings.Join([]string{`&PodResourceHintsResponse{`, + `PodUid:` + fmt.Sprintf("%v", this.PodUid) + `,`, + `PodNamespace:` + fmt.Sprintf("%v", this.PodNamespace) + `,`, + `PodName:` + fmt.Sprintf("%v", this.PodName) + `,`, + `PodRole:` + fmt.Sprintf("%v", this.PodRole) + `,`, + `PodType:` + fmt.Sprintf("%v", this.PodType) + `,`, + `ResourceName:` + fmt.Sprintf("%v", this.ResourceName) + `,`, + `ResourceHints:` + mapStringForResourceHints + `,`, + `Labels:` + mapStringForLabels + `,`, + `Annotations:` + mapStringForAnnotations + `,`, + `}`, + }, "") + return s +} +func (this *ResourceHintsResponse) String() string { + if this == nil { + return "nil" + } + keysForResourceHints := make([]string, 0, len(this.ResourceHints)) + for k := range this.ResourceHints { + keysForResourceHints = append(keysForResourceHints, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForResourceHints) + mapStringForResourceHints := "map[string]*ListOfTopologyHints{" + for _, k := range keysForResourceHints { + mapStringForResourceHints += fmt.Sprintf("%v: %v,", k, this.ResourceHints[k]) + } + mapStringForResourceHints += "}" + keysForLabels := make([]string, 0, len(this.Labels)) + for k := range this.Labels { + keysForLabels = append(keysForLabels, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) + mapStringForLabels := "map[string]string{" + for _, k := range keysForLabels { + mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + } + mapStringForLabels += "}" + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" + s := strings.Join([]string{`&ResourceHintsResponse{`, + `PodUid:` + fmt.Sprintf("%v", this.PodUid) + `,`, + `PodNamespace:` + fmt.Sprintf("%v", this.PodNamespace) + `,`, + `PodName:` + fmt.Sprintf("%v", this.PodName) + `,`, + `ContainerName:` + fmt.Sprintf("%v", this.ContainerName) + `,`, + `ContainerType:` + fmt.Sprintf("%v", this.ContainerType) + `,`, + `ContainerIndex:` + fmt.Sprintf("%v", this.ContainerIndex) + `,`, + `PodRole:` + fmt.Sprintf("%v", this.PodRole) + `,`, + `PodType:` + fmt.Sprintf("%v", this.PodType) + `,`, + `ResourceName:` + fmt.Sprintf("%v", this.ResourceName) + `,`, + `ResourceHints:` + mapStringForResourceHints + `,`, + `Labels:` + mapStringForLabels + `,`, + `Annotations:` + mapStringForAnnotations + `,`, + `NativeQosClass:` + fmt.Sprintf("%v", this.NativeQosClass) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceAllocationResponse) String() string { + if this == nil { + return "nil" + } + keysForLabels := make([]string, 0, len(this.Labels)) + for k := range this.Labels { + keysForLabels = append(keysForLabels, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) + mapStringForLabels := "map[string]string{" + for _, k := range keysForLabels { + mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + } + mapStringForLabels += "}" + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" + s := strings.Join([]string{`&ResourceAllocationResponse{`, + `PodUid:` + fmt.Sprintf("%v", this.PodUid) + `,`, + `PodNamespace:` + fmt.Sprintf("%v", this.PodNamespace) + `,`, + `PodName:` + fmt.Sprintf("%v", this.PodName) + `,`, + `ContainerName:` + fmt.Sprintf("%v", this.ContainerName) + `,`, + `ContainerType:` + fmt.Sprintf("%v", this.ContainerType) + `,`, + `ContainerIndex:` + fmt.Sprintf("%v", this.ContainerIndex) + `,`, + `PodRole:` + fmt.Sprintf("%v", this.PodRole) + `,`, + `PodType:` + fmt.Sprintf("%v", this.PodType) + `,`, + `ResourceName:` + fmt.Sprintf("%v", this.ResourceName) + `,`, + `AllocationResult:` + strings.Replace(this.AllocationResult.String(), "ResourceAllocation", "ResourceAllocation", 1) + `,`, + `Labels:` + mapStringForLabels + `,`, + `Annotations:` + mapStringForAnnotations + `,`, + `NativeQosClass:` + fmt.Sprintf("%v", this.NativeQosClass) + `,`, + `}`, + }, "") + return s +} +func (this *PodResourceAllocationResponse) String() string { + if this == nil { + return "nil" + } + keysForLabels := make([]string, 0, len(this.Labels)) + for k := range this.Labels { + keysForLabels = append(keysForLabels, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) + mapStringForLabels := "map[string]string{" + for _, k := range keysForLabels { + mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + } + mapStringForLabels += "}" + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" + s := strings.Join([]string{`&PodResourceAllocationResponse{`, + `PodUid:` + fmt.Sprintf("%v", this.PodUid) + `,`, + `PodNamespace:` + fmt.Sprintf("%v", this.PodNamespace) + `,`, + `PodName:` + fmt.Sprintf("%v", this.PodName) + `,`, + `PodRole:` + fmt.Sprintf("%v", this.PodRole) + `,`, + `PodType:` + fmt.Sprintf("%v", this.PodType) + `,`, + `ResourceName:` + fmt.Sprintf("%v", this.ResourceName) + `,`, + `AllocationResult:` + strings.Replace(this.AllocationResult.String(), "ResourceAllocation", "ResourceAllocation", 1) + `,`, + `Labels:` + mapStringForLabels + `,`, + `Annotations:` + mapStringForAnnotations + `,`, + `}`, + }, "") + return s +} +func (this *ListOfTopologyHints) String() string { + if this == nil { + return "nil" + } + repeatedStringForHints := "[]*TopologyHint{" + for _, f := range this.Hints { + repeatedStringForHints += strings.Replace(f.String(), "TopologyHint", "TopologyHint", 1) + "," + } + repeatedStringForHints += "}" + s := strings.Join([]string{`&ListOfTopologyHints{`, + `Hints:` + repeatedStringForHints + `,`, + `}`, + }, "") + return s +} +func (this *TopologyHint) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TopologyHint{`, + `Nodes:` + fmt.Sprintf("%v", this.Nodes) + `,`, + `Preferred:` + fmt.Sprintf("%v", this.Preferred) + `,`, + `}`, + }, "") + return s +} +func (this *Empty) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Empty{`, + `}`, + }, "") + return s +} +func (this *RemovePodRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RemovePodRequest{`, + `PodUid:` + fmt.Sprintf("%v", this.PodUid) + `,`, + `}`, + }, "") + return s +} +func (this *RemovePodResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RemovePodResponse{`, + `}`, + }, "") + return s +} +func (this *GetResourcesAllocationRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetResourcesAllocationRequest{`, + `}`, + }, "") + return s +} +func (this *GetResourcesAllocationResponse) String() string { + if this == nil { + return "nil" + } + keysForPodResources := make([]string, 0, len(this.PodResources)) + for k := range this.PodResources { + keysForPodResources = append(keysForPodResources, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForPodResources) + mapStringForPodResources := "map[string]*ContainerResources{" + for _, k := range keysForPodResources { + mapStringForPodResources += fmt.Sprintf("%v: %v,", k, this.PodResources[k]) + } + mapStringForPodResources += "}" + s := strings.Join([]string{`&GetResourcesAllocationResponse{`, + `PodResources:` + mapStringForPodResources + `,`, + `}`, + }, "") + return s +} +func (this *ContainerResources) String() string { + if this == nil { + return "nil" + } + keysForContainerResources := make([]string, 0, len(this.ContainerResources)) + for k := range this.ContainerResources { + keysForContainerResources = append(keysForContainerResources, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForContainerResources) + mapStringForContainerResources := "map[string]*ResourceAllocation{" + for _, k := range keysForContainerResources { + mapStringForContainerResources += fmt.Sprintf("%v: %v,", k, this.ContainerResources[k]) + } + mapStringForContainerResources += "}" + s := strings.Join([]string{`&ContainerResources{`, + `ContainerResources:` + mapStringForContainerResources + `,`, + `}`, + }, "") + return s +} +func (this *ResourceAllocation) String() string { + if this == nil { + return "nil" + } + keysForResourceAllocation := make([]string, 0, len(this.ResourceAllocation)) + for k := range this.ResourceAllocation { + keysForResourceAllocation = append(keysForResourceAllocation, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForResourceAllocation) + mapStringForResourceAllocation := "map[string]*ResourceAllocationInfo{" + for _, k := range keysForResourceAllocation { + mapStringForResourceAllocation += fmt.Sprintf("%v: %v,", k, this.ResourceAllocation[k]) + } + mapStringForResourceAllocation += "}" + s := strings.Join([]string{`&ResourceAllocation{`, + `ResourceAllocation:` + mapStringForResourceAllocation + `,`, + `}`, + }, "") + return s +} +func (this *ResourceAllocationInfo) String() string { + if this == nil { + return "nil" + } + keysForEnvs := make([]string, 0, len(this.Envs)) + for k := range this.Envs { + keysForEnvs = append(keysForEnvs, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForEnvs) + mapStringForEnvs := "map[string]string{" + for _, k := range keysForEnvs { + mapStringForEnvs += fmt.Sprintf("%v: %v,", k, this.Envs[k]) + } + mapStringForEnvs += "}" + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" + keysForTopologyAssignments := make([]uint64, 0, len(this.TopologyAssignments)) + for k := range this.TopologyAssignments { + keysForTopologyAssignments = append(keysForTopologyAssignments, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForTopologyAssignments) + mapStringForTopologyAssignments := "map[uint64]uint64{" + for _, k := range keysForTopologyAssignments { + mapStringForTopologyAssignments += fmt.Sprintf("%v: %v,", k, this.TopologyAssignments[k]) + } + mapStringForTopologyAssignments += "}" + s := strings.Join([]string{`&ResourceAllocationInfo{`, + `OciPropertyName:` + fmt.Sprintf("%v", this.OciPropertyName) + `,`, + `IsNodeResource:` + fmt.Sprintf("%v", this.IsNodeResource) + `,`, + `IsScalarResource:` + fmt.Sprintf("%v", this.IsScalarResource) + `,`, + `AllocatedQuantity:` + fmt.Sprintf("%v", this.AllocatedQuantity) + `,`, + `AllocationResult:` + fmt.Sprintf("%v", this.AllocationResult) + `,`, + `Envs:` + mapStringForEnvs + `,`, + `Annotations:` + mapStringForAnnotations + `,`, + `ResourceHints:` + strings.Replace(this.ResourceHints.String(), "ListOfTopologyHints", "ListOfTopologyHints", 1) + `,`, + `TopologyAssignments:` + mapStringForTopologyAssignments + `,`, + `}`, + }, "") + return s +} +func (this *GetTopologyAwareResourcesRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetTopologyAwareResourcesRequest{`, + `PodUid:` + fmt.Sprintf("%v", this.PodUid) + `,`, + `ContainerName:` + fmt.Sprintf("%v", this.ContainerName) + `,`, + `}`, + }, "") + return s +} +func (this *GetTopologyAwareResourcesResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetTopologyAwareResourcesResponse{`, + `PodUid:` + fmt.Sprintf("%v", this.PodUid) + `,`, + `PodName:` + fmt.Sprintf("%v", this.PodName) + `,`, + `PodNamespace:` + fmt.Sprintf("%v", this.PodNamespace) + `,`, + `ContainerTopologyAwareResources:` + strings.Replace(this.ContainerTopologyAwareResources.String(), "ContainerTopologyAwareResources", "ContainerTopologyAwareResources", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ContainerTopologyAwareResources) String() string { + if this == nil { + return "nil" + } + keysForAllocatedResources := make([]string, 0, len(this.AllocatedResources)) + for k := range this.AllocatedResources { + keysForAllocatedResources = append(keysForAllocatedResources, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAllocatedResources) + mapStringForAllocatedResources := "map[string]*TopologyAwareResource{" + for _, k := range keysForAllocatedResources { + mapStringForAllocatedResources += fmt.Sprintf("%v: %v,", k, this.AllocatedResources[k]) + } + mapStringForAllocatedResources += "}" + s := strings.Join([]string{`&ContainerTopologyAwareResources{`, + `ContainerName:` + fmt.Sprintf("%v", this.ContainerName) + `,`, + `AllocatedResources:` + mapStringForAllocatedResources + `,`, + `}`, + }, "") + return s +} +func (this *TopologyAwareResource) String() string { + if this == nil { + return "nil" + } + repeatedStringForTopologyAwareQuantityList := "[]*TopologyAwareQuantity{" + for _, f := range this.TopologyAwareQuantityList { + repeatedStringForTopologyAwareQuantityList += strings.Replace(f.String(), "TopologyAwareQuantity", "TopologyAwareQuantity", 1) + "," + } + repeatedStringForTopologyAwareQuantityList += "}" + repeatedStringForOriginalTopologyAwareQuantityList := "[]*TopologyAwareQuantity{" + for _, f := range this.OriginalTopologyAwareQuantityList { + repeatedStringForOriginalTopologyAwareQuantityList += strings.Replace(f.String(), "TopologyAwareQuantity", "TopologyAwareQuantity", 1) + "," + } + repeatedStringForOriginalTopologyAwareQuantityList += "}" + s := strings.Join([]string{`&TopologyAwareResource{`, + `IsNodeResource:` + fmt.Sprintf("%v", this.IsNodeResource) + `,`, + `IsScalarResource:` + fmt.Sprintf("%v", this.IsScalarResource) + `,`, + `AggregatedQuantity:` + fmt.Sprintf("%v", this.AggregatedQuantity) + `,`, + `OriginalAggregatedQuantity:` + fmt.Sprintf("%v", this.OriginalAggregatedQuantity) + `,`, + `TopologyAwareQuantityList:` + repeatedStringForTopologyAwareQuantityList + `,`, + `OriginalTopologyAwareQuantityList:` + repeatedStringForOriginalTopologyAwareQuantityList + `,`, + `}`, + }, "") + return s +} +func (this *TopologyAwareQuantity) String() string { + if this == nil { + return "nil" + } + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" + s := strings.Join([]string{`&TopologyAwareQuantity{`, + `ResourceValue:` + fmt.Sprintf("%v", this.ResourceValue) + `,`, + `Node:` + fmt.Sprintf("%v", this.Node) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `TopologyLevel:` + fmt.Sprintf("%v", this.TopologyLevel) + `,`, + `Annotations:` + mapStringForAnnotations + `,`, + `}`, + }, "") + return s +} +func (this *GetTopologyAwareAllocatableResourcesRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetTopologyAwareAllocatableResourcesRequest{`, + `}`, + }, "") + return s +} +func (this *GetTopologyAwareAllocatableResourcesResponse) String() string { + if this == nil { + return "nil" + } + keysForAllocatableResources := make([]string, 0, len(this.AllocatableResources)) + for k := range this.AllocatableResources { + keysForAllocatableResources = append(keysForAllocatableResources, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAllocatableResources) + mapStringForAllocatableResources := "map[string]*AllocatableTopologyAwareResource{" + for _, k := range keysForAllocatableResources { + mapStringForAllocatableResources += fmt.Sprintf("%v: %v,", k, this.AllocatableResources[k]) + } + mapStringForAllocatableResources += "}" + s := strings.Join([]string{`&GetTopologyAwareAllocatableResourcesResponse{`, + `AllocatableResources:` + mapStringForAllocatableResources + `,`, + `}`, + }, "") + return s +} +func (this *AllocatableTopologyAwareResource) String() string { + if this == nil { + return "nil" + } + repeatedStringForTopologyAwareAllocatableQuantityList := "[]*TopologyAwareQuantity{" + for _, f := range this.TopologyAwareAllocatableQuantityList { + repeatedStringForTopologyAwareAllocatableQuantityList += strings.Replace(f.String(), "TopologyAwareQuantity", "TopologyAwareQuantity", 1) + "," + } + repeatedStringForTopologyAwareAllocatableQuantityList += "}" + repeatedStringForTopologyAwareCapacityQuantityList := "[]*TopologyAwareQuantity{" + for _, f := range this.TopologyAwareCapacityQuantityList { + repeatedStringForTopologyAwareCapacityQuantityList += strings.Replace(f.String(), "TopologyAwareQuantity", "TopologyAwareQuantity", 1) + "," + } + repeatedStringForTopologyAwareCapacityQuantityList += "}" + s := strings.Join([]string{`&AllocatableTopologyAwareResource{`, + `IsNodeResource:` + fmt.Sprintf("%v", this.IsNodeResource) + `,`, + `IsScalarResource:` + fmt.Sprintf("%v", this.IsScalarResource) + `,`, + `AggregatedAllocatableQuantity:` + fmt.Sprintf("%v", this.AggregatedAllocatableQuantity) + `,`, + `TopologyAwareAllocatableQuantityList:` + repeatedStringForTopologyAwareAllocatableQuantityList + `,`, + `AggregatedCapacityQuantity:` + fmt.Sprintf("%v", this.AggregatedCapacityQuantity) + `,`, + `TopologyAwareCapacityQuantityList:` + repeatedStringForTopologyAwareCapacityQuantityList + `,`, + `}`, + }, "") + return s +} +func (this *PreStartContainerRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PreStartContainerRequest{`, + `PodUid:` + fmt.Sprintf("%v", this.PodUid) + `,`, + `PodNamespace:` + fmt.Sprintf("%v", this.PodNamespace) + `,`, + `PodName:` + fmt.Sprintf("%v", this.PodName) + `,`, + `ContainerName:` + fmt.Sprintf("%v", this.ContainerName) + `,`, + `}`, + }, "") + return s +} +func (this *PreStartContainerResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PreStartContainerResponse{`, + `}`, + }, "") + return s +} +func (this *AssociatedDevice) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AssociatedDevice{`, + `ID:` + fmt.Sprintf("%v", this.ID) + `,`, + `Health:` + fmt.Sprintf("%v", this.Health) + `,`, + `Topology:` + strings.Replace(this.Topology.String(), "TopologyInfo", "TopologyInfo", 1) + `,`, + `}`, + }, "") + return s +} +func (this *TopologyInfo) String() string { + if this == nil { + return "nil" + } + repeatedStringForNodes := "[]*NUMANode{" + for _, f := range this.Nodes { + repeatedStringForNodes += strings.Replace(f.String(), "NUMANode", "NUMANode", 1) + "," + } + repeatedStringForNodes += "}" + s := strings.Join([]string{`&TopologyInfo{`, + `Nodes:` + repeatedStringForNodes + `,`, + `}`, + }, "") + return s +} +func (this *NUMANode) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NUMANode{`, + `ID:` + fmt.Sprintf("%v", this.ID) + `,`, + `}`, + }, "") + return s +} +func (this *UpdateAllocatableAssociatedDevicesRequest) String() string { + if this == nil { + return "nil" + } + repeatedStringForDevices := "[]*AssociatedDevice{" + for _, f := range this.Devices { + repeatedStringForDevices += strings.Replace(f.String(), "AssociatedDevice", "AssociatedDevice", 1) + "," + } + repeatedStringForDevices += "}" + s := strings.Join([]string{`&UpdateAllocatableAssociatedDevicesRequest{`, + `DeviceName:` + fmt.Sprintf("%v", this.DeviceName) + `,`, + `Devices:` + repeatedStringForDevices + `,`, + `}`, + }, "") + return s +} +func (this *UpdateAllocatableAssociatedDevicesResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UpdateAllocatableAssociatedDevicesResponse{`, + `}`, + }, "") + return s +} +func (this *AssociatedDeviceRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AssociatedDeviceRequest{`, + `ResourceRequest:` + strings.Replace(this.ResourceRequest.String(), "ResourceRequest", "ResourceRequest", 1) + `,`, + `DeviceRequest:` + strings.Replace(this.DeviceRequest.String(), "DeviceRequest", "DeviceRequest", 1) + `,`, + `}`, + }, "") + return s +} +func (this *DeviceRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeviceRequest{`, + `DeviceName:` + fmt.Sprintf("%v", this.DeviceName) + `,`, + `Hint:` + strings.Replace(this.Hint.String(), "TopologyHint", "TopologyHint", 1) + `,`, + `AvailableDevices:` + fmt.Sprintf("%v", this.AvailableDevices) + `,`, + `ReusableDevices:` + fmt.Sprintf("%v", this.ReusableDevices) + `,`, + `DeviceRequest:` + fmt.Sprintf("%v", this.DeviceRequest) + `,`, + `}`, + }, "") + return s +} +func (this *AssociatedDeviceAllocationResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AssociatedDeviceAllocationResponse{`, + `AllocationResult:` + strings.Replace(this.AllocationResult.String(), "AssociatedDeviceAllocation", "AssociatedDeviceAllocation", 1) + `,`, + `}`, + }, "") + return s +} +func (this *AssociatedDeviceAllocation) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AssociatedDeviceAllocation{`, + `AllocatedDevices:` + fmt.Sprintf("%v", this.AllocatedDevices) + `,`, + `}`, + }, "") + return s +} +func (this *AssociatedDeviceHintsResponse) String() string { + if this == nil { + return "nil" + } + keysForLabels := make([]string, 0, len(this.Labels)) + for k := range this.Labels { + keysForLabels = append(keysForLabels, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) + mapStringForLabels := "map[string]string{" + for _, k := range keysForLabels { + mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + } + mapStringForLabels += "}" + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" + s := strings.Join([]string{`&AssociatedDeviceHintsResponse{`, + `PodUid:` + fmt.Sprintf("%v", this.PodUid) + `,`, + `PodNamespace:` + fmt.Sprintf("%v", this.PodNamespace) + `,`, + `PodName:` + fmt.Sprintf("%v", this.PodName) + `,`, + `ContainerName:` + fmt.Sprintf("%v", this.ContainerName) + `,`, + `ContainerType:` + fmt.Sprintf("%v", this.ContainerType) + `,`, + `ContainerIndex:` + fmt.Sprintf("%v", this.ContainerIndex) + `,`, + `PodRole:` + fmt.Sprintf("%v", this.PodRole) + `,`, + `PodType:` + fmt.Sprintf("%v", this.PodType) + `,`, + `DeviceName:` + fmt.Sprintf("%v", this.DeviceName) + `,`, + `DeviceHints:` + strings.Replace(this.DeviceHints.String(), "ListOfTopologyHints", "ListOfTopologyHints", 1) + `,`, + `Labels:` + mapStringForLabels + `,`, + `Annotations:` + mapStringForAnnotations + `,`, + `}`, + }, "") + return s +} +func valueToStringApi(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *ResourcePluginOptions) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourcePluginOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourcePluginOptions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PreStartRequired", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.PreStartRequired = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WithTopologyAlignment", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.WithTopologyAlignment = bool(v != 0) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NeedReconcile", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.NeedReconcile = bool(v != 0) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AssociatedDevices", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AssociatedDevices = append(m.AssociatedDevices, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RegisterRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RegisterRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RegisterRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Endpoint", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Endpoint = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Options == nil { + m.Options = &ResourcePluginOptions{} + } + if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodUid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodUid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodNamespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodNamespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContainerName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerType", wireType) + } + m.ContainerType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ContainerType |= ContainerType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerIndex", wireType) + } + m.ContainerIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ContainerIndex |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodRole", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodRole = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hint", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Hint == nil { + m.Hint = &TopologyHint{} + } + if err := m.Hint.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceRequests", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResourceRequests == nil { + m.ResourceRequests = make(map[string]float64) + } + var mapkey string + var mapvalue float64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthApi + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + mapvalue = math.Float64frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.ResourceRequests[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Labels == nil { + m.Labels = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthApi + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthApi + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Labels[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Annotations == nil { + m.Annotations = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthApi + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthApi + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Annotations[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NativeQosClass", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NativeQosClass = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } - s := strings.Join([]string{`&PreStartContainerResponse{`, - `}`, - }, "") - return s -} -func valueToStringApi(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" + + if iNdEx > l { + return io.ErrUnexpectedEOF } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) + return nil } -func (m *ResourcePluginOptions) Unmarshal(dAtA []byte) error { +func (m *PodResourceRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6352,17 +9063,17 @@ func (m *ResourcePluginOptions) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourcePluginOptions: wiretype end group for non-group") + return fmt.Errorf("proto: PodResourceRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourcePluginOptions: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: PodResourceRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PreStartRequired", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodUid", wireType) } - var v int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -6372,17 +9083,29 @@ func (m *ResourcePluginOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.PreStartRequired = bool(v != 0) + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodUid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WithTopologyAlignment", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodNamespace", wireType) } - var v int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -6392,17 +9115,29 @@ func (m *ResourcePluginOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.WithTopologyAlignment = bool(v != 0) + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodNamespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NeedReconcile", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodName", wireType) } - var v int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -6412,65 +9147,59 @@ func (m *ResourcePluginOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.NeedReconcile = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi } - if (skippy < 0) || (iNdEx+skippy) < 0 { + postIndex := iNdEx + intStringLen + if postIndex < 0 { return ErrInvalidLengthApi } - if (iNdEx + skippy) > l { + if postIndex > l { return io.ErrUnexpectedEOF } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RegisterRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi + m.PodName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodRole", wireType) } - if iNdEx >= l { - return io.ErrUnexpectedEOF + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RegisterRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RegisterRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodRole = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PodType", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6498,11 +9227,11 @@ func (m *RegisterRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Version = string(dAtA[iNdEx:postIndex]) + m.PodType = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Endpoint", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ResourceName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6530,13 +9259,13 @@ func (m *RegisterRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Endpoint = string(dAtA[iNdEx:postIndex]) + m.ResourceName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Hint", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -6546,27 +9275,264 @@ func (m *RegisterRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Hint == nil { + m.Hint = &TopologyHint{} + } + if err := m.Hint.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceRequests", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResourceRequests == nil { + m.ResourceRequests = make(map[string]float64) + } + var mapkey string + var mapvalue float64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthApi + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + mapvalue = math.Float64frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.ResourceRequests[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceName = string(dAtA[iNdEx:postIndex]) + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Labels == nil { + m.Labels = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthApi + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthApi + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Labels[mapkey] = mapvalue iNdEx = postIndex - case 4: + case 10: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6593,12 +9559,103 @@ func (m *RegisterRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Options == nil { - m.Options = &ResourcePluginOptions{} + if m.Annotations == nil { + m.Annotations = make(map[string]string) } - if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthApi + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthApi + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } + m.Annotations[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex @@ -6621,7 +9678,7 @@ func (m *RegisterRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceRequest) Unmarshal(dAtA []byte) error { +func (m *PodResourceHintsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6644,10 +9701,10 @@ func (m *ResourceRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceRequest: wiretype end group for non-group") + return fmt.Errorf("proto: PodResourceHintsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: PodResourceHintsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -6696,129 +9753,27 @@ func (m *ResourceRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PodNamespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PodName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContainerName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContainerName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ContainerType", wireType) - } - m.ContainerType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ContainerType |= ContainerType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ContainerIndex", wireType) - } - m.ContainerIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ContainerIndex |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 7: + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodNamespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodRole", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PodName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6846,11 +9801,11 @@ func (m *ResourceRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.PodRole = string(dAtA[iNdEx:postIndex]) + m.PodName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 8: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodType", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PodRole", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6878,11 +9833,11 @@ func (m *ResourceRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.PodType = string(dAtA[iNdEx:postIndex]) + m.PodRole = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 9: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PodType", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6910,13 +9865,13 @@ func (m *ResourceRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ResourceName = string(dAtA[iNdEx:postIndex]) + m.PodType = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 10: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hint", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ResourceName", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -6926,31 +9881,27 @@ func (m *ResourceRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthApi } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthApi } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Hint == nil { - m.Hint = &TopologyHint{} - } - if err := m.Hint.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.ResourceName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 11: + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceRequests", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ResourceHints", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6977,11 +9928,11 @@ func (m *ResourceRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ResourceRequests == nil { - m.ResourceRequests = make(map[string]float64) + if m.ResourceHints == nil { + m.ResourceHints = make(map[string]*ListOfTopologyHints) } var mapkey string - var mapvalue float64 + var mapvalue *ListOfTopologyHints for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 @@ -7030,13 +9981,36 @@ func (m *ResourceRequest) Unmarshal(dAtA []byte) error { mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { - var mapvaluetemp uint64 - if (iNdEx + 8) > l { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthApi + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthApi + } + if postmsgIndex > l { return io.ErrUnexpectedEOF } - mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - mapvalue = math.Float64frombits(mapvaluetemp) + mapvalue = &ListOfTopologyHints{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex } else { iNdEx = entryPreIndex skippy, err := skipApi(dAtA[iNdEx:]) @@ -7052,9 +10026,9 @@ func (m *ResourceRequest) Unmarshal(dAtA []byte) error { iNdEx += skippy } } - m.ResourceRequests[mapkey] = mapvalue + m.ResourceHints[mapkey] = mapvalue iNdEx = postIndex - case 12: + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) } @@ -7181,7 +10155,7 @@ func (m *ResourceRequest) Unmarshal(dAtA []byte) error { } m.Labels[mapkey] = mapvalue iNdEx = postIndex - case 13: + case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) } @@ -7308,38 +10282,6 @@ func (m *ResourceRequest) Unmarshal(dAtA []byte) error { } m.Annotations[mapkey] = mapvalue iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NativeQosClass", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NativeQosClass = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipApi(dAtA[iNdEx:]) @@ -7361,7 +10303,7 @@ func (m *ResourceRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *PodResourceRequest) Unmarshal(dAtA []byte) error { +func (m *ResourceHintsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7384,10 +10326,10 @@ func (m *PodResourceRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PodResourceRequest: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceHintsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PodResourceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceHintsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -7488,7 +10430,7 @@ func (m *PodResourceRequest) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodRole", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ContainerName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7516,11 +10458,49 @@ func (m *PodResourceRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.PodRole = string(dAtA[iNdEx:postIndex]) + m.ContainerName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerType", wireType) + } + m.ContainerType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ContainerType |= ContainerType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerIndex", wireType) + } + m.ContainerIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ContainerIndex |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodType", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PodRole", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7548,11 +10528,11 @@ func (m *PodResourceRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.PodType = string(dAtA[iNdEx:postIndex]) + m.PodRole = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PodType", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7580,13 +10560,13 @@ func (m *PodResourceRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ResourceName = string(dAtA[iNdEx:postIndex]) + m.PodType = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: + case 9: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hint", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ResourceName", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -7596,31 +10576,27 @@ func (m *PodResourceRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthApi } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthApi } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Hint == nil { - m.Hint = &TopologyHint{} - } - if err := m.Hint.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.ResourceName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 8: + case 10: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceRequests", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ResourceHints", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7647,11 +10623,11 @@ func (m *PodResourceRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ResourceRequests == nil { - m.ResourceRequests = make(map[string]float64) + if m.ResourceHints == nil { + m.ResourceHints = make(map[string]*ListOfTopologyHints) } var mapkey string - var mapvalue float64 + var mapvalue *ListOfTopologyHints for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 @@ -7700,13 +10676,36 @@ func (m *PodResourceRequest) Unmarshal(dAtA []byte) error { mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { - var mapvaluetemp uint64 - if (iNdEx + 8) > l { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthApi + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthApi + } + if postmsgIndex > l { return io.ErrUnexpectedEOF } - mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - mapvalue = math.Float64frombits(mapvaluetemp) + mapvalue = &ListOfTopologyHints{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex } else { iNdEx = entryPreIndex skippy, err := skipApi(dAtA[iNdEx:]) @@ -7722,9 +10721,9 @@ func (m *PodResourceRequest) Unmarshal(dAtA []byte) error { iNdEx += skippy } } - m.ResourceRequests[mapkey] = mapvalue + m.ResourceHints[mapkey] = mapvalue iNdEx = postIndex - case 9: + case 11: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) } @@ -7851,7 +10850,7 @@ func (m *PodResourceRequest) Unmarshal(dAtA []byte) error { } m.Labels[mapkey] = mapvalue iNdEx = postIndex - case 10: + case 12: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) } @@ -7978,6 +10977,38 @@ func (m *PodResourceRequest) Unmarshal(dAtA []byte) error { } m.Annotations[mapkey] = mapvalue iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NativeQosClass", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NativeQosClass = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipApi(dAtA[iNdEx:]) @@ -7999,7 +11030,7 @@ func (m *PodResourceRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *PodResourceHintsResponse) Unmarshal(dAtA []byte) error { +func (m *ResourceAllocationResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8022,10 +11053,10 @@ func (m *PodResourceHintsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PodResourceHintsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceAllocationResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PodResourceHintsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceAllocationResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -8125,6 +11156,76 @@ func (m *PodResourceHintsResponse) Unmarshal(dAtA []byte) error { m.PodName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContainerName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerType", wireType) + } + m.ContainerType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ContainerType |= ContainerType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerIndex", wireType) + } + m.ContainerIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ContainerIndex |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PodRole", wireType) } @@ -8156,7 +11257,7 @@ func (m *PodResourceHintsResponse) Unmarshal(dAtA []byte) error { } m.PodRole = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PodType", wireType) } @@ -8188,7 +11289,7 @@ func (m *PodResourceHintsResponse) Unmarshal(dAtA []byte) error { } m.PodType = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ResourceName", wireType) } @@ -8220,9 +11321,9 @@ func (m *PodResourceHintsResponse) Unmarshal(dAtA []byte) error { } m.ResourceName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: + case 10: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceHints", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AllocationResult", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8249,107 +11350,14 @@ func (m *PodResourceHintsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ResourceHints == nil { - m.ResourceHints = make(map[string]*ListOfTopologyHints) + if m.AllocationResult == nil { + m.AllocationResult = &ResourceAllocation{} } - var mapkey string - var mapvalue *ListOfTopologyHints - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthApi - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthApi - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthApi - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthApi - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &ListOfTopologyHints{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } + if err := m.AllocationResult.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.ResourceHints[mapkey] = mapvalue iNdEx = postIndex - case 8: + case 11: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) } @@ -8476,7 +11484,7 @@ func (m *PodResourceHintsResponse) Unmarshal(dAtA []byte) error { } m.Labels[mapkey] = mapvalue iNdEx = postIndex - case 9: + case 12: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) } @@ -8603,6 +11611,38 @@ func (m *PodResourceHintsResponse) Unmarshal(dAtA []byte) error { } m.Annotations[mapkey] = mapvalue iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NativeQosClass", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NativeQosClass = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipApi(dAtA[iNdEx:]) @@ -8624,7 +11664,7 @@ func (m *PodResourceHintsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceHintsResponse) Unmarshal(dAtA []byte) error { +func (m *PodResourceAllocationResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8647,10 +11687,10 @@ func (m *ResourceHintsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceHintsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: PodResourceAllocationResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceHintsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: PodResourceAllocationResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -8751,7 +11791,7 @@ func (m *ResourceHintsResponse) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContainerName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PodRole", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8779,49 +11819,11 @@ func (m *ResourceHintsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ContainerName = string(dAtA[iNdEx:postIndex]) + m.PodRole = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ContainerType", wireType) - } - m.ContainerType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ContainerType |= ContainerType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ContainerIndex", wireType) - } - m.ContainerIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ContainerIndex |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodRole", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PodType", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8849,11 +11851,11 @@ func (m *ResourceHintsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.PodRole = string(dAtA[iNdEx:postIndex]) + m.PodType = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 8: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodType", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ResourceName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8881,13 +11883,13 @@ func (m *ResourceHintsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.PodType = string(dAtA[iNdEx:postIndex]) + m.ResourceName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 9: + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AllocationResult", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -8897,27 +11899,31 @@ func (m *ResourceHintsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthApi } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthApi } if postIndex > l { return io.ErrUnexpectedEOF } - m.ResourceName = string(dAtA[iNdEx:postIndex]) + if m.AllocationResult == nil { + m.AllocationResult = &ResourceAllocation{} + } + if err := m.AllocationResult.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 10: + case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceHints", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8944,11 +11950,11 @@ func (m *ResourceHintsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ResourceHints == nil { - m.ResourceHints = make(map[string]*ListOfTopologyHints) + if m.Labels == nil { + m.Labels = make(map[string]string) } var mapkey string - var mapvalue *ListOfTopologyHints + var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 @@ -8997,7 +12003,7 @@ func (m *ResourceHintsResponse) Unmarshal(dAtA []byte) error { mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { - var mapmsglen int + var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -9007,26 +12013,24 @@ func (m *ResourceHintsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapmsglen |= int(b&0x7F) << shift + stringLenmapvalue |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if mapmsglen < 0 { + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { return ErrInvalidLengthApi } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { return ErrInvalidLengthApi } - if postmsgIndex > l { + if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF } - mapvalue = &ListOfTopologyHints{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := skipApi(dAtA[iNdEx:]) @@ -9042,11 +12046,11 @@ func (m *ResourceHintsResponse) Unmarshal(dAtA []byte) error { iNdEx += skippy } } - m.ResourceHints[mapkey] = mapvalue + m.Labels[mapkey] = mapvalue iNdEx = postIndex - case 11: + case 9: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9073,8 +12077,8 @@ func (m *ResourceHintsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Labels == nil { - m.Labels = make(map[string]string) + if m.Annotations == nil { + m.Annotations = make(map[string]string) } var mapkey string var mapvalue string @@ -9169,11 +12173,61 @@ func (m *ResourceHintsResponse) Unmarshal(dAtA []byte) error { iNdEx += skippy } } - m.Labels[mapkey] = mapvalue + m.Annotations[mapkey] = mapvalue iNdEx = postIndex - case 12: + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListOfTopologyHints) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListOfTopologyHints: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListOfTopologyHints: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Hints", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9200,14 +12254,81 @@ func (m *ResourceHintsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Annotations == nil { - m.Annotations = make(map[string]string) + m.Hints = append(m.Hints, &TopologyHint{}) + if err := m.Hints[len(m.Hints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TopologyHint) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TopologyHint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TopologyHint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Nodes = append(m.Nodes, v) + } else if wireType == 2 { + var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -9217,43 +12338,34 @@ func (m *ResourceHintsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - wire |= uint64(b&0x7F) << shift + packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthApi - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthApi - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF + if packedLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 + } + elementCount = count + if elementCount != 0 && len(m.Nodes) == 0 { + m.Nodes = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -9263,44 +12375,139 @@ func (m *ResourceHintsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift + v |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthApi - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthApi - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy + m.Nodes = append(m.Nodes, v) } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Nodes", wireType) } - m.Annotations[mapkey] = mapvalue - iNdEx = postIndex - case 13: + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Preferred", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Preferred = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Empty) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Empty: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Empty: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RemovePodRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RemovePodRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RemovePodRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NativeQosClass", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PodUid", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9328,7 +12535,7 @@ func (m *ResourceHintsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.NativeQosClass = string(dAtA[iNdEx:postIndex]) + m.PodUid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -9351,7 +12558,57 @@ func (m *ResourceHintsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceAllocationResponse) Unmarshal(dAtA []byte) error { +func (m *RemovePodResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RemovePodResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RemovePodResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetResourcesAllocationRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9374,247 +12631,67 @@ func (m *ResourceAllocationResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceAllocationResponse: wiretype end group for non-group") + return fmt.Errorf("proto: GetResourcesAllocationRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceAllocationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetResourcesAllocationRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodUid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PodUid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodNamespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PodNamespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PodName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContainerName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContainerName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ContainerType", wireType) - } - m.ContainerType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ContainerType |= ContainerType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ContainerIndex", wireType) - } - m.ContainerIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ContainerIndex |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodRole", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + intStringLen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthApi } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.PodRole = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetResourcesAllocationResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi } - if postIndex > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - m.PodType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetResourcesAllocationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetResourcesAllocationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PodResources", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -9624,63 +12701,174 @@ func (m *ResourceAllocationResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthApi } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthApi } if postIndex > l { return io.ErrUnexpectedEOF } - m.ResourceName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllocationResult", wireType) + if m.PodResources == nil { + m.PodResources = make(map[string]*ContainerResources) } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF + var mapkey string + var mapvalue *ContainerResources + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthApi + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthApi + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthApi + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &ContainerResources{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy } } - if msglen < 0 { - return ErrInvalidLengthApi + m.PodResources[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + msglen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthApi } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - if m.AllocationResult == nil { - m.AllocationResult = &ResourceAllocation{} + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainerResources) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi } - if err := m.AllocationResult.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + if iNdEx >= l { + return io.ErrUnexpectedEOF } - iNdEx = postIndex - case 11: + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContainerResources: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainerResources: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ContainerResources", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9707,11 +12895,11 @@ func (m *ResourceAllocationResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Labels == nil { - m.Labels = make(map[string]string) + if m.ContainerResources == nil { + m.ContainerResources = make(map[string]*ResourceAllocation) } var mapkey string - var mapvalue string + var mapvalue *ResourceAllocation for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 @@ -9760,7 +12948,7 @@ func (m *ResourceAllocationResponse) Unmarshal(dAtA []byte) error { mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { - var stringLenmapvalue uint64 + var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -9770,24 +12958,26 @@ func (m *ResourceAllocationResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift + mapmsglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { + if mapmsglen < 0 { return ErrInvalidLengthApi } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { return ErrInvalidLengthApi } - if postStringIndexmapvalue > l { + if postmsgIndex > l { return io.ErrUnexpectedEOF } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue + mapvalue = &ResourceAllocation{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex } else { iNdEx = entryPreIndex skippy, err := skipApi(dAtA[iNdEx:]) @@ -9803,11 +12993,61 @@ func (m *ResourceAllocationResponse) Unmarshal(dAtA []byte) error { iNdEx += skippy } } - m.Labels[mapkey] = mapvalue - iNdEx = postIndex - case 12: + m.ContainerResources[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceAllocation) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceAllocation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceAllocation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ResourceAllocation", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9834,11 +13074,11 @@ func (m *ResourceAllocationResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Annotations == nil { - m.Annotations = make(map[string]string) + if m.ResourceAllocation == nil { + m.ResourceAllocation = make(map[string]*ResourceAllocationInfo) } var mapkey string - var mapvalue string + var mapvalue *ResourceAllocationInfo for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 @@ -9887,7 +13127,7 @@ func (m *ResourceAllocationResponse) Unmarshal(dAtA []byte) error { mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { - var stringLenmapvalue uint64 + var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -9897,24 +13137,26 @@ func (m *ResourceAllocationResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift + mapmsglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { + if mapmsglen < 0 { return ErrInvalidLengthApi } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { return ErrInvalidLengthApi } - if postStringIndexmapvalue > l { + if postmsgIndex > l { return io.ErrUnexpectedEOF } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue + mapvalue = &ResourceAllocationInfo{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex } else { iNdEx = entryPreIndex skippy, err := skipApi(dAtA[iNdEx:]) @@ -9930,39 +13172,7 @@ func (m *ResourceAllocationResponse) Unmarshal(dAtA []byte) error { iNdEx += skippy } } - m.Annotations[mapkey] = mapvalue - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NativeQosClass", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NativeQosClass = string(dAtA[iNdEx:postIndex]) + m.ResourceAllocation[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex @@ -9985,7 +13195,7 @@ func (m *ResourceAllocationResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *PodResourceAllocationResponse) Unmarshal(dAtA []byte) error { +func (m *ResourceAllocationInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10008,15 +13218,15 @@ func (m *PodResourceAllocationResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PodResourceAllocationResponse: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceAllocationInfo: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PodResourceAllocationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceAllocationInfo: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodUid", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OciPropertyName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10044,13 +13254,13 @@ func (m *PodResourceAllocationResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.PodUid = string(dAtA[iNdEx:postIndex]) + m.OciPropertyName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodNamespace", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsNodeResource", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -10060,29 +13270,17 @@ func (m *PodResourceAllocationResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PodNamespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex + m.IsNodeResource = bool(v != 0) case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodName", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsScalarResource", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -10092,59 +13290,26 @@ func (m *PodResourceAllocationResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PodName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex + m.IsScalarResource = bool(v != 0) case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodRole", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field AllocatedQuantity", wireType) } - if postIndex > l { + var v uint64 + if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } - m.PodRole = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.AllocatedQuantity = float64(math.Float64frombits(v)) case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodType", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AllocationResult", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10172,79 +13337,11 @@ func (m *PodResourceAllocationResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.PodType = string(dAtA[iNdEx:postIndex]) + m.AllocationResult = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllocationResult", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AllocationResult == nil { - m.AllocationResult = &ResourceAllocation{} - } - if err := m.AllocationResult.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Envs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10271,8 +13368,8 @@ func (m *PodResourceAllocationResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Labels == nil { - m.Labels = make(map[string]string) + if m.Envs == nil { + m.Envs = make(map[string]string) } var mapkey string var mapvalue string @@ -10367,9 +13464,9 @@ func (m *PodResourceAllocationResponse) Unmarshal(dAtA []byte) error { iNdEx += skippy } } - m.Labels[mapkey] = mapvalue + m.Envs[mapkey] = mapvalue iNdEx = postIndex - case 9: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) } @@ -10496,59 +13593,9 @@ func (m *PodResourceAllocationResponse) Unmarshal(dAtA []byte) error { } m.Annotations[mapkey] = mapvalue iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListOfTopologyHints) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListOfTopologyHints: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListOfTopologyHints: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hints", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ResourceHints", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10575,81 +13622,50 @@ func (m *ListOfTopologyHints) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Hints = append(m.Hints, &TopologyHint{}) - if err := m.Hints[len(m.Hints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.ResourceHints == nil { + m.ResourceHints = &ListOfTopologyHints{} + } + if err := m.ResourceHints.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TopologyAssignments", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApi + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + if msglen < 0 { + return ErrInvalidLengthApi } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TopologyHint) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthApi } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if m.TopologyAssignments == nil { + m.TopologyAssignments = make(map[uint64]uint64) } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TopologyHint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TopologyHint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Nodes = append(m.Nodes, v) - } else if wireType == 2 { - var packedLen int + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -10659,34 +13675,13 @@ func (m *TopologyHint) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= int(b&0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if packedLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.Nodes) == 0 { - m.Nodes = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 + fieldNum := int32(wire >> 3) + if fieldNum == 1 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -10696,86 +13691,43 @@ func (m *TopologyHint) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= uint64(b&0x7F) << shift + mapkey |= uint64(b&0x7F) << shift if b < 0x80 { break - } - } - m.Nodes = append(m.Nodes, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Nodes", wireType) - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Preferred", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Preferred = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Empty) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Empty: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Empty: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { + m.TopologyAssignments[mapkey] = mapvalue + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipApi(dAtA[iNdEx:]) @@ -10797,7 +13749,7 @@ func (m *Empty) Unmarshal(dAtA []byte) error { } return nil } -func (m *RemovePodRequest) Unmarshal(dAtA []byte) error { +func (m *GetTopologyAwareResourcesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10820,10 +13772,10 @@ func (m *RemovePodRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RemovePodRequest: wiretype end group for non-group") + return fmt.Errorf("proto: GetTopologyAwareResourcesRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RemovePodRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetTopologyAwareResourcesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -10858,56 +13810,38 @@ func (m *RemovePodRequest) Unmarshal(dAtA []byte) error { } m.PodUid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerName", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApi + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RemovePodResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RemovePodResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RemovePodResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { + m.ContainerName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipApi(dAtA[iNdEx:]) @@ -10929,7 +13863,7 @@ func (m *RemovePodResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *GetResourcesAllocationRequest) Unmarshal(dAtA []byte) error { +func (m *GetTopologyAwareResourcesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10952,65 +13886,111 @@ func (m *GetResourcesAllocationRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetResourcesAllocationRequest: wiretype end group for non-group") + return fmt.Errorf("proto: GetTopologyAwareResourcesResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetResourcesAllocationRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetTopologyAwareResourcesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodUid", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthApi } - if (iNdEx + skippy) > l { + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { return io.ErrUnexpectedEOF } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetResourcesAllocationResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi + m.PodUid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodName", wireType) } - if iNdEx >= l { + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.PodName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodNamespace", wireType) } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetResourcesAllocationResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetResourcesAllocationResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodNamespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodResources", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ContainerTopologyAwareResources", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11037,105 +14017,12 @@ func (m *GetResourcesAllocationResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.PodResources == nil { - m.PodResources = make(map[string]*ContainerResources) + if m.ContainerTopologyAwareResources == nil { + m.ContainerTopologyAwareResources = &ContainerTopologyAwareResources{} } - var mapkey string - var mapvalue *ContainerResources - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthApi - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthApi - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthApi - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthApi - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &ContainerResources{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } + if err := m.ContainerTopologyAwareResources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.PodResources[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex @@ -11158,7 +14045,7 @@ func (m *GetResourcesAllocationResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *ContainerResources) Unmarshal(dAtA []byte) error { +func (m *ContainerTopologyAwareResources) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11181,15 +14068,47 @@ func (m *ContainerResources) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ContainerResources: wiretype end group for non-group") + return fmt.Errorf("proto: ContainerTopologyAwareResources: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ContainerResources: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ContainerTopologyAwareResources: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContainerResources", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ContainerName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContainerName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AllocatedResources", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11216,11 +14135,11 @@ func (m *ContainerResources) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ContainerResources == nil { - m.ContainerResources = make(map[string]*ResourceAllocation) + if m.AllocatedResources == nil { + m.AllocatedResources = make(map[string]*TopologyAwareResource) } var mapkey string - var mapvalue *ResourceAllocation + var mapvalue *TopologyAwareResource for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 @@ -11294,7 +14213,7 @@ func (m *ContainerResources) Unmarshal(dAtA []byte) error { if postmsgIndex > l { return io.ErrUnexpectedEOF } - mapvalue = &ResourceAllocation{} + mapvalue = &TopologyAwareResource{} if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { return err } @@ -11314,7 +14233,7 @@ func (m *ContainerResources) Unmarshal(dAtA []byte) error { iNdEx += skippy } } - m.ContainerResources[mapkey] = mapvalue + m.AllocatedResources[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex @@ -11337,7 +14256,7 @@ func (m *ContainerResources) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceAllocation) Unmarshal(dAtA []byte) error { +func (m *TopologyAwareResource) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11356,19 +14275,115 @@ func (m *ResourceAllocation) Unmarshal(dAtA []byte) error { if b < 0x80 { break } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResourceAllocation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceAllocation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TopologyAwareResource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TopologyAwareResource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsNodeResource", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsNodeResource = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsScalarResource", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsScalarResource = bool(v != 0) + case 3: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field AggregatedQuantity", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.AggregatedQuantity = float64(math.Float64frombits(v)) + case 4: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field OriginalAggregatedQuantity", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.OriginalAggregatedQuantity = float64(math.Float64frombits(v)) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TopologyAwareQuantityList", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TopologyAwareQuantityList = append(m.TopologyAwareQuantityList, &TopologyAwareQuantity{}) + if err := m.TopologyAwareQuantityList[len(m.TopologyAwareQuantityList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceAllocation", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OriginalTopologyAwareQuantityList", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11395,105 +14410,10 @@ func (m *ResourceAllocation) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ResourceAllocation == nil { - m.ResourceAllocation = make(map[string]*ResourceAllocationInfo) - } - var mapkey string - var mapvalue *ResourceAllocationInfo - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthApi - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthApi - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthApi - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthApi - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &ResourceAllocationInfo{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } + m.OriginalTopologyAwareQuantityList = append(m.OriginalTopologyAwareQuantityList, &TopologyAwareQuantity{}) + if err := m.OriginalTopologyAwareQuantityList[len(m.OriginalTopologyAwareQuantityList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.ResourceAllocation[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex @@ -11516,7 +14436,7 @@ func (m *ResourceAllocation) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceAllocationInfo) Unmarshal(dAtA []byte) error { +func (m *TopologyAwareQuantity) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11539,49 +14459,28 @@ func (m *ResourceAllocationInfo) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceAllocationInfo: wiretype end group for non-group") + return fmt.Errorf("proto: TopologyAwareQuantity: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceAllocationInfo: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TopologyAwareQuantity: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OciPropertyName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceValue", wireType) } - if postIndex > l { + var v uint64 + if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } - m.OciPropertyName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.ResourceValue = float64(math.Float64frombits(v)) case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsNodeResource", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType) } - var v int + m.Node = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -11591,17 +14490,16 @@ func (m *ResourceAllocationInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.Node |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.IsNodeResource = bool(v != 0) case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsScalarResource", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } - var v int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -11611,26 +14509,27 @@ func (m *ResourceAllocationInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.IsScalarResource = bool(v != 0) - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field AllocatedQuantity", wireType) + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi } - var v uint64 - if (iNdEx + 8) > l { + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { return io.ErrUnexpectedEOF } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.AllocatedQuantity = float64(math.Float64frombits(v)) - case 5: + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllocationResult", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -11658,11 +14557,30 @@ func (m *ResourceAllocationInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.AllocationResult = string(dAtA[iNdEx:postIndex]) + m.Type = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TopologyLevel", wireType) + } + m.TopologyLevel = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TopologyLevel |= TopologyLevel(b&0x7F) << shift + if b < 0x80 { + break + } + } case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Envs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11689,8 +14607,8 @@ func (m *ResourceAllocationInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Envs == nil { - m.Envs = make(map[string]string) + if m.Annotations == nil { + m.Annotations = make(map[string]string) } var mapkey string var mapvalue string @@ -11785,11 +14703,111 @@ func (m *ResourceAllocationInfo) Unmarshal(dAtA []byte) error { iNdEx += skippy } } - m.Envs[mapkey] = mapvalue - iNdEx = postIndex - case 7: + m.Annotations[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetTopologyAwareAllocatableResourcesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetTopologyAwareAllocatableResourcesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetTopologyAwareAllocatableResourcesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetTopologyAwareAllocatableResourcesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetTopologyAwareAllocatableResourcesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetTopologyAwareAllocatableResourcesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AllocatableResources", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11816,11 +14834,11 @@ func (m *ResourceAllocationInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Annotations == nil { - m.Annotations = make(map[string]string) + if m.AllocatableResources == nil { + m.AllocatableResources = make(map[string]*AllocatableTopologyAwareResource) } var mapkey string - var mapvalue string + var mapvalue *AllocatableTopologyAwareResource for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 @@ -11869,7 +14887,7 @@ func (m *ResourceAllocationInfo) Unmarshal(dAtA []byte) error { mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { - var stringLenmapvalue uint64 + var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -11879,24 +14897,26 @@ func (m *ResourceAllocationInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift + mapmsglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { + if mapmsglen < 0 { return ErrInvalidLengthApi } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { return ErrInvalidLengthApi } - if postStringIndexmapvalue > l { + if postmsgIndex > l { return io.ErrUnexpectedEOF } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue + mapvalue = &AllocatableTopologyAwareResource{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex } else { iNdEx = entryPreIndex skippy, err := skipApi(dAtA[iNdEx:]) @@ -11912,13 +14932,63 @@ func (m *ResourceAllocationInfo) Unmarshal(dAtA []byte) error { iNdEx += skippy } } - m.Annotations[mapkey] = mapvalue + m.AllocatableResources[mapkey] = mapvalue iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceHints", wireType) + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err } - var msglen int + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllocatableTopologyAwareResource) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AllocatableTopologyAwareResource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllocatableTopologyAwareResource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsNodeResource", wireType) + } + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -11928,31 +14998,46 @@ func (m *ResourceAllocationInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApi + m.IsNodeResource = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsScalarResource", wireType) } - if postIndex > l { - return io.ErrUnexpectedEOF + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - if m.ResourceHints == nil { - m.ResourceHints = &ListOfTopologyHints{} + m.IsScalarResource = bool(v != 0) + case 3: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field AggregatedAllocatableQuantity", wireType) } - if err := m.ResourceHints.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF } - iNdEx = postIndex - case 9: + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.AggregatedAllocatableQuantity = float64(math.Float64frombits(v)) + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TopologyAssignments", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TopologyAwareAllocatableQuantityList", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11979,75 +15064,55 @@ func (m *ResourceAllocationInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.TopologyAssignments == nil { - m.TopologyAssignments = make(map[uint64]uint64) + m.TopologyAwareAllocatableQuantityList = append(m.TopologyAwareAllocatableQuantityList, &TopologyAwareQuantity{}) + if err := m.TopologyAwareAllocatableQuantityList[len(m.TopologyAwareAllocatableQuantityList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - var mapkey uint64 - var mapvalue uint64 - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + iNdEx = postIndex + case 5: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field AggregatedCapacityQuantity", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.AggregatedCapacityQuantity = float64(math.Float64frombits(v)) + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TopologyAwareCapacityQuantityList", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - } else if fieldNum == 2 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break } } - m.TopologyAssignments[mapkey] = mapvalue + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TopologyAwareCapacityQuantityList = append(m.TopologyAwareCapacityQuantityList, &TopologyAwareQuantity{}) + if err := m.TopologyAwareCapacityQuantityList[len(m.TopologyAwareCapacityQuantityList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -12070,7 +15135,7 @@ func (m *ResourceAllocationInfo) Unmarshal(dAtA []byte) error { } return nil } -func (m *GetTopologyAwareResourcesRequest) Unmarshal(dAtA []byte) error { +func (m *PreStartContainerRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12093,10 +15158,10 @@ func (m *GetTopologyAwareResourcesRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetTopologyAwareResourcesRequest: wiretype end group for non-group") + return fmt.Errorf("proto: PreStartContainerRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetTopologyAwareResourcesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: PreStartContainerRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -12132,6 +15197,70 @@ func (m *GetTopologyAwareResourcesRequest) Unmarshal(dAtA []byte) error { m.PodUid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodNamespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodNamespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ContainerName", wireType) } @@ -12184,7 +15313,7 @@ func (m *GetTopologyAwareResourcesRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *GetTopologyAwareResourcesResponse) Unmarshal(dAtA []byte) error { +func (m *PreStartContainerResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12207,15 +15336,65 @@ func (m *GetTopologyAwareResourcesResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetTopologyAwareResourcesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: PreStartContainerResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetTopologyAwareResourcesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: PreStartContainerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AssociatedDevice) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AssociatedDevice: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AssociatedDevice: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodUid", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -12243,11 +15422,11 @@ func (m *GetTopologyAwareResourcesResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.PodUid = string(dAtA[iNdEx:postIndex]) + m.ID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Health", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -12275,13 +15454,13 @@ func (m *GetTopologyAwareResourcesResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.PodName = string(dAtA[iNdEx:postIndex]) + m.Health = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodNamespace", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Topology", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -12291,27 +15470,81 @@ func (m *GetTopologyAwareResourcesResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthApi } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthApi } if postIndex > l { return io.ErrUnexpectedEOF } - m.PodNamespace = string(dAtA[iNdEx:postIndex]) + if m.Topology == nil { + m.Topology = &TopologyInfo{} + } + if err := m.Topology.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 4: + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TopologyInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TopologyInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TopologyInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContainerTopologyAwareResources", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Nodes", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12338,10 +15571,8 @@ func (m *GetTopologyAwareResourcesResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ContainerTopologyAwareResources == nil { - m.ContainerTopologyAwareResources = &ContainerTopologyAwareResources{} - } - if err := m.ContainerTopologyAwareResources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Nodes = append(m.Nodes, &NUMANode{}) + if err := m.Nodes[len(m.Nodes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -12366,7 +15597,7 @@ func (m *GetTopologyAwareResourcesResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *ContainerTopologyAwareResources) Unmarshal(dAtA []byte) error { +func (m *NUMANode) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12389,15 +15620,84 @@ func (m *ContainerTopologyAwareResources) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ContainerTopologyAwareResources: wiretype end group for non-group") + return fmt.Errorf("proto: NUMANode: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ContainerTopologyAwareResources: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: NUMANode: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) + } + m.ID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ID |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UpdateAllocatableAssociatedDevicesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UpdateAllocatableAssociatedDevicesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateAllocatableAssociatedDevicesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContainerName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DeviceName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -12425,11 +15725,11 @@ func (m *ContainerTopologyAwareResources) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ContainerName = string(dAtA[iNdEx:postIndex]) + m.DeviceName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllocatedResources", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12456,105 +15756,10 @@ func (m *ContainerTopologyAwareResources) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.AllocatedResources == nil { - m.AllocatedResources = make(map[string]*TopologyAwareResource) - } - var mapkey string - var mapvalue *TopologyAwareResource - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthApi - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthApi - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthApi - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthApi - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &TopologyAwareResource{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } + m.Devices = append(m.Devices, &AssociatedDevice{}) + if err := m.Devices[len(m.Devices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.AllocatedResources[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex @@ -12577,7 +15782,7 @@ func (m *ContainerTopologyAwareResources) Unmarshal(dAtA []byte) error { } return nil } -func (m *TopologyAwareResource) Unmarshal(dAtA []byte) error { +func (m *UpdateAllocatableAssociatedDevicesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12600,77 +15805,65 @@ func (m *TopologyAwareResource) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TopologyAwareResource: wiretype end group for non-group") + return fmt.Errorf("proto: UpdateAllocatableAssociatedDevicesResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TopologyAwareResource: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: UpdateAllocatableAssociatedDevicesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsNodeResource", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsNodeResource = bool(v != 0) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsScalarResource", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err } - m.IsScalarResource = bool(v != 0) - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field AggregatedQuantity", wireType) + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthApi } - var v uint64 - if (iNdEx + 8) > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.AggregatedQuantity = float64(math.Float64frombits(v)) - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field OriginalAggregatedQuantity", wireType) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AssociatedDeviceRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi } - var v uint64 - if (iNdEx + 8) > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.OriginalAggregatedQuantity = float64(math.Float64frombits(v)) - case 5: + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AssociatedDeviceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AssociatedDeviceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TopologyAwareQuantityList", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ResourceRequest", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12697,14 +15890,16 @@ func (m *TopologyAwareResource) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.TopologyAwareQuantityList = append(m.TopologyAwareQuantityList, &TopologyAwareQuantity{}) - if err := m.TopologyAwareQuantityList[len(m.TopologyAwareQuantityList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.ResourceRequest == nil { + m.ResourceRequest = &ResourceRequest{} + } + if err := m.ResourceRequest.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 6: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OriginalTopologyAwareQuantityList", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DeviceRequest", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12731,8 +15926,10 @@ func (m *TopologyAwareResource) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.OriginalTopologyAwareQuantityList = append(m.OriginalTopologyAwareQuantityList, &TopologyAwareQuantity{}) - if err := m.OriginalTopologyAwareQuantityList[len(m.OriginalTopologyAwareQuantityList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.DeviceRequest == nil { + m.DeviceRequest = &DeviceRequest{} + } + if err := m.DeviceRequest.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -12757,7 +15954,7 @@ func (m *TopologyAwareResource) Unmarshal(dAtA []byte) error { } return nil } -func (m *TopologyAwareQuantity) Unmarshal(dAtA []byte) error { +func (m *DeviceRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12780,28 +15977,17 @@ func (m *TopologyAwareQuantity) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TopologyAwareQuantity: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TopologyAwareQuantity: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceValue", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.ResourceValue = float64(math.Float64frombits(v)) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeviceName", wireType) } - m.Node = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -12811,16 +15997,29 @@ func (m *TopologyAwareQuantity) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Node |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 3: + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeviceName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Hint", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -12830,27 +16029,31 @@ func (m *TopologyAwareQuantity) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthApi } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthApi } if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + if m.Hint == nil { + m.Hint = &TopologyHint{} + } + if err := m.Hint.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 4: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AvailableDevices", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -12878,13 +16081,13 @@ func (m *TopologyAwareQuantity) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Type = string(dAtA[iNdEx:postIndex]) + m.AvailableDevices = append(m.AvailableDevices, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TopologyLevel", wireType) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReusableDevices", wireType) } - m.TopologyLevel = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -12894,16 +16097,29 @@ func (m *TopologyAwareQuantity) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TopologyLevel |= TopologyLevel(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi } - var msglen int + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ReusableDevices = append(m.ReusableDevices, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DeviceRequest", wireType) + } + m.DeviceRequest = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -12913,118 +16129,96 @@ func (m *TopologyAwareQuantity) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.DeviceRequest |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthApi + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + msglen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthApi } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - if m.Annotations == nil { - m.Annotations = make(map[string]string) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AssociatedDeviceAllocationResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthApi - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthApi - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthApi - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthApi - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AssociatedDeviceAllocationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AssociatedDeviceAllocationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AllocationResult", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break } } - m.Annotations[mapkey] = mapvalue + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AllocationResult == nil { + m.AllocationResult = &AssociatedDeviceAllocation{} + } + if err := m.AllocationResult.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -13047,7 +16241,7 @@ func (m *TopologyAwareQuantity) Unmarshal(dAtA []byte) error { } return nil } -func (m *GetTopologyAwareAllocatableResourcesRequest) Unmarshal(dAtA []byte) error { +func (m *AssociatedDeviceAllocation) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13070,12 +16264,44 @@ func (m *GetTopologyAwareAllocatableResourcesRequest) Unmarshal(dAtA []byte) err fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetTopologyAwareAllocatableResourcesRequest: wiretype end group for non-group") + return fmt.Errorf("proto: AssociatedDeviceAllocation: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetTopologyAwareAllocatableResourcesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: AssociatedDeviceAllocation: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AllocatedDevices", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AllocatedDevices = append(m.AllocatedDevices, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipApi(dAtA[iNdEx:]) @@ -13097,7 +16323,7 @@ func (m *GetTopologyAwareAllocatableResourcesRequest) Unmarshal(dAtA []byte) err } return nil } -func (m *GetTopologyAwareAllocatableResourcesResponse) Unmarshal(dAtA []byte) error { +func (m *AssociatedDeviceHintsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13120,17 +16346,17 @@ func (m *GetTopologyAwareAllocatableResourcesResponse) Unmarshal(dAtA []byte) er fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetTopologyAwareAllocatableResourcesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: AssociatedDeviceHintsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetTopologyAwareAllocatableResourcesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: AssociatedDeviceHintsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllocatableResources", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PodUid", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -13140,176 +16366,125 @@ func (m *GetTopologyAwareAllocatableResourcesResponse) Unmarshal(dAtA []byte) er } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthApi } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthApi } if postIndex > l { return io.ErrUnexpectedEOF } - if m.AllocatableResources == nil { - m.AllocatableResources = make(map[string]*AllocatableTopologyAwareResource) + m.PodUid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodNamespace", wireType) } - var mapkey string - var mapvalue *AllocatableTopologyAwareResource - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthApi - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthApi - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthApi - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthApi - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &AllocatableTopologyAwareResource{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break } } - m.AllocatableResources[mapkey] = mapvalue + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodNamespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodName", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthApi } - if (iNdEx + skippy) > l { + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { return io.ErrUnexpectedEOF } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllocatableTopologyAwareResource) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi + m.PodName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - if iNdEx >= l { - return io.ErrUnexpectedEOF + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllocatableTopologyAwareResource: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllocatableTopologyAwareResource: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContainerName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsNodeResource", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ContainerType", wireType) } - var v int + m.ContainerType = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -13319,17 +16494,16 @@ func (m *AllocatableTopologyAwareResource) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.ContainerType |= ContainerType(b&0x7F) << shift if b < 0x80 { break } } - m.IsNodeResource = bool(v != 0) - case 2: + case 6: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsScalarResource", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ContainerIndex", wireType) } - var v int + m.ContainerIndex = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -13339,28 +16513,16 @@ func (m *AllocatableTopologyAwareResource) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.ContainerIndex |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.IsScalarResource = bool(v != 0) - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field AggregatedAllocatableQuantity", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.AggregatedAllocatableQuantity = float64(math.Float64frombits(v)) - case 4: + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TopologyAwareAllocatableQuantityList", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PodRole", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -13370,42 +16532,29 @@ func (m *AllocatableTopologyAwareResource) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthApi } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthApi } if postIndex > l { return io.ErrUnexpectedEOF } - m.TopologyAwareAllocatableQuantityList = append(m.TopologyAwareAllocatableQuantityList, &TopologyAwareQuantity{}) - if err := m.TopologyAwareAllocatableQuantityList[len(m.TopologyAwareAllocatableQuantityList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.PodRole = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field AggregatedCapacityQuantity", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.AggregatedCapacityQuantity = float64(math.Float64frombits(v)) - case 6: + case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TopologyAwareCapacityQuantityList", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PodType", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -13415,81 +16564,61 @@ func (m *AllocatableTopologyAwareResource) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthApi } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthApi } if postIndex > l { return io.ErrUnexpectedEOF } - m.TopologyAwareCapacityQuantityList = append(m.TopologyAwareCapacityQuantityList, &TopologyAwareQuantity{}) - if err := m.TopologyAwareCapacityQuantityList[len(m.TopologyAwareCapacityQuantityList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.PodType = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeviceName", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApi + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PreStartContainerRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PreStartContainerRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PreStartContainerRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + m.DeviceName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodUid", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DeviceHints", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -13499,29 +16628,33 @@ func (m *PreStartContainerRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthApi } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthApi } if postIndex > l { return io.ErrUnexpectedEOF } - m.PodUid = string(dAtA[iNdEx:postIndex]) + if m.DeviceHints == nil { + m.DeviceHints = &ListOfTopologyHints{} + } + if err := m.DeviceHints.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 2: + case 11: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodNamespace", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -13531,29 +16664,124 @@ func (m *PreStartContainerRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PodNamespace = string(dAtA[iNdEx:postIndex]) + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Labels == nil { + m.Labels = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthApi + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthApi + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Labels[mapkey] = mapvalue iNdEx = postIndex - case 3: + case 12: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -13563,55 +16791,118 @@ func (m *PreStartContainerRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthApi } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthApi } if postIndex > l { return io.ErrUnexpectedEOF } - m.PodName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContainerName", wireType) + if m.Annotations == nil { + m.Annotations = make(map[string]string) } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthApi + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthApi + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContainerName = string(dAtA[iNdEx:postIndex]) + m.Annotations[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex @@ -13634,56 +16925,6 @@ func (m *PreStartContainerRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *PreStartContainerResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PreStartContainerResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PreStartContainerResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipApi(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/pkg/apis/resourceplugin/v1alpha1/api.proto b/pkg/apis/resourceplugin/v1alpha1/api.proto index 4a56ce99..ccd481a6 100644 --- a/pkg/apis/resourceplugin/v1alpha1/api.proto +++ b/pkg/apis/resourceplugin/v1alpha1/api.proto @@ -33,6 +33,8 @@ message ResourcePluginOptions { bool with_topology_alignment = 2; // Indicates if the resource needs reconciling allocation result bool need_reconcile = 3; + // Indicates the devices that this plugin needs to allocate + repeated string associated_devices = 4; } message RegisterRequest { @@ -311,4 +313,86 @@ service ResourcePlugin { // before each container start. Resource plugin can run resource specific operations // such as resetting the resource before making resources available to the container rpc PreStartContainer(PreStartContainerRequest) returns (PreStartContainerResponse) {} + + // GetAssociatedDeviceTopologyHints gets associated device for the container + rpc GetAssociatedDeviceTopologyHints(AssociatedDeviceRequest) returns (AssociatedDeviceHintsResponse) {} + + // UpdateAllocatableAssociatedDevices updates the allocatable associated devices for the resource plugin + // This is called when the device plugin reports the allocatable devices + rpc UpdateAllocatableAssociatedDevices(UpdateAllocatableAssociatedDevicesRequest) returns (UpdateAllocatableAssociatedDevicesResponse) {} + + // AllocateAssociatedDevice allocates the associated device for the container + rpc AllocateAssociatedDevice(AssociatedDeviceRequest) returns (AssociatedDeviceAllocationResponse) {} +} + +// AssociatedDevice represents a device that is associated with a resource and can be used by a container. +message AssociatedDevice { + // ID is a unique identifier assigned by the device plugin to identify the device. + // The maximum length of this field is 63 characters. + string ID = 1; + // Health indicates the health of the device (e.g., healthy or unhealthy). + // See constants.go for possible values. + string health = 2; + // Topology provides the NUMA affinity of the device. + TopologyInfo topology = 3; +} + +// TopologyInfo contains the NUMA node information for a device. +message TopologyInfo { + repeated NUMANode nodes = 1; +} + +// NUMANode represents a NUMA node. +message NUMANode { + int64 ID = 1; +} + +// UpdateAllocatableAssociatedDevicesRequest is the request sent to a resource plugin +// to update its knowledge of allocatable devices. +message UpdateAllocatableAssociatedDevicesRequest { + string device_name = 1; + repeated AssociatedDevice devices = 2; +} + +// UpdateAllocatableAssociatedDevicesResponse is the empty response from the resource plugin. +message UpdateAllocatableAssociatedDevicesResponse { } + +// AssociatedDeviceRequest is the request sent to a resource plugin to allocate an associated device. +message AssociatedDeviceRequest { + ResourceRequest resource_request = 1; + DeviceRequest device_request = 2; +} + +message DeviceRequest { + string device_name = 1; + TopologyHint hint = 2; + repeated string available_devices = 3; + repeated string reusable_devices = 4; + uint64 device_request = 5; +} + +// AssociatedDeviceAllocationResponse contains the result of an associated device allocation. +message AssociatedDeviceAllocationResponse { + AssociatedDeviceAllocation allocation_result = 1; +} + +// AssociatedDeviceAllocation represents the result of an allocation. +message AssociatedDeviceAllocation { + repeated string allocated_devices = 1; +} + +message AssociatedDeviceHintsResponse { + string pod_uid = 1; + string pod_namespace = 2; + string pod_name = 3; + string container_name = 4; + ContainerType container_type = 5; + uint64 container_index = 6; + string pod_role = 7; + string pod_type = 8; + string device_name = 9; + ListOfTopologyHints device_hints = 10; + map labels = 11; + map annotations = 12; +} \ No newline at end of file diff --git a/pkg/apis/resourceplugin/v1alpha1/constants.go b/pkg/apis/resourceplugin/v1alpha1/constants.go index 99f2f8a8..aeb478ed 100644 --- a/pkg/apis/resourceplugin/v1alpha1/constants.go +++ b/pkg/apis/resourceplugin/v1alpha1/constants.go @@ -48,6 +48,12 @@ const ( KubeletResourcePluginGetTopologyAwareResourcesRPCTimeoutInSecs = 10 // Timeout duration in secs for GetTopologyAwareAllocatableResources RPC KubeletResourcePluginGetTopologyAwareAllocatableResourcesRPCTimeoutInSecs = 10 + // Timeout duration in secs for GetAssociatedDeviceTopologyHints RPC + KubeletResourcePluginGetAssociatedDeviceTopologyHintsRPCTimeoutInSecs = 10 + // Timeout duration in secs for UpdateAllocatableAssociatedDevices RPC + KubeletResourcePluginUpdateAllocatableAssociatedDevicesRPCTimeoutInSecs = 10 + // Timeout duration in secs for AllocateAssociatedDevice RPC + KubeletResourcePluginAllocateAssociatedDeviceRPCTimeoutInSecs = 10 PodRoleLabelKey = "katalyst.kubewharf.io/pod_role" PodTypeAnnotationKey = "katalyst.kubewharf.io/pod_type"