blob: 7dbb0893134ba80d57a07d7a55d8077c9f9649b9 [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"
11 math "math"
12)
13
14// Reference imports to suppress errors if they are not otherwise used.
15var _ = proto.Marshal
16var _ = fmt.Errorf
17var _ = math.Inf
18
19// This is a compile-time assertion to ensure that this generated file
20// is compatible with the proto package it is being compiled against.
21// A compilation error at this line likely means your copy of the
22// proto package needs to be updated.
23const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
24
amit.ghoshae473032021-01-10 11:59:10 +010025type GetSoftwareVersionInformationResponse_Reason int32
26
27const (
amit.ghoshbd2022e2021-02-22 05:58:53 +010028 GetSoftwareVersionInformationResponse_UNDEFINED_REASON GetSoftwareVersionInformationResponse_Reason = 0
29 GetSoftwareVersionInformationResponse_UNKNOWN_DEVICE GetSoftwareVersionInformationResponse_Reason = 1
30 GetSoftwareVersionInformationResponse_INTERNAL_ERROR GetSoftwareVersionInformationResponse_Reason = 2
31 GetSoftwareVersionInformationResponse_DEVICE_UNREACHABLE GetSoftwareVersionInformationResponse_Reason = 3
amit.ghoshae473032021-01-10 11:59:10 +010032)
33
34var GetSoftwareVersionInformationResponse_Reason_name = map[int32]string{
35 0: "UNDEFINED_REASON",
36 1: "UNKNOWN_DEVICE",
37 2: "INTERNAL_ERROR",
amit.ghoshbd2022e2021-02-22 05:58:53 +010038 3: "DEVICE_UNREACHABLE",
amit.ghoshae473032021-01-10 11:59:10 +010039}
40
41var GetSoftwareVersionInformationResponse_Reason_value = map[string]int32{
amit.ghoshbd2022e2021-02-22 05:58:53 +010042 "UNDEFINED_REASON": 0,
43 "UNKNOWN_DEVICE": 1,
44 "INTERNAL_ERROR": 2,
45 "DEVICE_UNREACHABLE": 3,
amit.ghoshae473032021-01-10 11:59:10 +010046}
47
48func (x GetSoftwareVersionInformationResponse_Reason) String() string {
49 return proto.EnumName(GetSoftwareVersionInformationResponse_Reason_name, int32(x))
50}
51
52func (GetSoftwareVersionInformationResponse_Reason) EnumDescriptor() ([]byte, []int) {
53 return fileDescriptor_000929e4bec891d7, []int{1, 0}
54}
55
56type ConfigResponse_Reason int32
57
58const (
59 ConfigResponse_UNDEFINED_REASON ConfigResponse_Reason = 0
60 ConfigResponse_UNKNOWN_DEVICE ConfigResponse_Reason = 1
61 ConfigResponse_INTERNAL_ERROR ConfigResponse_Reason = 2
62 ConfigResponse_ERROR_FETCHING_CONFIG ConfigResponse_Reason = 3
63 ConfigResponse_INVALID_CONFIG ConfigResponse_Reason = 4
64 ConfigResponse_OPERATION_ALREADY_IN_PROGRESS ConfigResponse_Reason = 5
amit.ghoshbd2022e2021-02-22 05:58:53 +010065 ConfigResponse_DEVICE_UNREACHABLE ConfigResponse_Reason = 6
amit.ghoshae473032021-01-10 11:59:10 +010066)
67
68var ConfigResponse_Reason_name = map[int32]string{
69 0: "UNDEFINED_REASON",
70 1: "UNKNOWN_DEVICE",
71 2: "INTERNAL_ERROR",
72 3: "ERROR_FETCHING_CONFIG",
73 4: "INVALID_CONFIG",
74 5: "OPERATION_ALREADY_IN_PROGRESS",
amit.ghoshbd2022e2021-02-22 05:58:53 +010075 6: "DEVICE_UNREACHABLE",
amit.ghoshae473032021-01-10 11:59:10 +010076}
77
78var ConfigResponse_Reason_value = map[string]int32{
79 "UNDEFINED_REASON": 0,
80 "UNKNOWN_DEVICE": 1,
81 "INTERNAL_ERROR": 2,
82 "ERROR_FETCHING_CONFIG": 3,
83 "INVALID_CONFIG": 4,
84 "OPERATION_ALREADY_IN_PROGRESS": 5,
amit.ghoshbd2022e2021-02-22 05:58:53 +010085 "DEVICE_UNREACHABLE": 6,
amit.ghoshae473032021-01-10 11:59:10 +010086}
87
88func (x ConfigResponse_Reason) String() string {
89 return proto.EnumName(ConfigResponse_Reason_name, int32(x))
90}
91
92func (ConfigResponse_Reason) EnumDescriptor() ([]byte, []int) {
93 return fileDescriptor_000929e4bec891d7, []int{4, 0}
94}
95
amit.ghosh2c938b82021-01-14 11:34:03 +010096type StartupConfigInfoResponse_Reason int32
97
98const (
amit.ghoshbd2022e2021-02-22 05:58:53 +010099 StartupConfigInfoResponse_UNDEFINED_REASON StartupConfigInfoResponse_Reason = 0
100 StartupConfigInfoResponse_UNKNOWN_DEVICE StartupConfigInfoResponse_Reason = 1
101 StartupConfigInfoResponse_INTERNAL_ERROR StartupConfigInfoResponse_Reason = 2
102 StartupConfigInfoResponse_DEVICE_UNREACHABLE StartupConfigInfoResponse_Reason = 3
amit.ghosh2c938b82021-01-14 11:34:03 +0100103)
104
105var StartupConfigInfoResponse_Reason_name = map[int32]string{
106 0: "UNDEFINED_REASON",
107 1: "UNKNOWN_DEVICE",
108 2: "INTERNAL_ERROR",
amit.ghoshbd2022e2021-02-22 05:58:53 +0100109 3: "DEVICE_UNREACHABLE",
amit.ghosh2c938b82021-01-14 11:34:03 +0100110}
111
112var StartupConfigInfoResponse_Reason_value = map[string]int32{
amit.ghoshbd2022e2021-02-22 05:58:53 +0100113 "UNDEFINED_REASON": 0,
114 "UNKNOWN_DEVICE": 1,
115 "INTERNAL_ERROR": 2,
116 "DEVICE_UNREACHABLE": 3,
amit.ghosh2c938b82021-01-14 11:34:03 +0100117}
118
119func (x StartupConfigInfoResponse_Reason) String() string {
120 return proto.EnumName(StartupConfigInfoResponse_Reason_name, int32(x))
121}
122
123func (StartupConfigInfoResponse_Reason) EnumDescriptor() ([]byte, []int) {
124 return fileDescriptor_000929e4bec891d7, []int{6, 0}
125}
126
Amit Ghosh09f28362020-06-12 21:52:19 +0100127type SoftwareVersionInformation struct {
128 ActiveVersions []*ImageVersion `protobuf:"bytes,1,rep,name=active_versions,json=activeVersions,proto3" json:"active_versions,omitempty"`
129 StandbyVersions []*ImageVersion `protobuf:"bytes,2,rep,name=standby_versions,json=standbyVersions,proto3" json:"standby_versions,omitempty"`
130 XXX_NoUnkeyedLiteral struct{} `json:"-"`
131 XXX_unrecognized []byte `json:"-"`
132 XXX_sizecache int32 `json:"-"`
133}
134
135func (m *SoftwareVersionInformation) Reset() { *m = SoftwareVersionInformation{} }
136func (m *SoftwareVersionInformation) String() string { return proto.CompactTextString(m) }
137func (*SoftwareVersionInformation) ProtoMessage() {}
138func (*SoftwareVersionInformation) Descriptor() ([]byte, []int) {
139 return fileDescriptor_000929e4bec891d7, []int{0}
140}
141
142func (m *SoftwareVersionInformation) XXX_Unmarshal(b []byte) error {
143 return xxx_messageInfo_SoftwareVersionInformation.Unmarshal(m, b)
144}
145func (m *SoftwareVersionInformation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
146 return xxx_messageInfo_SoftwareVersionInformation.Marshal(b, m, deterministic)
147}
148func (m *SoftwareVersionInformation) XXX_Merge(src proto.Message) {
149 xxx_messageInfo_SoftwareVersionInformation.Merge(m, src)
150}
151func (m *SoftwareVersionInformation) XXX_Size() int {
152 return xxx_messageInfo_SoftwareVersionInformation.Size(m)
153}
154func (m *SoftwareVersionInformation) XXX_DiscardUnknown() {
155 xxx_messageInfo_SoftwareVersionInformation.DiscardUnknown(m)
156}
157
158var xxx_messageInfo_SoftwareVersionInformation proto.InternalMessageInfo
159
160func (m *SoftwareVersionInformation) GetActiveVersions() []*ImageVersion {
161 if m != nil {
162 return m.ActiveVersions
163 }
164 return nil
165}
166
167func (m *SoftwareVersionInformation) GetStandbyVersions() []*ImageVersion {
168 if m != nil {
169 return m.StandbyVersions
170 }
171 return nil
172}
173
aghoshc301dcd2020-09-03 16:55:34 +0100174type GetSoftwareVersionInformationResponse struct {
amit.ghoshae473032021-01-10 11:59:10 +0100175 Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=dmi.Status" json:"status,omitempty"`
176 Reason GetSoftwareVersionInformationResponse_Reason `protobuf:"varint,2,opt,name=reason,proto3,enum=dmi.GetSoftwareVersionInformationResponse_Reason" json:"reason,omitempty"`
177 Info *SoftwareVersionInformation `protobuf:"bytes,3,opt,name=info,proto3" json:"info,omitempty"`
amit.ghosh8ab1e6e2021-02-23 07:40:17 +0100178 ReasonDetail string `protobuf:"bytes,4,opt,name=reason_detail,json=reasonDetail,proto3" json:"reason_detail,omitempty"`
amit.ghoshae473032021-01-10 11:59:10 +0100179 XXX_NoUnkeyedLiteral struct{} `json:"-"`
180 XXX_unrecognized []byte `json:"-"`
181 XXX_sizecache int32 `json:"-"`
aghoshc301dcd2020-09-03 16:55:34 +0100182}
183
184func (m *GetSoftwareVersionInformationResponse) Reset() { *m = GetSoftwareVersionInformationResponse{} }
185func (m *GetSoftwareVersionInformationResponse) String() string { return proto.CompactTextString(m) }
186func (*GetSoftwareVersionInformationResponse) ProtoMessage() {}
187func (*GetSoftwareVersionInformationResponse) Descriptor() ([]byte, []int) {
188 return fileDescriptor_000929e4bec891d7, []int{1}
189}
190
191func (m *GetSoftwareVersionInformationResponse) XXX_Unmarshal(b []byte) error {
192 return xxx_messageInfo_GetSoftwareVersionInformationResponse.Unmarshal(m, b)
193}
194func (m *GetSoftwareVersionInformationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
195 return xxx_messageInfo_GetSoftwareVersionInformationResponse.Marshal(b, m, deterministic)
196}
197func (m *GetSoftwareVersionInformationResponse) XXX_Merge(src proto.Message) {
198 xxx_messageInfo_GetSoftwareVersionInformationResponse.Merge(m, src)
199}
200func (m *GetSoftwareVersionInformationResponse) XXX_Size() int {
201 return xxx_messageInfo_GetSoftwareVersionInformationResponse.Size(m)
202}
203func (m *GetSoftwareVersionInformationResponse) XXX_DiscardUnknown() {
204 xxx_messageInfo_GetSoftwareVersionInformationResponse.DiscardUnknown(m)
205}
206
207var xxx_messageInfo_GetSoftwareVersionInformationResponse proto.InternalMessageInfo
208
209func (m *GetSoftwareVersionInformationResponse) GetStatus() Status {
210 if m != nil {
211 return m.Status
212 }
213 return Status_UNDEFINED_STATUS
214}
215
amit.ghoshae473032021-01-10 11:59:10 +0100216func (m *GetSoftwareVersionInformationResponse) GetReason() GetSoftwareVersionInformationResponse_Reason {
aghoshc301dcd2020-09-03 16:55:34 +0100217 if m != nil {
218 return m.Reason
219 }
amit.ghoshae473032021-01-10 11:59:10 +0100220 return GetSoftwareVersionInformationResponse_UNDEFINED_REASON
aghoshc301dcd2020-09-03 16:55:34 +0100221}
222
223func (m *GetSoftwareVersionInformationResponse) GetInfo() *SoftwareVersionInformation {
224 if m != nil {
225 return m.Info
226 }
227 return nil
228}
229
amit.ghosh8ab1e6e2021-02-23 07:40:17 +0100230func (m *GetSoftwareVersionInformationResponse) GetReasonDetail() string {
231 if m != nil {
232 return m.ReasonDetail
233 }
234 return ""
235}
236
Amit Ghosh09f28362020-06-12 21:52:19 +0100237type DownloadImageRequest struct {
238 DeviceUuid *Uuid `protobuf:"bytes,1,opt,name=device_uuid,json=deviceUuid,proto3" json:"device_uuid,omitempty"`
239 ImageInfo *ImageInformation `protobuf:"bytes,2,opt,name=image_info,json=imageInfo,proto3" json:"image_info,omitempty"`
240 XXX_NoUnkeyedLiteral struct{} `json:"-"`
241 XXX_unrecognized []byte `json:"-"`
242 XXX_sizecache int32 `json:"-"`
243}
244
245func (m *DownloadImageRequest) Reset() { *m = DownloadImageRequest{} }
246func (m *DownloadImageRequest) String() string { return proto.CompactTextString(m) }
247func (*DownloadImageRequest) ProtoMessage() {}
248func (*DownloadImageRequest) Descriptor() ([]byte, []int) {
aghoshc301dcd2020-09-03 16:55:34 +0100249 return fileDescriptor_000929e4bec891d7, []int{2}
Amit Ghosh09f28362020-06-12 21:52:19 +0100250}
251
252func (m *DownloadImageRequest) XXX_Unmarshal(b []byte) error {
253 return xxx_messageInfo_DownloadImageRequest.Unmarshal(m, b)
254}
255func (m *DownloadImageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
256 return xxx_messageInfo_DownloadImageRequest.Marshal(b, m, deterministic)
257}
258func (m *DownloadImageRequest) XXX_Merge(src proto.Message) {
259 xxx_messageInfo_DownloadImageRequest.Merge(m, src)
260}
261func (m *DownloadImageRequest) XXX_Size() int {
262 return xxx_messageInfo_DownloadImageRequest.Size(m)
263}
264func (m *DownloadImageRequest) XXX_DiscardUnknown() {
265 xxx_messageInfo_DownloadImageRequest.DiscardUnknown(m)
266}
267
268var xxx_messageInfo_DownloadImageRequest proto.InternalMessageInfo
269
270func (m *DownloadImageRequest) GetDeviceUuid() *Uuid {
271 if m != nil {
272 return m.DeviceUuid
273 }
274 return nil
275}
276
277func (m *DownloadImageRequest) GetImageInfo() *ImageInformation {
278 if m != nil {
279 return m.ImageInfo
280 }
281 return nil
282}
283
amit.ghoshed23db02020-11-18 10:26:36 +0100284type ConfigRequest struct {
285 DeviceUuid *Uuid `protobuf:"bytes,1,opt,name=device_uuid,json=deviceUuid,proto3" json:"device_uuid,omitempty"`
286 // Location of the configuration file, authentication (user/pass) if any should be in the url string
287 // The config_url would contain the protocol, credentials, the IP address/DNS of the server and the path of the file
288 // e.g. sftp://download_user:download_pass@192.168.0.1:22/OLT-configs/config-v1.2.3.xml
289 ConfigUrl string `protobuf:"bytes,2,opt,name=config_url,json=configUrl,proto3" json:"config_url,omitempty"`
290 XXX_NoUnkeyedLiteral struct{} `json:"-"`
291 XXX_unrecognized []byte `json:"-"`
292 XXX_sizecache int32 `json:"-"`
293}
294
295func (m *ConfigRequest) Reset() { *m = ConfigRequest{} }
296func (m *ConfigRequest) String() string { return proto.CompactTextString(m) }
297func (*ConfigRequest) ProtoMessage() {}
298func (*ConfigRequest) Descriptor() ([]byte, []int) {
299 return fileDescriptor_000929e4bec891d7, []int{3}
300}
301
302func (m *ConfigRequest) XXX_Unmarshal(b []byte) error {
303 return xxx_messageInfo_ConfigRequest.Unmarshal(m, b)
304}
305func (m *ConfigRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
306 return xxx_messageInfo_ConfigRequest.Marshal(b, m, deterministic)
307}
308func (m *ConfigRequest) XXX_Merge(src proto.Message) {
309 xxx_messageInfo_ConfigRequest.Merge(m, src)
310}
311func (m *ConfigRequest) XXX_Size() int {
312 return xxx_messageInfo_ConfigRequest.Size(m)
313}
314func (m *ConfigRequest) XXX_DiscardUnknown() {
315 xxx_messageInfo_ConfigRequest.DiscardUnknown(m)
316}
317
318var xxx_messageInfo_ConfigRequest proto.InternalMessageInfo
319
320func (m *ConfigRequest) GetDeviceUuid() *Uuid {
321 if m != nil {
322 return m.DeviceUuid
323 }
324 return nil
325}
326
327func (m *ConfigRequest) GetConfigUrl() string {
328 if m != nil {
329 return m.ConfigUrl
330 }
331 return ""
332}
333
334type ConfigResponse struct {
amit.ghoshae473032021-01-10 11:59:10 +0100335 Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=dmi.Status" json:"status,omitempty"`
336 Reason ConfigResponse_Reason `protobuf:"varint,2,opt,name=reason,proto3,enum=dmi.ConfigResponse_Reason" json:"reason,omitempty"`
amit.ghosh8ab1e6e2021-02-23 07:40:17 +0100337 ReasonDetail string `protobuf:"bytes,3,opt,name=reason_detail,json=reasonDetail,proto3" json:"reason_detail,omitempty"`
amit.ghoshae473032021-01-10 11:59:10 +0100338 XXX_NoUnkeyedLiteral struct{} `json:"-"`
339 XXX_unrecognized []byte `json:"-"`
340 XXX_sizecache int32 `json:"-"`
amit.ghoshed23db02020-11-18 10:26:36 +0100341}
342
343func (m *ConfigResponse) Reset() { *m = ConfigResponse{} }
344func (m *ConfigResponse) String() string { return proto.CompactTextString(m) }
345func (*ConfigResponse) ProtoMessage() {}
346func (*ConfigResponse) Descriptor() ([]byte, []int) {
347 return fileDescriptor_000929e4bec891d7, []int{4}
348}
349
350func (m *ConfigResponse) XXX_Unmarshal(b []byte) error {
351 return xxx_messageInfo_ConfigResponse.Unmarshal(m, b)
352}
353func (m *ConfigResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
354 return xxx_messageInfo_ConfigResponse.Marshal(b, m, deterministic)
355}
356func (m *ConfigResponse) XXX_Merge(src proto.Message) {
357 xxx_messageInfo_ConfigResponse.Merge(m, src)
358}
359func (m *ConfigResponse) XXX_Size() int {
360 return xxx_messageInfo_ConfigResponse.Size(m)
361}
362func (m *ConfigResponse) XXX_DiscardUnknown() {
363 xxx_messageInfo_ConfigResponse.DiscardUnknown(m)
364}
365
366var xxx_messageInfo_ConfigResponse proto.InternalMessageInfo
367
368func (m *ConfigResponse) GetStatus() Status {
369 if m != nil {
370 return m.Status
371 }
372 return Status_UNDEFINED_STATUS
373}
374
amit.ghoshae473032021-01-10 11:59:10 +0100375func (m *ConfigResponse) GetReason() ConfigResponse_Reason {
amit.ghoshed23db02020-11-18 10:26:36 +0100376 if m != nil {
377 return m.Reason
378 }
amit.ghoshae473032021-01-10 11:59:10 +0100379 return ConfigResponse_UNDEFINED_REASON
amit.ghoshed23db02020-11-18 10:26:36 +0100380}
381
amit.ghosh8ab1e6e2021-02-23 07:40:17 +0100382func (m *ConfigResponse) GetReasonDetail() string {
383 if m != nil {
384 return m.ReasonDetail
385 }
386 return ""
387}
388
amit.ghosh2c938b82021-01-14 11:34:03 +0100389type StartupConfigInfoRequest struct {
390 DeviceUuid *Uuid `protobuf:"bytes,1,opt,name=device_uuid,json=deviceUuid,proto3" json:"device_uuid,omitempty"`
391 XXX_NoUnkeyedLiteral struct{} `json:"-"`
392 XXX_unrecognized []byte `json:"-"`
393 XXX_sizecache int32 `json:"-"`
394}
395
396func (m *StartupConfigInfoRequest) Reset() { *m = StartupConfigInfoRequest{} }
397func (m *StartupConfigInfoRequest) String() string { return proto.CompactTextString(m) }
398func (*StartupConfigInfoRequest) ProtoMessage() {}
399func (*StartupConfigInfoRequest) Descriptor() ([]byte, []int) {
400 return fileDescriptor_000929e4bec891d7, []int{5}
401}
402
403func (m *StartupConfigInfoRequest) XXX_Unmarshal(b []byte) error {
404 return xxx_messageInfo_StartupConfigInfoRequest.Unmarshal(m, b)
405}
406func (m *StartupConfigInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
407 return xxx_messageInfo_StartupConfigInfoRequest.Marshal(b, m, deterministic)
408}
409func (m *StartupConfigInfoRequest) XXX_Merge(src proto.Message) {
410 xxx_messageInfo_StartupConfigInfoRequest.Merge(m, src)
411}
412func (m *StartupConfigInfoRequest) XXX_Size() int {
413 return xxx_messageInfo_StartupConfigInfoRequest.Size(m)
414}
415func (m *StartupConfigInfoRequest) XXX_DiscardUnknown() {
416 xxx_messageInfo_StartupConfigInfoRequest.DiscardUnknown(m)
417}
418
419var xxx_messageInfo_StartupConfigInfoRequest proto.InternalMessageInfo
420
421func (m *StartupConfigInfoRequest) GetDeviceUuid() *Uuid {
422 if m != nil {
423 return m.DeviceUuid
424 }
425 return nil
426}
427
428type StartupConfigInfoResponse struct {
429 Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=dmi.Status" json:"status,omitempty"`
430 Reason StartupConfigInfoResponse_Reason `protobuf:"varint,2,opt,name=reason,proto3,enum=dmi.StartupConfigInfoResponse_Reason" json:"reason,omitempty"`
431 // The config_url is an optional attribute, the device manager could return the location from
432 // where the config was downloaded. Also it would not be present/empty for a fresh device into which the
433 // startup config would have been installed in the factory.
434 ConfigUrl string `protobuf:"bytes,3,opt,name=config_url,json=configUrl,proto3" json:"config_url,omitempty"`
435 // The version of the startup configuration. It is recommended to use semVer, but the DM implementations
436 // and operators could choose any other format as well.
437 Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`
amit.ghosh8ab1e6e2021-02-23 07:40:17 +0100438 ReasonDetail string `protobuf:"bytes,5,opt,name=reason_detail,json=reasonDetail,proto3" json:"reason_detail,omitempty"`
amit.ghosh2c938b82021-01-14 11:34:03 +0100439 XXX_NoUnkeyedLiteral struct{} `json:"-"`
440 XXX_unrecognized []byte `json:"-"`
441 XXX_sizecache int32 `json:"-"`
442}
443
444func (m *StartupConfigInfoResponse) Reset() { *m = StartupConfigInfoResponse{} }
445func (m *StartupConfigInfoResponse) String() string { return proto.CompactTextString(m) }
446func (*StartupConfigInfoResponse) ProtoMessage() {}
447func (*StartupConfigInfoResponse) Descriptor() ([]byte, []int) {
448 return fileDescriptor_000929e4bec891d7, []int{6}
449}
450
451func (m *StartupConfigInfoResponse) XXX_Unmarshal(b []byte) error {
452 return xxx_messageInfo_StartupConfigInfoResponse.Unmarshal(m, b)
453}
454func (m *StartupConfigInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
455 return xxx_messageInfo_StartupConfigInfoResponse.Marshal(b, m, deterministic)
456}
457func (m *StartupConfigInfoResponse) XXX_Merge(src proto.Message) {
458 xxx_messageInfo_StartupConfigInfoResponse.Merge(m, src)
459}
460func (m *StartupConfigInfoResponse) XXX_Size() int {
461 return xxx_messageInfo_StartupConfigInfoResponse.Size(m)
462}
463func (m *StartupConfigInfoResponse) XXX_DiscardUnknown() {
464 xxx_messageInfo_StartupConfigInfoResponse.DiscardUnknown(m)
465}
466
467var xxx_messageInfo_StartupConfigInfoResponse proto.InternalMessageInfo
468
469func (m *StartupConfigInfoResponse) GetStatus() Status {
470 if m != nil {
471 return m.Status
472 }
473 return Status_UNDEFINED_STATUS
474}
475
476func (m *StartupConfigInfoResponse) GetReason() StartupConfigInfoResponse_Reason {
477 if m != nil {
478 return m.Reason
479 }
480 return StartupConfigInfoResponse_UNDEFINED_REASON
481}
482
483func (m *StartupConfigInfoResponse) GetConfigUrl() string {
484 if m != nil {
485 return m.ConfigUrl
486 }
487 return ""
488}
489
490func (m *StartupConfigInfoResponse) GetVersion() string {
491 if m != nil {
492 return m.Version
493 }
494 return ""
495}
496
amit.ghosh8ab1e6e2021-02-23 07:40:17 +0100497func (m *StartupConfigInfoResponse) GetReasonDetail() string {
498 if m != nil {
499 return m.ReasonDetail
500 }
501 return ""
502}
503
Amit Ghosh09f28362020-06-12 21:52:19 +0100504func init() {
amit.ghoshae473032021-01-10 11:59:10 +0100505 proto.RegisterEnum("dmi.GetSoftwareVersionInformationResponse_Reason", GetSoftwareVersionInformationResponse_Reason_name, GetSoftwareVersionInformationResponse_Reason_value)
506 proto.RegisterEnum("dmi.ConfigResponse_Reason", ConfigResponse_Reason_name, ConfigResponse_Reason_value)
amit.ghosh2c938b82021-01-14 11:34:03 +0100507 proto.RegisterEnum("dmi.StartupConfigInfoResponse_Reason", StartupConfigInfoResponse_Reason_name, StartupConfigInfoResponse_Reason_value)
Amit Ghosh09f28362020-06-12 21:52:19 +0100508 proto.RegisterType((*SoftwareVersionInformation)(nil), "dmi.SoftwareVersionInformation")
aghoshc301dcd2020-09-03 16:55:34 +0100509 proto.RegisterType((*GetSoftwareVersionInformationResponse)(nil), "dmi.GetSoftwareVersionInformationResponse")
Amit Ghosh09f28362020-06-12 21:52:19 +0100510 proto.RegisterType((*DownloadImageRequest)(nil), "dmi.DownloadImageRequest")
amit.ghoshed23db02020-11-18 10:26:36 +0100511 proto.RegisterType((*ConfigRequest)(nil), "dmi.ConfigRequest")
512 proto.RegisterType((*ConfigResponse)(nil), "dmi.ConfigResponse")
amit.ghosh2c938b82021-01-14 11:34:03 +0100513 proto.RegisterType((*StartupConfigInfoRequest)(nil), "dmi.StartupConfigInfoRequest")
514 proto.RegisterType((*StartupConfigInfoResponse)(nil), "dmi.StartupConfigInfoResponse")
Amit Ghosh09f28362020-06-12 21:52:19 +0100515}
516
517func init() { proto.RegisterFile("dmi/sw_management_service.proto", fileDescriptor_000929e4bec891d7) }
518
519var fileDescriptor_000929e4bec891d7 = []byte{
amit.ghosh8ab1e6e2021-02-23 07:40:17 +0100520 // 804 bytes of a gzipped FileDescriptorProto
521 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xed, 0x6e, 0xe3, 0x44,
522 0x14, 0xc5, 0x71, 0x37, 0x28, 0x37, 0xdb, 0xd6, 0x3b, 0x74, 0x51, 0x1a, 0x54, 0x5a, 0xbc, 0x5a,
523 0xa9, 0x5a, 0x69, 0x93, 0x25, 0xdd, 0x3f, 0xb0, 0x80, 0xe4, 0x8d, 0xdd, 0xd4, 0xa2, 0x38, 0xcb,
524 0xb8, 0x29, 0x62, 0x85, 0x18, 0x4d, 0xe3, 0x49, 0x76, 0xa4, 0xda, 0x13, 0xec, 0x71, 0x0a, 0x2f,
525 0xc2, 0x73, 0xf0, 0x02, 0xfc, 0xe0, 0x05, 0x90, 0x78, 0x23, 0xe4, 0x19, 0x87, 0x90, 0x2f, 0xb4,
526 0xad, 0xd0, 0xfe, 0xb3, 0xef, 0xdc, 0x73, 0x66, 0xe6, 0x9e, 0x7b, 0xcf, 0xc0, 0x61, 0x14, 0xf3,
527 0x76, 0x76, 0x43, 0x62, 0x9a, 0xd0, 0x31, 0x8b, 0x59, 0x22, 0x49, 0xc6, 0xd2, 0x29, 0x1f, 0xb2,
528 0xd6, 0x24, 0x15, 0x52, 0x20, 0x33, 0x8a, 0x79, 0xf3, 0x41, 0x91, 0x35, 0x14, 0x71, 0x2c, 0x92,
529 0x4c, 0xc7, 0x9b, 0xf7, 0x8b, 0xd0, 0x9b, 0x9b, 0xf2, 0x0f, 0x95, 0x34, 0x3c, 0xa6, 0xe3, 0x12,
530 0x69, 0xff, 0x6a, 0x40, 0x33, 0x14, 0x23, 0x79, 0x43, 0x53, 0x76, 0xc9, 0xd2, 0x8c, 0x8b, 0xc4,
531 0x4f, 0x46, 0x22, 0x8d, 0xa9, 0xe4, 0x22, 0x41, 0x9f, 0xc3, 0x2e, 0x1d, 0x4a, 0x3e, 0x65, 0x64,
532 0xaa, 0x17, 0xb3, 0x86, 0x71, 0x64, 0x1e, 0xd7, 0x3b, 0x0f, 0x5a, 0x51, 0xcc, 0x5b, 0x7e, 0xc1,
533 0x54, 0xc2, 0xf0, 0x8e, 0xce, 0x2c, 0x7f, 0x33, 0xf4, 0x05, 0x58, 0x99, 0xa4, 0x49, 0x74, 0xf5,
534 0xcb, 0x1c, 0x5c, 0xd9, 0x04, 0xde, 0x2d, 0x53, 0x67, 0x68, 0xfb, 0xaf, 0x0a, 0x3c, 0xee, 0x31,
535 0xb9, 0xf9, 0x6c, 0x98, 0x65, 0x13, 0x91, 0x64, 0x0c, 0x3d, 0x82, 0x6a, 0x26, 0xa9, 0xcc, 0x8b,
536 0xa3, 0x19, 0xc7, 0x3b, 0x9d, 0xba, 0x62, 0x0f, 0x55, 0x08, 0x97, 0x4b, 0xc8, 0x87, 0x6a, 0xca,
537 0x68, 0x26, 0x92, 0x46, 0x45, 0x25, 0x7d, 0xaa, 0x92, 0xde, 0x6a, 0x83, 0x16, 0x56, 0x40, 0x5c,
538 0x12, 0xa0, 0x13, 0xd8, 0xe2, 0xc9, 0x48, 0x34, 0xcc, 0x23, 0xe3, 0xb8, 0xde, 0x39, 0xd4, 0xbb,
539 0x6d, 0x66, 0x51, 0xc9, 0xe8, 0x11, 0x6c, 0x6b, 0x38, 0x89, 0x98, 0xa4, 0xfc, 0xba, 0xb1, 0x75,
540 0x64, 0x1c, 0xd7, 0xf0, 0x7d, 0x1d, 0x74, 0x55, 0xcc, 0xfe, 0x11, 0xaa, 0x7a, 0x2f, 0xb4, 0x07,
541 0xd6, 0x20, 0x70, 0xbd, 0x53, 0x3f, 0xf0, 0x5c, 0x82, 0x3d, 0x27, 0xec, 0x07, 0xd6, 0x7b, 0x08,
542 0xc1, 0xce, 0x20, 0xf8, 0x3a, 0xe8, 0x7f, 0x17, 0x10, 0xd7, 0xbb, 0xf4, 0xbb, 0x9e, 0x65, 0x14,
543 0x31, 0x3f, 0xb8, 0xf0, 0x70, 0xe0, 0x9c, 0x13, 0x0f, 0xe3, 0x3e, 0xb6, 0x2a, 0xe8, 0x43, 0x40,
544 0x7a, 0x9d, 0x0c, 0x02, 0xec, 0x39, 0xdd, 0x33, 0xe7, 0xe5, 0xb9, 0x67, 0x99, 0xf6, 0xcf, 0xb0,
545 0xe7, 0x8a, 0x9b, 0xe4, 0x5a, 0xd0, 0x48, 0x15, 0x1f, 0xb3, 0x9f, 0x72, 0x96, 0x49, 0xf4, 0x04,
546 0xea, 0x11, 0x2b, 0xda, 0x89, 0xe4, 0x39, 0x8f, 0x54, 0x19, 0xeb, 0x9d, 0x9a, 0xba, 0xd8, 0x20,
547 0xe7, 0x11, 0x06, 0xbd, 0x5a, 0x7c, 0xa3, 0xe7, 0x00, 0xaa, 0x7f, 0x88, 0xaa, 0x41, 0x45, 0xa5,
548 0x3e, 0x9c, 0xeb, 0xf9, 0xef, 0x9b, 0xd7, 0xf8, 0x2c, 0x62, 0xbf, 0x86, 0xed, 0xae, 0x48, 0x46,
549 0x7c, 0x7c, 0x97, 0x2d, 0x0f, 0x00, 0x86, 0x0a, 0x4c, 0xf2, 0xf4, 0x5a, 0x6d, 0x59, 0xc3, 0x35,
550 0x1d, 0x19, 0xa4, 0xd7, 0xf6, 0x1f, 0x15, 0xd8, 0x99, 0x91, 0xdf, 0xa6, 0x25, 0x3a, 0x4b, 0x2d,
551 0xd1, 0x54, 0x49, 0x8b, 0x4c, 0xcb, 0xda, 0xaf, 0xc8, 0x68, 0xae, 0x91, 0xf1, 0x37, 0xe3, 0x7f,
552 0xd2, 0x71, 0x1f, 0x1e, 0xaa, 0x4f, 0x72, 0xea, 0x5d, 0x74, 0xcf, 0xfc, 0xa0, 0x47, 0xba, 0xfd,
553 0xe0, 0xd4, 0xef, 0x59, 0xa6, 0x4e, 0xbf, 0x74, 0xce, 0x7d, 0x77, 0x16, 0xdb, 0x42, 0x9f, 0xc0,
554 0x41, 0xff, 0x95, 0x87, 0x9d, 0x0b, 0xbf, 0x1f, 0x10, 0xe7, 0x1c, 0x7b, 0x8e, 0xfb, 0x3d, 0xf1,
555 0x03, 0xf2, 0x0a, 0xf7, 0x7b, 0xd8, 0x0b, 0x43, 0xeb, 0xde, 0x86, 0xce, 0xa8, 0xda, 0xa7, 0xd0,
556 0x08, 0x25, 0x4d, 0x65, 0x3e, 0xd1, 0xf7, 0x2f, 0x44, 0xbb, 0x83, 0x54, 0xf6, 0xef, 0x15, 0xd8,
557 0x5f, 0x43, 0x74, 0x1b, 0x59, 0xbe, 0x5c, 0x92, 0xe5, 0xf1, 0x2c, 0x69, 0x3d, 0xe9, 0xb2, 0x42,
558 0x8b, 0xcd, 0x62, 0x2e, 0x35, 0x0b, 0x6a, 0xc0, 0xfb, 0xa5, 0x19, 0x95, 0x13, 0x38, 0xfb, 0x5d,
559 0x95, 0xf6, 0xde, 0xbb, 0x9f, 0xd0, 0xce, 0x9f, 0x26, 0x1c, 0x06, 0xb4, 0xb0, 0xd1, 0x99, 0xa3,
560 0x7c, 0xf3, 0x8f, 0xe7, 0x87, 0xda, 0xf2, 0xd1, 0xb7, 0x80, 0x56, 0x7d, 0x0b, 0xed, 0xaa, 0x32,
561 0x9d, 0xd1, 0x34, 0x2a, 0xa2, 0xbe, 0xdb, 0x7c, 0xf2, 0xf6, 0x0e, 0x87, 0xbe, 0x82, 0xed, 0x05,
562 0x63, 0x40, 0xfb, 0x0a, 0xbc, 0xce, 0x2c, 0x9a, 0xd6, 0x7c, 0xd8, 0xb5, 0x72, 0xcf, 0x0c, 0xf4,
563 0x1c, 0xb6, 0x9d, 0xc2, 0xfc, 0xa9, 0x64, 0x1a, 0xbf, 0x72, 0x9a, 0x75, 0xa8, 0x17, 0xb0, 0x87,
564 0xd9, 0x94, 0xa5, 0xf2, 0x42, 0x84, 0xda, 0xfd, 0x6f, 0x01, 0xee, 0x41, 0x73, 0x30, 0x89, 0xa8,
565 0x64, 0x0b, 0x9d, 0x91, 0xa7, 0xfa, 0xdd, 0x42, 0x0b, 0xb3, 0xac, 0x0f, 0xfe, 0xc1, 0x9a, 0xf9,
566 0x7e, 0x66, 0xa0, 0x1f, 0xe0, 0xa3, 0xa2, 0x48, 0x6b, 0x58, 0x8a, 0x4a, 0xa1, 0x83, 0x4d, 0xed,
567 0xa7, 0x49, 0x3f, 0xfe, 0xef, 0xee, 0x7c, 0xf9, 0xe2, 0xf5, 0x67, 0x63, 0x2e, 0xdf, 0xe4, 0x57,
568 0xad, 0xa1, 0x88, 0xdb, 0x62, 0xc2, 0x92, 0xa1, 0x48, 0xa3, 0xb6, 0x1e, 0x99, 0xa7, 0xf3, 0x07,
569 0xfd, 0x29, 0x4f, 0x24, 0x4b, 0x47, 0x74, 0xc8, 0xda, 0xd3, 0x93, 0xf6, 0x58, 0xb4, 0xa3, 0x98,
570 0x5f, 0x55, 0xd5, 0x1b, 0x7d, 0xf2, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdd, 0xa9, 0x07, 0xea,
571 0x00, 0x08, 0x00, 0x00,
Amit Ghosh09f28362020-06-12 21:52:19 +0100572}
573
574// Reference imports to suppress errors if they are not otherwise used.
575var _ context.Context
576var _ grpc.ClientConn
577
578// This is a compile-time assertion to ensure that this generated file
579// is compatible with the grpc package it is being compiled against.
580const _ = grpc.SupportPackageIsVersion4
581
582// NativeSoftwareManagementServiceClient is the client API for NativeSoftwareManagementService service.
583//
584// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
585type NativeSoftwareManagementServiceClient interface {
586 // Get the software version information of the Active and Standby images
aghoshc301dcd2020-09-03 16:55:34 +0100587 GetSoftwareVersion(ctx context.Context, in *HardwareID, opts ...grpc.CallOption) (*GetSoftwareVersionInformationResponse, error)
Amit Ghosh09f28362020-06-12 21:52:19 +0100588 // Downloads and installs the image in the standby partition, returns the status/progress of the Install
589 DownloadImage(ctx context.Context, in *DownloadImageRequest, opts ...grpc.CallOption) (NativeSoftwareManagementService_DownloadImageClient, error)
590 // Activates and runs the OLT with the image in the standby partition. If things are fine this image will
591 // henceforth be marked as the Active Partition. The old working image would remain on the Standby partition.
592 // Any possibly required (sub-)steps like "commit" are left to the "Device Manager"
593 ActivateImage(ctx context.Context, in *HardwareID, opts ...grpc.CallOption) (NativeSoftwareManagementService_ActivateImageClient, error)
594 // 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 +0100595 // This API is to be used if operator wants to go back to the previous software
Amit Ghosh09f28362020-06-12 21:52:19 +0100596 RevertToStandbyImage(ctx context.Context, in *HardwareID, opts ...grpc.CallOption) (NativeSoftwareManagementService_RevertToStandbyImageClient, error)
amit.ghoshed23db02020-11-18 10:26:36 +0100597 // This API can be used to let the devices pickup their properitary configuration which they need at startup.
598 UpdateStartupConfiguration(ctx context.Context, in *ConfigRequest, opts ...grpc.CallOption) (NativeSoftwareManagementService_UpdateStartupConfigurationClient, error)
amit.ghosh2c938b82021-01-14 11:34:03 +0100599 // This API can be used to retrieve information about the current startup configuration that a device is using
600 GetStartupConfigurationInfo(ctx context.Context, in *StartupConfigInfoRequest, opts ...grpc.CallOption) (*StartupConfigInfoResponse, error)
Amit Ghosh09f28362020-06-12 21:52:19 +0100601}
602
603type nativeSoftwareManagementServiceClient struct {
604 cc *grpc.ClientConn
605}
606
607func NewNativeSoftwareManagementServiceClient(cc *grpc.ClientConn) NativeSoftwareManagementServiceClient {
608 return &nativeSoftwareManagementServiceClient{cc}
609}
610
aghoshc301dcd2020-09-03 16:55:34 +0100611func (c *nativeSoftwareManagementServiceClient) GetSoftwareVersion(ctx context.Context, in *HardwareID, opts ...grpc.CallOption) (*GetSoftwareVersionInformationResponse, error) {
612 out := new(GetSoftwareVersionInformationResponse)
Amit Ghosh09f28362020-06-12 21:52:19 +0100613 err := c.cc.Invoke(ctx, "/dmi.NativeSoftwareManagementService/GetSoftwareVersion", in, out, opts...)
614 if err != nil {
615 return nil, err
616 }
617 return out, nil
618}
619
620func (c *nativeSoftwareManagementServiceClient) DownloadImage(ctx context.Context, in *DownloadImageRequest, opts ...grpc.CallOption) (NativeSoftwareManagementService_DownloadImageClient, error) {
621 stream, err := c.cc.NewStream(ctx, &_NativeSoftwareManagementService_serviceDesc.Streams[0], "/dmi.NativeSoftwareManagementService/DownloadImage", opts...)
622 if err != nil {
623 return nil, err
624 }
625 x := &nativeSoftwareManagementServiceDownloadImageClient{stream}
626 if err := x.ClientStream.SendMsg(in); err != nil {
627 return nil, err
628 }
629 if err := x.ClientStream.CloseSend(); err != nil {
630 return nil, err
631 }
632 return x, nil
633}
634
635type NativeSoftwareManagementService_DownloadImageClient interface {
636 Recv() (*ImageStatus, error)
637 grpc.ClientStream
638}
639
640type nativeSoftwareManagementServiceDownloadImageClient struct {
641 grpc.ClientStream
642}
643
644func (x *nativeSoftwareManagementServiceDownloadImageClient) Recv() (*ImageStatus, error) {
645 m := new(ImageStatus)
646 if err := x.ClientStream.RecvMsg(m); err != nil {
647 return nil, err
648 }
649 return m, nil
650}
651
652func (c *nativeSoftwareManagementServiceClient) ActivateImage(ctx context.Context, in *HardwareID, opts ...grpc.CallOption) (NativeSoftwareManagementService_ActivateImageClient, error) {
653 stream, err := c.cc.NewStream(ctx, &_NativeSoftwareManagementService_serviceDesc.Streams[1], "/dmi.NativeSoftwareManagementService/ActivateImage", opts...)
654 if err != nil {
655 return nil, err
656 }
657 x := &nativeSoftwareManagementServiceActivateImageClient{stream}
658 if err := x.ClientStream.SendMsg(in); err != nil {
659 return nil, err
660 }
661 if err := x.ClientStream.CloseSend(); err != nil {
662 return nil, err
663 }
664 return x, nil
665}
666
667type NativeSoftwareManagementService_ActivateImageClient interface {
668 Recv() (*ImageStatus, error)
669 grpc.ClientStream
670}
671
672type nativeSoftwareManagementServiceActivateImageClient struct {
673 grpc.ClientStream
674}
675
676func (x *nativeSoftwareManagementServiceActivateImageClient) Recv() (*ImageStatus, error) {
677 m := new(ImageStatus)
678 if err := x.ClientStream.RecvMsg(m); err != nil {
679 return nil, err
680 }
681 return m, nil
682}
683
684func (c *nativeSoftwareManagementServiceClient) RevertToStandbyImage(ctx context.Context, in *HardwareID, opts ...grpc.CallOption) (NativeSoftwareManagementService_RevertToStandbyImageClient, error) {
685 stream, err := c.cc.NewStream(ctx, &_NativeSoftwareManagementService_serviceDesc.Streams[2], "/dmi.NativeSoftwareManagementService/RevertToStandbyImage", opts...)
686 if err != nil {
687 return nil, err
688 }
689 x := &nativeSoftwareManagementServiceRevertToStandbyImageClient{stream}
690 if err := x.ClientStream.SendMsg(in); err != nil {
691 return nil, err
692 }
693 if err := x.ClientStream.CloseSend(); err != nil {
694 return nil, err
695 }
696 return x, nil
697}
698
699type NativeSoftwareManagementService_RevertToStandbyImageClient interface {
700 Recv() (*ImageStatus, error)
701 grpc.ClientStream
702}
703
704type nativeSoftwareManagementServiceRevertToStandbyImageClient struct {
705 grpc.ClientStream
706}
707
708func (x *nativeSoftwareManagementServiceRevertToStandbyImageClient) Recv() (*ImageStatus, error) {
709 m := new(ImageStatus)
710 if err := x.ClientStream.RecvMsg(m); err != nil {
711 return nil, err
712 }
713 return m, nil
714}
715
amit.ghoshed23db02020-11-18 10:26:36 +0100716func (c *nativeSoftwareManagementServiceClient) UpdateStartupConfiguration(ctx context.Context, in *ConfigRequest, opts ...grpc.CallOption) (NativeSoftwareManagementService_UpdateStartupConfigurationClient, error) {
717 stream, err := c.cc.NewStream(ctx, &_NativeSoftwareManagementService_serviceDesc.Streams[3], "/dmi.NativeSoftwareManagementService/UpdateStartupConfiguration", opts...)
718 if err != nil {
719 return nil, err
720 }
721 x := &nativeSoftwareManagementServiceUpdateStartupConfigurationClient{stream}
722 if err := x.ClientStream.SendMsg(in); err != nil {
723 return nil, err
724 }
725 if err := x.ClientStream.CloseSend(); err != nil {
726 return nil, err
727 }
728 return x, nil
729}
730
731type NativeSoftwareManagementService_UpdateStartupConfigurationClient interface {
732 Recv() (*ConfigResponse, error)
733 grpc.ClientStream
734}
735
736type nativeSoftwareManagementServiceUpdateStartupConfigurationClient struct {
737 grpc.ClientStream
738}
739
740func (x *nativeSoftwareManagementServiceUpdateStartupConfigurationClient) Recv() (*ConfigResponse, error) {
741 m := new(ConfigResponse)
742 if err := x.ClientStream.RecvMsg(m); err != nil {
743 return nil, err
744 }
745 return m, nil
746}
747
amit.ghosh2c938b82021-01-14 11:34:03 +0100748func (c *nativeSoftwareManagementServiceClient) GetStartupConfigurationInfo(ctx context.Context, in *StartupConfigInfoRequest, opts ...grpc.CallOption) (*StartupConfigInfoResponse, error) {
749 out := new(StartupConfigInfoResponse)
750 err := c.cc.Invoke(ctx, "/dmi.NativeSoftwareManagementService/GetStartupConfigurationInfo", in, out, opts...)
751 if err != nil {
752 return nil, err
753 }
754 return out, nil
755}
756
Amit Ghosh09f28362020-06-12 21:52:19 +0100757// NativeSoftwareManagementServiceServer is the server API for NativeSoftwareManagementService service.
758type NativeSoftwareManagementServiceServer interface {
759 // Get the software version information of the Active and Standby images
aghoshc301dcd2020-09-03 16:55:34 +0100760 GetSoftwareVersion(context.Context, *HardwareID) (*GetSoftwareVersionInformationResponse, error)
Amit Ghosh09f28362020-06-12 21:52:19 +0100761 // Downloads and installs the image in the standby partition, returns the status/progress of the Install
762 DownloadImage(*DownloadImageRequest, NativeSoftwareManagementService_DownloadImageServer) error
763 // Activates and runs the OLT with the image in the standby partition. If things are fine this image will
764 // henceforth be marked as the Active Partition. The old working image would remain on the Standby partition.
765 // Any possibly required (sub-)steps like "commit" are left to the "Device Manager"
766 ActivateImage(*HardwareID, NativeSoftwareManagementService_ActivateImageServer) error
767 // 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 +0100768 // This API is to be used if operator wants to go back to the previous software
Amit Ghosh09f28362020-06-12 21:52:19 +0100769 RevertToStandbyImage(*HardwareID, NativeSoftwareManagementService_RevertToStandbyImageServer) error
amit.ghoshed23db02020-11-18 10:26:36 +0100770 // This API can be used to let the devices pickup their properitary configuration which they need at startup.
771 UpdateStartupConfiguration(*ConfigRequest, NativeSoftwareManagementService_UpdateStartupConfigurationServer) error
amit.ghosh2c938b82021-01-14 11:34:03 +0100772 // This API can be used to retrieve information about the current startup configuration that a device is using
773 GetStartupConfigurationInfo(context.Context, *StartupConfigInfoRequest) (*StartupConfigInfoResponse, error)
Amit Ghosh09f28362020-06-12 21:52:19 +0100774}
775
776func RegisterNativeSoftwareManagementServiceServer(s *grpc.Server, srv NativeSoftwareManagementServiceServer) {
777 s.RegisterService(&_NativeSoftwareManagementService_serviceDesc, srv)
778}
779
780func _NativeSoftwareManagementService_GetSoftwareVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
781 in := new(HardwareID)
782 if err := dec(in); err != nil {
783 return nil, err
784 }
785 if interceptor == nil {
786 return srv.(NativeSoftwareManagementServiceServer).GetSoftwareVersion(ctx, in)
787 }
788 info := &grpc.UnaryServerInfo{
789 Server: srv,
790 FullMethod: "/dmi.NativeSoftwareManagementService/GetSoftwareVersion",
791 }
792 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
793 return srv.(NativeSoftwareManagementServiceServer).GetSoftwareVersion(ctx, req.(*HardwareID))
794 }
795 return interceptor(ctx, in, info, handler)
796}
797
798func _NativeSoftwareManagementService_DownloadImage_Handler(srv interface{}, stream grpc.ServerStream) error {
799 m := new(DownloadImageRequest)
800 if err := stream.RecvMsg(m); err != nil {
801 return err
802 }
803 return srv.(NativeSoftwareManagementServiceServer).DownloadImage(m, &nativeSoftwareManagementServiceDownloadImageServer{stream})
804}
805
806type NativeSoftwareManagementService_DownloadImageServer interface {
807 Send(*ImageStatus) error
808 grpc.ServerStream
809}
810
811type nativeSoftwareManagementServiceDownloadImageServer struct {
812 grpc.ServerStream
813}
814
815func (x *nativeSoftwareManagementServiceDownloadImageServer) Send(m *ImageStatus) error {
816 return x.ServerStream.SendMsg(m)
817}
818
819func _NativeSoftwareManagementService_ActivateImage_Handler(srv interface{}, stream grpc.ServerStream) error {
820 m := new(HardwareID)
821 if err := stream.RecvMsg(m); err != nil {
822 return err
823 }
824 return srv.(NativeSoftwareManagementServiceServer).ActivateImage(m, &nativeSoftwareManagementServiceActivateImageServer{stream})
825}
826
827type NativeSoftwareManagementService_ActivateImageServer interface {
828 Send(*ImageStatus) error
829 grpc.ServerStream
830}
831
832type nativeSoftwareManagementServiceActivateImageServer struct {
833 grpc.ServerStream
834}
835
836func (x *nativeSoftwareManagementServiceActivateImageServer) Send(m *ImageStatus) error {
837 return x.ServerStream.SendMsg(m)
838}
839
840func _NativeSoftwareManagementService_RevertToStandbyImage_Handler(srv interface{}, stream grpc.ServerStream) error {
841 m := new(HardwareID)
842 if err := stream.RecvMsg(m); err != nil {
843 return err
844 }
845 return srv.(NativeSoftwareManagementServiceServer).RevertToStandbyImage(m, &nativeSoftwareManagementServiceRevertToStandbyImageServer{stream})
846}
847
848type NativeSoftwareManagementService_RevertToStandbyImageServer interface {
849 Send(*ImageStatus) error
850 grpc.ServerStream
851}
852
853type nativeSoftwareManagementServiceRevertToStandbyImageServer struct {
854 grpc.ServerStream
855}
856
857func (x *nativeSoftwareManagementServiceRevertToStandbyImageServer) Send(m *ImageStatus) error {
858 return x.ServerStream.SendMsg(m)
859}
860
amit.ghoshed23db02020-11-18 10:26:36 +0100861func _NativeSoftwareManagementService_UpdateStartupConfiguration_Handler(srv interface{}, stream grpc.ServerStream) error {
862 m := new(ConfigRequest)
863 if err := stream.RecvMsg(m); err != nil {
864 return err
865 }
866 return srv.(NativeSoftwareManagementServiceServer).UpdateStartupConfiguration(m, &nativeSoftwareManagementServiceUpdateStartupConfigurationServer{stream})
867}
868
869type NativeSoftwareManagementService_UpdateStartupConfigurationServer interface {
870 Send(*ConfigResponse) error
871 grpc.ServerStream
872}
873
874type nativeSoftwareManagementServiceUpdateStartupConfigurationServer struct {
875 grpc.ServerStream
876}
877
878func (x *nativeSoftwareManagementServiceUpdateStartupConfigurationServer) Send(m *ConfigResponse) error {
879 return x.ServerStream.SendMsg(m)
880}
881
amit.ghosh2c938b82021-01-14 11:34:03 +0100882func _NativeSoftwareManagementService_GetStartupConfigurationInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
883 in := new(StartupConfigInfoRequest)
884 if err := dec(in); err != nil {
885 return nil, err
886 }
887 if interceptor == nil {
888 return srv.(NativeSoftwareManagementServiceServer).GetStartupConfigurationInfo(ctx, in)
889 }
890 info := &grpc.UnaryServerInfo{
891 Server: srv,
892 FullMethod: "/dmi.NativeSoftwareManagementService/GetStartupConfigurationInfo",
893 }
894 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
895 return srv.(NativeSoftwareManagementServiceServer).GetStartupConfigurationInfo(ctx, req.(*StartupConfigInfoRequest))
896 }
897 return interceptor(ctx, in, info, handler)
898}
899
Amit Ghosh09f28362020-06-12 21:52:19 +0100900var _NativeSoftwareManagementService_serviceDesc = grpc.ServiceDesc{
901 ServiceName: "dmi.NativeSoftwareManagementService",
902 HandlerType: (*NativeSoftwareManagementServiceServer)(nil),
903 Methods: []grpc.MethodDesc{
904 {
905 MethodName: "GetSoftwareVersion",
906 Handler: _NativeSoftwareManagementService_GetSoftwareVersion_Handler,
907 },
amit.ghosh2c938b82021-01-14 11:34:03 +0100908 {
909 MethodName: "GetStartupConfigurationInfo",
910 Handler: _NativeSoftwareManagementService_GetStartupConfigurationInfo_Handler,
911 },
Amit Ghosh09f28362020-06-12 21:52:19 +0100912 },
913 Streams: []grpc.StreamDesc{
914 {
915 StreamName: "DownloadImage",
916 Handler: _NativeSoftwareManagementService_DownloadImage_Handler,
917 ServerStreams: true,
918 },
919 {
920 StreamName: "ActivateImage",
921 Handler: _NativeSoftwareManagementService_ActivateImage_Handler,
922 ServerStreams: true,
923 },
924 {
925 StreamName: "RevertToStandbyImage",
926 Handler: _NativeSoftwareManagementService_RevertToStandbyImage_Handler,
927 ServerStreams: true,
928 },
amit.ghoshed23db02020-11-18 10:26:36 +0100929 {
930 StreamName: "UpdateStartupConfiguration",
931 Handler: _NativeSoftwareManagementService_UpdateStartupConfiguration_Handler,
932 ServerStreams: true,
933 },
Amit Ghosh09f28362020-06-12 21:52:19 +0100934 },
935 Metadata: "dmi/sw_management_service.proto",
936}