blob: db176be293144c03ad3a2ee40ef22952e69194a2 [file] [log] [blame]
Amit Ghosh09f28362020-06-12 21:52:19 +01001// Code generated by protoc-gen-go. DO NOT EDIT.
2// source: dmi/sw_management_service.proto
3
4package dmi
5
6import (
7 context "context"
8 fmt "fmt"
9 proto "github.com/golang/protobuf/proto"
10 grpc "google.golang.org/grpc"
Andrea Campanellac795b7d2021-04-14 13:24:44 +020011 codes "google.golang.org/grpc/codes"
12 status "google.golang.org/grpc/status"
Amit Ghosh09f28362020-06-12 21:52:19 +010013 math "math"
14)
15
16// Reference imports to suppress errors if they are not otherwise used.
17var _ = proto.Marshal
18var _ = fmt.Errorf
19var _ = math.Inf
20
21// This is a compile-time assertion to ensure that this generated file
22// is compatible with the proto package it is being compiled against.
23// A compilation error at this line likely means your copy of the
24// proto package needs to be updated.
25const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
26
amit.ghoshae473032021-01-10 11:59:10 +010027type GetSoftwareVersionInformationResponse_Reason int32
28
29const (
amit.ghoshbd2022e2021-02-22 05:58:53 +010030 GetSoftwareVersionInformationResponse_UNDEFINED_REASON GetSoftwareVersionInformationResponse_Reason = 0
31 GetSoftwareVersionInformationResponse_UNKNOWN_DEVICE GetSoftwareVersionInformationResponse_Reason = 1
32 GetSoftwareVersionInformationResponse_INTERNAL_ERROR GetSoftwareVersionInformationResponse_Reason = 2
33 GetSoftwareVersionInformationResponse_DEVICE_UNREACHABLE GetSoftwareVersionInformationResponse_Reason = 3
amit.ghoshae473032021-01-10 11:59:10 +010034)
35
36var GetSoftwareVersionInformationResponse_Reason_name = map[int32]string{
37 0: "UNDEFINED_REASON",
38 1: "UNKNOWN_DEVICE",
39 2: "INTERNAL_ERROR",
amit.ghoshbd2022e2021-02-22 05:58:53 +010040 3: "DEVICE_UNREACHABLE",
amit.ghoshae473032021-01-10 11:59:10 +010041}
42
43var GetSoftwareVersionInformationResponse_Reason_value = map[string]int32{
amit.ghoshbd2022e2021-02-22 05:58:53 +010044 "UNDEFINED_REASON": 0,
45 "UNKNOWN_DEVICE": 1,
46 "INTERNAL_ERROR": 2,
47 "DEVICE_UNREACHABLE": 3,
amit.ghoshae473032021-01-10 11:59:10 +010048}
49
50func (x GetSoftwareVersionInformationResponse_Reason) String() string {
51 return proto.EnumName(GetSoftwareVersionInformationResponse_Reason_name, int32(x))
52}
53
54func (GetSoftwareVersionInformationResponse_Reason) EnumDescriptor() ([]byte, []int) {
55 return fileDescriptor_000929e4bec891d7, []int{1, 0}
56}
57
58type ConfigResponse_Reason int32
59
60const (
61 ConfigResponse_UNDEFINED_REASON ConfigResponse_Reason = 0
62 ConfigResponse_UNKNOWN_DEVICE ConfigResponse_Reason = 1
63 ConfigResponse_INTERNAL_ERROR ConfigResponse_Reason = 2
64 ConfigResponse_ERROR_FETCHING_CONFIG ConfigResponse_Reason = 3
65 ConfigResponse_INVALID_CONFIG ConfigResponse_Reason = 4
66 ConfigResponse_OPERATION_ALREADY_IN_PROGRESS ConfigResponse_Reason = 5
amit.ghoshbd2022e2021-02-22 05:58:53 +010067 ConfigResponse_DEVICE_UNREACHABLE ConfigResponse_Reason = 6
amit.ghoshae473032021-01-10 11:59:10 +010068)
69
70var ConfigResponse_Reason_name = map[int32]string{
71 0: "UNDEFINED_REASON",
72 1: "UNKNOWN_DEVICE",
73 2: "INTERNAL_ERROR",
74 3: "ERROR_FETCHING_CONFIG",
75 4: "INVALID_CONFIG",
76 5: "OPERATION_ALREADY_IN_PROGRESS",
amit.ghoshbd2022e2021-02-22 05:58:53 +010077 6: "DEVICE_UNREACHABLE",
amit.ghoshae473032021-01-10 11:59:10 +010078}
79
80var ConfigResponse_Reason_value = map[string]int32{
81 "UNDEFINED_REASON": 0,
82 "UNKNOWN_DEVICE": 1,
83 "INTERNAL_ERROR": 2,
84 "ERROR_FETCHING_CONFIG": 3,
85 "INVALID_CONFIG": 4,
86 "OPERATION_ALREADY_IN_PROGRESS": 5,
amit.ghoshbd2022e2021-02-22 05:58:53 +010087 "DEVICE_UNREACHABLE": 6,
amit.ghoshae473032021-01-10 11:59:10 +010088}
89
90func (x ConfigResponse_Reason) String() string {
91 return proto.EnumName(ConfigResponse_Reason_name, int32(x))
92}
93
94func (ConfigResponse_Reason) EnumDescriptor() ([]byte, []int) {
95 return fileDescriptor_000929e4bec891d7, []int{4, 0}
96}
97
amit.ghosh2c938b82021-01-14 11:34:03 +010098type StartupConfigInfoResponse_Reason int32
99
100const (
amit.ghoshbd2022e2021-02-22 05:58:53 +0100101 StartupConfigInfoResponse_UNDEFINED_REASON StartupConfigInfoResponse_Reason = 0
102 StartupConfigInfoResponse_UNKNOWN_DEVICE StartupConfigInfoResponse_Reason = 1
103 StartupConfigInfoResponse_INTERNAL_ERROR StartupConfigInfoResponse_Reason = 2
104 StartupConfigInfoResponse_DEVICE_UNREACHABLE StartupConfigInfoResponse_Reason = 3
amit.ghosh2c938b82021-01-14 11:34:03 +0100105)
106
107var StartupConfigInfoResponse_Reason_name = map[int32]string{
108 0: "UNDEFINED_REASON",
109 1: "UNKNOWN_DEVICE",
110 2: "INTERNAL_ERROR",
amit.ghoshbd2022e2021-02-22 05:58:53 +0100111 3: "DEVICE_UNREACHABLE",
amit.ghosh2c938b82021-01-14 11:34:03 +0100112}
113
114var StartupConfigInfoResponse_Reason_value = map[string]int32{
amit.ghoshbd2022e2021-02-22 05:58:53 +0100115 "UNDEFINED_REASON": 0,
116 "UNKNOWN_DEVICE": 1,
117 "INTERNAL_ERROR": 2,
118 "DEVICE_UNREACHABLE": 3,
amit.ghosh2c938b82021-01-14 11:34:03 +0100119}
120
121func (x StartupConfigInfoResponse_Reason) String() string {
122 return proto.EnumName(StartupConfigInfoResponse_Reason_name, int32(x))
123}
124
125func (StartupConfigInfoResponse_Reason) EnumDescriptor() ([]byte, []int) {
126 return fileDescriptor_000929e4bec891d7, []int{6, 0}
127}
128
Amit Ghosh09f28362020-06-12 21:52:19 +0100129type SoftwareVersionInformation struct {
130 ActiveVersions []*ImageVersion `protobuf:"bytes,1,rep,name=active_versions,json=activeVersions,proto3" json:"active_versions,omitempty"`
131 StandbyVersions []*ImageVersion `protobuf:"bytes,2,rep,name=standby_versions,json=standbyVersions,proto3" json:"standby_versions,omitempty"`
132 XXX_NoUnkeyedLiteral struct{} `json:"-"`
133 XXX_unrecognized []byte `json:"-"`
134 XXX_sizecache int32 `json:"-"`
135}
136
137func (m *SoftwareVersionInformation) Reset() { *m = SoftwareVersionInformation{} }
138func (m *SoftwareVersionInformation) String() string { return proto.CompactTextString(m) }
139func (*SoftwareVersionInformation) ProtoMessage() {}
140func (*SoftwareVersionInformation) Descriptor() ([]byte, []int) {
141 return fileDescriptor_000929e4bec891d7, []int{0}
142}
143
144func (m *SoftwareVersionInformation) XXX_Unmarshal(b []byte) error {
145 return xxx_messageInfo_SoftwareVersionInformation.Unmarshal(m, b)
146}
147func (m *SoftwareVersionInformation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
148 return xxx_messageInfo_SoftwareVersionInformation.Marshal(b, m, deterministic)
149}
150func (m *SoftwareVersionInformation) XXX_Merge(src proto.Message) {
151 xxx_messageInfo_SoftwareVersionInformation.Merge(m, src)
152}
153func (m *SoftwareVersionInformation) XXX_Size() int {
154 return xxx_messageInfo_SoftwareVersionInformation.Size(m)
155}
156func (m *SoftwareVersionInformation) XXX_DiscardUnknown() {
157 xxx_messageInfo_SoftwareVersionInformation.DiscardUnknown(m)
158}
159
160var xxx_messageInfo_SoftwareVersionInformation proto.InternalMessageInfo
161
162func (m *SoftwareVersionInformation) GetActiveVersions() []*ImageVersion {
163 if m != nil {
164 return m.ActiveVersions
165 }
166 return nil
167}
168
169func (m *SoftwareVersionInformation) GetStandbyVersions() []*ImageVersion {
170 if m != nil {
171 return m.StandbyVersions
172 }
173 return nil
174}
175
aghoshc301dcd2020-09-03 16:55:34 +0100176type GetSoftwareVersionInformationResponse struct {
amit.ghoshae473032021-01-10 11:59:10 +0100177 Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=dmi.Status" json:"status,omitempty"`
178 Reason GetSoftwareVersionInformationResponse_Reason `protobuf:"varint,2,opt,name=reason,proto3,enum=dmi.GetSoftwareVersionInformationResponse_Reason" json:"reason,omitempty"`
179 Info *SoftwareVersionInformation `protobuf:"bytes,3,opt,name=info,proto3" json:"info,omitempty"`
amit.ghosh8ab1e6e2021-02-23 07:40:17 +0100180 ReasonDetail string `protobuf:"bytes,4,opt,name=reason_detail,json=reasonDetail,proto3" json:"reason_detail,omitempty"`
amit.ghoshae473032021-01-10 11:59:10 +0100181 XXX_NoUnkeyedLiteral struct{} `json:"-"`
182 XXX_unrecognized []byte `json:"-"`
183 XXX_sizecache int32 `json:"-"`
aghoshc301dcd2020-09-03 16:55:34 +0100184}
185
186func (m *GetSoftwareVersionInformationResponse) Reset() { *m = GetSoftwareVersionInformationResponse{} }
187func (m *GetSoftwareVersionInformationResponse) String() string { return proto.CompactTextString(m) }
188func (*GetSoftwareVersionInformationResponse) ProtoMessage() {}
189func (*GetSoftwareVersionInformationResponse) Descriptor() ([]byte, []int) {
190 return fileDescriptor_000929e4bec891d7, []int{1}
191}
192
193func (m *GetSoftwareVersionInformationResponse) XXX_Unmarshal(b []byte) error {
194 return xxx_messageInfo_GetSoftwareVersionInformationResponse.Unmarshal(m, b)
195}
196func (m *GetSoftwareVersionInformationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
197 return xxx_messageInfo_GetSoftwareVersionInformationResponse.Marshal(b, m, deterministic)
198}
199func (m *GetSoftwareVersionInformationResponse) XXX_Merge(src proto.Message) {
200 xxx_messageInfo_GetSoftwareVersionInformationResponse.Merge(m, src)
201}
202func (m *GetSoftwareVersionInformationResponse) XXX_Size() int {
203 return xxx_messageInfo_GetSoftwareVersionInformationResponse.Size(m)
204}
205func (m *GetSoftwareVersionInformationResponse) XXX_DiscardUnknown() {
206 xxx_messageInfo_GetSoftwareVersionInformationResponse.DiscardUnknown(m)
207}
208
209var xxx_messageInfo_GetSoftwareVersionInformationResponse proto.InternalMessageInfo
210
211func (m *GetSoftwareVersionInformationResponse) GetStatus() Status {
212 if m != nil {
213 return m.Status
214 }
215 return Status_UNDEFINED_STATUS
216}
217
amit.ghoshae473032021-01-10 11:59:10 +0100218func (m *GetSoftwareVersionInformationResponse) GetReason() GetSoftwareVersionInformationResponse_Reason {
aghoshc301dcd2020-09-03 16:55:34 +0100219 if m != nil {
220 return m.Reason
221 }
amit.ghoshae473032021-01-10 11:59:10 +0100222 return GetSoftwareVersionInformationResponse_UNDEFINED_REASON
aghoshc301dcd2020-09-03 16:55:34 +0100223}
224
225func (m *GetSoftwareVersionInformationResponse) GetInfo() *SoftwareVersionInformation {
226 if m != nil {
227 return m.Info
228 }
229 return nil
230}
231
amit.ghosh8ab1e6e2021-02-23 07:40:17 +0100232func (m *GetSoftwareVersionInformationResponse) GetReasonDetail() string {
233 if m != nil {
234 return m.ReasonDetail
235 }
236 return ""
237}
238
Amit Ghosh09f28362020-06-12 21:52:19 +0100239type DownloadImageRequest struct {
240 DeviceUuid *Uuid `protobuf:"bytes,1,opt,name=device_uuid,json=deviceUuid,proto3" json:"device_uuid,omitempty"`
241 ImageInfo *ImageInformation `protobuf:"bytes,2,opt,name=image_info,json=imageInfo,proto3" json:"image_info,omitempty"`
242 XXX_NoUnkeyedLiteral struct{} `json:"-"`
243 XXX_unrecognized []byte `json:"-"`
244 XXX_sizecache int32 `json:"-"`
245}
246
247func (m *DownloadImageRequest) Reset() { *m = DownloadImageRequest{} }
248func (m *DownloadImageRequest) String() string { return proto.CompactTextString(m) }
249func (*DownloadImageRequest) ProtoMessage() {}
250func (*DownloadImageRequest) Descriptor() ([]byte, []int) {
aghoshc301dcd2020-09-03 16:55:34 +0100251 return fileDescriptor_000929e4bec891d7, []int{2}
Amit Ghosh09f28362020-06-12 21:52:19 +0100252}
253
254func (m *DownloadImageRequest) XXX_Unmarshal(b []byte) error {
255 return xxx_messageInfo_DownloadImageRequest.Unmarshal(m, b)
256}
257func (m *DownloadImageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
258 return xxx_messageInfo_DownloadImageRequest.Marshal(b, m, deterministic)
259}
260func (m *DownloadImageRequest) XXX_Merge(src proto.Message) {
261 xxx_messageInfo_DownloadImageRequest.Merge(m, src)
262}
263func (m *DownloadImageRequest) XXX_Size() int {
264 return xxx_messageInfo_DownloadImageRequest.Size(m)
265}
266func (m *DownloadImageRequest) XXX_DiscardUnknown() {
267 xxx_messageInfo_DownloadImageRequest.DiscardUnknown(m)
268}
269
270var xxx_messageInfo_DownloadImageRequest proto.InternalMessageInfo
271
272func (m *DownloadImageRequest) GetDeviceUuid() *Uuid {
273 if m != nil {
274 return m.DeviceUuid
275 }
276 return nil
277}
278
279func (m *DownloadImageRequest) GetImageInfo() *ImageInformation {
280 if m != nil {
281 return m.ImageInfo
282 }
283 return nil
284}
285
amit.ghoshed23db02020-11-18 10:26:36 +0100286type ConfigRequest struct {
287 DeviceUuid *Uuid `protobuf:"bytes,1,opt,name=device_uuid,json=deviceUuid,proto3" json:"device_uuid,omitempty"`
288 // Location of the configuration file, authentication (user/pass) if any should be in the url string
289 // The config_url would contain the protocol, credentials, the IP address/DNS of the server and the path of the file
290 // e.g. sftp://download_user:download_pass@192.168.0.1:22/OLT-configs/config-v1.2.3.xml
291 ConfigUrl string `protobuf:"bytes,2,opt,name=config_url,json=configUrl,proto3" json:"config_url,omitempty"`
292 XXX_NoUnkeyedLiteral struct{} `json:"-"`
293 XXX_unrecognized []byte `json:"-"`
294 XXX_sizecache int32 `json:"-"`
295}
296
297func (m *ConfigRequest) Reset() { *m = ConfigRequest{} }
298func (m *ConfigRequest) String() string { return proto.CompactTextString(m) }
299func (*ConfigRequest) ProtoMessage() {}
300func (*ConfigRequest) Descriptor() ([]byte, []int) {
301 return fileDescriptor_000929e4bec891d7, []int{3}
302}
303
304func (m *ConfigRequest) XXX_Unmarshal(b []byte) error {
305 return xxx_messageInfo_ConfigRequest.Unmarshal(m, b)
306}
307func (m *ConfigRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
308 return xxx_messageInfo_ConfigRequest.Marshal(b, m, deterministic)
309}
310func (m *ConfigRequest) XXX_Merge(src proto.Message) {
311 xxx_messageInfo_ConfigRequest.Merge(m, src)
312}
313func (m *ConfigRequest) XXX_Size() int {
314 return xxx_messageInfo_ConfigRequest.Size(m)
315}
316func (m *ConfigRequest) XXX_DiscardUnknown() {
317 xxx_messageInfo_ConfigRequest.DiscardUnknown(m)
318}
319
320var xxx_messageInfo_ConfigRequest proto.InternalMessageInfo
321
322func (m *ConfigRequest) GetDeviceUuid() *Uuid {
323 if m != nil {
324 return m.DeviceUuid
325 }
326 return nil
327}
328
329func (m *ConfigRequest) GetConfigUrl() string {
330 if m != nil {
331 return m.ConfigUrl
332 }
333 return ""
334}
335
336type ConfigResponse struct {
amit.ghoshae473032021-01-10 11:59:10 +0100337 Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=dmi.Status" json:"status,omitempty"`
338 Reason ConfigResponse_Reason `protobuf:"varint,2,opt,name=reason,proto3,enum=dmi.ConfigResponse_Reason" json:"reason,omitempty"`
amit.ghosh8ab1e6e2021-02-23 07:40:17 +0100339 ReasonDetail string `protobuf:"bytes,3,opt,name=reason_detail,json=reasonDetail,proto3" json:"reason_detail,omitempty"`
amit.ghoshae473032021-01-10 11:59:10 +0100340 XXX_NoUnkeyedLiteral struct{} `json:"-"`
341 XXX_unrecognized []byte `json:"-"`
342 XXX_sizecache int32 `json:"-"`
amit.ghoshed23db02020-11-18 10:26:36 +0100343}
344
345func (m *ConfigResponse) Reset() { *m = ConfigResponse{} }
346func (m *ConfigResponse) String() string { return proto.CompactTextString(m) }
347func (*ConfigResponse) ProtoMessage() {}
348func (*ConfigResponse) Descriptor() ([]byte, []int) {
349 return fileDescriptor_000929e4bec891d7, []int{4}
350}
351
352func (m *ConfigResponse) XXX_Unmarshal(b []byte) error {
353 return xxx_messageInfo_ConfigResponse.Unmarshal(m, b)
354}
355func (m *ConfigResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
356 return xxx_messageInfo_ConfigResponse.Marshal(b, m, deterministic)
357}
358func (m *ConfigResponse) XXX_Merge(src proto.Message) {
359 xxx_messageInfo_ConfigResponse.Merge(m, src)
360}
361func (m *ConfigResponse) XXX_Size() int {
362 return xxx_messageInfo_ConfigResponse.Size(m)
363}
364func (m *ConfigResponse) XXX_DiscardUnknown() {
365 xxx_messageInfo_ConfigResponse.DiscardUnknown(m)
366}
367
368var xxx_messageInfo_ConfigResponse proto.InternalMessageInfo
369
370func (m *ConfigResponse) GetStatus() Status {
371 if m != nil {
372 return m.Status
373 }
374 return Status_UNDEFINED_STATUS
375}
376
amit.ghoshae473032021-01-10 11:59:10 +0100377func (m *ConfigResponse) GetReason() ConfigResponse_Reason {
amit.ghoshed23db02020-11-18 10:26:36 +0100378 if m != nil {
379 return m.Reason
380 }
amit.ghoshae473032021-01-10 11:59:10 +0100381 return ConfigResponse_UNDEFINED_REASON
amit.ghoshed23db02020-11-18 10:26:36 +0100382}
383
amit.ghosh8ab1e6e2021-02-23 07:40:17 +0100384func (m *ConfigResponse) GetReasonDetail() string {
385 if m != nil {
386 return m.ReasonDetail
387 }
388 return ""
389}
390
amit.ghosh2c938b82021-01-14 11:34:03 +0100391type StartupConfigInfoRequest struct {
392 DeviceUuid *Uuid `protobuf:"bytes,1,opt,name=device_uuid,json=deviceUuid,proto3" json:"device_uuid,omitempty"`
393 XXX_NoUnkeyedLiteral struct{} `json:"-"`
394 XXX_unrecognized []byte `json:"-"`
395 XXX_sizecache int32 `json:"-"`
396}
397
398func (m *StartupConfigInfoRequest) Reset() { *m = StartupConfigInfoRequest{} }
399func (m *StartupConfigInfoRequest) String() string { return proto.CompactTextString(m) }
400func (*StartupConfigInfoRequest) ProtoMessage() {}
401func (*StartupConfigInfoRequest) Descriptor() ([]byte, []int) {
402 return fileDescriptor_000929e4bec891d7, []int{5}
403}
404
405func (m *StartupConfigInfoRequest) XXX_Unmarshal(b []byte) error {
406 return xxx_messageInfo_StartupConfigInfoRequest.Unmarshal(m, b)
407}
408func (m *StartupConfigInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
409 return xxx_messageInfo_StartupConfigInfoRequest.Marshal(b, m, deterministic)
410}
411func (m *StartupConfigInfoRequest) XXX_Merge(src proto.Message) {
412 xxx_messageInfo_StartupConfigInfoRequest.Merge(m, src)
413}
414func (m *StartupConfigInfoRequest) XXX_Size() int {
415 return xxx_messageInfo_StartupConfigInfoRequest.Size(m)
416}
417func (m *StartupConfigInfoRequest) XXX_DiscardUnknown() {
418 xxx_messageInfo_StartupConfigInfoRequest.DiscardUnknown(m)
419}
420
421var xxx_messageInfo_StartupConfigInfoRequest proto.InternalMessageInfo
422
423func (m *StartupConfigInfoRequest) GetDeviceUuid() *Uuid {
424 if m != nil {
425 return m.DeviceUuid
426 }
427 return nil
428}
429
430type StartupConfigInfoResponse struct {
431 Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=dmi.Status" json:"status,omitempty"`
432 Reason StartupConfigInfoResponse_Reason `protobuf:"varint,2,opt,name=reason,proto3,enum=dmi.StartupConfigInfoResponse_Reason" json:"reason,omitempty"`
433 // The config_url is an optional attribute, the device manager could return the location from
434 // where the config was downloaded. Also it would not be present/empty for a fresh device into which the
435 // startup config would have been installed in the factory.
436 ConfigUrl string `protobuf:"bytes,3,opt,name=config_url,json=configUrl,proto3" json:"config_url,omitempty"`
437 // The version of the startup configuration. It is recommended to use semVer, but the DM implementations
438 // and operators could choose any other format as well.
439 Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`
amit.ghosh8ab1e6e2021-02-23 07:40:17 +0100440 ReasonDetail string `protobuf:"bytes,5,opt,name=reason_detail,json=reasonDetail,proto3" json:"reason_detail,omitempty"`
amit.ghosh2c938b82021-01-14 11:34:03 +0100441 XXX_NoUnkeyedLiteral struct{} `json:"-"`
442 XXX_unrecognized []byte `json:"-"`
443 XXX_sizecache int32 `json:"-"`
444}
445
446func (m *StartupConfigInfoResponse) Reset() { *m = StartupConfigInfoResponse{} }
447func (m *StartupConfigInfoResponse) String() string { return proto.CompactTextString(m) }
448func (*StartupConfigInfoResponse) ProtoMessage() {}
449func (*StartupConfigInfoResponse) Descriptor() ([]byte, []int) {
450 return fileDescriptor_000929e4bec891d7, []int{6}
451}
452
453func (m *StartupConfigInfoResponse) XXX_Unmarshal(b []byte) error {
454 return xxx_messageInfo_StartupConfigInfoResponse.Unmarshal(m, b)
455}
456func (m *StartupConfigInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
457 return xxx_messageInfo_StartupConfigInfoResponse.Marshal(b, m, deterministic)
458}
459func (m *StartupConfigInfoResponse) XXX_Merge(src proto.Message) {
460 xxx_messageInfo_StartupConfigInfoResponse.Merge(m, src)
461}
462func (m *StartupConfigInfoResponse) XXX_Size() int {
463 return xxx_messageInfo_StartupConfigInfoResponse.Size(m)
464}
465func (m *StartupConfigInfoResponse) XXX_DiscardUnknown() {
466 xxx_messageInfo_StartupConfigInfoResponse.DiscardUnknown(m)
467}
468
469var xxx_messageInfo_StartupConfigInfoResponse proto.InternalMessageInfo
470
471func (m *StartupConfigInfoResponse) GetStatus() Status {
472 if m != nil {
473 return m.Status
474 }
475 return Status_UNDEFINED_STATUS
476}
477
478func (m *StartupConfigInfoResponse) GetReason() StartupConfigInfoResponse_Reason {
479 if m != nil {
480 return m.Reason
481 }
482 return StartupConfigInfoResponse_UNDEFINED_REASON
483}
484
485func (m *StartupConfigInfoResponse) GetConfigUrl() string {
486 if m != nil {
487 return m.ConfigUrl
488 }
489 return ""
490}
491
492func (m *StartupConfigInfoResponse) GetVersion() string {
493 if m != nil {
494 return m.Version
495 }
496 return ""
497}
498
amit.ghosh8ab1e6e2021-02-23 07:40:17 +0100499func (m *StartupConfigInfoResponse) GetReasonDetail() string {
500 if m != nil {
501 return m.ReasonDetail
502 }
503 return ""
504}
505
Amit Ghosh09f28362020-06-12 21:52:19 +0100506func init() {
amit.ghoshae473032021-01-10 11:59:10 +0100507 proto.RegisterEnum("dmi.GetSoftwareVersionInformationResponse_Reason", GetSoftwareVersionInformationResponse_Reason_name, GetSoftwareVersionInformationResponse_Reason_value)
508 proto.RegisterEnum("dmi.ConfigResponse_Reason", ConfigResponse_Reason_name, ConfigResponse_Reason_value)
amit.ghosh2c938b82021-01-14 11:34:03 +0100509 proto.RegisterEnum("dmi.StartupConfigInfoResponse_Reason", StartupConfigInfoResponse_Reason_name, StartupConfigInfoResponse_Reason_value)
Amit Ghosh09f28362020-06-12 21:52:19 +0100510 proto.RegisterType((*SoftwareVersionInformation)(nil), "dmi.SoftwareVersionInformation")
aghoshc301dcd2020-09-03 16:55:34 +0100511 proto.RegisterType((*GetSoftwareVersionInformationResponse)(nil), "dmi.GetSoftwareVersionInformationResponse")
Amit Ghosh09f28362020-06-12 21:52:19 +0100512 proto.RegisterType((*DownloadImageRequest)(nil), "dmi.DownloadImageRequest")
amit.ghoshed23db02020-11-18 10:26:36 +0100513 proto.RegisterType((*ConfigRequest)(nil), "dmi.ConfigRequest")
514 proto.RegisterType((*ConfigResponse)(nil), "dmi.ConfigResponse")
amit.ghosh2c938b82021-01-14 11:34:03 +0100515 proto.RegisterType((*StartupConfigInfoRequest)(nil), "dmi.StartupConfigInfoRequest")
516 proto.RegisterType((*StartupConfigInfoResponse)(nil), "dmi.StartupConfigInfoResponse")
Amit Ghosh09f28362020-06-12 21:52:19 +0100517}
518
519func init() { proto.RegisterFile("dmi/sw_management_service.proto", fileDescriptor_000929e4bec891d7) }
520
521var fileDescriptor_000929e4bec891d7 = []byte{
amit.ghosh8ab1e6e2021-02-23 07:40:17 +0100522 // 804 bytes of a gzipped FileDescriptorProto
523 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xed, 0x6e, 0xe3, 0x44,
524 0x14, 0xc5, 0x71, 0x37, 0x28, 0x37, 0xdb, 0xd6, 0x3b, 0x74, 0x51, 0x1a, 0x54, 0x5a, 0xbc, 0x5a,
525 0xa9, 0x5a, 0x69, 0x93, 0x25, 0xdd, 0x3f, 0xb0, 0x80, 0xe4, 0x8d, 0xdd, 0xd4, 0xa2, 0x38, 0xcb,
526 0xb8, 0x29, 0x62, 0x85, 0x18, 0x4d, 0xe3, 0x49, 0x76, 0xa4, 0xda, 0x13, 0xec, 0x71, 0x0a, 0x2f,
527 0xc2, 0x73, 0xf0, 0x02, 0xfc, 0xe0, 0x05, 0x90, 0x78, 0x23, 0xe4, 0x19, 0x87, 0x90, 0x2f, 0xb4,
528 0xad, 0xd0, 0xfe, 0xb3, 0xef, 0xdc, 0x73, 0x66, 0xe6, 0x9e, 0x7b, 0xcf, 0xc0, 0x61, 0x14, 0xf3,
529 0x76, 0x76, 0x43, 0x62, 0x9a, 0xd0, 0x31, 0x8b, 0x59, 0x22, 0x49, 0xc6, 0xd2, 0x29, 0x1f, 0xb2,
530 0xd6, 0x24, 0x15, 0x52, 0x20, 0x33, 0x8a, 0x79, 0xf3, 0x41, 0x91, 0x35, 0x14, 0x71, 0x2c, 0x92,
531 0x4c, 0xc7, 0x9b, 0xf7, 0x8b, 0xd0, 0x9b, 0x9b, 0xf2, 0x0f, 0x95, 0x34, 0x3c, 0xa6, 0xe3, 0x12,
532 0x69, 0xff, 0x6a, 0x40, 0x33, 0x14, 0x23, 0x79, 0x43, 0x53, 0x76, 0xc9, 0xd2, 0x8c, 0x8b, 0xc4,
533 0x4f, 0x46, 0x22, 0x8d, 0xa9, 0xe4, 0x22, 0x41, 0x9f, 0xc3, 0x2e, 0x1d, 0x4a, 0x3e, 0x65, 0x64,
534 0xaa, 0x17, 0xb3, 0x86, 0x71, 0x64, 0x1e, 0xd7, 0x3b, 0x0f, 0x5a, 0x51, 0xcc, 0x5b, 0x7e, 0xc1,
535 0x54, 0xc2, 0xf0, 0x8e, 0xce, 0x2c, 0x7f, 0x33, 0xf4, 0x05, 0x58, 0x99, 0xa4, 0x49, 0x74, 0xf5,
536 0xcb, 0x1c, 0x5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 0x2e, 0xdf, 0xe4, 0x57,
570 0xad, 0xa1, 0x88, 0xdb, 0x62, 0xc2, 0x92, 0xa1, 0x48, 0xa3, 0xb6, 0x1e, 0x99, 0xa7, 0xf3, 0x07,
571 0xfd, 0x29, 0x4f, 0x24, 0x4b, 0x47, 0x74, 0xc8, 0xda, 0xd3, 0x93, 0xf6, 0x58, 0xb4, 0xa3, 0x98,
572 0x5f, 0x55, 0xd5, 0x1b, 0x7d, 0xf2, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdd, 0xa9, 0x07, 0xea,
573 0x00, 0x08, 0x00, 0x00,
Amit Ghosh09f28362020-06-12 21:52:19 +0100574}
575
576// Reference imports to suppress errors if they are not otherwise used.
577var _ context.Context
578var _ grpc.ClientConn
579
580// This is a compile-time assertion to ensure that this generated file
581// is compatible with the grpc package it is being compiled against.
582const _ = grpc.SupportPackageIsVersion4
583
584// NativeSoftwareManagementServiceClient is the client API for NativeSoftwareManagementService service.
585//
586// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
587type NativeSoftwareManagementServiceClient interface {
588 // Get the software version information of the Active and Standby images
aghoshc301dcd2020-09-03 16:55:34 +0100589 GetSoftwareVersion(ctx context.Context, in *HardwareID, opts ...grpc.CallOption) (*GetSoftwareVersionInformationResponse, error)
Amit Ghosh09f28362020-06-12 21:52:19 +0100590 // Downloads and installs the image in the standby partition, returns the status/progress of the Install
591 DownloadImage(ctx context.Context, in *DownloadImageRequest, opts ...grpc.CallOption) (NativeSoftwareManagementService_DownloadImageClient, error)
592 // Activates and runs the OLT with the image in the standby partition. If things are fine this image will
593 // henceforth be marked as the Active Partition. The old working image would remain on the Standby partition.
594 // Any possibly required (sub-)steps like "commit" are left to the "Device Manager"
595 ActivateImage(ctx context.Context, in *HardwareID, opts ...grpc.CallOption) (NativeSoftwareManagementService_ActivateImageClient, error)
596 // Marks the image in the Standby as Active and reboots the device, so that it boots from that image which was in the standby.
aghoshc301dcd2020-09-03 16:55:34 +0100597 // This API is to be used if operator wants to go back to the previous software
Amit Ghosh09f28362020-06-12 21:52:19 +0100598 RevertToStandbyImage(ctx context.Context, in *HardwareID, opts ...grpc.CallOption) (NativeSoftwareManagementService_RevertToStandbyImageClient, error)
amit.ghoshed23db02020-11-18 10:26:36 +0100599 // This API can be used to let the devices pickup their properitary configuration which they need at startup.
600 UpdateStartupConfiguration(ctx context.Context, in *ConfigRequest, opts ...grpc.CallOption) (NativeSoftwareManagementService_UpdateStartupConfigurationClient, error)
amit.ghosh2c938b82021-01-14 11:34:03 +0100601 // This API can be used to retrieve information about the current startup configuration that a device is using
602 GetStartupConfigurationInfo(ctx context.Context, in *StartupConfigInfoRequest, opts ...grpc.CallOption) (*StartupConfigInfoResponse, error)
Amit Ghosh09f28362020-06-12 21:52:19 +0100603}
604
605type nativeSoftwareManagementServiceClient struct {
606 cc *grpc.ClientConn
607}
608
609func NewNativeSoftwareManagementServiceClient(cc *grpc.ClientConn) NativeSoftwareManagementServiceClient {
610 return &nativeSoftwareManagementServiceClient{cc}
611}
612
aghoshc301dcd2020-09-03 16:55:34 +0100613func (c *nativeSoftwareManagementServiceClient) GetSoftwareVersion(ctx context.Context, in *HardwareID, opts ...grpc.CallOption) (*GetSoftwareVersionInformationResponse, error) {
614 out := new(GetSoftwareVersionInformationResponse)
Amit Ghosh09f28362020-06-12 21:52:19 +0100615 err := c.cc.Invoke(ctx, "/dmi.NativeSoftwareManagementService/GetSoftwareVersion", in, out, opts...)
616 if err != nil {
617 return nil, err
618 }
619 return out, nil
620}
621
622func (c *nativeSoftwareManagementServiceClient) DownloadImage(ctx context.Context, in *DownloadImageRequest, opts ...grpc.CallOption) (NativeSoftwareManagementService_DownloadImageClient, error) {
623 stream, err := c.cc.NewStream(ctx, &_NativeSoftwareManagementService_serviceDesc.Streams[0], "/dmi.NativeSoftwareManagementService/DownloadImage", opts...)
624 if err != nil {
625 return nil, err
626 }
627 x := &nativeSoftwareManagementServiceDownloadImageClient{stream}
628 if err := x.ClientStream.SendMsg(in); err != nil {
629 return nil, err
630 }
631 if err := x.ClientStream.CloseSend(); err != nil {
632 return nil, err
633 }
634 return x, nil
635}
636
637type NativeSoftwareManagementService_DownloadImageClient interface {
638 Recv() (*ImageStatus, error)
639 grpc.ClientStream
640}
641
642type nativeSoftwareManagementServiceDownloadImageClient struct {
643 grpc.ClientStream
644}
645
646func (x *nativeSoftwareManagementServiceDownloadImageClient) Recv() (*ImageStatus, error) {
647 m := new(ImageStatus)
648 if err := x.ClientStream.RecvMsg(m); err != nil {
649 return nil, err
650 }
651 return m, nil
652}
653
654func (c *nativeSoftwareManagementServiceClient) ActivateImage(ctx context.Context, in *HardwareID, opts ...grpc.CallOption) (NativeSoftwareManagementService_ActivateImageClient, error) {
655 stream, err := c.cc.NewStream(ctx, &_NativeSoftwareManagementService_serviceDesc.Streams[1], "/dmi.NativeSoftwareManagementService/ActivateImage", opts...)
656 if err != nil {
657 return nil, err
658 }
659 x := &nativeSoftwareManagementServiceActivateImageClient{stream}
660 if err := x.ClientStream.SendMsg(in); err != nil {
661 return nil, err
662 }
663 if err := x.ClientStream.CloseSend(); err != nil {
664 return nil, err
665 }
666 return x, nil
667}
668
669type NativeSoftwareManagementService_ActivateImageClient interface {
670 Recv() (*ImageStatus, error)
671 grpc.ClientStream
672}
673
674type nativeSoftwareManagementServiceActivateImageClient struct {
675 grpc.ClientStream
676}
677
678func (x *nativeSoftwareManagementServiceActivateImageClient) Recv() (*ImageStatus, error) {
679 m := new(ImageStatus)
680 if err := x.ClientStream.RecvMsg(m); err != nil {
681 return nil, err
682 }
683 return m, nil
684}
685
686func (c *nativeSoftwareManagementServiceClient) RevertToStandbyImage(ctx context.Context, in *HardwareID, opts ...grpc.CallOption) (NativeSoftwareManagementService_RevertToStandbyImageClient, error) {
687 stream, err := c.cc.NewStream(ctx, &_NativeSoftwareManagementService_serviceDesc.Streams[2], "/dmi.NativeSoftwareManagementService/RevertToStandbyImage", opts...)
688 if err != nil {
689 return nil, err
690 }
691 x := &nativeSoftwareManagementServiceRevertToStandbyImageClient{stream}
692 if err := x.ClientStream.SendMsg(in); err != nil {
693 return nil, err
694 }
695 if err := x.ClientStream.CloseSend(); err != nil {
696 return nil, err
697 }
698 return x, nil
699}
700
701type NativeSoftwareManagementService_RevertToStandbyImageClient interface {
702 Recv() (*ImageStatus, error)
703 grpc.ClientStream
704}
705
706type nativeSoftwareManagementServiceRevertToStandbyImageClient struct {
707 grpc.ClientStream
708}
709
710func (x *nativeSoftwareManagementServiceRevertToStandbyImageClient) Recv() (*ImageStatus, error) {
711 m := new(ImageStatus)
712 if err := x.ClientStream.RecvMsg(m); err != nil {
713 return nil, err
714 }
715 return m, nil
716}
717
amit.ghoshed23db02020-11-18 10:26:36 +0100718func (c *nativeSoftwareManagementServiceClient) UpdateStartupConfiguration(ctx context.Context, in *ConfigRequest, opts ...grpc.CallOption) (NativeSoftwareManagementService_UpdateStartupConfigurationClient, error) {
719 stream, err := c.cc.NewStream(ctx, &_NativeSoftwareManagementService_serviceDesc.Streams[3], "/dmi.NativeSoftwareManagementService/UpdateStartupConfiguration", opts...)
720 if err != nil {
721 return nil, err
722 }
723 x := &nativeSoftwareManagementServiceUpdateStartupConfigurationClient{stream}
724 if err := x.ClientStream.SendMsg(in); err != nil {
725 return nil, err
726 }
727 if err := x.ClientStream.CloseSend(); err != nil {
728 return nil, err
729 }
730 return x, nil
731}
732
733type NativeSoftwareManagementService_UpdateStartupConfigurationClient interface {
734 Recv() (*ConfigResponse, error)
735 grpc.ClientStream
736}
737
738type nativeSoftwareManagementServiceUpdateStartupConfigurationClient struct {
739 grpc.ClientStream
740}
741
742func (x *nativeSoftwareManagementServiceUpdateStartupConfigurationClient) Recv() (*ConfigResponse, error) {
743 m := new(ConfigResponse)
744 if err := x.ClientStream.RecvMsg(m); err != nil {
745 return nil, err
746 }
747 return m, nil
748}
749
amit.ghosh2c938b82021-01-14 11:34:03 +0100750func (c *nativeSoftwareManagementServiceClient) GetStartupConfigurationInfo(ctx context.Context, in *StartupConfigInfoRequest, opts ...grpc.CallOption) (*StartupConfigInfoResponse, error) {
751 out := new(StartupConfigInfoResponse)
752 err := c.cc.Invoke(ctx, "/dmi.NativeSoftwareManagementService/GetStartupConfigurationInfo", in, out, opts...)
753 if err != nil {
754 return nil, err
755 }
756 return out, nil
757}
758
Amit Ghosh09f28362020-06-12 21:52:19 +0100759// NativeSoftwareManagementServiceServer is the server API for NativeSoftwareManagementService service.
760type NativeSoftwareManagementServiceServer interface {
761 // Get the software version information of the Active and Standby images
aghoshc301dcd2020-09-03 16:55:34 +0100762 GetSoftwareVersion(context.Context, *HardwareID) (*GetSoftwareVersionInformationResponse, error)
Amit Ghosh09f28362020-06-12 21:52:19 +0100763 // Downloads and installs the image in the standby partition, returns the status/progress of the Install
764 DownloadImage(*DownloadImageRequest, NativeSoftwareManagementService_DownloadImageServer) error
765 // Activates and runs the OLT with the image in the standby partition. If things are fine this image will
766 // henceforth be marked as the Active Partition. The old working image would remain on the Standby partition.
767 // Any possibly required (sub-)steps like "commit" are left to the "Device Manager"
768 ActivateImage(*HardwareID, NativeSoftwareManagementService_ActivateImageServer) error
769 // Marks the image in the Standby as Active and reboots the device, so that it boots from that image which was in the standby.
aghoshc301dcd2020-09-03 16:55:34 +0100770 // This API is to be used if operator wants to go back to the previous software
Amit Ghosh09f28362020-06-12 21:52:19 +0100771 RevertToStandbyImage(*HardwareID, NativeSoftwareManagementService_RevertToStandbyImageServer) error
amit.ghoshed23db02020-11-18 10:26:36 +0100772 // This API can be used to let the devices pickup their properitary configuration which they need at startup.
773 UpdateStartupConfiguration(*ConfigRequest, NativeSoftwareManagementService_UpdateStartupConfigurationServer) error
amit.ghosh2c938b82021-01-14 11:34:03 +0100774 // This API can be used to retrieve information about the current startup configuration that a device is using
775 GetStartupConfigurationInfo(context.Context, *StartupConfigInfoRequest) (*StartupConfigInfoResponse, error)
Amit Ghosh09f28362020-06-12 21:52:19 +0100776}
777
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200778// UnimplementedNativeSoftwareManagementServiceServer can be embedded to have forward compatible implementations.
779type UnimplementedNativeSoftwareManagementServiceServer struct {
780}
781
782func (*UnimplementedNativeSoftwareManagementServiceServer) GetSoftwareVersion(ctx context.Context, req *HardwareID) (*GetSoftwareVersionInformationResponse, error) {
783 return nil, status.Errorf(codes.Unimplemented, "method GetSoftwareVersion not implemented")
784}
785func (*UnimplementedNativeSoftwareManagementServiceServer) DownloadImage(req *DownloadImageRequest, srv NativeSoftwareManagementService_DownloadImageServer) error {
786 return status.Errorf(codes.Unimplemented, "method DownloadImage not implemented")
787}
788func (*UnimplementedNativeSoftwareManagementServiceServer) ActivateImage(req *HardwareID, srv NativeSoftwareManagementService_ActivateImageServer) error {
789 return status.Errorf(codes.Unimplemented, "method ActivateImage not implemented")
790}
791func (*UnimplementedNativeSoftwareManagementServiceServer) RevertToStandbyImage(req *HardwareID, srv NativeSoftwareManagementService_RevertToStandbyImageServer) error {
792 return status.Errorf(codes.Unimplemented, "method RevertToStandbyImage not implemented")
793}
794func (*UnimplementedNativeSoftwareManagementServiceServer) UpdateStartupConfiguration(req *ConfigRequest, srv NativeSoftwareManagementService_UpdateStartupConfigurationServer) error {
795 return status.Errorf(codes.Unimplemented, "method UpdateStartupConfiguration not implemented")
796}
797func (*UnimplementedNativeSoftwareManagementServiceServer) GetStartupConfigurationInfo(ctx context.Context, req *StartupConfigInfoRequest) (*StartupConfigInfoResponse, error) {
798 return nil, status.Errorf(codes.Unimplemented, "method GetStartupConfigurationInfo not implemented")
799}
800
Amit Ghosh09f28362020-06-12 21:52:19 +0100801func RegisterNativeSoftwareManagementServiceServer(s *grpc.Server, srv NativeSoftwareManagementServiceServer) {
802 s.RegisterService(&_NativeSoftwareManagementService_serviceDesc, srv)
803}
804
805func _NativeSoftwareManagementService_GetSoftwareVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
806 in := new(HardwareID)
807 if err := dec(in); err != nil {
808 return nil, err
809 }
810 if interceptor == nil {
811 return srv.(NativeSoftwareManagementServiceServer).GetSoftwareVersion(ctx, in)
812 }
813 info := &grpc.UnaryServerInfo{
814 Server: srv,
815 FullMethod: "/dmi.NativeSoftwareManagementService/GetSoftwareVersion",
816 }
817 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
818 return srv.(NativeSoftwareManagementServiceServer).GetSoftwareVersion(ctx, req.(*HardwareID))
819 }
820 return interceptor(ctx, in, info, handler)
821}
822
823func _NativeSoftwareManagementService_DownloadImage_Handler(srv interface{}, stream grpc.ServerStream) error {
824 m := new(DownloadImageRequest)
825 if err := stream.RecvMsg(m); err != nil {
826 return err
827 }
828 return srv.(NativeSoftwareManagementServiceServer).DownloadImage(m, &nativeSoftwareManagementServiceDownloadImageServer{stream})
829}
830
831type NativeSoftwareManagementService_DownloadImageServer interface {
832 Send(*ImageStatus) error
833 grpc.ServerStream
834}
835
836type nativeSoftwareManagementServiceDownloadImageServer struct {
837 grpc.ServerStream
838}
839
840func (x *nativeSoftwareManagementServiceDownloadImageServer) Send(m *ImageStatus) error {
841 return x.ServerStream.SendMsg(m)
842}
843
844func _NativeSoftwareManagementService_ActivateImage_Handler(srv interface{}, stream grpc.ServerStream) error {
845 m := new(HardwareID)
846 if err := stream.RecvMsg(m); err != nil {
847 return err
848 }
849 return srv.(NativeSoftwareManagementServiceServer).ActivateImage(m, &nativeSoftwareManagementServiceActivateImageServer{stream})
850}
851
852type NativeSoftwareManagementService_ActivateImageServer interface {
853 Send(*ImageStatus) error
854 grpc.ServerStream
855}
856
857type nativeSoftwareManagementServiceActivateImageServer struct {
858 grpc.ServerStream
859}
860
861func (x *nativeSoftwareManagementServiceActivateImageServer) Send(m *ImageStatus) error {
862 return x.ServerStream.SendMsg(m)
863}
864
865func _NativeSoftwareManagementService_RevertToStandbyImage_Handler(srv interface{}, stream grpc.ServerStream) error {
866 m := new(HardwareID)
867 if err := stream.RecvMsg(m); err != nil {
868 return err
869 }
870 return srv.(NativeSoftwareManagementServiceServer).RevertToStandbyImage(m, &nativeSoftwareManagementServiceRevertToStandbyImageServer{stream})
871}
872
873type NativeSoftwareManagementService_RevertToStandbyImageServer interface {
874 Send(*ImageStatus) error
875 grpc.ServerStream
876}
877
878type nativeSoftwareManagementServiceRevertToStandbyImageServer struct {
879 grpc.ServerStream
880}
881
882func (x *nativeSoftwareManagementServiceRevertToStandbyImageServer) Send(m *ImageStatus) error {
883 return x.ServerStream.SendMsg(m)
884}
885
amit.ghoshed23db02020-11-18 10:26:36 +0100886func _NativeSoftwareManagementService_UpdateStartupConfiguration_Handler(srv interface{}, stream grpc.ServerStream) error {
887 m := new(ConfigRequest)
888 if err := stream.RecvMsg(m); err != nil {
889 return err
890 }
891 return srv.(NativeSoftwareManagementServiceServer).UpdateStartupConfiguration(m, &nativeSoftwareManagementServiceUpdateStartupConfigurationServer{stream})
892}
893
894type NativeSoftwareManagementService_UpdateStartupConfigurationServer interface {
895 Send(*ConfigResponse) error
896 grpc.ServerStream
897}
898
899type nativeSoftwareManagementServiceUpdateStartupConfigurationServer struct {
900 grpc.ServerStream
901}
902
903func (x *nativeSoftwareManagementServiceUpdateStartupConfigurationServer) Send(m *ConfigResponse) error {
904 return x.ServerStream.SendMsg(m)
905}
906
amit.ghosh2c938b82021-01-14 11:34:03 +0100907func _NativeSoftwareManagementService_GetStartupConfigurationInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
908 in := new(StartupConfigInfoRequest)
909 if err := dec(in); err != nil {
910 return nil, err
911 }
912 if interceptor == nil {
913 return srv.(NativeSoftwareManagementServiceServer).GetStartupConfigurationInfo(ctx, in)
914 }
915 info := &grpc.UnaryServerInfo{
916 Server: srv,
917 FullMethod: "/dmi.NativeSoftwareManagementService/GetStartupConfigurationInfo",
918 }
919 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
920 return srv.(NativeSoftwareManagementServiceServer).GetStartupConfigurationInfo(ctx, req.(*StartupConfigInfoRequest))
921 }
922 return interceptor(ctx, in, info, handler)
923}
924
Amit Ghosh09f28362020-06-12 21:52:19 +0100925var _NativeSoftwareManagementService_serviceDesc = grpc.ServiceDesc{
926 ServiceName: "dmi.NativeSoftwareManagementService",
927 HandlerType: (*NativeSoftwareManagementServiceServer)(nil),
928 Methods: []grpc.MethodDesc{
929 {
930 MethodName: "GetSoftwareVersion",
931 Handler: _NativeSoftwareManagementService_GetSoftwareVersion_Handler,
932 },
amit.ghosh2c938b82021-01-14 11:34:03 +0100933 {
934 MethodName: "GetStartupConfigurationInfo",
935 Handler: _NativeSoftwareManagementService_GetStartupConfigurationInfo_Handler,
936 },
Amit Ghosh09f28362020-06-12 21:52:19 +0100937 },
938 Streams: []grpc.StreamDesc{
939 {
940 StreamName: "DownloadImage",
941 Handler: _NativeSoftwareManagementService_DownloadImage_Handler,
942 ServerStreams: true,
943 },
944 {
945 StreamName: "ActivateImage",
946 Handler: _NativeSoftwareManagementService_ActivateImage_Handler,
947 ServerStreams: true,
948 },
949 {
950 StreamName: "RevertToStandbyImage",
951 Handler: _NativeSoftwareManagementService_RevertToStandbyImage_Handler,
952 ServerStreams: true,
953 },
amit.ghoshed23db02020-11-18 10:26:36 +0100954 {
955 StreamName: "UpdateStartupConfiguration",
956 Handler: _NativeSoftwareManagementService_UpdateStartupConfiguration_Handler,
957 ServerStreams: true,
958 },
Amit Ghosh09f28362020-06-12 21:52:19 +0100959 },
960 Metadata: "dmi/sw_management_service.proto",
961}