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