diff --git a/broker/machinebroker/apiutils/apiutils.go b/broker/machinebroker/apiutils/apiutils.go index 7d037beb0..1bdb3d57e 100644 --- a/broker/machinebroker/apiutils/apiutils.go +++ b/broker/machinebroker/apiutils/apiutils.go @@ -167,3 +167,19 @@ func IsManagedBy(o metav1.Object, manager string) bool { actual, ok := o.GetLabels()[machinebrokerv1alpha1.ManagerLabel] return ok && actual == manager } + +func GetIRIObjectMetadata(o metav1.Object) *irimeta.ObjectMetadata { + var deletedAt int64 + if !o.GetDeletionTimestamp().IsZero() { + deletedAt = o.GetDeletionTimestamp().UnixNano() + } + + return &irimeta.ObjectMetadata{ + Id: o.GetName(), + Annotations: o.GetAnnotations(), + Labels: o.GetLabels(), + Generation: o.GetGeneration(), + CreatedAt: o.GetCreationTimestamp().UnixNano(), + DeletedAt: deletedAt, + } +} diff --git a/broker/machinebroker/server/event_list.go b/broker/machinebroker/server/event_list.go new file mode 100644 index 000000000..e9a78cdcc --- /dev/null +++ b/broker/machinebroker/server/event_list.go @@ -0,0 +1,93 @@ +// SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and IronCore contributors +// SPDX-License-Identifier: Apache-2.0 + +package server + +import ( + "context" + "fmt" + + v1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/labels" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/ironcore-dev/ironcore/broker/machinebroker/apiutils" + iri "github.com/ironcore-dev/ironcore/iri/apis/machine/v1alpha1" +) + +const InvolvedObjectName = "involvedObject.name" + +func (s *Server) listEvents(ctx context.Context, machineID string) ([]*iri.Event, error) { + machineEventList := &v1.EventList{} + selectorField := fields.Set{} + selectorField[InvolvedObjectName] = machineID + + if err := s.cluster.Client().List(ctx, machineEventList, + client.InNamespace(s.cluster.Namespace()), client.MatchingFieldsSelector{Selector: selectorField.AsSelector()}, + ); err != nil { + return nil, fmt.Errorf("error listing machine events: %w", err) + } + + var iriEvents []*iri.Event + for _, machineEvent := range machineEventList.Items { + iriEvent := &iri.Event{ + Metadata: apiutils.GetIRIObjectMetadata(&machineEvent.ObjectMeta), + Spec: &iri.EventSpec{ + Reason: machineEvent.Reason, + Message: machineEvent.Message, + Type: machineEvent.Type, + EventTime: machineEvent.FirstTimestamp.Unix(), + }, + } + iriEvents = append(iriEvents, iriEvent) + } + return iriEvents, nil +} + +func (s *Server) filterEvents(events []*iri.Event, filter *iri.EventFilter) []*iri.Event { + if filter == nil { + return events + } + + var ( + res []*iri.Event + sel = labels.SelectorFromSet(filter.LabelSelector) + ) + for _, iriEvent := range events { + if !sel.Matches(labels.Set(iriEvent.Metadata.Labels)) { + continue + } + if (filter.EventsFromTime >= 0 && iriEvent.Spec.EventTime >= filter.EventsFromTime) && (filter.EventsToTime >= 0 && iriEvent.Spec.EventTime <= filter.EventsToTime) { + res = append(res, iriEvent) + } + + } + return res +} + +func (s *Server) ListEvents(ctx context.Context, req *iri.ListEventsRequest) (*iri.ListEventsResponse, error) { + ironcoreMachineList, err := s.listIroncoreMachines(ctx) + if err != nil { + return nil, err + } + var machineEvents []*iri.MachineEvents + for i := range ironcoreMachineList.Items { + ironcoreMachine := &ironcoreMachineList.Items[i] + iriEvents, err := s.listEvents(ctx, ironcoreMachine.Name) + if err != nil { + return nil, err + } + + iriEvents = s.filterEvents(iriEvents, req.Filter) + ironcoreMachineMeta, err := apiutils.GetObjectMetadata(&ironcoreMachine.ObjectMeta) + if err != nil { + return nil, fmt.Errorf("error listing machine events: %w", err) + } + machineEvents = append(machineEvents, &iri.MachineEvents{InvolvedObjectMeta: ironcoreMachineMeta, Events: iriEvents}) + } + + return &iri.ListEventsResponse{ + MachineEvents: machineEvents, + }, nil +} diff --git a/broker/machinebroker/server/event_list_test.go b/broker/machinebroker/server/event_list_test.go new file mode 100644 index 000000000..f74797468 --- /dev/null +++ b/broker/machinebroker/server/event_list_test.go @@ -0,0 +1,86 @@ +// SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and IronCore contributors +// SPDX-License-Identifier: Apache-2.0 + +package server_test + +import ( + computev1alpha1 "github.com/ironcore-dev/ironcore/api/compute/v1alpha1" + networkingv1alpha1 "github.com/ironcore-dev/ironcore/api/networking/v1alpha1" + iri "github.com/ironcore-dev/ironcore/iri/apis/machine/v1alpha1" + irimeta "github.com/ironcore-dev/ironcore/iri/apis/meta/v1alpha1" + machinepoolletv1alpha1 "github.com/ironcore-dev/ironcore/poollet/machinepoollet/api/v1alpha1" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + + corev1 "k8s.io/api/core/v1" + "k8s.io/client-go/kubernetes/scheme" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +var _ = Describe("ListEvents", func() { + ns, srv := SetupTest() + machineClass := SetupMachineClass() + + It("should correctly list events", func(ctx SpecContext) { + By("creating machine") + Expect(computev1alpha1.AddToScheme(scheme.Scheme)).To(Succeed()) + Expect(networkingv1alpha1.AddToScheme(scheme.Scheme)).To(Succeed()) + + k8sManager, err := ctrl.NewManager(cfg, ctrl.Options{ + Scheme: scheme.Scheme, + }) + Expect(err).ToNot(HaveOccurred()) + + res, err := srv.CreateMachine(ctx, &iri.CreateMachineRequest{ + Machine: &iri.Machine{ + Metadata: &irimeta.ObjectMetadata{ + Labels: map[string]string{ + machinepoolletv1alpha1.MachineUIDLabel: "foobar", + }, + }, + Spec: &iri.MachineSpec{ + Power: iri.Power_POWER_ON, + Image: &iri.ImageSpec{ + Image: "example.org/foo:latest", + }, + Class: machineClass.Name, + NetworkInterfaces: []*iri.NetworkInterface{ + { + Name: "primary-nic", + NetworkId: "network-id", + Ips: []string{"10.0.0.1"}, + }, + }, + }, + }, + }) + Expect(err).NotTo(HaveOccurred()) + Expect(res).NotTo(BeNil()) + + By("getting the ironcore machine") + ironcoreMachine := &computev1alpha1.Machine{} + ironcoreMachineKey := client.ObjectKey{Namespace: ns.Name, Name: res.Machine.Metadata.Id} + Expect(k8sClient.Get(ctx, ironcoreMachineKey, ironcoreMachine)).To(Succeed()) + + By("generating the machine events") + eventRecorder := k8sManager.GetEventRecorderFor("test-recorder") + eventRecorder.Event(ironcoreMachine, corev1.EventTypeNormal, "testing", "this is test event") + + By("listing the machine events") + resp, err := srv.ListEvents(ctx, &iri.ListEventsRequest{}) + + Expect(err).NotTo(HaveOccurred()) + + Expect(resp.MachineEvents).To(ConsistOf(SatisfyAll( + HaveField("InvolvedObjectMeta.Id", Equal(ironcoreMachine.Name)), + HaveField("Events", ConsistOf(SatisfyAll( + HaveField("Spec", SatisfyAll( + HaveField("Reason", Equal("testing")), + HaveField("Message", Equal("this is test event")), + HaveField("Type", Equal(corev1.EventTypeNormal)), + )), + ))), + ))) + }) +}) diff --git a/broker/machinebroker/server/machine_list.go b/broker/machinebroker/server/machine_list.go index 7f4b7ac1b..1e0f31423 100644 --- a/broker/machinebroker/server/machine_list.go +++ b/broker/machinebroker/server/machine_list.go @@ -23,14 +23,8 @@ import ( ) func (s *Server) listAggregateIronCoreMachines(ctx context.Context) ([]AggregateIronCoreMachine, error) { - ironcoreMachineList := &computev1alpha1.MachineList{} - if err := s.cluster.Client().List(ctx, ironcoreMachineList, - client.InNamespace(s.cluster.Namespace()), - client.MatchingLabels{ - machinebrokerv1alpha1.ManagerLabel: machinebrokerv1alpha1.MachineBrokerManager, - machinebrokerv1alpha1.CreatedLabel: "true", - }, - ); err != nil { + ironcoreMachineList, err := s.listIroncoreMachines(ctx) + if err != nil { return nil, fmt.Errorf("error listing ironcore machines: %w", err) } @@ -61,6 +55,20 @@ func (s *Server) listAggregateIronCoreMachines(ctx context.Context) ([]Aggregate return res, nil } +func (s *Server) listIroncoreMachines(ctx context.Context) (*computev1alpha1.MachineList, error) { + ironcoreMachineList := &computev1alpha1.MachineList{} + if err := s.cluster.Client().List(ctx, ironcoreMachineList, + client.InNamespace(s.cluster.Namespace()), + client.MatchingLabels{ + machinebrokerv1alpha1.ManagerLabel: machinebrokerv1alpha1.MachineBrokerManager, + machinebrokerv1alpha1.CreatedLabel: "true", + }, + ); err != nil { + return nil, err + } + return ironcoreMachineList, nil +} + func (s *Server) aggregateIronCoreMachine( ctx context.Context, rd client.Reader, diff --git a/broker/machinebroker/server/machine_networkinterface_attach.go b/broker/machinebroker/server/machine_networkinterface_attach.go index 99cefc2a5..097c9e3e6 100644 --- a/broker/machinebroker/server/machine_networkinterface_attach.go +++ b/broker/machinebroker/server/machine_networkinterface_attach.go @@ -100,7 +100,6 @@ func (s *Server) createIronCoreNetworkInterface( func (s *Server) attachIronCoreNetworkInterface( ctx context.Context, - log logr.Logger, ironcoreMachine *computev1alpha1.Machine, ironcoreMachineNic *computev1alpha1.NetworkInterface, ) error { @@ -141,7 +140,7 @@ func (s *Server) AttachNetworkInterface(ctx context.Context, req *iri.AttachNetw return nil, err } - if err := s.attachIronCoreNetworkInterface(ctx, log, ironcoreMachine, ironcoreMachineNic); err != nil { + if err := s.attachIronCoreNetworkInterface(ctx, ironcoreMachine, ironcoreMachineNic); err != nil { return nil, fmt.Errorf("error creating ironcore network interface: %w", err) } diff --git a/broker/machinebroker/server/machine_volume_attach.go b/broker/machinebroker/server/machine_volume_attach.go index c86a1236d..514eda793 100644 --- a/broker/machinebroker/server/machine_volume_attach.go +++ b/broker/machinebroker/server/machine_volume_attach.go @@ -212,7 +212,6 @@ func (s *Server) createIronCoreVolume( func (s *Server) attachIronCoreVolume( ctx context.Context, - log logr.Logger, ironcoreMachine *computev1alpha1.Machine, ironcoreMachineVolume *computev1alpha1.Volume, ) error { @@ -251,7 +250,7 @@ func (s *Server) AttachVolume(ctx context.Context, req *iri.AttachVolumeRequest) } log.V(1).Info("Attaching ironcore volume") - if err := s.attachIronCoreVolume(ctx, log, ironcoreMachine, ironcoreMachineVolume); err != nil { + if err := s.attachIronCoreVolume(ctx, ironcoreMachine, ironcoreMachineVolume); err != nil { return nil, err } diff --git a/iri/apis/machine/machine.go b/iri/apis/machine/machine.go index 3927c17d0..a67cf279b 100644 --- a/iri/apis/machine/machine.go +++ b/iri/apis/machine/machine.go @@ -11,6 +11,7 @@ import ( type RuntimeService interface { Version(context.Context, *api.VersionRequest) (*api.VersionResponse, error) + ListEvents(context.Context, *api.ListEventsRequest) (*api.ListEventsResponse, error) ListMachines(context.Context, *api.ListMachinesRequest) (*api.ListMachinesResponse, error) CreateMachine(context.Context, *api.CreateMachineRequest) (*api.CreateMachineResponse, error) DeleteMachine(context.Context, *api.DeleteMachineRequest) (*api.DeleteMachineResponse, error) diff --git a/iri/apis/machine/v1alpha1/api.pb.go b/iri/apis/machine/v1alpha1/api.pb.go index e9c5da96b..2452f072d 100644 --- a/iri/apis/machine/v1alpha1/api.pb.go +++ b/iri/apis/machine/v1alpha1/api.pb.go @@ -263,6 +263,75 @@ func (m *MachineFilter) GetLabelSelector() map[string]string { return nil } +type EventFilter struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + LabelSelector map[string]string `protobuf:"bytes,2,rep,name=label_selector,json=labelSelector,proto3" json:"label_selector,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + EventsFromTime int64 `protobuf:"varint,3,opt,name=events_from_time,json=eventsFromTime,proto3" json:"events_from_time,omitempty"` + EventsToTime int64 `protobuf:"varint,4,opt,name=events_to_time,json=eventsToTime,proto3" json:"events_to_time,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EventFilter) Reset() { *m = EventFilter{} } +func (*EventFilter) ProtoMessage() {} +func (*EventFilter) Descriptor() ([]byte, []int) { + return fileDescriptor_00212fb1f9d3bf1c, []int{2} +} +func (m *EventFilter) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventFilter.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 *EventFilter) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventFilter.Merge(m, src) +} +func (m *EventFilter) XXX_Size() int { + return m.Size() +} +func (m *EventFilter) XXX_DiscardUnknown() { + xxx_messageInfo_EventFilter.DiscardUnknown(m) +} + +var xxx_messageInfo_EventFilter proto.InternalMessageInfo + +func (m *EventFilter) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *EventFilter) GetLabelSelector() map[string]string { + if m != nil { + return m.LabelSelector + } + return nil +} + +func (m *EventFilter) GetEventsFromTime() int64 { + if m != nil { + return m.EventsFromTime + } + return 0 +} + +func (m *EventFilter) GetEventsToTime() int64 { + if m != nil { + return m.EventsToTime + } + return 0 +} + type MachineClassCapabilities struct { CpuMillis int64 `protobuf:"varint,1,opt,name=cpu_millis,json=cpuMillis,proto3" json:"cpu_millis,omitempty"` MemoryBytes int64 `protobuf:"varint,2,opt,name=memory_bytes,json=memoryBytes,proto3" json:"memory_bytes,omitempty"` @@ -273,7 +342,7 @@ type MachineClassCapabilities struct { func (m *MachineClassCapabilities) Reset() { *m = MachineClassCapabilities{} } func (*MachineClassCapabilities) ProtoMessage() {} func (*MachineClassCapabilities) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{2} + return fileDescriptor_00212fb1f9d3bf1c, []int{3} } func (m *MachineClassCapabilities) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -327,7 +396,7 @@ type Machine struct { func (m *Machine) Reset() { *m = Machine{} } func (*Machine) ProtoMessage() {} func (*Machine) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{3} + return fileDescriptor_00212fb1f9d3bf1c, []int{4} } func (m *Machine) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -386,7 +455,7 @@ type ImageSpec struct { func (m *ImageSpec) Reset() { *m = ImageSpec{} } func (*ImageSpec) ProtoMessage() {} func (*ImageSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{4} + return fileDescriptor_00212fb1f9d3bf1c, []int{5} } func (m *ImageSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -431,7 +500,7 @@ type EmptyDisk struct { func (m *EmptyDisk) Reset() { *m = EmptyDisk{} } func (*EmptyDisk) ProtoMessage() {} func (*EmptyDisk) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{5} + return fileDescriptor_00212fb1f9d3bf1c, []int{6} } func (m *EmptyDisk) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -480,7 +549,7 @@ type VolumeConnection struct { func (m *VolumeConnection) Reset() { *m = VolumeConnection{} } func (*VolumeConnection) ProtoMessage() {} func (*VolumeConnection) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{6} + return fileDescriptor_00212fb1f9d3bf1c, []int{7} } func (m *VolumeConnection) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -556,7 +625,7 @@ type Volume struct { func (m *Volume) Reset() { *m = Volume{} } func (*Volume) ProtoMessage() {} func (*Volume) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{7} + return fileDescriptor_00212fb1f9d3bf1c, []int{8} } func (m *Volume) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -625,7 +694,7 @@ type NetworkInterface struct { func (m *NetworkInterface) Reset() { *m = NetworkInterface{} } func (*NetworkInterface) ProtoMessage() {} func (*NetworkInterface) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{8} + return fileDescriptor_00212fb1f9d3bf1c, []int{9} } func (m *NetworkInterface) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -696,7 +765,7 @@ type MachineSpec struct { func (m *MachineSpec) Reset() { *m = MachineSpec{} } func (*MachineSpec) ProtoMessage() {} func (*MachineSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{9} + return fileDescriptor_00212fb1f9d3bf1c, []int{10} } func (m *MachineSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -767,6 +836,128 @@ func (m *MachineSpec) GetNetworkInterfaces() []*NetworkInterface { return nil } +type Event struct { + Metadata *v1alpha1.ObjectMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *EventSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Event) Reset() { *m = Event{} } +func (*Event) ProtoMessage() {} +func (*Event) Descriptor() ([]byte, []int) { + return fileDescriptor_00212fb1f9d3bf1c, []int{11} +} +func (m *Event) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Event.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 *Event) XXX_Merge(src proto.Message) { + xxx_messageInfo_Event.Merge(m, src) +} +func (m *Event) XXX_Size() int { + return m.Size() +} +func (m *Event) XXX_DiscardUnknown() { + xxx_messageInfo_Event.DiscardUnknown(m) +} + +var xxx_messageInfo_Event proto.InternalMessageInfo + +func (m *Event) GetMetadata() *v1alpha1.ObjectMetadata { + if m != nil { + return m.Metadata + } + return nil +} + +func (m *Event) GetSpec() *EventSpec { + if m != nil { + return m.Spec + } + return nil +} + +type EventSpec struct { + Reason string `protobuf:"bytes,1,opt,name=reason,proto3" json:"reason,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` + EventTime int64 `protobuf:"varint,4,opt,name=event_time,json=eventTime,proto3" json:"event_time,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EventSpec) Reset() { *m = EventSpec{} } +func (*EventSpec) ProtoMessage() {} +func (*EventSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_00212fb1f9d3bf1c, []int{12} +} +func (m *EventSpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventSpec.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 *EventSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventSpec.Merge(m, src) +} +func (m *EventSpec) XXX_Size() int { + return m.Size() +} +func (m *EventSpec) XXX_DiscardUnknown() { + xxx_messageInfo_EventSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_EventSpec proto.InternalMessageInfo + +func (m *EventSpec) GetReason() string { + if m != nil { + return m.Reason + } + return "" +} + +func (m *EventSpec) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + +func (m *EventSpec) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *EventSpec) GetEventTime() int64 { + if m != nil { + return m.EventTime + } + return 0 +} + type MachineStatus struct { ObservedGeneration int64 `protobuf:"varint,1,opt,name=observed_generation,json=observedGeneration,proto3" json:"observed_generation,omitempty"` State MachineState `protobuf:"varint,2,opt,name=state,proto3,enum=machine.v1alpha1.MachineState" json:"state,omitempty"` @@ -780,7 +971,7 @@ type MachineStatus struct { func (m *MachineStatus) Reset() { *m = MachineStatus{} } func (*MachineStatus) ProtoMessage() {} func (*MachineStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{10} + return fileDescriptor_00212fb1f9d3bf1c, []int{13} } func (m *MachineStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -855,7 +1046,7 @@ type VolumeStatus struct { func (m *VolumeStatus) Reset() { *m = VolumeStatus{} } func (*VolumeStatus) ProtoMessage() {} func (*VolumeStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{11} + return fileDescriptor_00212fb1f9d3bf1c, []int{14} } func (m *VolumeStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -917,7 +1108,7 @@ type NetworkInterfaceStatus struct { func (m *NetworkInterfaceStatus) Reset() { *m = NetworkInterfaceStatus{} } func (*NetworkInterfaceStatus) ProtoMessage() {} func (*NetworkInterfaceStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{12} + return fileDescriptor_00212fb1f9d3bf1c, []int{15} } func (m *NetworkInterfaceStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -984,7 +1175,7 @@ type MachineClass struct { func (m *MachineClass) Reset() { *m = MachineClass{} } func (*MachineClass) ProtoMessage() {} func (*MachineClass) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{13} + return fileDescriptor_00212fb1f9d3bf1c, []int{16} } func (m *MachineClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1037,7 +1228,7 @@ type MachineClassStatus struct { func (m *MachineClassStatus) Reset() { *m = MachineClassStatus{} } func (*MachineClassStatus) ProtoMessage() {} func (*MachineClassStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{14} + return fileDescriptor_00212fb1f9d3bf1c, []int{17} } func (m *MachineClassStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1089,7 +1280,7 @@ type VersionRequest struct { func (m *VersionRequest) Reset() { *m = VersionRequest{} } func (*VersionRequest) ProtoMessage() {} func (*VersionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{15} + return fileDescriptor_00212fb1f9d3bf1c, []int{18} } func (m *VersionRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1138,7 +1329,7 @@ type VersionResponse struct { func (m *VersionResponse) Reset() { *m = VersionResponse{} } func (*VersionResponse) ProtoMessage() {} func (*VersionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{16} + return fileDescriptor_00212fb1f9d3bf1c, []int{19} } func (m *VersionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1190,7 +1381,7 @@ type ListMachinesRequest struct { func (m *ListMachinesRequest) Reset() { *m = ListMachinesRequest{} } func (*ListMachinesRequest) ProtoMessage() {} func (*ListMachinesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{17} + return fileDescriptor_00212fb1f9d3bf1c, []int{20} } func (m *ListMachinesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1235,7 +1426,7 @@ type ListMachinesResponse struct { func (m *ListMachinesResponse) Reset() { *m = ListMachinesResponse{} } func (*ListMachinesResponse) ProtoMessage() {} func (*ListMachinesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{18} + return fileDescriptor_00212fb1f9d3bf1c, []int{21} } func (m *ListMachinesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1271,23 +1462,23 @@ func (m *ListMachinesResponse) GetMachines() []*Machine { return nil } -type CreateMachineRequest struct { - Machine *Machine `protobuf:"bytes,1,opt,name=machine,proto3" json:"machine,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` +type ListEventsRequest struct { + Filter *EventFilter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *CreateMachineRequest) Reset() { *m = CreateMachineRequest{} } -func (*CreateMachineRequest) ProtoMessage() {} -func (*CreateMachineRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{19} +func (m *ListEventsRequest) Reset() { *m = ListEventsRequest{} } +func (*ListEventsRequest) ProtoMessage() {} +func (*ListEventsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_00212fb1f9d3bf1c, []int{22} } -func (m *CreateMachineRequest) XXX_Unmarshal(b []byte) error { +func (m *ListEventsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *CreateMachineRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ListEventsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_CreateMachineRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_ListEventsRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1297,42 +1488,42 @@ func (m *CreateMachineRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } -func (m *CreateMachineRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateMachineRequest.Merge(m, src) +func (m *ListEventsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListEventsRequest.Merge(m, src) } -func (m *CreateMachineRequest) XXX_Size() int { +func (m *ListEventsRequest) XXX_Size() int { return m.Size() } -func (m *CreateMachineRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CreateMachineRequest.DiscardUnknown(m) +func (m *ListEventsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ListEventsRequest.DiscardUnknown(m) } -var xxx_messageInfo_CreateMachineRequest proto.InternalMessageInfo +var xxx_messageInfo_ListEventsRequest proto.InternalMessageInfo -func (m *CreateMachineRequest) GetMachine() *Machine { +func (m *ListEventsRequest) GetFilter() *EventFilter { if m != nil { - return m.Machine + return m.Filter } return nil } -type CreateMachineResponse struct { - Machine *Machine `protobuf:"bytes,1,opt,name=machine,proto3" json:"machine,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` +type ListEventsResponse struct { + MachineEvents []*MachineEvents `protobuf:"bytes,1,rep,name=machine_events,json=machineEvents,proto3" json:"machine_events,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *CreateMachineResponse) Reset() { *m = CreateMachineResponse{} } -func (*CreateMachineResponse) ProtoMessage() {} -func (*CreateMachineResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{20} +func (m *ListEventsResponse) Reset() { *m = ListEventsResponse{} } +func (*ListEventsResponse) ProtoMessage() {} +func (*ListEventsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_00212fb1f9d3bf1c, []int{23} } -func (m *CreateMachineResponse) XXX_Unmarshal(b []byte) error { +func (m *ListEventsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *CreateMachineResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ListEventsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_CreateMachineResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_ListEventsResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1342,42 +1533,43 @@ func (m *CreateMachineResponse) XXX_Marshal(b []byte, deterministic bool) ([]byt return b[:n], nil } } -func (m *CreateMachineResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateMachineResponse.Merge(m, src) +func (m *ListEventsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListEventsResponse.Merge(m, src) } -func (m *CreateMachineResponse) XXX_Size() int { +func (m *ListEventsResponse) XXX_Size() int { return m.Size() } -func (m *CreateMachineResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CreateMachineResponse.DiscardUnknown(m) +func (m *ListEventsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ListEventsResponse.DiscardUnknown(m) } -var xxx_messageInfo_CreateMachineResponse proto.InternalMessageInfo +var xxx_messageInfo_ListEventsResponse proto.InternalMessageInfo -func (m *CreateMachineResponse) GetMachine() *Machine { +func (m *ListEventsResponse) GetMachineEvents() []*MachineEvents { if m != nil { - return m.Machine + return m.MachineEvents } return nil } -type DeleteMachineRequest struct { - MachineId string `protobuf:"bytes,1,opt,name=machine_id,json=machineId,proto3" json:"machine_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` +type MachineEvents struct { + InvolvedObjectMeta *v1alpha1.ObjectMetadata `protobuf:"bytes,1,opt,name=involved_object_meta,json=involvedObjectMeta,proto3" json:"involved_object_meta,omitempty"` + Events []*Event `protobuf:"bytes,2,rep,name=events,proto3" json:"events,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *DeleteMachineRequest) Reset() { *m = DeleteMachineRequest{} } -func (*DeleteMachineRequest) ProtoMessage() {} -func (*DeleteMachineRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{21} +func (m *MachineEvents) Reset() { *m = MachineEvents{} } +func (*MachineEvents) ProtoMessage() {} +func (*MachineEvents) Descriptor() ([]byte, []int) { + return fileDescriptor_00212fb1f9d3bf1c, []int{24} } -func (m *DeleteMachineRequest) XXX_Unmarshal(b []byte) error { +func (m *MachineEvents) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *DeleteMachineRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MachineEvents) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_DeleteMachineRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_MachineEvents.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1387,41 +1579,49 @@ func (m *DeleteMachineRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } -func (m *DeleteMachineRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteMachineRequest.Merge(m, src) +func (m *MachineEvents) XXX_Merge(src proto.Message) { + xxx_messageInfo_MachineEvents.Merge(m, src) } -func (m *DeleteMachineRequest) XXX_Size() int { +func (m *MachineEvents) XXX_Size() int { return m.Size() } -func (m *DeleteMachineRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteMachineRequest.DiscardUnknown(m) +func (m *MachineEvents) XXX_DiscardUnknown() { + xxx_messageInfo_MachineEvents.DiscardUnknown(m) } -var xxx_messageInfo_DeleteMachineRequest proto.InternalMessageInfo +var xxx_messageInfo_MachineEvents proto.InternalMessageInfo -func (m *DeleteMachineRequest) GetMachineId() string { +func (m *MachineEvents) GetInvolvedObjectMeta() *v1alpha1.ObjectMetadata { if m != nil { - return m.MachineId + return m.InvolvedObjectMeta } - return "" + return nil } -type DeleteMachineResponse struct { +func (m *MachineEvents) GetEvents() []*Event { + if m != nil { + return m.Events + } + return nil +} + +type CreateMachineRequest struct { + Machine *Machine `protobuf:"bytes,1,opt,name=machine,proto3" json:"machine,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *DeleteMachineResponse) Reset() { *m = DeleteMachineResponse{} } -func (*DeleteMachineResponse) ProtoMessage() {} -func (*DeleteMachineResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{22} +func (m *CreateMachineRequest) Reset() { *m = CreateMachineRequest{} } +func (*CreateMachineRequest) ProtoMessage() {} +func (*CreateMachineRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_00212fb1f9d3bf1c, []int{25} } -func (m *DeleteMachineResponse) XXX_Unmarshal(b []byte) error { +func (m *CreateMachineRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *DeleteMachineResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *CreateMachineRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_DeleteMachineResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_CreateMachineRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1431,10 +1631,144 @@ func (m *DeleteMachineResponse) XXX_Marshal(b []byte, deterministic bool) ([]byt return b[:n], nil } } -func (m *DeleteMachineResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteMachineResponse.Merge(m, src) +func (m *CreateMachineRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateMachineRequest.Merge(m, src) } -func (m *DeleteMachineResponse) XXX_Size() int { +func (m *CreateMachineRequest) XXX_Size() int { + return m.Size() +} +func (m *CreateMachineRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CreateMachineRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_CreateMachineRequest proto.InternalMessageInfo + +func (m *CreateMachineRequest) GetMachine() *Machine { + if m != nil { + return m.Machine + } + return nil +} + +type CreateMachineResponse struct { + Machine *Machine `protobuf:"bytes,1,opt,name=machine,proto3" json:"machine,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CreateMachineResponse) Reset() { *m = CreateMachineResponse{} } +func (*CreateMachineResponse) ProtoMessage() {} +func (*CreateMachineResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_00212fb1f9d3bf1c, []int{26} +} +func (m *CreateMachineResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CreateMachineResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CreateMachineResponse.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 *CreateMachineResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateMachineResponse.Merge(m, src) +} +func (m *CreateMachineResponse) XXX_Size() int { + return m.Size() +} +func (m *CreateMachineResponse) XXX_DiscardUnknown() { + xxx_messageInfo_CreateMachineResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_CreateMachineResponse proto.InternalMessageInfo + +func (m *CreateMachineResponse) GetMachine() *Machine { + if m != nil { + return m.Machine + } + return nil +} + +type DeleteMachineRequest struct { + MachineId string `protobuf:"bytes,1,opt,name=machine_id,json=machineId,proto3" json:"machine_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeleteMachineRequest) Reset() { *m = DeleteMachineRequest{} } +func (*DeleteMachineRequest) ProtoMessage() {} +func (*DeleteMachineRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_00212fb1f9d3bf1c, []int{27} +} +func (m *DeleteMachineRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeleteMachineRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeleteMachineRequest.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 *DeleteMachineRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteMachineRequest.Merge(m, src) +} +func (m *DeleteMachineRequest) XXX_Size() int { + return m.Size() +} +func (m *DeleteMachineRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteMachineRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteMachineRequest proto.InternalMessageInfo + +func (m *DeleteMachineRequest) GetMachineId() string { + if m != nil { + return m.MachineId + } + return "" +} + +type DeleteMachineResponse struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeleteMachineResponse) Reset() { *m = DeleteMachineResponse{} } +func (*DeleteMachineResponse) ProtoMessage() {} +func (*DeleteMachineResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_00212fb1f9d3bf1c, []int{28} +} +func (m *DeleteMachineResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeleteMachineResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeleteMachineResponse.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 *DeleteMachineResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteMachineResponse.Merge(m, src) +} +func (m *DeleteMachineResponse) XXX_Size() int { return m.Size() } func (m *DeleteMachineResponse) XXX_DiscardUnknown() { @@ -1453,7 +1787,7 @@ type UpdateMachineAnnotationsRequest struct { func (m *UpdateMachineAnnotationsRequest) Reset() { *m = UpdateMachineAnnotationsRequest{} } func (*UpdateMachineAnnotationsRequest) ProtoMessage() {} func (*UpdateMachineAnnotationsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{23} + return fileDescriptor_00212fb1f9d3bf1c, []int{29} } func (m *UpdateMachineAnnotationsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1504,7 +1838,7 @@ type UpdateMachineAnnotationsResponse struct { func (m *UpdateMachineAnnotationsResponse) Reset() { *m = UpdateMachineAnnotationsResponse{} } func (*UpdateMachineAnnotationsResponse) ProtoMessage() {} func (*UpdateMachineAnnotationsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{24} + return fileDescriptor_00212fb1f9d3bf1c, []int{30} } func (m *UpdateMachineAnnotationsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1543,7 +1877,7 @@ type UpdateMachinePowerRequest struct { func (m *UpdateMachinePowerRequest) Reset() { *m = UpdateMachinePowerRequest{} } func (*UpdateMachinePowerRequest) ProtoMessage() {} func (*UpdateMachinePowerRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{25} + return fileDescriptor_00212fb1f9d3bf1c, []int{31} } func (m *UpdateMachinePowerRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1594,7 +1928,7 @@ type UpdateMachinePowerResponse struct { func (m *UpdateMachinePowerResponse) Reset() { *m = UpdateMachinePowerResponse{} } func (*UpdateMachinePowerResponse) ProtoMessage() {} func (*UpdateMachinePowerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{26} + return fileDescriptor_00212fb1f9d3bf1c, []int{32} } func (m *UpdateMachinePowerResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1633,7 +1967,7 @@ type AttachVolumeRequest struct { func (m *AttachVolumeRequest) Reset() { *m = AttachVolumeRequest{} } func (*AttachVolumeRequest) ProtoMessage() {} func (*AttachVolumeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{27} + return fileDescriptor_00212fb1f9d3bf1c, []int{33} } func (m *AttachVolumeRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1684,7 +2018,7 @@ type AttachVolumeResponse struct { func (m *AttachVolumeResponse) Reset() { *m = AttachVolumeResponse{} } func (*AttachVolumeResponse) ProtoMessage() {} func (*AttachVolumeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{28} + return fileDescriptor_00212fb1f9d3bf1c, []int{34} } func (m *AttachVolumeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1723,7 +2057,7 @@ type DetachVolumeRequest struct { func (m *DetachVolumeRequest) Reset() { *m = DetachVolumeRequest{} } func (*DetachVolumeRequest) ProtoMessage() {} func (*DetachVolumeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{29} + return fileDescriptor_00212fb1f9d3bf1c, []int{35} } func (m *DetachVolumeRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1774,7 +2108,7 @@ type DetachVolumeResponse struct { func (m *DetachVolumeResponse) Reset() { *m = DetachVolumeResponse{} } func (*DetachVolumeResponse) ProtoMessage() {} func (*DetachVolumeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{30} + return fileDescriptor_00212fb1f9d3bf1c, []int{36} } func (m *DetachVolumeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1813,7 +2147,7 @@ type AttachNetworkInterfaceRequest struct { func (m *AttachNetworkInterfaceRequest) Reset() { *m = AttachNetworkInterfaceRequest{} } func (*AttachNetworkInterfaceRequest) ProtoMessage() {} func (*AttachNetworkInterfaceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{31} + return fileDescriptor_00212fb1f9d3bf1c, []int{37} } func (m *AttachNetworkInterfaceRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1864,7 +2198,7 @@ type AttachNetworkInterfaceResponse struct { func (m *AttachNetworkInterfaceResponse) Reset() { *m = AttachNetworkInterfaceResponse{} } func (*AttachNetworkInterfaceResponse) ProtoMessage() {} func (*AttachNetworkInterfaceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{32} + return fileDescriptor_00212fb1f9d3bf1c, []int{38} } func (m *AttachNetworkInterfaceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1903,7 +2237,7 @@ type DetachNetworkInterfaceRequest struct { func (m *DetachNetworkInterfaceRequest) Reset() { *m = DetachNetworkInterfaceRequest{} } func (*DetachNetworkInterfaceRequest) ProtoMessage() {} func (*DetachNetworkInterfaceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{33} + return fileDescriptor_00212fb1f9d3bf1c, []int{39} } func (m *DetachNetworkInterfaceRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1954,7 +2288,7 @@ type DetachNetworkInterfaceResponse struct { func (m *DetachNetworkInterfaceResponse) Reset() { *m = DetachNetworkInterfaceResponse{} } func (*DetachNetworkInterfaceResponse) ProtoMessage() {} func (*DetachNetworkInterfaceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{34} + return fileDescriptor_00212fb1f9d3bf1c, []int{40} } func (m *DetachNetworkInterfaceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1991,7 +2325,7 @@ type StatusRequest struct { func (m *StatusRequest) Reset() { *m = StatusRequest{} } func (*StatusRequest) ProtoMessage() {} func (*StatusRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{35} + return fileDescriptor_00212fb1f9d3bf1c, []int{41} } func (m *StatusRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2029,7 +2363,7 @@ type StatusResponse struct { func (m *StatusResponse) Reset() { *m = StatusResponse{} } func (*StatusResponse) ProtoMessage() {} func (*StatusResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{36} + return fileDescriptor_00212fb1f9d3bf1c, []int{42} } func (m *StatusResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2074,7 +2408,7 @@ type ExecRequest struct { func (m *ExecRequest) Reset() { *m = ExecRequest{} } func (*ExecRequest) ProtoMessage() {} func (*ExecRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{37} + return fileDescriptor_00212fb1f9d3bf1c, []int{43} } func (m *ExecRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2119,7 +2453,7 @@ type ExecResponse struct { func (m *ExecResponse) Reset() { *m = ExecResponse{} } func (*ExecResponse) ProtoMessage() {} func (*ExecResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{38} + return fileDescriptor_00212fb1f9d3bf1c, []int{44} } func (m *ExecResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2165,6 +2499,8 @@ func init() { proto.RegisterMapType((map[string][]byte)(nil), "machine.v1alpha1.VolumeSpec.SecretDataEntry") proto.RegisterType((*MachineFilter)(nil), "machine.v1alpha1.MachineFilter") proto.RegisterMapType((map[string]string)(nil), "machine.v1alpha1.MachineFilter.LabelSelectorEntry") + proto.RegisterType((*EventFilter)(nil), "machine.v1alpha1.EventFilter") + proto.RegisterMapType((map[string]string)(nil), "machine.v1alpha1.EventFilter.LabelSelectorEntry") proto.RegisterType((*MachineClassCapabilities)(nil), "machine.v1alpha1.MachineClassCapabilities") proto.RegisterType((*Machine)(nil), "machine.v1alpha1.Machine") proto.RegisterType((*ImageSpec)(nil), "machine.v1alpha1.ImageSpec") @@ -2177,6 +2513,8 @@ func init() { proto.RegisterType((*NetworkInterface)(nil), "machine.v1alpha1.NetworkInterface") proto.RegisterMapType((map[string]string)(nil), "machine.v1alpha1.NetworkInterface.AttributesEntry") proto.RegisterType((*MachineSpec)(nil), "machine.v1alpha1.MachineSpec") + proto.RegisterType((*Event)(nil), "machine.v1alpha1.Event") + proto.RegisterType((*EventSpec)(nil), "machine.v1alpha1.EventSpec") proto.RegisterType((*MachineStatus)(nil), "machine.v1alpha1.MachineStatus") proto.RegisterType((*VolumeStatus)(nil), "machine.v1alpha1.VolumeStatus") proto.RegisterType((*NetworkInterfaceStatus)(nil), "machine.v1alpha1.NetworkInterfaceStatus") @@ -2186,6 +2524,9 @@ func init() { proto.RegisterType((*VersionResponse)(nil), "machine.v1alpha1.VersionResponse") proto.RegisterType((*ListMachinesRequest)(nil), "machine.v1alpha1.ListMachinesRequest") proto.RegisterType((*ListMachinesResponse)(nil), "machine.v1alpha1.ListMachinesResponse") + proto.RegisterType((*ListEventsRequest)(nil), "machine.v1alpha1.ListEventsRequest") + proto.RegisterType((*ListEventsResponse)(nil), "machine.v1alpha1.ListEventsResponse") + proto.RegisterType((*MachineEvents)(nil), "machine.v1alpha1.MachineEvents") proto.RegisterType((*CreateMachineRequest)(nil), "machine.v1alpha1.CreateMachineRequest") proto.RegisterType((*CreateMachineResponse)(nil), "machine.v1alpha1.CreateMachineResponse") proto.RegisterType((*DeleteMachineRequest)(nil), "machine.v1alpha1.DeleteMachineRequest") @@ -2212,123 +2553,138 @@ func init() { func init() { proto.RegisterFile("api.proto", fileDescriptor_00212fb1f9d3bf1c) } var fileDescriptor_00212fb1f9d3bf1c = []byte{ - // 1848 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0x4b, 0x93, 0xdb, 0x58, - 0x15, 0x6e, 0xb9, 0xdd, 0x0f, 0x1f, 0xbb, 0xdd, 0xce, 0xed, 0x4e, 0xc7, 0xd1, 0x60, 0xc7, 0x11, - 0xc3, 0x24, 0xd5, 0x24, 0xf6, 0xb4, 0xc3, 0x3c, 0x48, 0xd5, 0x50, 0x38, 0xb6, 0x33, 0x71, 0xa5, - 0xed, 0x0e, 0xea, 0x4e, 0x07, 0x28, 0x28, 0x95, 0x2c, 0xdf, 0xee, 0x16, 0x91, 0x25, 0x8f, 0x24, - 0x7b, 0x68, 0x66, 0x33, 0xfc, 0x00, 0x0a, 0x36, 0xfc, 0x05, 0xd6, 0x50, 0xc5, 0x92, 0x1f, 0x30, - 0xcb, 0xd9, 0xc1, 0x92, 0x69, 0xaa, 0x58, 0xf0, 0x2b, 0xa8, 0xfb, 0x90, 0x2c, 0xdb, 0x57, 0x7e, - 0x0c, 0x0b, 0x76, 0xbe, 0x47, 0xe7, 0x7c, 0xe7, 0xa1, 0x73, 0xce, 0x77, 0x55, 0x86, 0x94, 0x3e, - 0x30, 0xcb, 0x03, 0xd7, 0xf1, 0x1d, 0x94, 0xeb, 0xeb, 0xc6, 0x95, 0x69, 0xe3, 0xf2, 0xe8, 0x48, - 0xb7, 0x06, 0x57, 0xfa, 0x91, 0xfc, 0xf8, 0xd2, 0xf4, 0xaf, 0x86, 0xdd, 0xb2, 0xe1, 0xf4, 0x2b, - 0x97, 0xce, 0xa5, 0x53,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c, 0xfb, 0xe9, 0x57, 0xdf, 0x14, - 0xa5, 0x7f, 0x7c, 0x53, 0x5c, 0xfb, 0xf2, 0xa6, 0x28, 0x7d, 0x75, 0x53, 0x94, 0xbe, 0xbe, 0x29, - 0x4a, 0xff, 0xbc, 0x29, 0x4a, 0x7f, 0xf8, 0x57, 0x71, 0xed, 0xe7, 0x4f, 0x57, 0xf8, 0xb3, 0x81, - 0xb9, 0x09, 0xff, 0x6f, 0xe8, 0x6e, 0xd2, 0x3f, 0x1b, 0x9e, 0xfc, 0x37, 0x00, 0x00, 0xff, 0xff, - 0x9f, 0xd1, 0x4c, 0xe5, 0xfd, 0x18, 0x00, 0x00, + // 2094 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0x4f, 0x73, 0x1b, 0x59, + 0x11, 0xf7, 0xc8, 0xb6, 0x62, 0xb5, 0x64, 0x59, 0x79, 0x76, 0x1c, 0x65, 0x82, 0x14, 0x65, 0x36, + 0x6c, 0x5c, 0x26, 0x91, 0x62, 0x85, 0xec, 0x2e, 0xa9, 0x5a, 0x0a, 0xc5, 0x96, 0x37, 0x26, 0xb6, + 0x1c, 0xc6, 0x8e, 0xc3, 0x52, 0x4b, 0x4d, 0x8d, 0x46, 0xcf, 0xf6, 0x10, 0x69, 0x46, 0x3b, 0x33, + 0xd2, 0x62, 0xf6, 0xb2, 0xdc, 0xb8, 0x50, 0xc0, 0x81, 0xaf, 0xc0, 0x85, 0x0b, 0x54, 0x71, 0xe4, + 0x03, 0xec, 0x91, 0x1b, 0x1c, 0xd9, 0x50, 0xc5, 0x81, 0x4f, 0x41, 0xbd, 0xf7, 0x7a, 0x46, 0x23, + 0x69, 0x46, 0x7f, 0x76, 0xa9, 0xe2, 0x36, 0xaf, 0xa7, 0xfb, 0xd7, 0xfd, 0xfa, 0xf5, 0xeb, 0x5f, + 0x8f, 0x04, 0x29, 0xbd, 0x6b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75, + 0x49, 0x01, 0xc0, 0xe8, 0xf6, 0xb4, 0x8e, 0xd9, 0x6e, 0x9b, 0x2e, 0x87, 0x5b, 0x54, 0x53, 0x46, + 0xb7, 0x77, 0xc4, 0x05, 0xe4, 0x2e, 0x64, 0x3a, 0xb4, 0x63, 0x3b, 0x57, 0x5a, 0xf3, 0x8a, 0xdd, + 0x90, 0x04, 0x57, 0x48, 0x0b, 0xd9, 0x33, 0x26, 0x52, 0xfe, 0x24, 0xc1, 0x35, 0x84, 0x27, 0xdf, + 0x83, 0x15, 0x76, 0x51, 0x79, 0xf5, 0x33, 0xac, 0x74, 0xb5, 0x50, 0x66, 0x82, 0x41, 0x2e, 0x8f, + 0x9b, 0x3f, 0xa3, 0x86, 0x77, 0x84, 0x4a, 0x6a, 0xa0, 0x4e, 0x76, 0x60, 0xc9, 0xed, 0x52, 0x83, + 0x7b, 0xe0, 0x66, 0x31, 0x25, 0xc4, 0x6e, 0x8d, 0xca, 0x55, 0xc9, 0xfb, 0x90, 0x74, 0x3d, 0xdd, + 0xeb, 0xb9, 0x3c, 0xbf, 0xe9, 0xea, 0x9d, 0x78, 0x23, 0xae, 0xa6, 0xa2, 0xba, 0x72, 0x17, 0x52, + 0x07, 0x1d, 0xfd, 0x42, 0xb4, 0x8c, 0x0d, 0x58, 0x36, 0xd9, 0x02, 0x73, 0x29, 0x16, 0xca, 0x36, + 0xa4, 0xea, 0x9d, 0xae, 0x77, 0xb5, 0x67, 0xba, 0x6f, 0x58, 0x92, 0x5c, 0xf3, 0x17, 0x14, 0x73, + 0x80, 0x49, 0x62, 0x12, 0x91, 0x81, 0x5f, 0x2f, 0x41, 0x4e, 0x5c, 0xe9, 0x5d, 0xdb, 0xb2, 0xa8, + 0xe1, 0x99, 0xb6, 0x35, 0x77, 0x27, 0x52, 0x23, 0x3a, 0x51, 0x35, 0xae, 0x75, 0x0c, 0xfc, 0x4c, + 0xec, 0x47, 0x27, 0x51, 0xfd, 0x68, 0x16, 0xd0, 0x09, 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0x16, 0x8a, 0xaa, 0x8e, 0x08, 0x36, 0x8c, 0xaa, 0x8e, 0x48, 0x32, + 0xe3, 0xe5, 0x17, 0x26, 0xa1, 0x28, 0x07, 0x11, 0x74, 0x27, 0xbf, 0x3b, 0x4d, 0x2d, 0x70, 0xf0, + 0x39, 0x6c, 0x46, 0x73, 0x07, 0xa9, 0xc4, 0x05, 0x19, 0xc3, 0x21, 0xf2, 0xa3, 0xd9, 0x0d, 0x30, + 0x7d, 0x9f, 0xc3, 0x66, 0x34, 0x85, 0x44, 0x39, 0x9f, 0x48, 0x60, 0x51, 0xce, 0x27, 0xb3, 0x13, + 0x79, 0x01, 0x49, 0xfc, 0xfa, 0x8b, 0x18, 0xfc, 0x87, 0x78, 0x4b, 0x2e, 0xc5, 0x2b, 0x20, 0x58, + 0x1d, 0x96, 0x18, 0x83, 0x90, 0xa8, 0x0f, 0x93, 0x01, 0x0f, 0xc9, 0xc5, 0xb8, 0xd7, 0x02, 0xe6, + 0xd9, 0x8f, 0xbf, 0xfc, 0xaa, 0x28, 0xfd, 0xe3, 0xab, 0xe2, 0xc2, 0x17, 0x6f, 0x8b, 0xd2, 0x97, + 0x6f, 0x8b, 0xd2, 0xdf, 0xde, 0x16, 0xa5, 0x7f, 0xbe, 0x2d, 0x4a, 0xbf, 0xfd, 0x57, 0x71, 0xe1, + 0x27, 0x4f, 0xe7, 0xf8, 0xdf, 0x4f, 0xb8, 0x09, 0xfe, 0xfa, 0x6b, 0x26, 0xf9, 0xff, 0x7e, 0x8f, + 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x57, 0xb4, 0xdc, 0xa1, 0x88, 0x1c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2344,6 +2700,7 @@ const _ = grpc.SupportPackageIsVersion4 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type MachineRuntimeClient interface { Version(ctx context.Context, in *VersionRequest, opts ...grpc.CallOption) (*VersionResponse, error) + ListEvents(ctx context.Context, in *ListEventsRequest, opts ...grpc.CallOption) (*ListEventsResponse, error) ListMachines(ctx context.Context, in *ListMachinesRequest, opts ...grpc.CallOption) (*ListMachinesResponse, error) CreateMachine(ctx context.Context, in *CreateMachineRequest, opts ...grpc.CallOption) (*CreateMachineResponse, error) DeleteMachine(ctx context.Context, in *DeleteMachineRequest, opts ...grpc.CallOption) (*DeleteMachineResponse, error) @@ -2374,6 +2731,15 @@ func (c *machineRuntimeClient) Version(ctx context.Context, in *VersionRequest, return out, nil } +func (c *machineRuntimeClient) ListEvents(ctx context.Context, in *ListEventsRequest, opts ...grpc.CallOption) (*ListEventsResponse, error) { + out := new(ListEventsResponse) + err := c.cc.Invoke(ctx, "/machine.v1alpha1.MachineRuntime/ListEvents", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *machineRuntimeClient) ListMachines(ctx context.Context, in *ListMachinesRequest, opts ...grpc.CallOption) (*ListMachinesResponse, error) { out := new(ListMachinesResponse) err := c.cc.Invoke(ctx, "/machine.v1alpha1.MachineRuntime/ListMachines", in, out, opts...) @@ -2476,6 +2842,7 @@ func (c *machineRuntimeClient) Exec(ctx context.Context, in *ExecRequest, opts . // MachineRuntimeServer is the server API for MachineRuntime service. type MachineRuntimeServer interface { Version(context.Context, *VersionRequest) (*VersionResponse, error) + ListEvents(context.Context, *ListEventsRequest) (*ListEventsResponse, error) ListMachines(context.Context, *ListMachinesRequest) (*ListMachinesResponse, error) CreateMachine(context.Context, *CreateMachineRequest) (*CreateMachineResponse, error) DeleteMachine(context.Context, *DeleteMachineRequest) (*DeleteMachineResponse, error) @@ -2496,6 +2863,9 @@ type UnimplementedMachineRuntimeServer struct { func (*UnimplementedMachineRuntimeServer) Version(ctx context.Context, req *VersionRequest) (*VersionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Version not implemented") } +func (*UnimplementedMachineRuntimeServer) ListEvents(ctx context.Context, req *ListEventsRequest) (*ListEventsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListEvents not implemented") +} func (*UnimplementedMachineRuntimeServer) ListMachines(ctx context.Context, req *ListMachinesRequest) (*ListMachinesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListMachines not implemented") } @@ -2552,6 +2922,24 @@ func _MachineRuntime_Version_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _MachineRuntime_ListEvents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListEventsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MachineRuntimeServer).ListEvents(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/machine.v1alpha1.MachineRuntime/ListEvents", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MachineRuntimeServer).ListEvents(ctx, req.(*ListEventsRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _MachineRuntime_ListMachines_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListMachinesRequest) if err := dec(in); err != nil { @@ -2758,6 +3146,10 @@ var _MachineRuntime_serviceDesc = grpc.ServiceDesc{ MethodName: "Version", Handler: _MachineRuntime_Version_Handler, }, + { + MethodName: "ListEvents", + Handler: _MachineRuntime_ListEvents_Handler, + }, { MethodName: "ListMachines", Handler: _MachineRuntime_ListMachines_Handler, @@ -2933,6 +3325,65 @@ func (m *MachineFilter) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *EventFilter) 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 *EventFilter) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventFilter) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.EventsToTime != 0 { + i = encodeVarintApi(dAtA, i, uint64(m.EventsToTime)) + i-- + dAtA[i] = 0x20 + } + if m.EventsFromTime != 0 { + i = encodeVarintApi(dAtA, i, uint64(m.EventsFromTime)) + i-- + dAtA[i] = 0x18 + } + if len(m.LabelSelector) > 0 { + for k := range m.LabelSelector { + v := m.LabelSelector[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] = 0x12 + } + } + 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 len(dAtA) - i, nil +} + func (m *MachineClassCapabilities) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -3389,7 +3840,7 @@ func (m *MachineSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MachineStatus) Marshal() (dAtA []byte, err error) { +func (m *Event) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3399,28 +3850,124 @@ func (m *MachineStatus) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MachineStatus) MarshalTo(dAtA []byte) (int, error) { +func (m *Event) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MachineStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.NetworkInterfaces) > 0 { - for iNdEx := len(m.NetworkInterfaces) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.NetworkInterfaces[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApi(dAtA, i, uint64(size)) + if m.Spec != nil { + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x2a + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Metadata != nil { + { + size, err := m.Metadata.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 *EventSpec) 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 *EventSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.EventTime != 0 { + i = encodeVarintApi(dAtA, i, uint64(m.EventTime)) + i-- + dAtA[i] = 0x20 + } + 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] = 0x1a + } + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintApi(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0x12 + } + if len(m.Reason) > 0 { + i -= len(m.Reason) + copy(dAtA[i:], m.Reason) + i = encodeVarintApi(dAtA, i, uint64(len(m.Reason))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MachineStatus) 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 *MachineStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MachineStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.NetworkInterfaces) > 0 { + for iNdEx := len(m.NetworkInterfaces) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.NetworkInterfaces[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a } } if len(m.Volumes) > 0 { @@ -3771,6 +4318,127 @@ func (m *ListMachinesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *ListEventsRequest) 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 *ListEventsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListEventsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Filter != nil { + { + size, err := m.Filter.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 *ListEventsResponse) 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 *ListEventsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListEventsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MachineEvents) > 0 { + for iNdEx := len(m.MachineEvents) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MachineEvents[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 *MachineEvents) 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 *MachineEvents) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MachineEvents) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Events) > 0 { + for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.InvolvedObjectMeta != nil { + { + size, err := m.InvolvedObjectMeta.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 *CreateMachineRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -4463,6 +5131,33 @@ func (m *MachineFilter) Size() (n int) { return n } +func (m *EventFilter) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if len(m.LabelSelector) > 0 { + for k, v := range m.LabelSelector { + _ = 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.EventsFromTime != 0 { + n += 1 + sovApi(uint64(m.EventsFromTime)) + } + if m.EventsToTime != 0 { + n += 1 + sovApi(uint64(m.EventsToTime)) + } + return n +} + func (m *MachineClassCapabilities) Size() (n int) { if m == nil { return 0 @@ -4665,6 +5360,47 @@ func (m *MachineSpec) Size() (n int) { return n } +func (m *Event) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Metadata != nil { + l = m.Metadata.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.Spec != nil { + l = m.Spec.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *EventSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Reason) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Message) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Type) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.EventTime != 0 { + n += 1 + sovApi(uint64(m.EventTime)) + } + return n +} + func (m *MachineStatus) Size() (n int) { if m == nil { return 0 @@ -4833,43 +5569,90 @@ func (m *ListMachinesResponse) Size() (n int) { return n } -func (m *CreateMachineRequest) Size() (n int) { +func (m *ListEventsRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Machine != nil { - l = m.Machine.Size() + if m.Filter != nil { + l = m.Filter.Size() n += 1 + l + sovApi(uint64(l)) } return n } -func (m *CreateMachineResponse) Size() (n int) { +func (m *ListEventsResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Machine != nil { - l = m.Machine.Size() - n += 1 + l + sovApi(uint64(l)) + if len(m.MachineEvents) > 0 { + for _, e := range m.MachineEvents { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } } return n } -func (m *DeleteMachineRequest) Size() (n int) { +func (m *MachineEvents) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.MachineId) - if l > 0 { + if m.InvolvedObjectMeta != nil { + l = m.InvolvedObjectMeta.Size() n += 1 + l + sovApi(uint64(l)) } - return n + if len(m.Events) > 0 { + for _, e := range m.Events { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + return n +} + +func (m *CreateMachineRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Machine != nil { + l = m.Machine.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *CreateMachineResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Machine != nil { + l = m.Machine.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *DeleteMachineRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MachineId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n } func (m *DeleteMachineResponse) Size() (n int) { @@ -5150,6 +5933,29 @@ func (this *MachineFilter) String() string { }, "") return s } +func (this *EventFilter) String() string { + if this == nil { + return "nil" + } + keysForLabelSelector := make([]string, 0, len(this.LabelSelector)) + for k, _ := range this.LabelSelector { + keysForLabelSelector = append(keysForLabelSelector, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabelSelector) + mapStringForLabelSelector := "map[string]string{" + for _, k := range keysForLabelSelector { + mapStringForLabelSelector += fmt.Sprintf("%v: %v,", k, this.LabelSelector[k]) + } + mapStringForLabelSelector += "}" + s := strings.Join([]string{`&EventFilter{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `LabelSelector:` + mapStringForLabelSelector + `,`, + `EventsFromTime:` + fmt.Sprintf("%v", this.EventsFromTime) + `,`, + `EventsToTime:` + fmt.Sprintf("%v", this.EventsToTime) + `,`, + `}`, + }, "") + return s +} func (this *MachineClassCapabilities) String() string { if this == nil { return "nil" @@ -5298,6 +6104,30 @@ func (this *MachineSpec) String() string { }, "") return s } +func (this *Event) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Event{`, + `Metadata:` + strings.Replace(fmt.Sprintf("%v", this.Metadata), "ObjectMetadata", "v1alpha1.ObjectMetadata", 1) + `,`, + `Spec:` + strings.Replace(this.Spec.String(), "EventSpec", "EventSpec", 1) + `,`, + `}`, + }, "") + return s +} +func (this *EventSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&EventSpec{`, + `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, + `Message:` + fmt.Sprintf("%v", this.Message) + `,`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `EventTime:` + fmt.Sprintf("%v", this.EventTime) + `,`, + `}`, + }, "") + return s +} func (this *MachineStatus) String() string { if this == nil { return "nil" @@ -5415,6 +6245,47 @@ func (this *ListMachinesResponse) String() string { }, "") return s } +func (this *ListEventsRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ListEventsRequest{`, + `Filter:` + strings.Replace(this.Filter.String(), "EventFilter", "EventFilter", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ListEventsResponse) String() string { + if this == nil { + return "nil" + } + repeatedStringForMachineEvents := "[]*MachineEvents{" + for _, f := range this.MachineEvents { + repeatedStringForMachineEvents += strings.Replace(f.String(), "MachineEvents", "MachineEvents", 1) + "," + } + repeatedStringForMachineEvents += "}" + s := strings.Join([]string{`&ListEventsResponse{`, + `MachineEvents:` + repeatedStringForMachineEvents + `,`, + `}`, + }, "") + return s +} +func (this *MachineEvents) String() string { + if this == nil { + return "nil" + } + repeatedStringForEvents := "[]*Event{" + for _, f := range this.Events { + repeatedStringForEvents += strings.Replace(f.String(), "Event", "Event", 1) + "," + } + repeatedStringForEvents += "}" + s := strings.Join([]string{`&MachineEvents{`, + `InvolvedObjectMeta:` + strings.Replace(fmt.Sprintf("%v", this.InvolvedObjectMeta), "ObjectMetadata", "v1alpha1.ObjectMetadata", 1) + `,`, + `Events:` + repeatedStringForEvents + `,`, + `}`, + }, "") + return s +} func (this *CreateMachineRequest) String() string { if this == nil { return "nil" @@ -6214,95 +7085,7 @@ func (m *MachineFilter) Unmarshal(dAtA []byte) error { } return nil } -func (m *MachineClassCapabilities) 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: MachineClassCapabilities: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MachineClassCapabilities: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CpuMillis", wireType) - } - m.CpuMillis = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CpuMillis |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MemoryBytes", wireType) - } - m.MemoryBytes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MemoryBytes |= 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 *Machine) Unmarshal(dAtA []byte) error { +func (m *EventFilter) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6325,17 +7108,17 @@ func (m *Machine) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Machine: wiretype end group for non-group") + return fmt.Errorf("proto: EventFilter: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Machine: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: EventFilter: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -6345,31 +7128,27 @@ func (m *Machine) 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.Metadata == nil { - m.Metadata = &v1alpha1.ObjectMetadata{} - } - if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LabelSelector", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6396,49 +7175,142 @@ func (m *Machine) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Spec == nil { - m.Spec = &MachineSpec{} - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + if m.LabelSelector == nil { + m.LabelSelector = make(map[string]string) } - 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 + 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 msglen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApi + m.LabelSelector[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EventsFromTime", wireType) } - if postIndex > l { - return io.ErrUnexpectedEOF + m.EventsFromTime = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EventsFromTime |= int64(b&0x7F) << shift + if b < 0x80 { + break + } } - if m.Status == nil { - m.Status = &MachineStatus{} + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EventsToTime", wireType) } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.EventsToTime = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EventsToTime |= int64(b&0x7F) << shift + if b < 0x80 { + break + } } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipApi(dAtA[iNdEx:]) @@ -6460,7 +7332,7 @@ func (m *Machine) Unmarshal(dAtA []byte) error { } return nil } -func (m *ImageSpec) Unmarshal(dAtA []byte) error { +func (m *MachineClassCapabilities) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6483,17 +7355,17 @@ func (m *ImageSpec) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ImageSpec: wiretype end group for non-group") + return fmt.Errorf("proto: MachineClassCapabilities: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ImageSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MachineClassCapabilities: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CpuMillis", wireType) } - var stringLen uint64 + m.CpuMillis = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -6503,79 +7375,16 @@ func (m *ImageSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.CpuMillis |= int64(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.Image = 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 *EmptyDisk) 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: EmptyDisk: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EmptyDisk: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SizeBytes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MemoryBytes", wireType) } - m.SizeBytes = 0 + m.MemoryBytes = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -6585,7 +7394,7 @@ func (m *EmptyDisk) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.SizeBytes |= int64(b&0x7F) << shift + m.MemoryBytes |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -6611,7 +7420,7 @@ func (m *EmptyDisk) Unmarshal(dAtA []byte) error { } return nil } -func (m *VolumeConnection) Unmarshal(dAtA []byte) error { +func (m *Machine) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6634,17 +7443,17 @@ func (m *VolumeConnection) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: VolumeConnection: wiretype end group for non-group") + return fmt.Errorf("proto: Machine: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: VolumeConnection: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Machine: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -6654,29 +7463,33 @@ func (m *VolumeConnection) 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.Driver = string(dAtA[iNdEx:postIndex]) + if m.Metadata == nil { + m.Metadata = &v1alpha1.ObjectMetadata{} + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Handle", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -6686,27 +7499,31 @@ func (m *VolumeConnection) 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.Handle = string(dAtA[iNdEx:postIndex]) + if m.Spec == nil { + m.Spec = &MachineSpec{} + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6733,17 +7550,445 @@ func (m *VolumeConnection) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Attributes == nil { - m.Attributes = make(map[string]string) + if m.Status == nil { + m.Status = &MachineStatus{} } - 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 err := m.Status.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 *ImageSpec) 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: ImageSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImageSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", 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.Image = 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 *EmptyDisk) 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: EmptyDisk: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EmptyDisk: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SizeBytes", wireType) + } + m.SizeBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SizeBytes |= 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 *VolumeConnection) 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: VolumeConnection: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VolumeConnection: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Driver", 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.Driver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Handle", 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.Handle = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", 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.Attributes == nil { + m.Attributes = 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.Attributes[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SecretData", 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.SecretData == nil { + m.SecretData = make(map[string][]byte) + } + var mapkey string + mapvalue := []byte{} + 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 @@ -6786,7 +8031,7 @@ func (m *VolumeConnection) Unmarshal(dAtA []byte) error { mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { - var stringLenmapvalue uint64 + var mapbyteLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -6796,24 +8041,153 @@ func (m *VolumeConnection) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift + mapbyteLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { return ErrInvalidLengthApi } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex < 0 { return ErrInvalidLengthApi } - if postStringIndexmapvalue > l { + if postbytesIndex > l { return io.ErrUnexpectedEOF } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue + mapvalue = make([]byte, mapbyteLen) + copy(mapvalue, dAtA[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + } 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.SecretData[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EncryptionData", 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.EncryptionData == nil { + m.EncryptionData = make(map[string][]byte) + } + var mapkey string + mapvalue := []byte{} + 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 mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthApi + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex < 0 { + return ErrInvalidLengthApi + } + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = make([]byte, mapbyteLen) + copy(mapvalue, dAtA[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex } else { iNdEx = entryPreIndex skippy, err := skipApi(dAtA[iNdEx:]) @@ -6829,11 +8203,125 @@ func (m *VolumeConnection) Unmarshal(dAtA []byte) error { iNdEx += skippy } } - m.Attributes[mapkey] = mapvalue + m.EncryptionData[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 *Volume) 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: Volume: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Volume: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", 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.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Device", 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.Device = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SecretData", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field EmptyDisk", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6860,108 +8348,198 @@ func (m *VolumeConnection) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.SecretData == nil { - m.SecretData = make(map[string][]byte) + if m.EmptyDisk == nil { + m.EmptyDisk = &EmptyDisk{} } - var mapkey string - mapvalue := []byte{} - 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 - } + if err := m.EmptyDisk.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Connection", wireType) + } + var msglen int + 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 mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapbyteLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthApi - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex < 0 { - return ErrInvalidLengthApi - } - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = make([]byte, mapbyteLen) - copy(mapvalue, dAtA[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - } 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++ + 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.Connection == nil { + m.Connection = &VolumeConnection{} + } + if err := m.Connection.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 *NetworkInterface) 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: NetworkInterface: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NetworkInterface: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", 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.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NetworkId", 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 } } - m.SecretData[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.NetworkId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EncryptionData", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ips", 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.Ips = append(m.Ips, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6988,11 +8566,11 @@ func (m *VolumeConnection) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.EncryptionData == nil { - m.EncryptionData = make(map[string][]byte) + if m.Attributes == nil { + m.Attributes = make(map[string]string) } var mapkey string - mapvalue := []byte{} + var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 @@ -7041,7 +8619,7 @@ func (m *VolumeConnection) Unmarshal(dAtA []byte) error { mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { - var mapbyteLen uint64 + var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -7051,25 +8629,24 @@ func (m *VolumeConnection) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - mapbyteLen |= uint64(b&0x7F) << shift + stringLenmapvalue |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { return ErrInvalidLengthApi } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex < 0 { + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { return ErrInvalidLengthApi } - if postbytesIndex > l { + if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF } - mapvalue = make([]byte, mapbyteLen) - copy(mapvalue, dAtA[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := skipApi(dAtA[iNdEx:]) @@ -7085,7 +8662,7 @@ func (m *VolumeConnection) Unmarshal(dAtA []byte) error { iNdEx += skippy } } - m.EncryptionData[mapkey] = mapvalue + m.Attributes[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex @@ -7108,7 +8685,7 @@ func (m *VolumeConnection) Unmarshal(dAtA []byte) error { } return nil } -func (m *Volume) Unmarshal(dAtA []byte) error { +func (m *MachineSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7131,15 +8708,70 @@ func (m *Volume) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Volume: wiretype end group for non-group") + return fmt.Errorf("proto: MachineSpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Volume: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MachineSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType) + } + m.Power = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Power |= Power(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 Image", 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.Image == nil { + m.Image = &ImageSpec{} + } + if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Class", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7167,13 +8799,13 @@ func (m *Volume) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.Class = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IgnitionData", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -7183,27 +8815,147 @@ func (m *Volume) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IgnitionData = append(m.IgnitionData[:0], dAtA[iNdEx:postIndex]...) + if m.IgnitionData == nil { + m.IgnitionData = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Volumes", 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.Volumes = append(m.Volumes, &Volume{}) + if err := m.Volumes[len(m.Volumes)-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 NetworkInterfaces", 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 { + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NetworkInterfaces = append(m.NetworkInterfaces, &NetworkInterface{}) + if err := m.NetworkInterfaces[len(m.NetworkInterfaces)-1].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 } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - if postIndex > l { + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Event) 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 } - m.Device = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: + 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: Event: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EmptyDisk", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7230,16 +8982,16 @@ func (m *Volume) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.EmptyDisk == nil { - m.EmptyDisk = &EmptyDisk{} + if m.Metadata == nil { + m.Metadata = &v1alpha1.ObjectMetadata{} } - if err := m.EmptyDisk.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 5: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Connection", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7266,10 +9018,10 @@ func (m *Volume) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Connection == nil { - m.Connection = &VolumeConnection{} + if m.Spec == nil { + m.Spec = &EventSpec{} } - if err := m.Connection.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -7294,7 +9046,7 @@ func (m *Volume) Unmarshal(dAtA []byte) error { } return nil } -func (m *NetworkInterface) Unmarshal(dAtA []byte) error { +func (m *EventSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7317,15 +9069,15 @@ func (m *NetworkInterface) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NetworkInterface: wiretype end group for non-group") + return fmt.Errorf("proto: EventSpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NetworkInterface: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: EventSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7353,11 +9105,11 @@ func (m *NetworkInterface) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.Reason = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NetworkId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7385,11 +9137,11 @@ func (m *NetworkInterface) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.NetworkId = string(dAtA[iNdEx:postIndex]) + m.Message = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ips", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7417,13 +9169,13 @@ func (m *NetworkInterface) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Ips = append(m.Ips, string(dAtA[iNdEx:postIndex])) + m.Type = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EventTime", wireType) } - var msglen int + m.EventTime = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -7433,119 +9185,11 @@ func (m *NetworkInterface) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.EventTime |= int64(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.Attributes == nil { - m.Attributes = 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.Attributes[mapkey] = mapvalue - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipApi(dAtA[iNdEx:]) @@ -7567,7 +9211,7 @@ func (m *NetworkInterface) Unmarshal(dAtA []byte) error { } return nil } -func (m *MachineSpec) Unmarshal(dAtA []byte) error { +func (m *MachineStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7590,17 +9234,17 @@ func (m *MachineSpec) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MachineSpec: wiretype end group for non-group") + return fmt.Errorf("proto: MachineStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MachineSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MachineStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType) } - m.Power = 0 + m.ObservedGeneration = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -7610,52 +9254,16 @@ func (m *MachineSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Power |= Power(b&0x7F) << shift + m.ObservedGeneration |= int64(b&0x7F) << shift if b < 0x80 { break } } case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Image", 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.Image == nil { - m.Image = &ImageSpec{} - } - if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Class", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) } - var stringLen uint64 + m.State = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -7665,29 +9273,16 @@ func (m *MachineSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.State |= MachineState(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 + break + } } - m.Class = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IgnitionData", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ImageRef", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -7697,27 +9292,25 @@ func (m *MachineSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthApi } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthApi } if postIndex > l { return io.ErrUnexpectedEOF } - m.IgnitionData = append(m.IgnitionData[:0], dAtA[iNdEx:postIndex]...) - if m.IgnitionData == nil { - m.IgnitionData = []byte{} - } + m.ImageRef = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Volumes", wireType) } @@ -7746,12 +9339,12 @@ func (m *MachineSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Volumes = append(m.Volumes, &Volume{}) + m.Volumes = append(m.Volumes, &VolumeStatus{}) if err := m.Volumes[len(m.Volumes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 6: + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field NetworkInterfaces", wireType) } @@ -7780,7 +9373,7 @@ func (m *MachineSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.NetworkInterfaces = append(m.NetworkInterfaces, &NetworkInterface{}) + m.NetworkInterfaces = append(m.NetworkInterfaces, &NetworkInterfaceStatus{}) if err := m.NetworkInterfaces[len(m.NetworkInterfaces)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -7806,7 +9399,7 @@ func (m *MachineSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *MachineStatus) Unmarshal(dAtA []byte) error { +func (m *VolumeStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7829,53 +9422,15 @@ func (m *MachineStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MachineStatus: wiretype end group for non-group") + return fmt.Errorf("proto: VolumeStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MachineStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: VolumeStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType) - } - m.ObservedGeneration = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ObservedGeneration |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - m.State = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.State |= MachineState(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ImageRef", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7903,13 +9458,13 @@ func (m *MachineStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ImageRef = string(dAtA[iNdEx:postIndex]) + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Volumes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Handle", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -7919,31 +9474,29 @@ func (m *MachineStatus) 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.Volumes = append(m.Volumes, &VolumeStatus{}) - if err := m.Volumes[len(m.Volumes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Handle = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NetworkInterfaces", wireType) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) } - var msglen int + m.State = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -7953,26 +9506,11 @@ func (m *MachineStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.State |= VolumeState(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.NetworkInterfaces = append(m.NetworkInterfaces, &NetworkInterfaceStatus{}) - if err := m.NetworkInterfaces[len(m.NetworkInterfaces)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipApi(dAtA[iNdEx:]) @@ -7994,7 +9532,7 @@ func (m *MachineStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *VolumeStatus) Unmarshal(dAtA []byte) error { +func (m *NetworkInterfaceStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8017,10 +9555,10 @@ func (m *VolumeStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: VolumeStatus: wiretype end group for non-group") + return fmt.Errorf("proto: NetworkInterfaceStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: VolumeStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: NetworkInterfaceStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -8101,11 +9639,43 @@ func (m *VolumeStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.State |= VolumeState(b&0x7F) << shift + m.State |= NetworkInterfaceState(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ips", 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.Ips = append(m.Ips, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipApi(dAtA[iNdEx:]) @@ -8127,7 +9697,7 @@ func (m *VolumeStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *NetworkInterfaceStatus) Unmarshal(dAtA []byte) error { +func (m *MachineClass) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8150,10 +9720,10 @@ func (m *NetworkInterfaceStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NetworkInterfaceStatus: wiretype end group for non-group") + return fmt.Errorf("proto: MachineClass: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NetworkInterfaceStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MachineClass: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -8190,9 +9760,95 @@ func (m *NetworkInterfaceStatus) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Handle", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Capabilities", wireType) } - var stringLen uint64 + 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.Capabilities == nil { + m.Capabilities = &MachineClassCapabilities{} + } + if err := m.Capabilities.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 *MachineClassStatus) 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: MachineClassStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MachineClassStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MachineClass", wireType) + } + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -8202,29 +9858,33 @@ func (m *NetworkInterfaceStatus) 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.Handle = string(dAtA[iNdEx:postIndex]) + if m.MachineClass == nil { + m.MachineClass = &MachineClass{} + } + if err := m.MachineClass.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 3: + case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType) } - m.State = 0 + m.Quantity = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -8234,14 +9894,64 @@ func (m *NetworkInterfaceStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.State |= NetworkInterfaceState(b&0x7F) << shift + m.Quantity |= int64(b&0x7F) << shift if b < 0x80 { break } } - 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 *VersionRequest) 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: VersionRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VersionRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ips", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8269,7 +9979,7 @@ func (m *NetworkInterfaceStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Ips = append(m.Ips, string(dAtA[iNdEx:postIndex])) + m.Version = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -8292,7 +10002,7 @@ func (m *NetworkInterfaceStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *MachineClass) Unmarshal(dAtA []byte) error { +func (m *VersionResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8315,15 +10025,15 @@ func (m *MachineClass) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MachineClass: wiretype end group for non-group") + return fmt.Errorf("proto: VersionResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MachineClass: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: VersionResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RuntimeName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8351,13 +10061,13 @@ func (m *MachineClass) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.RuntimeName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Capabilities", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RuntimeVersion", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -8367,27 +10077,23 @@ func (m *MachineClass) 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.Capabilities == nil { - m.Capabilities = &MachineClassCapabilities{} - } - if err := m.Capabilities.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.RuntimeVersion = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -8410,7 +10116,7 @@ func (m *MachineClass) Unmarshal(dAtA []byte) error { } return nil } -func (m *MachineClassStatus) Unmarshal(dAtA []byte) error { +func (m *ListMachinesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8433,15 +10139,15 @@ func (m *MachineClassStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MachineClassStatus: wiretype end group for non-group") + return fmt.Errorf("proto: ListMachinesRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MachineClassStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ListMachinesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MachineClass", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8468,32 +10174,13 @@ func (m *MachineClassStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.MachineClass == nil { - m.MachineClass = &MachineClass{} + if m.Filter == nil { + m.Filter = &MachineFilter{} } - if err := m.MachineClass.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Filter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Quantity", wireType) - } - m.Quantity = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Quantity |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipApi(dAtA[iNdEx:]) @@ -8515,7 +10202,7 @@ func (m *MachineClassStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *VersionRequest) Unmarshal(dAtA []byte) error { +func (m *ListMachinesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8538,17 +10225,17 @@ func (m *VersionRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: VersionRequest: wiretype end group for non-group") + return fmt.Errorf("proto: ListMachinesResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: VersionRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ListMachinesResponse: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Machines", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -8558,23 +10245,25 @@ func (m *VersionRequest) 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.Version = string(dAtA[iNdEx:postIndex]) + m.Machines = append(m.Machines, &Machine{}) + if err := m.Machines[len(m.Machines)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -8597,7 +10286,7 @@ func (m *VersionRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *VersionResponse) Unmarshal(dAtA []byte) error { +func (m *ListEventsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8620,17 +10309,17 @@ func (m *VersionResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: VersionResponse: wiretype end group for non-group") + return fmt.Errorf("proto: ListEventsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: VersionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ListEventsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RuntimeName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowApi @@ -8640,55 +10329,27 @@ func (m *VersionResponse) 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.RuntimeName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RuntimeVersion", 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 m.Filter == nil { + m.Filter = &EventFilter{} } - if postIndex > l { - return io.ErrUnexpectedEOF + if err := m.Filter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.RuntimeVersion = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -8711,7 +10372,7 @@ func (m *VersionResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *ListMachinesRequest) Unmarshal(dAtA []byte) error { +func (m *ListEventsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8734,15 +10395,15 @@ func (m *ListMachinesRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ListMachinesRequest: wiretype end group for non-group") + return fmt.Errorf("proto: ListEventsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ListMachinesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ListEventsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MachineEvents", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8769,10 +10430,8 @@ func (m *ListMachinesRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Filter == nil { - m.Filter = &MachineFilter{} - } - if err := m.Filter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.MachineEvents = append(m.MachineEvents, &MachineEvents{}) + if err := m.MachineEvents[len(m.MachineEvents)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -8797,7 +10456,7 @@ func (m *ListMachinesRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ListMachinesResponse) Unmarshal(dAtA []byte) error { +func (m *MachineEvents) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8820,15 +10479,15 @@ func (m *ListMachinesResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ListMachinesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MachineEvents: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ListMachinesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MachineEvents: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Machines", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field InvolvedObjectMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8855,8 +10514,44 @@ func (m *ListMachinesResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Machines = append(m.Machines, &Machine{}) - if err := m.Machines[len(m.Machines)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.InvolvedObjectMeta == nil { + m.InvolvedObjectMeta = &v1alpha1.ObjectMetadata{} + } + if err := m.InvolvedObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Events", 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.Events = append(m.Events, &Event{}) + if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/iri/apis/machine/v1alpha1/api.proto b/iri/apis/machine/v1alpha1/api.proto index e3a963c4e..383897e70 100644 --- a/iri/apis/machine/v1alpha1/api.proto +++ b/iri/apis/machine/v1alpha1/api.proto @@ -16,6 +16,7 @@ option (gogoproto.goproto_unrecognized_all) = false; service MachineRuntime { rpc Version(VersionRequest) returns (VersionResponse) {}; + rpc ListEvents(ListEventsRequest) returns (ListEventsResponse) {}; rpc ListMachines(ListMachinesRequest) returns (ListMachinesResponse) {}; rpc CreateMachine(CreateMachineRequest) returns (CreateMachineResponse) {}; @@ -44,6 +45,13 @@ message MachineFilter { map label_selector = 2; } +message EventFilter { + string id = 1; + map label_selector = 2; + int64 events_from_time = 3; + int64 events_to_time = 4; +} + message MachineClassCapabilities { int64 cpu_millis = 1; int64 memory_bytes = 2; @@ -99,6 +107,18 @@ message MachineSpec { repeated NetworkInterface network_interfaces = 6; } +message Event { + meta.v1alpha1.ObjectMetadata metadata = 1; + EventSpec spec = 2; +} + +message EventSpec { + string reason = 1; + string message = 2; + string type = 3; + int64 event_time = 4; +} + message MachineStatus { int64 observed_generation = 1; MachineState state = 2; @@ -168,6 +188,19 @@ message ListMachinesResponse { repeated Machine machines = 1; } +message ListEventsRequest { + EventFilter filter = 1; +} + +message ListEventsResponse { + repeated MachineEvents machine_events = 1; +} + +message MachineEvents { + meta.v1alpha1.ObjectMetadata involved_object_meta = 1; + repeated Event events = 2; +} + message CreateMachineRequest { Machine machine = 1; } @@ -244,4 +277,4 @@ message ExecRequest { message ExecResponse { string url = 1; -} +} \ No newline at end of file diff --git a/iri/remote/machine/runtime.go b/iri/remote/machine/runtime.go index 4f6ea5e99..047e9b072 100644 --- a/iri/remote/machine/runtime.go +++ b/iri/remote/machine/runtime.go @@ -34,6 +34,10 @@ func (r *remoteRuntime) Version(ctx context.Context, req *iri.VersionRequest) (* return r.client.Version(ctx, req) } +func (r *remoteRuntime) ListEvents(ctx context.Context, req *iri.ListEventsRequest) (*iri.ListEventsResponse, error) { + return r.client.ListEvents(ctx, req) +} + func (r *remoteRuntime) ListMachines(ctx context.Context, req *iri.ListMachinesRequest) (*iri.ListMachinesResponse, error) { return r.client.ListMachines(ctx, req) } diff --git a/iri/testing/machine/fake.go b/iri/testing/machine/fake.go index 54c4ac33d..afc17540f 100644 --- a/iri/testing/machine/fake.go +++ b/iri/testing/machine/fake.go @@ -62,18 +62,37 @@ type FakeMachineClassStatus struct { iri.MachineClassStatus } +type FakeMachineEvents struct { + iri.MachineEvents +} + type FakeRuntimeService struct { sync.Mutex Machines map[string]*FakeMachine MachineClassStatus map[string]*FakeMachineClassStatus GetExecURL func(req *iri.ExecRequest) string + MachineEvents map[string]*FakeMachineEvents +} + +// ListEvents implements machine.RuntimeService. +func (r *FakeRuntimeService) ListEvents(ctx context.Context, req *iri.ListEventsRequest) (*iri.ListEventsResponse, error) { + r.Lock() + defer r.Unlock() + var machineEvents []*iri.MachineEvents + + for _, m := range r.MachineEvents { + machineEvents = append(machineEvents, &m.MachineEvents) + } + + return &iri.ListEventsResponse{MachineEvents: machineEvents}, nil } func NewFakeRuntimeService() *FakeRuntimeService { return &FakeRuntimeService{ Machines: make(map[string]*FakeMachine), MachineClassStatus: make(map[string]*FakeMachineClassStatus), + MachineEvents: make(map[string]*FakeMachineEvents), } } @@ -104,6 +123,13 @@ func (r *FakeRuntimeService) SetGetExecURL(f func(req *iri.ExecRequest) string) r.GetExecURL = f } +func (r *FakeRuntimeService) SetEvents(machineId string, events *FakeMachineEvents) { + r.Lock() + defer r.Unlock() + + r.MachineEvents[machineId] = events +} + func (r *FakeRuntimeService) Version(ctx context.Context, req *iri.VersionRequest) (*iri.VersionResponse, error) { return &iri.VersionResponse{ RuntimeName: FakeRuntimeName, diff --git a/poollet/machinepoollet/cmd/machinepoollet/app/app.go b/poollet/machinepoollet/cmd/machinepoollet/app/app.go index 8f8ccc089..e978b2d56 100644 --- a/poollet/machinepoollet/cmd/machinepoollet/app/app.go +++ b/poollet/machinepoollet/cmd/machinepoollet/app/app.go @@ -25,6 +25,7 @@ import ( machinepoolletconfig "github.com/ironcore-dev/ironcore/poollet/machinepoollet/client/config" "github.com/ironcore-dev/ironcore/poollet/machinepoollet/controllers" "github.com/ironcore-dev/ironcore/poollet/machinepoollet/mcm" + "github.com/ironcore-dev/ironcore/poollet/machinepoollet/mem" "github.com/ironcore-dev/ironcore/poollet/machinepoollet/server" "github.com/ironcore-dev/ironcore/utils/client/config" "github.com/spf13/cobra" @@ -259,6 +260,11 @@ func Run(ctx context.Context, opts Options) error { return fmt.Errorf("error adding machine class mapper: %w", err) } + machineEventMapper := mem.NewMachineEventMapper(mgr.GetClient(), machineRuntime, mgr.GetEventRecorderFor("machine-cluster-events"), mem.MachineEventMapperOptions{}) + if err := mgr.Add(machineEventMapper); err != nil { + return fmt.Errorf("error adding machine event mapper: %w", err) + } + machineEvents := irievent.NewGenerator(func(ctx context.Context) ([]*iri.Machine, error) { res, err := machineRuntime.ListMachines(ctx, &iri.ListMachinesRequest{}) if err != nil { diff --git a/poollet/machinepoollet/mem/mem.go b/poollet/machinepoollet/mem/mem.go new file mode 100644 index 000000000..ee9950e05 --- /dev/null +++ b/poollet/machinepoollet/mem/mem.go @@ -0,0 +1,101 @@ +// SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and IronCore contributors +// SPDX-License-Identifier: Apache-2.0 + +package mem + +import ( + "context" + "fmt" + "time" + + "github.com/go-logr/logr" + computev1alpha1 "github.com/ironcore-dev/ironcore/api/compute/v1alpha1" + "github.com/ironcore-dev/ironcore/iri/apis/machine" + iri "github.com/ironcore-dev/ironcore/iri/apis/machine/v1alpha1" + "github.com/ironcore-dev/ironcore/poollet/machinepoollet/api/v1alpha1" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/tools/record" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/manager" +) + +type MachineEventMapper struct { + manager.Runnable + record.EventRecorder + client.Client + + machineRuntime machine.RuntimeService + + relistPeriod time.Duration + lastFetched time.Time +} + +func (m *MachineEventMapper) relist(ctx context.Context, log logr.Logger) error { + log.V(1).Info("Relisting machine cluster events") + toEventFilterTime := time.Now() + res, err := m.machineRuntime.ListEvents(ctx, &iri.ListEventsRequest{ + Filter: &iri.EventFilter{EventsFromTime: m.lastFetched.Unix(), EventsToTime: toEventFilterTime.Unix()}, + }) + if err != nil { + return fmt.Errorf("error listing machine cluster events: %w", err) + } + + m.lastFetched = toEventFilterTime + + for _, machineEvent := range res.MachineEvents { + if involvedMachine, err := m.getMachine(ctx, machineEvent.InvolvedObjectMeta.GetLabels()); err == nil { + for _, event := range machineEvent.Events { + m.Eventf(involvedMachine, event.Spec.Type, event.Spec.Reason, event.Spec.Message) + } + } + } + + return nil +} + +func (m *MachineEventMapper) getMachine(ctx context.Context, labels map[string]string) (*computev1alpha1.Machine, error) { + ironcoreMachine := &computev1alpha1.Machine{} + ironcoreMachineKey := client.ObjectKey{Namespace: labels[v1alpha1.MachineNamespaceLabel], Name: labels[v1alpha1.MachineNameLabel]} + if err := m.Client.Get(ctx, ironcoreMachineKey, ironcoreMachine); err != nil { + if !apierrors.IsNotFound(err) { + return nil, fmt.Errorf("error getting ironcore machine: %w", err) + } + return nil, status.Errorf(codes.NotFound, "machine %s not found", ironcoreMachineKey.Name) + } + return ironcoreMachine, nil +} + +func (m *MachineEventMapper) Start(ctx context.Context) error { + log := ctrl.LoggerFrom(ctx).WithName("mem") + m.lastFetched = time.Now() + wait.UntilWithContext(ctx, func(ctx context.Context) { + if err := m.relist(ctx, log); err != nil { + log.Error(err, "Error relisting") + } + }, m.relistPeriod) + return nil +} + +type MachineEventMapperOptions struct { + RelistPeriod time.Duration +} + +func setMachineEventMapperOptionsDefaults(o *MachineEventMapperOptions) { + if o.RelistPeriod == 0 { + o.RelistPeriod = 1 * time.Minute + } +} + +func NewMachineEventMapper(client client.Client, runtime machine.RuntimeService, recorder record.EventRecorder, opts MachineEventMapperOptions) *MachineEventMapper { + setMachineEventMapperOptionsDefaults(&opts) + return &MachineEventMapper{ + Client: client, + machineRuntime: runtime, + relistPeriod: opts.RelistPeriod, + EventRecorder: recorder, + } +} diff --git a/poollet/machinepoollet/mem/mem_suite_test.go b/poollet/machinepoollet/mem/mem_suite_test.go new file mode 100644 index 000000000..ca56978d0 --- /dev/null +++ b/poollet/machinepoollet/mem/mem_suite_test.go @@ -0,0 +1,159 @@ +// SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and IronCore contributors +// SPDX-License-Identifier: Apache-2.0 + +package mem_test + +import ( + "testing" + "time" + + "github.com/ironcore-dev/controller-utils/buildutils" + "github.com/ironcore-dev/controller-utils/modutils" + computev1alpha1 "github.com/ironcore-dev/ironcore/api/compute/v1alpha1" + corev1alpha1 "github.com/ironcore-dev/ironcore/api/core/v1alpha1" + ipamv1alpha1 "github.com/ironcore-dev/ironcore/api/ipam/v1alpha1" + networkingv1alpha1 "github.com/ironcore-dev/ironcore/api/networking/v1alpha1" + storagev1alpha1 "github.com/ironcore-dev/ironcore/api/storage/v1alpha1" + utilsenvtest "github.com/ironcore-dev/ironcore/utils/envtest" + "github.com/ironcore-dev/ironcore/utils/envtest/apiserver" + "github.com/ironcore-dev/ironcore/utils/envtest/controllermanager" + "github.com/ironcore-dev/ironcore/utils/envtest/process" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/envtest" + . "sigs.k8s.io/controller-runtime/pkg/envtest/komega" + logf "sigs.k8s.io/controller-runtime/pkg/log" + "sigs.k8s.io/controller-runtime/pkg/log/zap" +) + +var ( + cfg *rest.Config + testEnv *envtest.Environment + testEnvExt *utilsenvtest.EnvironmentExtensions + k8sClient client.Client +) + +const ( + eventuallyTimeout = 3 * time.Second + apiServiceTimeout = 5 * time.Minute + + controllerManagerService = "controller-manager" + + fooDownwardAPILabel = "custom-downward-api-label" + fooAnnotation = "foo" +) + +func TestControllers(t *testing.T) { + SetDefaultEventuallyTimeout(eventuallyTimeout) + + RegisterFailHandler(Fail) + RunSpecs(t, "Machine event mapper Suite") +} + +var _ = BeforeSuite(func() { + logf.SetLogger(zap.New(zap.WriteTo(GinkgoWriter), zap.UseDevMode(true))) + + var err error + By("bootstrapping test environment") + testEnv = &envtest.Environment{} + testEnvExt = &utilsenvtest.EnvironmentExtensions{ + APIServiceDirectoryPaths: []string{ + modutils.Dir("github.com/ironcore-dev/ironcore", "config", "apiserver", "apiservice", "bases"), + }, + ErrorIfAPIServicePathIsMissing: true, + AdditionalServices: []utilsenvtest.AdditionalService{ + { + Name: controllerManagerService, + }, + }, + } + + cfg, err = utilsenvtest.StartWithExtensions(testEnv, testEnvExt) + Expect(err).NotTo(HaveOccurred()) + Expect(cfg).NotTo(BeNil()) + + DeferCleanup(utilsenvtest.StopWithExtensions, testEnv, testEnvExt) + + Expect(computev1alpha1.AddToScheme(scheme.Scheme)).To(Succeed()) + Expect(networkingv1alpha1.AddToScheme(scheme.Scheme)).To(Succeed()) + Expect(ipamv1alpha1.AddToScheme(scheme.Scheme)).To(Succeed()) + Expect(storagev1alpha1.AddToScheme(scheme.Scheme)).To(Succeed()) + + // Init package-level k8sClient + k8sClient, err = client.New(cfg, client.Options{Scheme: scheme.Scheme}) + Expect(err).NotTo(HaveOccurred()) + Expect(k8sClient).NotTo(BeNil()) + SetClient(k8sClient) + + apiSrv, err := apiserver.New(cfg, apiserver.Options{ + MainPath: "github.com/ironcore-dev/ironcore/cmd/ironcore-apiserver", + BuildOptions: []buildutils.BuildOption{buildutils.ModModeMod}, + ETCDServers: []string{testEnv.ControlPlane.Etcd.URL.String()}, + Host: testEnvExt.APIServiceInstallOptions.LocalServingHost, + Port: testEnvExt.APIServiceInstallOptions.LocalServingPort, + CertDir: testEnvExt.APIServiceInstallOptions.LocalServingCertDir, + }) + Expect(err).NotTo(HaveOccurred()) + + Expect(apiSrv.Start()).To(Succeed()) + DeferCleanup(apiSrv.Stop) + + Expect(utilsenvtest.WaitUntilAPIServicesReadyWithTimeout(apiServiceTimeout, testEnvExt, k8sClient, scheme.Scheme)).To(Succeed()) + + ctrlMgr, err := controllermanager.New(cfg, controllermanager.Options{ + Args: process.EmptyArgs().Set("controllers", "*"), + MainPath: "github.com/ironcore-dev/ironcore/cmd/ironcore-controller-manager", + BuildOptions: []buildutils.BuildOption{buildutils.ModModeMod}, + Host: testEnvExt.GetAdditionalServiceHost(controllerManagerService), + Port: testEnvExt.GetAdditionalServicePort(controllerManagerService), + }) + Expect(err).NotTo(HaveOccurred()) + + Expect(ctrlMgr.Start()).To(Succeed()) + DeferCleanup(ctrlMgr.Stop) +}) + +func SetupTest() (*corev1.Namespace, *computev1alpha1.MachinePool, *computev1alpha1.MachineClass) { + var ( + ns = &corev1.Namespace{} + mp = &computev1alpha1.MachinePool{} + mc = &computev1alpha1.MachineClass{} + ) + + BeforeEach(func(ctx SpecContext) { + *ns = corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + GenerateName: "test-ns-", + }, + } + Expect(k8sClient.Create(ctx, ns)).To(Succeed(), "failed to create test namespace") + DeferCleanup(k8sClient.Delete, ns) + + *mp = computev1alpha1.MachinePool{ + ObjectMeta: metav1.ObjectMeta{ + GenerateName: "test-mp-", + }, + } + Expect(k8sClient.Create(ctx, mp)).To(Succeed(), "failed to create test machine pool") + DeferCleanup(k8sClient.Delete, mp) + + *mc = computev1alpha1.MachineClass{ + ObjectMeta: metav1.ObjectMeta{ + GenerateName: "test-mc-", + }, + Capabilities: corev1alpha1.ResourceList{ + corev1alpha1.ResourceCPU: resource.MustParse("1"), + corev1alpha1.ResourceMemory: resource.MustParse("1Gi"), + }, + } + Expect(k8sClient.Create(ctx, mc)).To(Succeed(), "failed to create test machine class") + DeferCleanup(k8sClient.Delete, mc) + }) + return ns, mp, mc +} diff --git a/poollet/machinepoollet/mem/mem_test.go b/poollet/machinepoollet/mem/mem_test.go new file mode 100644 index 000000000..9af805c18 --- /dev/null +++ b/poollet/machinepoollet/mem/mem_test.go @@ -0,0 +1,157 @@ +// SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and IronCore contributors +// SPDX-License-Identifier: Apache-2.0 + +package mem_test + +import ( + "context" + "fmt" + "time" + + computev1alpha1 "github.com/ironcore-dev/ironcore/api/compute/v1alpha1" + iri "github.com/ironcore-dev/ironcore/iri/apis/machine/v1alpha1" + "github.com/ironcore-dev/ironcore/iri/apis/meta/v1alpha1" + fakemachine "github.com/ironcore-dev/ironcore/iri/testing/machine" + "github.com/ironcore-dev/ironcore/poollet/machinepoollet/controllers" + "github.com/ironcore-dev/ironcore/poollet/machinepoollet/mcm" + "github.com/ironcore-dev/ironcore/poollet/machinepoollet/mem" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/tools/record" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/client" + metricserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" +) + +var _ = Describe("MachineEventMapper", func() { + var srv = &fakemachine.FakeRuntimeService{} + ns, mp, mc := SetupTest() + + BeforeEach(func(ctx SpecContext) { + *srv = *fakemachine.NewFakeRuntimeService() + srv.SetMachineClasses([]*fakemachine.FakeMachineClassStatus{ + { + MachineClassStatus: iri.MachineClassStatus{ + MachineClass: &iri.MachineClass{ + Name: mc.Name, + Capabilities: &iri.MachineClassCapabilities{ + CpuMillis: mc.Capabilities.CPU().MilliValue(), + MemoryBytes: mc.Capabilities.Memory().Value(), + }, + }, + }, + }, + }) + + k8sManager, err := ctrl.NewManager(cfg, ctrl.Options{ + Scheme: scheme.Scheme, + Metrics: metricserver.Options{ + BindAddress: "0", + }, + }) + Expect(err).ToNot(HaveOccurred()) + + machineClassMapper := mcm.NewGeneric(srv, mcm.GenericOptions{ + RelistPeriod: 2 * time.Second, + }) + Expect(k8sManager.Add(machineClassMapper)).To(Succeed()) + + machineEventMapper := mem.NewMachineEventMapper(k8sManager.GetClient(), srv, k8sManager.GetEventRecorderFor("test"), mem.MachineEventMapperOptions{ + RelistPeriod: 2 * time.Second, + }) + Expect(k8sManager.Add(machineEventMapper)).To(Succeed()) + + Expect((&controllers.MachineReconciler{ + EventRecorder: &record.FakeRecorder{}, + Client: k8sManager.GetClient(), + MachineRuntime: srv, + MachineRuntimeName: fakemachine.FakeRuntimeName, + MachineRuntimeVersion: fakemachine.FakeVersion, + MachineClassMapper: machineClassMapper, + MachinePoolName: mp.Name, + DownwardAPILabels: map[string]string{ + fooDownwardAPILabel: fmt.Sprintf("metadata.annotations['%s']", fooAnnotation), + }, + }).SetupWithManager(k8sManager)).To(Succeed()) + + mgrCtx, cancel := context.WithCancel(context.Background()) + DeferCleanup(cancel) + + go func() { + defer GinkgoRecover() + Expect(k8sManager.Start(mgrCtx)).To(Succeed(), "failed to start manager") + }() + }) + + It("should get event list for machine", func(ctx SpecContext) { + By("creating a machine") + const fooAnnotationValue = "bar" + machine := &computev1alpha1.Machine{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: ns.Name, + GenerateName: "machine-", + Annotations: map[string]string{ + fooAnnotation: fooAnnotationValue, + }, + }, + Spec: computev1alpha1.MachineSpec{ + MachineClassRef: corev1.LocalObjectReference{Name: mc.Name}, + MachinePoolRef: &corev1.LocalObjectReference{Name: mp.Name}, + }, + } + Expect(k8sClient.Create(ctx, machine)).To(Succeed()) + By("waiting for the runtime to report the machine, volume and network interface") + Eventually(srv).Should(SatisfyAll( + HaveField("Machines", HaveLen(1)), + )) + + By("setting an event for iri machine") + _, iriMachine := GetSingleMapEntry(srv.Machines) + machineEvent := &fakemachine.FakeMachineEvents{ + MachineEvents: iri.MachineEvents{ + InvolvedObjectMeta: &v1alpha1.ObjectMetadata{ + Id: iriMachine.Metadata.Id, + Labels: iriMachine.Metadata.Labels, + }, + Events: []*iri.Event{{ + Spec: &iri.EventSpec{ + Reason: "testing", + Message: "this is test event", + Type: "Normal", + EventTime: time.Now().Unix(), + }}}, + }, + } + srv.SetEvents(iriMachine.Metadata.Id, machineEvent) + + By("validating event has been emitted for correct machine") + machineEventList := &corev1.EventList{} + selectorField := fields.Set{} + selectorField["involvedObject.name"] = machine.GetName() + Eventually(func(g Gomega) []corev1.Event { + err := k8sClient.List(ctx, machineEventList, + client.InNamespace(ns.Name), client.MatchingFieldsSelector{Selector: selectorField.AsSelector()}, + ) + g.Expect(err).NotTo(HaveOccurred()) + return machineEventList.Items + }).Should(ContainElement(SatisfyAll( + HaveField("Reason", Equal("testing")), + HaveField("Message", Equal("this is test event")), + HaveField("Type", Equal(corev1.EventTypeNormal)), + ))) + }) +}) + +func GetSingleMapEntry[K comparable, V any](m map[K]V) (K, V) { + if n := len(m); n != 1 { + Fail(fmt.Sprintf("Expected for map to have a single entry but got %d", n), 1) + } + for k, v := range m { + return k, v + } + panic("unreachable") +}