@@ -88,11 +88,11 @@ func checkTemplate(c *pango.Client, ctx context.Context) {
88
88
Name : "codegen_template" ,
89
89
Description : util .String ("This is a template created by codegen." ),
90
90
DefaultVsys : util .String ("vsys1" ),
91
- Config : & template.SpecConfig {
92
- Devices : []template.SpecConfigDevices {
91
+ Config : & template.Config {
92
+ Devices : []template.ConfigDevices {
93
93
{
94
94
Name : "localhost.localdomain" ,
95
- Vsys : []template.SpecConfigDevicesVsys {
95
+ Vsys : []template.ConfigDevicesVsys {
96
96
{
97
97
Name : "vsys1" ,
98
98
},
@@ -182,41 +182,41 @@ func checkSharedObjects(c *pango.Client, ctx context.Context) {
182
182
func checkVr (c * pango.Client , ctx context.Context ) {
183
183
entry := virtual_router.Entry {
184
184
Name : "codegen_vr" ,
185
- Protocol : & virtual_router.SpecProtocol {
186
- Bgp : & virtual_router.SpecProtocolBgp {
185
+ Protocol : & virtual_router.Protocol {
186
+ Bgp : & virtual_router.ProtocolBgp {
187
187
Enable : util .Bool (false ),
188
188
},
189
- Ospf : & virtual_router.SpecProtocolOspf {
189
+ Ospf : & virtual_router.ProtocolOspf {
190
190
Enable : util .Bool (false ),
191
191
},
192
- Ospfv3 : & virtual_router.SpecProtocolOspfv3 {
192
+ Ospfv3 : & virtual_router.ProtocolOspfv3 {
193
193
Enable : util .Bool (false ),
194
194
},
195
- Rip : & virtual_router.SpecProtocolRip {
195
+ Rip : & virtual_router.ProtocolRip {
196
196
Enable : util .Bool (false ),
197
197
},
198
198
},
199
- RoutingTable : & virtual_router.SpecRoutingTable {
200
- // Ip: &virtual_router.SpecRoutingTableIp {
201
- // StaticRoutes: []virtual_router.SpecRoutingTableIpStaticRoutes {
199
+ RoutingTable : & virtual_router.RoutingTable {
200
+ // Ip: &virtual_router.RoutingTableIp {
201
+ // StaticRoutes: []virtual_router.RoutingTableIpStaticRoutes {
202
202
// {
203
203
// Name: "default",
204
204
// Destination: util.String("0.0.0.0/0"),
205
205
// Interface: util.String("ethernet1/2"),
206
- // NextHop: &virtual_router.SpecRoutingTableIpStaticRoutesNextHop {
206
+ // NextHop: &virtual_router.RoutingTableIpStaticRoutesNextHop {
207
207
// IpAddress: util.String("1.1.1.1"),
208
208
// },
209
209
// Metric: util.Int(64),
210
210
// AdminDist: util.Int(120),
211
211
// },
212
212
// },
213
213
// },
214
- // Ipv6: &virtual_router.SpecRoutingTableIpv6 {
215
- // StaticRoutes: []virtual_router.SpecRoutingTableIpv6StaticRoutes {
214
+ // Ipv6: &virtual_router.RoutingTableIpv6 {
215
+ // StaticRoutes: []virtual_router.RoutingTableIpv6StaticRoutes {
216
216
// {
217
217
// Name: "default",
218
218
// Destination: util.String("0.0.0.0/0"),
219
- // NextHop: &virtual_router.SpecRoutingTableIpv6StaticRoutesNextHop {
219
+ // NextHop: &virtual_router.RoutingTableIpv6StaticRoutesNextHop {
220
220
// Ipv6Address: util.String("2001:0000:130F:0000:0000:09C0:876A:230D"),
221
221
// },
222
222
// Metric: util.Int(24),
@@ -225,18 +225,18 @@ func checkVr(c *pango.Client, ctx context.Context) {
225
225
// },
226
226
// },
227
227
},
228
- Ecmp : & virtual_router.SpecEcmp {
228
+ Ecmp : & virtual_router.Ecmp {
229
229
Enable : util .Bool (true ),
230
230
SymmetricReturn : util .Bool (true ),
231
231
MaxPaths : util .Int (3 ),
232
- Algorithm : & virtual_router.SpecEcmpAlgorithm {
233
- // IpHash: &virtual_router.SpecEcmpAlgorithmIpHash {
232
+ Algorithm : & virtual_router.EcmpAlgorithm {
233
+ // IpHash: &virtual_router.EcmpAlgorithmIpHash {
234
234
// HashSeed: util.Int(1234),
235
235
// UsePort: util.Bool(true),
236
236
// SrcOnly: util.Bool(true),
237
237
// },
238
- // WeightedRoundRobin: &virtual_router.SpecEcmpAlgorithmWeightedRoundRobin {
239
- // Interfaces: []virtual_router.SpecEcmpAlgorithmWeightedRoundRobinInterfaces {
238
+ // WeightedRoundRobin: &virtual_router.EcmpAlgorithmWeightedRoundRobin {
239
+ // Interfaces: []virtual_router.EcmpAlgorithmWeightedRoundRobinInterfaces {
240
240
// {
241
241
// Name: "ethernet1/2",
242
242
// Weight: util.Int(1),
@@ -249,7 +249,7 @@ func checkVr(c *pango.Client, ctx context.Context) {
249
249
// },
250
250
},
251
251
},
252
- AdministrativeDistances : & virtual_router.SpecAdministrativeDistances {
252
+ AdministrativeDistances : & virtual_router.AdministrativeDistances {
253
253
OspfInt : util .Int (77 ),
254
254
OspfExt : util .Int (88 ),
255
255
},
@@ -275,18 +275,18 @@ func checkEthernetLayer3Static(c *pango.Client, ctx context.Context) {
275
275
entry := ethernet.Entry {
276
276
Name : "ethernet1/2" ,
277
277
Comment : util .String ("This is a ethernet1/2" ),
278
- Layer3 : & ethernet.SpecLayer3 {
278
+ Layer3 : & ethernet.Layer3 {
279
279
NdpProxy : util .Bool (true ),
280
280
Lldp : util .Bool (true ),
281
- AdjustTcpMss : & ethernet.SpecLayer3AdjustTcpMss {
281
+ AdjustTcpMss : & ethernet.Layer3AdjustTcpMss {
282
282
Enable : util .Bool (true ),
283
283
Ipv4MssAdjustment : util .Int (250 ),
284
284
Ipv6MssAdjustment : util .Int (250 ),
285
285
},
286
286
Mtu : util .Int (1280 ),
287
287
Ips : []string {"11.11.11.11" , "22.22.22.22" },
288
- Ipv6 : & ethernet.SpecLayer3Ipv6 {
289
- Addresses : []ethernet.SpecLayer3Ipv6Addresses {
288
+ Ipv6 : & ethernet.Layer3Ipv6 {
289
+ Addresses : []ethernet.Layer3Ipv6Addresses {
290
290
{
291
291
EnableOnInterface : util .Bool (false ),
292
292
Name : "2001:0000:130F:0000:0000:09C0:876A:230B" ,
@@ -321,13 +321,13 @@ func checkEthernetLayer3Dhcp(c *pango.Client, ctx context.Context) {
321
321
entry := ethernet.Entry {
322
322
Name : "ethernet1/3" ,
323
323
Comment : util .String ("This is a ethernet1/3" ),
324
- Layer3 : & ethernet.SpecLayer3 {
324
+ Layer3 : & ethernet.Layer3 {
325
325
InterfaceManagementProfile : util .String ("codegen_mgmt_profile" ),
326
- DhcpClient : & ethernet.SpecLayer3DhcpClient {
326
+ DhcpClient : & ethernet.Layer3DhcpClient {
327
327
CreateDefaultRoute : util .Bool (false ),
328
328
DefaultRouteMetric : util .Int (64 ),
329
329
Enable : util .Bool (true ),
330
- SendHostname : & ethernet.SpecLayer3DhcpClientSendHostname {
330
+ SendHostname : & ethernet.Layer3DhcpClientSendHostname {
331
331
Enable : util .Bool (true ),
332
332
Hostname : util .String ("codegen_dhcp" ),
333
333
},
@@ -355,7 +355,7 @@ func checkEthernetHa(c *pango.Client, ctx context.Context) {
355
355
entry := ethernet.Entry {
356
356
Name : "ethernet1/10" ,
357
357
Comment : util .String ("This is a ethernet1/10" ),
358
- Ha : & ethernet.SpecHa {},
358
+ Ha : & ethernet.Ha {},
359
359
}
360
360
var location * ethernet.Location
361
361
if ok , _ := c .IsPanorama (); ok {
@@ -377,16 +377,16 @@ func checkEthernetHa(c *pango.Client, ctx context.Context) {
377
377
func checkLoopback (c * pango.Client , ctx context.Context ) {
378
378
entry := loopback.Entry {
379
379
Name : "loopback.123" ,
380
- AdjustTcpMss : & loopback.SpecAdjustTcpMss {
380
+ AdjustTcpMss : & loopback.AdjustTcpMss {
381
381
Enable : util .Bool (true ),
382
382
Ipv4MssAdjustment : util .Int (250 ),
383
383
Ipv6MssAdjustment : util .Int (250 ),
384
384
},
385
385
Comment : util .String ("This is a loopback entry" ),
386
386
Mtu : util .Int (1280 ),
387
387
Ips : []string {"1.1.1.1" , "2.2.2.2" },
388
- Ipv6 : & loopback.SpecIpv6 {
389
- Addresses : []loopback.SpecIpv6Addresses {
388
+ Ipv6 : & loopback.Ipv6 {
389
+ Addresses : []loopback.Ipv6Addresses {
390
390
{
391
391
EnableOnInterface : util .Bool (false ),
392
392
Name : "2001:0000:130F:0000:0000:09C0:876A:130B" ,
@@ -420,14 +420,14 @@ func checkZone(c *pango.Client, ctx context.Context) {
420
420
entry := zone.Entry {
421
421
Name : "codegen_zone" ,
422
422
EnableUserIdentification : util .Bool (true ),
423
- Network : & zone.SpecNetwork {
423
+ Network : & zone.Network {
424
424
EnablePacketBufferProtection : util .Bool (false ),
425
425
Layer3 : []string {},
426
426
},
427
- DeviceAcl : & zone.SpecDeviceAcl {
427
+ DeviceAcl : & zone.DeviceAcl {
428
428
IncludeList : []string {"1.2.3.4" },
429
429
},
430
- UserAcl : & zone.SpecUserAcl {
430
+ UserAcl : & zone.UserAcl {
431
431
ExcludeList : []string {"1.2.3.4" },
432
432
},
433
433
}
@@ -516,7 +516,7 @@ func checkVrZoneWithEthernet(c *pango.Client, ctx context.Context) {
516
516
}
517
517
log .Printf ("Zone %s read\n " , replyZone .Name )
518
518
519
- replyZone .Network = & zone.SpecNetwork {
519
+ replyZone .Network = & zone.Network {
520
520
EnablePacketBufferProtection : util .Bool (false ),
521
521
Layer3 : []string {"ethernet1/2" , "ethernet1/3" },
522
522
}
@@ -539,7 +539,7 @@ func checkVrZoneWithEthernet(c *pango.Client, ctx context.Context) {
539
539
log .Printf ("VR %s updated with %s\n " , replyVr .Name , replyVr .Interfaces )
540
540
541
541
// DELETE INTERFACES FROM ZONE
542
- replyZone .Network = & zone.SpecNetwork {
542
+ replyZone .Network = & zone.Network {
543
543
EnablePacketBufferProtection : util .Bool (false ),
544
544
Layer3 : []string {},
545
545
}
@@ -878,10 +878,10 @@ func checkService(c *pango.Client, ctx context.Context) {
878
878
serviceObject := service.Entry {
879
879
Name : "codegen_service_test1" ,
880
880
Description : util .String ("test description" ),
881
- Protocol : & service.SpecProtocol {
882
- Tcp : & service.SpecProtocolTcp {
881
+ Protocol : & service.Protocol {
882
+ Tcp : & service.ProtocolTcp {
883
883
DestinationPort : util .Int (8642 ),
884
- Override : & service.SpecProtocolTcpOverride {
884
+ Override : & service.ProtocolTcpOverride {
885
885
HalfcloseTimeout : util .Int (124 ),
886
886
Timeout : util .Int (125 ),
887
887
TimewaitTimeout : util .Int (127 ),
@@ -1035,8 +1035,8 @@ func checkService(c *pango.Client, ctx context.Context) {
1035
1035
func checkNtp (c * pango.Client , ctx context.Context ) {
1036
1036
// NTP - ADD
1037
1037
ntpConfig := ntp.Config {
1038
- NtpServers : & ntp.SpecNtpServers {
1039
- PrimaryNtpServer : & ntp.SpecNtpServersPrimaryNtpServer {
1038
+ NtpServers : & ntp.NtpServers {
1039
+ PrimaryNtpServer : & ntp.NtpServersPrimaryNtpServer {
1040
1040
NtpServerAddress : util .String ("11.12.13.14" ),
1041
1041
},
1042
1042
},
@@ -1071,8 +1071,8 @@ func checkNtp(c *pango.Client, ctx context.Context) {
1071
1071
func checkDns (c * pango.Client , ctx context.Context ) {
1072
1072
// DNS - ADD
1073
1073
dnsConfig := dns.Config {
1074
- DnsSetting : & dns.SpecDnsSetting {
1075
- Servers : & dns.SpecDnsSettingServers {
1074
+ DnsSetting : & dns.DnsSetting {
1075
+ Servers : & dns.DnsSettingServers {
1076
1076
Primary : util .String ("8.8.8.8" ),
1077
1077
Secondary : util .String ("4.4.4.4" ),
1078
1078
},
0 commit comments