This repository has been archived by the owner on Aug 3, 2020. It is now read-only.
forked from ligato/vpp-agent
/
netalloc.pb.go
300 lines (268 loc) · 12 KB
/
netalloc.pb.go
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
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: models/netalloc/netalloc.proto
// Netalloc allows to disassociate topology from addressing in the network
// configuration. Instead of inserting specific IP/MAC addresses, VXLAN VNIs, etc.,
// into the configuration data for interfaces, routes, ARPs and other network
// objects, the addresses can be symbolic references into the pool of allocated
// addresses known to the netalloc plugin.
//
// The ability to separate addresses from the rest of the network configuration
// is especially useful in scenarios where address allocations are provided
// externally, for example by another control-plane agent, IPAM tool or by CNI
// in containerized environments.
//
// But for now, only model for IP address allocations has been implemented.
// To allocate a new IP address, an instance of the proto message IPAllocation
// should be submitted into the vpp-agent through one of the supported NB
// transports (etcd, GRPC, ...) under the corresponding key. Network object which
// references (to-be or already) allocated address will have a dependency on the
// corresponding key-value instance of IPAllocation and will read and apply the
// address only once it is available.
package netalloc
import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
// IPAddressForm can be used in descriptors whose models reference allocated IP
// addresses, to ask for a specific form in which the address should applied.
type IPAddressForm int32
const (
IPAddressForm_UNDEFINED_FORM IPAddressForm = 0
// ADDR_ONLY = apply address without mask, e.g. 192.168.2.5
IPAddressForm_ADDR_ONLY IPAddressForm = 1
// ADDR_WITH_MASK = apply address including the mask of the network,
// e.g. 192.168.2.5/24
IPAddressForm_ADDR_WITH_MASK IPAddressForm = 2
// ADDR_NET = apply network implied by the address,
// e.g. for 192.168.2.10/24 apply 192.168.2.0/24
IPAddressForm_ADDR_NET IPAddressForm = 3
// SINGLE_ADDR_NET = apply address with an all-ones mask (i.e. /32 for IPv4,
// /128 for IPv6)
IPAddressForm_SINGLE_ADDR_NET IPAddressForm = 4
)
var IPAddressForm_name = map[int32]string{
0: "UNDEFINED_FORM",
1: "ADDR_ONLY",
2: "ADDR_WITH_MASK",
3: "ADDR_NET",
4: "SINGLE_ADDR_NET",
}
var IPAddressForm_value = map[string]int32{
"UNDEFINED_FORM": 0,
"ADDR_ONLY": 1,
"ADDR_WITH_MASK": 2,
"ADDR_NET": 3,
"SINGLE_ADDR_NET": 4,
}
func (x IPAddressForm) String() string {
return proto.EnumName(IPAddressForm_name, int32(x))
}
func (IPAddressForm) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_871b6a8ed3ae2830, []int{0}
}
// IPAddressSource can be used to remember the source of an IP address.
// (e.g. to distinguish allocated IP addresses from statically defined ones)
type IPAddressSource int32
const (
IPAddressSource_UNDEFINED_SOURCE IPAddressSource = 0
// STATIC is IP address statically assigned in the NB configuration.
IPAddressSource_STATIC IPAddressSource = 1
// FROM_DHCP is set when IP address is obtained from DHCP.
IPAddressSource_FROM_DHCP IPAddressSource = 2
// ALLOC_REF is a reference inside NB configuration to an allocated
// IP address.
IPAddressSource_ALLOC_REF IPAddressSource = 3
)
var IPAddressSource_name = map[int32]string{
0: "UNDEFINED_SOURCE",
1: "STATIC",
2: "FROM_DHCP",
3: "ALLOC_REF",
}
var IPAddressSource_value = map[string]int32{
"UNDEFINED_SOURCE": 0,
"STATIC": 1,
"FROM_DHCP": 2,
"ALLOC_REF": 3,
}
func (x IPAddressSource) String() string {
return proto.EnumName(IPAddressSource_name, int32(x))
}
func (IPAddressSource) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_871b6a8ed3ae2830, []int{1}
}
// IPAllocation represents a single allocated IP address.
//
// To reference allocated address, instead of entering specific IP address
// for interface/route/ARP/..., use one of the following string templates
// prefixed with netalloc keyword "alloc" followed by colon:
// a) reference IP address allocated for an interface:
// "alloc:<network_name>/<interface_name>"
// b) when interface is given (e.g. when asked for IP from interface model),
// interface_name can be omitted:
// "alloc:<network_name>"
// c) reference default gateway IP address assigned to an interface:
// "alloc:<network_name>/<interface_name>/GW"
// d) when asking for GW IP for interface which is given, interface_name
// can be omitted:
// "alloc:<network_name>/GW"
type IPAllocation struct {
// NetworkName is some label assigned to the network where the IP address
// was assigned to the given interface.
// In theory, interface can have multiple IP adresses or there can be multiple
// address allocators and the network name allows to separate them.
// The network name is not allowed to contain forward slashes.
NetworkName string `protobuf:"bytes,1,opt,name=network_name,json=networkName,proto3" json:"network_name,omitempty"`
// InterfaceName is the logical VPP or Linux interface name for which the
// address is allocated.
InterfaceName string `protobuf:"bytes,2,opt,name=interface_name,json=interfaceName,proto3" json:"interface_name,omitempty"`
// Address is an IP addres allocated to the interface inside the given
// network.
// If the address is specified without a mask, the all-ones mask (/32 for
// IPv4, /128 for IPv6) will be assumed.
Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"`
// Gw is the address of the default gateway assigned to the interface in
// the given network.
// If the address is specified without a mask, then either:
// a) the mask of the <address> is used provided that GW IP falls into the
// same network IP range, or
// b) the all-ones mask is used otherwise
Gw string `protobuf:"bytes,5,opt,name=gw,proto3" json:"gw,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *IPAllocation) Reset() { *m = IPAllocation{} }
func (m *IPAllocation) String() string { return proto.CompactTextString(m) }
func (*IPAllocation) ProtoMessage() {}
func (*IPAllocation) Descriptor() ([]byte, []int) {
return fileDescriptor_871b6a8ed3ae2830, []int{0}
}
func (m *IPAllocation) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_IPAllocation.Unmarshal(m, b)
}
func (m *IPAllocation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_IPAllocation.Marshal(b, m, deterministic)
}
func (m *IPAllocation) XXX_Merge(src proto.Message) {
xxx_messageInfo_IPAllocation.Merge(m, src)
}
func (m *IPAllocation) XXX_Size() int {
return xxx_messageInfo_IPAllocation.Size(m)
}
func (m *IPAllocation) XXX_DiscardUnknown() {
xxx_messageInfo_IPAllocation.DiscardUnknown(m)
}
var xxx_messageInfo_IPAllocation proto.InternalMessageInfo
func (m *IPAllocation) GetNetworkName() string {
if m != nil {
return m.NetworkName
}
return ""
}
func (m *IPAllocation) GetInterfaceName() string {
if m != nil {
return m.InterfaceName
}
return ""
}
func (m *IPAllocation) GetAddress() string {
if m != nil {
return m.Address
}
return ""
}
func (m *IPAllocation) GetGw() string {
if m != nil {
return m.Gw
}
return ""
}
func (*IPAllocation) XXX_MessageName() string {
return "netalloc.IPAllocation"
}
// ConfigData wraps all configuration items exported by netalloc.
// TBD: MACs, VXLAN VNIs, memif IDs, etc.
type ConfigData struct {
IpAddresses []*IPAllocation `protobuf:"bytes,10,rep,name=ip_addresses,json=ipAddresses,proto3" json:"ip_addresses,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ConfigData) Reset() { *m = ConfigData{} }
func (m *ConfigData) String() string { return proto.CompactTextString(m) }
func (*ConfigData) ProtoMessage() {}
func (*ConfigData) Descriptor() ([]byte, []int) {
return fileDescriptor_871b6a8ed3ae2830, []int{1}
}
func (m *ConfigData) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ConfigData.Unmarshal(m, b)
}
func (m *ConfigData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ConfigData.Marshal(b, m, deterministic)
}
func (m *ConfigData) XXX_Merge(src proto.Message) {
xxx_messageInfo_ConfigData.Merge(m, src)
}
func (m *ConfigData) XXX_Size() int {
return xxx_messageInfo_ConfigData.Size(m)
}
func (m *ConfigData) XXX_DiscardUnknown() {
xxx_messageInfo_ConfigData.DiscardUnknown(m)
}
var xxx_messageInfo_ConfigData proto.InternalMessageInfo
func (m *ConfigData) GetIpAddresses() []*IPAllocation {
if m != nil {
return m.IpAddresses
}
return nil
}
func (*ConfigData) XXX_MessageName() string {
return "netalloc.ConfigData"
}
func init() {
proto.RegisterEnum("netalloc.IPAddressForm", IPAddressForm_name, IPAddressForm_value)
proto.RegisterEnum("netalloc.IPAddressSource", IPAddressSource_name, IPAddressSource_value)
proto.RegisterType((*IPAllocation)(nil), "netalloc.IPAllocation")
proto.RegisterType((*ConfigData)(nil), "netalloc.ConfigData")
}
func init() { proto.RegisterFile("models/netalloc/netalloc.proto", fileDescriptor_871b6a8ed3ae2830) }
var fileDescriptor_871b6a8ed3ae2830 = []byte{
// 395 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x92, 0xcd, 0x6e,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