blob: bb605218864a01947f680852d8f47b83f3461c0d [file] [log] [blame]
Serge Bazanski4b6f33a2018-10-05 22:28:01 +01001// Code generated by protoc-gen-go. DO NOT EDIT.
2// source: control.proto
3
4/*
5Package connector is a generated protocol buffer package.
6
7It is generated from these files:
8 control.proto
9
10It has these top-level messages:
11 GetPortsRequest
12 SwitchPort
13 GetPortsResponse
14*/
15package connector
16
17import proto "github.com/golang/protobuf/proto"
18import fmt "fmt"
19import math "math"
20
21import (
22 context "golang.org/x/net/context"
23 grpc "google.golang.org/grpc"
24)
25
26// Reference imports to suppress errors if they are not otherwise used.
27var _ = proto.Marshal
28var _ = fmt.Errorf
29var _ = math.Inf
30
31// This is a compile-time assertion to ensure that this generated file
32// is compatible with the proto package it is being compiled against.
33// A compilation error at this line likely means your copy of the
34// proto package needs to be updated.
35const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
36
37type SwitchPort_Speed int32
38
39const (
40 SwitchPort_SPEED_INVALID SwitchPort_Speed = 0
41 SwitchPort_SPEED_100M SwitchPort_Speed = 1
42 SwitchPort_SPEED_1G SwitchPort_Speed = 2
43 SwitchPort_SPEED_10G SwitchPort_Speed = 3
44)
45
46var SwitchPort_Speed_name = map[int32]string{
47 0: "SPEED_INVALID",
48 1: "SPEED_100M",
49 2: "SPEED_1G",
50 3: "SPEED_10G",
51}
52var SwitchPort_Speed_value = map[string]int32{
53 "SPEED_INVALID": 0,
54 "SPEED_100M": 1,
55 "SPEED_1G": 2,
56 "SPEED_10G": 3,
57}
58
59func (x SwitchPort_Speed) String() string {
60 return proto.EnumName(SwitchPort_Speed_name, int32(x))
61}
62func (SwitchPort_Speed) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 0} }
63
64type SwitchPort_LinkState int32
65
66const (
67 SwitchPort_LINKSTATE_INVALID SwitchPort_LinkState = 0
68 SwitchPort_LINKSTATE_DOWN SwitchPort_LinkState = 1
69 SwitchPort_LINKSTATE_UP SwitchPort_LinkState = 2
70)
71
72var SwitchPort_LinkState_name = map[int32]string{
73 0: "LINKSTATE_INVALID",
74 1: "LINKSTATE_DOWN",
75 2: "LINKSTATE_UP",
76}
77var SwitchPort_LinkState_value = map[string]int32{
78 "LINKSTATE_INVALID": 0,
79 "LINKSTATE_DOWN": 1,
80 "LINKSTATE_UP": 2,
81}
82
83func (x SwitchPort_LinkState) String() string {
84 return proto.EnumName(SwitchPort_LinkState_name, int32(x))
85}
86func (SwitchPort_LinkState) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 1} }
87
88type SwitchPort_PortMode int32
89
90const (
91 SwitchPort_PORTMODE_INVALID SwitchPort_PortMode = 0
92 // Interface is bridged to a VLAN, untagged.
93 SwitchPort_PORTMODE_SWITCHPORT_UNTAGGED SwitchPort_PortMode = 1
94 // Interfaces is bridged to several tagged 802.1q VLANs.
95 SwitchPort_PORTMODE_SWITCHPORT_TAGGED SwitchPort_PortMode = 2
96 // Interface is in 'generic', both tagged 802.1q and untagged mode.
97 SwitchPort_PORTMODE_SWITCHPORT_GENERIC SwitchPort_PortMode = 3
98 // Interface is routed, ie routes packets from a separate L3 network
99 // and the Switch is the default gateway for machines in this network.
100 SwitchPort_PORTMODE_ROUTED SwitchPort_PortMode = 4
101 // Interface is in a configuration state that cannot be clearly stated
102 // in terms of this enum, and should be reconfigured.
103 SwitchPort_PORTMODE_MANGLED SwitchPort_PortMode = 5
104)
105
106var SwitchPort_PortMode_name = map[int32]string{
107 0: "PORTMODE_INVALID",
108 1: "PORTMODE_SWITCHPORT_UNTAGGED",
109 2: "PORTMODE_SWITCHPORT_TAGGED",
110 3: "PORTMODE_SWITCHPORT_GENERIC",
111 4: "PORTMODE_ROUTED",
112 5: "PORTMODE_MANGLED",
113}
114var SwitchPort_PortMode_value = map[string]int32{
115 "PORTMODE_INVALID": 0,
116 "PORTMODE_SWITCHPORT_UNTAGGED": 1,
117 "PORTMODE_SWITCHPORT_TAGGED": 2,
118 "PORTMODE_SWITCHPORT_GENERIC": 3,
119 "PORTMODE_ROUTED": 4,
120 "PORTMODE_MANGLED": 5,
121}
122
123func (x SwitchPort_PortMode) String() string {
124 return proto.EnumName(SwitchPort_PortMode_name, int32(x))
125}
126func (SwitchPort_PortMode) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 2} }
127
128type SwitchPort_SpanningTreeMode int32
129
130const (
131 SwitchPort_SPANNING_TREE_MODE_INVALID SwitchPort_SpanningTreeMode = 0
132 // Send STP BPDU, on timeout switch to Forwarding.
133 SwitchPort_SPANNING_TREE_MODE_AUTO_PORTFAST SwitchPort_SpanningTreeMode = 1
134 // Switch to Forwarding immediately on link up.
135 SwitchPort_SPANNING_TREE_MODE_PORTFAST SwitchPort_SpanningTreeMode = 2
136)
137
138var SwitchPort_SpanningTreeMode_name = map[int32]string{
139 0: "SPANNING_TREE_MODE_INVALID",
140 1: "SPANNING_TREE_MODE_AUTO_PORTFAST",
141 2: "SPANNING_TREE_MODE_PORTFAST",
142}
143var SwitchPort_SpanningTreeMode_value = map[string]int32{
144 "SPANNING_TREE_MODE_INVALID": 0,
145 "SPANNING_TREE_MODE_AUTO_PORTFAST": 1,
146 "SPANNING_TREE_MODE_PORTFAST": 2,
147}
148
149func (x SwitchPort_SpanningTreeMode) String() string {
150 return proto.EnumName(SwitchPort_SpanningTreeMode_name, int32(x))
151}
152func (SwitchPort_SpanningTreeMode) EnumDescriptor() ([]byte, []int) {
153 return fileDescriptor0, []int{1, 3}
154}
155
156type GetPortsRequest struct {
157}
158
159func (m *GetPortsRequest) Reset() { *m = GetPortsRequest{} }
160func (m *GetPortsRequest) String() string { return proto.CompactTextString(m) }
161func (*GetPortsRequest) ProtoMessage() {}
162func (*GetPortsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
163
164type SwitchPort struct {
165 Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
166 Speed SwitchPort_Speed `protobuf:"varint,2,opt,name=speed,enum=connector.SwitchPort_Speed" json:"speed,omitempty"`
167 LinkState SwitchPort_LinkState `protobuf:"varint,3,opt,name=link_state,json=linkState,enum=connector.SwitchPort_LinkState" json:"link_state,omitempty"`
168 PortMode SwitchPort_PortMode `protobuf:"varint,4,opt,name=port_mode,json=portMode,enum=connector.SwitchPort_PortMode" json:"port_mode,omitempty"`
169 // For PORTMODE_SWITCHPORT_UNTAGGED and PORTMODE_SWITCHPORT_GENERIC, the
170 // VLAN ID that this interface is natively bridged to.
171 VlanNative int32 `protobuf:"varint,5,opt,name=vlan_native,json=vlanNative" json:"vlan_native,omitempty"`
172 // For PORTMODE_SWITCHPORT_TAGGED and PORTMODE_SWITCHPORT_GENERIC, the VLAN
173 // IDs that the interface is bridged to using 802.1q tags.
174 VlanTagged []int32 `protobuf:"varint,6,rep,packed,name=vlan_tagged,json=vlanTagged" json:"vlan_tagged,omitempty"`
175 // For PORTMODE_ROUTED
176 Prefixes []string `protobuf:"bytes,7,rep,name=prefixes" json:"prefixes,omitempty"`
177 // Interface MTU
178 Mtu int32 `protobuf:"varint,8,opt,name=mtu" json:"mtu,omitempty"`
179 SpanningTreeMode SwitchPort_SpanningTreeMode `protobuf:"varint,9,opt,name=spanning_tree_mode,json=spanningTreeMode,enum=connector.SwitchPort_SpanningTreeMode" json:"spanning_tree_mode,omitempty"`
180}
181
182func (m *SwitchPort) Reset() { *m = SwitchPort{} }
183func (m *SwitchPort) String() string { return proto.CompactTextString(m) }
184func (*SwitchPort) ProtoMessage() {}
185func (*SwitchPort) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
186
187func (m *SwitchPort) GetName() string {
188 if m != nil {
189 return m.Name
190 }
191 return ""
192}
193
194func (m *SwitchPort) GetSpeed() SwitchPort_Speed {
195 if m != nil {
196 return m.Speed
197 }
198 return SwitchPort_SPEED_INVALID
199}
200
201func (m *SwitchPort) GetLinkState() SwitchPort_LinkState {
202 if m != nil {
203 return m.LinkState
204 }
205 return SwitchPort_LINKSTATE_INVALID
206}
207
208func (m *SwitchPort) GetPortMode() SwitchPort_PortMode {
209 if m != nil {
210 return m.PortMode
211 }
212 return SwitchPort_PORTMODE_INVALID
213}
214
215func (m *SwitchPort) GetVlanNative() int32 {
216 if m != nil {
217 return m.VlanNative
218 }
219 return 0
220}
221
222func (m *SwitchPort) GetVlanTagged() []int32 {
223 if m != nil {
224 return m.VlanTagged
225 }
226 return nil
227}
228
229func (m *SwitchPort) GetPrefixes() []string {
230 if m != nil {
231 return m.Prefixes
232 }
233 return nil
234}
235
236func (m *SwitchPort) GetMtu() int32 {
237 if m != nil {
238 return m.Mtu
239 }
240 return 0
241}
242
243func (m *SwitchPort) GetSpanningTreeMode() SwitchPort_SpanningTreeMode {
244 if m != nil {
245 return m.SpanningTreeMode
246 }
247 return SwitchPort_SPANNING_TREE_MODE_INVALID
248}
249
250type GetPortsResponse struct {
251 Ports []*SwitchPort `protobuf:"bytes,1,rep,name=ports" json:"ports,omitempty"`
252}
253
254func (m *GetPortsResponse) Reset() { *m = GetPortsResponse{} }
255func (m *GetPortsResponse) String() string { return proto.CompactTextString(m) }
256func (*GetPortsResponse) ProtoMessage() {}
257func (*GetPortsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
258
259func (m *GetPortsResponse) GetPorts() []*SwitchPort {
260 if m != nil {
261 return m.Ports
262 }
263 return nil
264}
265
266func init() {
267 proto.RegisterType((*GetPortsRequest)(nil), "connector.GetPortsRequest")
268 proto.RegisterType((*SwitchPort)(nil), "connector.SwitchPort")
269 proto.RegisterType((*GetPortsResponse)(nil), "connector.GetPortsResponse")
270 proto.RegisterEnum("connector.SwitchPort_Speed", SwitchPort_Speed_name, SwitchPort_Speed_value)
271 proto.RegisterEnum("connector.SwitchPort_LinkState", SwitchPort_LinkState_name, SwitchPort_LinkState_value)
272 proto.RegisterEnum("connector.SwitchPort_PortMode", SwitchPort_PortMode_name, SwitchPort_PortMode_value)
273 proto.RegisterEnum("connector.SwitchPort_SpanningTreeMode", SwitchPort_SpanningTreeMode_name, SwitchPort_SpanningTreeMode_value)
274}
275
276// Reference imports to suppress errors if they are not otherwise used.
277var _ context.Context
278var _ grpc.ClientConn
279
280// This is a compile-time assertion to ensure that this generated file
281// is compatible with the grpc package it is being compiled against.
282const _ = grpc.SupportPackageIsVersion4
283
284// Client API for SwitchControl service
285
286type SwitchControlClient interface {
287 GetPorts(ctx context.Context, in *GetPortsRequest, opts ...grpc.CallOption) (*GetPortsResponse, error)
288}
289
290type switchControlClient struct {
291 cc *grpc.ClientConn
292}
293
294func NewSwitchControlClient(cc *grpc.ClientConn) SwitchControlClient {
295 return &switchControlClient{cc}
296}
297
298func (c *switchControlClient) GetPorts(ctx context.Context, in *GetPortsRequest, opts ...grpc.CallOption) (*GetPortsResponse, error) {
299 out := new(GetPortsResponse)
300 err := grpc.Invoke(ctx, "/connector.SwitchControl/GetPorts", in, out, c.cc, opts...)
301 if err != nil {
302 return nil, err
303 }
304 return out, nil
305}
306
307// Server API for SwitchControl service
308
309type SwitchControlServer interface {
310 GetPorts(context.Context, *GetPortsRequest) (*GetPortsResponse, error)
311}
312
313func RegisterSwitchControlServer(s *grpc.Server, srv SwitchControlServer) {
314 s.RegisterService(&_SwitchControl_serviceDesc, srv)
315}
316
317func _SwitchControl_GetPorts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
318 in := new(GetPortsRequest)
319 if err := dec(in); err != nil {
320 return nil, err
321 }
322 if interceptor == nil {
323 return srv.(SwitchControlServer).GetPorts(ctx, in)
324 }
325 info := &grpc.UnaryServerInfo{
326 Server: srv,
327 FullMethod: "/connector.SwitchControl/GetPorts",
328 }
329 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
330 return srv.(SwitchControlServer).GetPorts(ctx, req.(*GetPortsRequest))
331 }
332 return interceptor(ctx, in, info, handler)
333}
334
335var _SwitchControl_serviceDesc = grpc.ServiceDesc{
336 ServiceName: "connector.SwitchControl",
337 HandlerType: (*SwitchControlServer)(nil),
338 Methods: []grpc.MethodDesc{
339 {
340 MethodName: "GetPorts",
341 Handler: _SwitchControl_GetPorts_Handler,
342 },
343 },
344 Streams: []grpc.StreamDesc{},
345 Metadata: "control.proto",
346}
347
348func init() { proto.RegisterFile("control.proto", fileDescriptor0) }
349
350var fileDescriptor0 = []byte{
351 // 561 bytes of a gzipped FileDescriptorProto
352 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x54, 0xd1, 0x6e, 0x9b, 0x4a,
353 0x10, 0xbd, 0x98, 0x38, 0x17, 0x26, 0x71, 0xb2, 0x99, 0x36, 0x12, 0x72, 0xaa, 0x04, 0xa1, 0xaa,
354 0xb2, 0x54, 0xc9, 0x4a, 0xd2, 0xc7, 0x4a, 0xad, 0x90, 0xa1, 0x04, 0xd5, 0xc6, 0xd6, 0xb2, 0x6e,
355 0x1e, 0x11, 0xb5, 0xb7, 0x29, 0x8a, 0xb3, 0x50, 0xd8, 0xa4, 0xed, 0x4f, 0xf5, 0x6f, 0xfa, 0x3f,
356 0x15, 0x10, 0xe3, 0xd4, 0xa2, 0x2f, 0x68, 0xe6, 0xcc, 0x39, 0xb3, 0x87, 0xd1, 0xce, 0x42, 0x6f,
357 0x91, 0x0a, 0x99, 0xa7, 0xab, 0x61, 0x96, 0xa7, 0x32, 0x45, 0x7d, 0x91, 0x0a, 0xc1, 0x17, 0x32,
358 0xcd, 0xad, 0x23, 0x38, 0xf4, 0xb8, 0x9c, 0xa5, 0xb9, 0x2c, 0x28, 0xff, 0x76, 0xcf, 0x0b, 0x69,
359 0xfd, 0xde, 0x05, 0x08, 0xbf, 0x27, 0x72, 0xf1, 0xb5, 0x84, 0x11, 0x61, 0x47, 0xc4, 0x77, 0xdc,
360 0x50, 0x4c, 0x65, 0xa0, 0xd3, 0x2a, 0xc6, 0x0b, 0xe8, 0x16, 0x19, 0xe7, 0x4b, 0xa3, 0x63, 0x2a,
361 0x83, 0x83, 0xcb, 0x93, 0x61, 0xd3, 0x70, 0xb8, 0x51, 0x0e, 0xc3, 0x92, 0x42, 0x6b, 0x26, 0xbe,
362 0x03, 0x58, 0x25, 0xe2, 0x36, 0x2a, 0x64, 0x2c, 0xb9, 0xa1, 0x56, 0xba, 0xb3, 0x76, 0xdd, 0x38,
363 0x11, 0xb7, 0x61, 0x49, 0xa3, 0xfa, 0x6a, 0x1d, 0xe2, 0x5b, 0xd0, 0xb3, 0x34, 0x97, 0xd1, 0x5d,
364 0xba, 0xe4, 0xc6, 0x4e, 0x25, 0x3f, 0x6d, 0x97, 0x97, 0x9f, 0x49, 0xba, 0xe4, 0x54, 0xcb, 0x1e,
365 0x23, 0x3c, 0x83, 0xbd, 0x87, 0x55, 0x2c, 0x22, 0x11, 0xcb, 0xe4, 0x81, 0x1b, 0x5d, 0x53, 0x19,
366 0x74, 0x29, 0x94, 0x50, 0x50, 0x21, 0x0d, 0x41, 0xc6, 0x37, 0x37, 0x7c, 0x69, 0xec, 0x9a, 0xea,
367 0x9a, 0xc0, 0x2a, 0x04, 0xfb, 0xa0, 0x65, 0x39, 0xff, 0x92, 0xfc, 0xe0, 0x85, 0xf1, 0xbf, 0xa9,
368 0x0e, 0x74, 0xda, 0xe4, 0x48, 0x40, 0xbd, 0x93, 0xf7, 0x86, 0x56, 0x75, 0x2d, 0x43, 0x64, 0x80,
369 0x45, 0x16, 0x0b, 0x91, 0x88, 0x9b, 0x48, 0xe6, 0x9c, 0xd7, 0xae, 0xf5, 0xca, 0xf5, 0xab, 0x7f,
370 0x0d, 0xab, 0xe6, 0xb3, 0x9c, 0xf3, 0xca, 0x3d, 0x29, 0xb6, 0x10, 0xcb, 0x83, 0x6e, 0x35, 0x52,
371 0x3c, 0x82, 0x5e, 0x38, 0x73, 0x5d, 0x27, 0xf2, 0x83, 0x4f, 0xf6, 0xd8, 0x77, 0xc8, 0x7f, 0x78,
372 0x00, 0x50, 0x43, 0x17, 0xe7, 0xe7, 0x13, 0xa2, 0xe0, 0x3e, 0x68, 0x8f, 0xb9, 0x47, 0x3a, 0xd8,
373 0x03, 0x7d, 0x5d, 0xf5, 0x88, 0x6a, 0x5d, 0x81, 0xde, 0xcc, 0x18, 0x8f, 0xe1, 0x68, 0xec, 0x07,
374 0x1f, 0x43, 0x66, 0x33, 0xf7, 0x49, 0x43, 0x84, 0x83, 0x0d, 0xec, 0x4c, 0xaf, 0x03, 0xa2, 0x20,
375 0x81, 0xfd, 0x0d, 0x36, 0x9f, 0x91, 0x8e, 0xf5, 0x4b, 0x01, 0x6d, 0x3d, 0x6f, 0x7c, 0x0e, 0x64,
376 0x36, 0xa5, 0x6c, 0x32, 0x75, 0x9e, 0x36, 0x32, 0xe1, 0x45, 0x83, 0x86, 0xd7, 0x3e, 0x1b, 0x5d,
377 0x95, 0x69, 0x34, 0x0f, 0x98, 0xed, 0x79, 0xae, 0x43, 0x14, 0x3c, 0x85, 0x7e, 0x1b, 0xe3, 0xb1,
378 0xde, 0xc1, 0x33, 0x38, 0x69, 0xab, 0x7b, 0x6e, 0xe0, 0x52, 0x7f, 0x44, 0x54, 0x7c, 0x06, 0x87,
379 0x0d, 0x81, 0x4e, 0xe7, 0xcc, 0x75, 0xc8, 0xce, 0x5f, 0x6e, 0x26, 0x76, 0xe0, 0x8d, 0x5d, 0x87,
380 0x74, 0xad, 0x9f, 0x40, 0xb6, 0x27, 0x5d, 0x9e, 0x1f, 0xce, 0xec, 0x20, 0xf0, 0x03, 0x2f, 0x62,
381 0xd4, 0x75, 0xa3, 0xad, 0x3f, 0x78, 0x09, 0x66, 0x4b, 0xdd, 0x9e, 0xb3, 0x69, 0x54, 0x9e, 0xf0,
382 0xc1, 0x0e, 0x19, 0x51, 0x4a, 0x97, 0x2d, 0xac, 0x86, 0xd0, 0xb1, 0xde, 0x03, 0xd9, 0xac, 0x5a,
383 0x91, 0xa5, 0xa2, 0xe0, 0xf8, 0x1a, 0xba, 0xe5, 0x25, 0x2d, 0x0c, 0xc5, 0x54, 0x07, 0x7b, 0x97,
384 0xc7, 0xad, 0x77, 0x83, 0xd6, 0x9c, 0x4b, 0x06, 0xbd, 0x1a, 0x1c, 0xd5, 0xdb, 0x8c, 0x23, 0xd0,
385 0xd6, 0x1d, 0xb1, 0xff, 0x44, 0xba, 0xb5, 0xd1, 0xfd, 0x93, 0xd6, 0x5a, 0x6d, 0xe1, 0xf3, 0x6e,
386 0xf5, 0x26, 0xbc, 0xf9, 0x13, 0x00, 0x00, 0xff, 0xff, 0xae, 0x71, 0xa0, 0x75, 0x24, 0x04, 0x00,
387 0x00,
388}