This repository was archived by the owner on Jun 2, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathnvswitch-manager_grpc.pb.go
More file actions
511 lines (477 loc) · 21.9 KB
/
Copy pathnvswitch-manager_grpc.pb.go
File metadata and controls
511 lines (477 loc) · 21.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
/*
* SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc (unknown)
// source: nvswitch-manager.proto
package gen
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
NVSwitchManager_RegisterNVSwitches_FullMethodName = "/nsm.v1.NVSwitchManager/RegisterNVSwitches"
NVSwitchManager_GetNVSwitches_FullMethodName = "/nsm.v1.NVSwitchManager/GetNVSwitches"
NVSwitchManager_ListBundles_FullMethodName = "/nsm.v1.NVSwitchManager/ListBundles"
NVSwitchManager_QueueUpdate_FullMethodName = "/nsm.v1.NVSwitchManager/QueueUpdate"
NVSwitchManager_QueueUpdates_FullMethodName = "/nsm.v1.NVSwitchManager/QueueUpdates"
NVSwitchManager_GetUpdate_FullMethodName = "/nsm.v1.NVSwitchManager/GetUpdate"
NVSwitchManager_GetUpdatesForSwitch_FullMethodName = "/nsm.v1.NVSwitchManager/GetUpdatesForSwitch"
NVSwitchManager_GetAllUpdates_FullMethodName = "/nsm.v1.NVSwitchManager/GetAllUpdates"
NVSwitchManager_CancelUpdate_FullMethodName = "/nsm.v1.NVSwitchManager/CancelUpdate"
NVSwitchManager_PowerControl_FullMethodName = "/nsm.v1.NVSwitchManager/PowerControl"
)
// NVSwitchManagerClient is the client API for NVSwitchManager service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// NVSwitchManager exposes registration, inventory, firmware management, and power control RPCs for NVLink Switch trays.
type NVSwitchManagerClient interface {
// Registration
// RegisterNVSwitches registers the specified NV-Switch trays and returns service-generated UUIDs.
RegisterNVSwitches(ctx context.Context, in *RegisterNVSwitchesRequest, opts ...grpc.CallOption) (*RegisterNVSwitchesResponse, error)
// Inventory Management
// GetNVSwitches returns NV-Switch information for the specified switches.
GetNVSwitches(ctx context.Context, in *NVSwitchRequest, opts ...grpc.CallOption) (*GetNVSwitchesResponse, error)
// Firmware Management (New API)
// ListBundles returns all available firmware bundles.
ListBundles(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListBundlesResponse, error)
// QueueUpdate queues firmware updates for one or more components (or all if not specified).
QueueUpdate(ctx context.Context, in *QueueUpdateRequest, opts ...grpc.CallOption) (*QueueUpdateResponse, error)
// QueueUpdates queues firmware updates for multiple switches in a single call.
QueueUpdates(ctx context.Context, in *QueueUpdatesRequest, opts ...grpc.CallOption) (*QueueUpdatesResponse, error)
// GetUpdate returns the status of a specific firmware update by ID.
GetUpdate(ctx context.Context, in *GetUpdateRequest, opts ...grpc.CallOption) (*GetUpdateResponse, error)
// GetUpdatesForSwitch returns all firmware updates for a switch.
GetUpdatesForSwitch(ctx context.Context, in *GetUpdatesForSwitchRequest, opts ...grpc.CallOption) (*GetUpdatesForSwitchResponse, error)
// GetAllUpdates returns all firmware updates across all switches.
GetAllUpdates(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetAllUpdatesResponse, error)
// CancelUpdate cancels an in-progress firmware update.
CancelUpdate(ctx context.Context, in *CancelUpdateRequest, opts ...grpc.CallOption) (*CancelUpdateResponse, error)
// Power Control
// PowerControl performs a power action (e.g. PowerCycle, GracefulShutdown) on NV-Switch trays.
PowerControl(ctx context.Context, in *PowerControlRequest, opts ...grpc.CallOption) (*PowerControlResponse, error)
}
type nVSwitchManagerClient struct {
cc grpc.ClientConnInterface
}
func NewNVSwitchManagerClient(cc grpc.ClientConnInterface) NVSwitchManagerClient {
return &nVSwitchManagerClient{cc}
}
func (c *nVSwitchManagerClient) RegisterNVSwitches(ctx context.Context, in *RegisterNVSwitchesRequest, opts ...grpc.CallOption) (*RegisterNVSwitchesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(RegisterNVSwitchesResponse)
err := c.cc.Invoke(ctx, NVSwitchManager_RegisterNVSwitches_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nVSwitchManagerClient) GetNVSwitches(ctx context.Context, in *NVSwitchRequest, opts ...grpc.CallOption) (*GetNVSwitchesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetNVSwitchesResponse)
err := c.cc.Invoke(ctx, NVSwitchManager_GetNVSwitches_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nVSwitchManagerClient) ListBundles(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListBundlesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListBundlesResponse)
err := c.cc.Invoke(ctx, NVSwitchManager_ListBundles_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nVSwitchManagerClient) QueueUpdate(ctx context.Context, in *QueueUpdateRequest, opts ...grpc.CallOption) (*QueueUpdateResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(QueueUpdateResponse)
err := c.cc.Invoke(ctx, NVSwitchManager_QueueUpdate_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nVSwitchManagerClient) QueueUpdates(ctx context.Context, in *QueueUpdatesRequest, opts ...grpc.CallOption) (*QueueUpdatesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(QueueUpdatesResponse)
err := c.cc.Invoke(ctx, NVSwitchManager_QueueUpdates_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nVSwitchManagerClient) GetUpdate(ctx context.Context, in *GetUpdateRequest, opts ...grpc.CallOption) (*GetUpdateResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetUpdateResponse)
err := c.cc.Invoke(ctx, NVSwitchManager_GetUpdate_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nVSwitchManagerClient) GetUpdatesForSwitch(ctx context.Context, in *GetUpdatesForSwitchRequest, opts ...grpc.CallOption) (*GetUpdatesForSwitchResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetUpdatesForSwitchResponse)
err := c.cc.Invoke(ctx, NVSwitchManager_GetUpdatesForSwitch_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nVSwitchManagerClient) GetAllUpdates(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetAllUpdatesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetAllUpdatesResponse)
err := c.cc.Invoke(ctx, NVSwitchManager_GetAllUpdates_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nVSwitchManagerClient) CancelUpdate(ctx context.Context, in *CancelUpdateRequest, opts ...grpc.CallOption) (*CancelUpdateResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(CancelUpdateResponse)
err := c.cc.Invoke(ctx, NVSwitchManager_CancelUpdate_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nVSwitchManagerClient) PowerControl(ctx context.Context, in *PowerControlRequest, opts ...grpc.CallOption) (*PowerControlResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(PowerControlResponse)
err := c.cc.Invoke(ctx, NVSwitchManager_PowerControl_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// NVSwitchManagerServer is the server API for NVSwitchManager service.
// All implementations should embed UnimplementedNVSwitchManagerServer
// for forward compatibility.
//
// NVSwitchManager exposes registration, inventory, firmware management, and power control RPCs for NVLink Switch trays.
type NVSwitchManagerServer interface {
// Registration
// RegisterNVSwitches registers the specified NV-Switch trays and returns service-generated UUIDs.
RegisterNVSwitches(context.Context, *RegisterNVSwitchesRequest) (*RegisterNVSwitchesResponse, error)
// Inventory Management
// GetNVSwitches returns NV-Switch information for the specified switches.
GetNVSwitches(context.Context, *NVSwitchRequest) (*GetNVSwitchesResponse, error)
// Firmware Management (New API)
// ListBundles returns all available firmware bundles.
ListBundles(context.Context, *emptypb.Empty) (*ListBundlesResponse, error)
// QueueUpdate queues firmware updates for one or more components (or all if not specified).
QueueUpdate(context.Context, *QueueUpdateRequest) (*QueueUpdateResponse, error)
// QueueUpdates queues firmware updates for multiple switches in a single call.
QueueUpdates(context.Context, *QueueUpdatesRequest) (*QueueUpdatesResponse, error)
// GetUpdate returns the status of a specific firmware update by ID.
GetUpdate(context.Context, *GetUpdateRequest) (*GetUpdateResponse, error)
// GetUpdatesForSwitch returns all firmware updates for a switch.
GetUpdatesForSwitch(context.Context, *GetUpdatesForSwitchRequest) (*GetUpdatesForSwitchResponse, error)
// GetAllUpdates returns all firmware updates across all switches.
GetAllUpdates(context.Context, *emptypb.Empty) (*GetAllUpdatesResponse, error)
// CancelUpdate cancels an in-progress firmware update.
CancelUpdate(context.Context, *CancelUpdateRequest) (*CancelUpdateResponse, error)
// Power Control
// PowerControl performs a power action (e.g. PowerCycle, GracefulShutdown) on NV-Switch trays.
PowerControl(context.Context, *PowerControlRequest) (*PowerControlResponse, error)
}
// UnimplementedNVSwitchManagerServer should be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedNVSwitchManagerServer struct{}
func (UnimplementedNVSwitchManagerServer) RegisterNVSwitches(context.Context, *RegisterNVSwitchesRequest) (*RegisterNVSwitchesResponse, error) {
return nil, status.Error(codes.Unimplemented, "method RegisterNVSwitches not implemented")
}
func (UnimplementedNVSwitchManagerServer) GetNVSwitches(context.Context, *NVSwitchRequest) (*GetNVSwitchesResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetNVSwitches not implemented")
}
func (UnimplementedNVSwitchManagerServer) ListBundles(context.Context, *emptypb.Empty) (*ListBundlesResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListBundles not implemented")
}
func (UnimplementedNVSwitchManagerServer) QueueUpdate(context.Context, *QueueUpdateRequest) (*QueueUpdateResponse, error) {
return nil, status.Error(codes.Unimplemented, "method QueueUpdate not implemented")
}
func (UnimplementedNVSwitchManagerServer) QueueUpdates(context.Context, *QueueUpdatesRequest) (*QueueUpdatesResponse, error) {
return nil, status.Error(codes.Unimplemented, "method QueueUpdates not implemented")
}
func (UnimplementedNVSwitchManagerServer) GetUpdate(context.Context, *GetUpdateRequest) (*GetUpdateResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetUpdate not implemented")
}
func (UnimplementedNVSwitchManagerServer) GetUpdatesForSwitch(context.Context, *GetUpdatesForSwitchRequest) (*GetUpdatesForSwitchResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetUpdatesForSwitch not implemented")
}
func (UnimplementedNVSwitchManagerServer) GetAllUpdates(context.Context, *emptypb.Empty) (*GetAllUpdatesResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetAllUpdates not implemented")
}
func (UnimplementedNVSwitchManagerServer) CancelUpdate(context.Context, *CancelUpdateRequest) (*CancelUpdateResponse, error) {
return nil, status.Error(codes.Unimplemented, "method CancelUpdate not implemented")
}
func (UnimplementedNVSwitchManagerServer) PowerControl(context.Context, *PowerControlRequest) (*PowerControlResponse, error) {
return nil, status.Error(codes.Unimplemented, "method PowerControl not implemented")
}
func (UnimplementedNVSwitchManagerServer) testEmbeddedByValue() {}
// UnsafeNVSwitchManagerServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to NVSwitchManagerServer will
// result in compilation errors.
type UnsafeNVSwitchManagerServer interface {
mustEmbedUnimplementedNVSwitchManagerServer()
}
func RegisterNVSwitchManagerServer(s grpc.ServiceRegistrar, srv NVSwitchManagerServer) {
// If the following call panics, it indicates UnimplementedNVSwitchManagerServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&NVSwitchManager_ServiceDesc, srv)
}
func _NVSwitchManager_RegisterNVSwitches_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RegisterNVSwitchesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NVSwitchManagerServer).RegisterNVSwitches(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: NVSwitchManager_RegisterNVSwitches_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NVSwitchManagerServer).RegisterNVSwitches(ctx, req.(*RegisterNVSwitchesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NVSwitchManager_GetNVSwitches_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(NVSwitchRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NVSwitchManagerServer).GetNVSwitches(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: NVSwitchManager_GetNVSwitches_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NVSwitchManagerServer).GetNVSwitches(ctx, req.(*NVSwitchRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NVSwitchManager_ListBundles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(emptypb.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NVSwitchManagerServer).ListBundles(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: NVSwitchManager_ListBundles_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NVSwitchManagerServer).ListBundles(ctx, req.(*emptypb.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _NVSwitchManager_QueueUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueueUpdateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NVSwitchManagerServer).QueueUpdate(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: NVSwitchManager_QueueUpdate_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NVSwitchManagerServer).QueueUpdate(ctx, req.(*QueueUpdateRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NVSwitchManager_QueueUpdates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueueUpdatesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NVSwitchManagerServer).QueueUpdates(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: NVSwitchManager_QueueUpdates_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NVSwitchManagerServer).QueueUpdates(ctx, req.(*QueueUpdatesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NVSwitchManager_GetUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUpdateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NVSwitchManagerServer).GetUpdate(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: NVSwitchManager_GetUpdate_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NVSwitchManagerServer).GetUpdate(ctx, req.(*GetUpdateRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NVSwitchManager_GetUpdatesForSwitch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUpdatesForSwitchRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NVSwitchManagerServer).GetUpdatesForSwitch(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: NVSwitchManager_GetUpdatesForSwitch_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NVSwitchManagerServer).GetUpdatesForSwitch(ctx, req.(*GetUpdatesForSwitchRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NVSwitchManager_GetAllUpdates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(emptypb.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NVSwitchManagerServer).GetAllUpdates(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: NVSwitchManager_GetAllUpdates_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NVSwitchManagerServer).GetAllUpdates(ctx, req.(*emptypb.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _NVSwitchManager_CancelUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CancelUpdateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NVSwitchManagerServer).CancelUpdate(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: NVSwitchManager_CancelUpdate_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NVSwitchManagerServer).CancelUpdate(ctx, req.(*CancelUpdateRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NVSwitchManager_PowerControl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PowerControlRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NVSwitchManagerServer).PowerControl(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: NVSwitchManager_PowerControl_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NVSwitchManagerServer).PowerControl(ctx, req.(*PowerControlRequest))
}
return interceptor(ctx, in, info, handler)
}
// NVSwitchManager_ServiceDesc is the grpc.ServiceDesc for NVSwitchManager service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var NVSwitchManager_ServiceDesc = grpc.ServiceDesc{
ServiceName: "nsm.v1.NVSwitchManager",
HandlerType: (*NVSwitchManagerServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "RegisterNVSwitches",
Handler: _NVSwitchManager_RegisterNVSwitches_Handler,
},
{
MethodName: "GetNVSwitches",
Handler: _NVSwitchManager_GetNVSwitches_Handler,
},
{
MethodName: "ListBundles",
Handler: _NVSwitchManager_ListBundles_Handler,
},
{
MethodName: "QueueUpdate",
Handler: _NVSwitchManager_QueueUpdate_Handler,
},
{
MethodName: "QueueUpdates",
Handler: _NVSwitchManager_QueueUpdates_Handler,
},
{
MethodName: "GetUpdate",
Handler: _NVSwitchManager_GetUpdate_Handler,
},
{
MethodName: "GetUpdatesForSwitch",
Handler: _NVSwitchManager_GetUpdatesForSwitch_Handler,
},
{
MethodName: "GetAllUpdates",
Handler: _NVSwitchManager_GetAllUpdates_Handler,
},
{
MethodName: "CancelUpdate",
Handler: _NVSwitchManager_CancelUpdate_Handler,
},
{
MethodName: "PowerControl",
Handler: _NVSwitchManager_PowerControl_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "nvswitch-manager.proto",
}