@@ -1741,7 +1741,7 @@ func (data *TransportRoutingBGP) fromBody(ctx context.Context, res gjson.Result)
1741
1741
data .MultipathRelax = types .BoolValue (va .Bool ())
1742
1742
}
1743
1743
}
1744
- if value := res .Get (path + "neighbor" ); value .Exists () {
1744
+ if value := res .Get (path + "neighbor" ); value .Exists () && len ( value . Array ()) > 0 {
1745
1745
data .Ipv4Neighbors = make ([]TransportRoutingBGPIpv4Neighbors , 0 )
1746
1746
value .ForEach (func (k , v gjson.Result ) bool {
1747
1747
item := TransportRoutingBGPIpv4Neighbors {}
@@ -1903,7 +1903,7 @@ func (data *TransportRoutingBGP) fromBody(ctx context.Context, res gjson.Result)
1903
1903
item .AllowasInNumber = types .Int64Value (va .Int ())
1904
1904
}
1905
1905
}
1906
- if cValue := v .Get ("addressFamily" ); cValue .Exists () {
1906
+ if cValue := v .Get ("addressFamily" ); cValue .Exists () && len ( cValue . Array ()) > 0 {
1907
1907
item .AddressFamilies = make ([]TransportRoutingBGPIpv4NeighborsAddressFamilies , 0 )
1908
1908
cValue .ForEach (func (ck , cv gjson.Result ) bool {
1909
1909
cItem := TransportRoutingBGPIpv4NeighborsAddressFamilies {}
@@ -1934,6 +1934,7 @@ func (data *TransportRoutingBGP) fromBody(ctx context.Context, res gjson.Result)
1934
1934
cItem .RestartMaxNumberOfPrefixes = types .Int64Value (va .Int ())
1935
1935
}
1936
1936
}
1937
+ cItem .PolicyType = types .StringValue ("restart" )
1937
1938
}
1938
1939
cItem .RestartThreshold = types .Int64Null ()
1939
1940
cItem .RestartThresholdVariable = types .StringNull ()
@@ -1946,6 +1947,7 @@ func (data *TransportRoutingBGP) fromBody(ctx context.Context, res gjson.Result)
1946
1947
cItem .RestartThreshold = types .Int64Value (va .Int ())
1947
1948
}
1948
1949
}
1950
+ cItem .PolicyType = types .StringValue ("restart" )
1949
1951
}
1950
1952
cItem .RestartInterval = types .Int64Null ()
1951
1953
cItem .RestartIntervalVariable = types .StringNull ()
@@ -1958,6 +1960,7 @@ func (data *TransportRoutingBGP) fromBody(ctx context.Context, res gjson.Result)
1958
1960
cItem .RestartInterval = types .Int64Value (va .Int ())
1959
1961
}
1960
1962
}
1963
+ cItem .PolicyType = types .StringValue ("restart" )
1961
1964
}
1962
1965
cItem .WarningMessageMaxNumberOfPrefixes = types .Int64Null ()
1963
1966
cItem .WarningMessageMaxNumberOfPrefixesVariable = types .StringNull ()
@@ -1970,6 +1973,7 @@ func (data *TransportRoutingBGP) fromBody(ctx context.Context, res gjson.Result)
1970
1973
cItem .WarningMessageMaxNumberOfPrefixes = types .Int64Value (va .Int ())
1971
1974
}
1972
1975
}
1976
+ cItem .PolicyType = types .StringValue ("warning-only" )
1973
1977
}
1974
1978
cItem .WarningMessageThreshold = types .Int64Null ()
1975
1979
cItem .WarningMessageThresholdVariable = types .StringNull ()
@@ -1982,6 +1986,7 @@ func (data *TransportRoutingBGP) fromBody(ctx context.Context, res gjson.Result)
1982
1986
cItem .WarningMessageThreshold = types .Int64Value (va .Int ())
1983
1987
}
1984
1988
}
1989
+ cItem .PolicyType = types .StringValue ("warning-only" )
1985
1990
}
1986
1991
cItem .DisablePeerMaxNumberOfPrefixes = types .Int64Null ()
1987
1992
cItem .DisablePeerMaxNumberOfPrefixesVariable = types .StringNull ()
@@ -1994,6 +1999,7 @@ func (data *TransportRoutingBGP) fromBody(ctx context.Context, res gjson.Result)
1994
1999
cItem .DisablePeerMaxNumberOfPrefixes = types .Int64Value (va .Int ())
1995
2000
}
1996
2001
}
2002
+ cItem .PolicyType = types .StringValue ("disable-peer" )
1997
2003
}
1998
2004
cItem .DisablePeerThreshold = types .Int64Null ()
1999
2005
cItem .DisablePeerThresholdVariable = types .StringNull ()
@@ -2006,6 +2012,7 @@ func (data *TransportRoutingBGP) fromBody(ctx context.Context, res gjson.Result)
2006
2012
cItem .DisablePeerThreshold = types .Int64Value (va .Int ())
2007
2013
}
2008
2014
}
2015
+ cItem .PolicyType = types .StringValue ("disable-peer" )
2009
2016
}
2010
2017
cItem .InRoutePolicyId = types .StringNull ()
2011
2018
@@ -2031,7 +2038,7 @@ func (data *TransportRoutingBGP) fromBody(ctx context.Context, res gjson.Result)
2031
2038
return true
2032
2039
})
2033
2040
}
2034
- if value := res .Get (path + "ipv6Neighbor" ); value .Exists () {
2041
+ if value := res .Get (path + "ipv6Neighbor" ); value .Exists () && len ( value . Array ()) > 0 {
2035
2042
data .Ipv6Neighbors = make ([]TransportRoutingBGPIpv6Neighbors , 0 )
2036
2043
value .ForEach (func (k , v gjson.Result ) bool {
2037
2044
item := TransportRoutingBGPIpv6Neighbors {}
@@ -2175,7 +2182,7 @@ func (data *TransportRoutingBGP) fromBody(ctx context.Context, res gjson.Result)
2175
2182
item .AllowasInNumber = types .Int64Value (va .Int ())
2176
2183
}
2177
2184
}
2178
- if cValue := v .Get ("addressFamily" ); cValue .Exists () {
2185
+ if cValue := v .Get ("addressFamily" ); cValue .Exists () && len ( cValue . Array ()) > 0 {
2179
2186
item .AddressFamilies = make ([]TransportRoutingBGPIpv6NeighborsAddressFamilies , 0 )
2180
2187
cValue .ForEach (func (ck , cv gjson.Result ) bool {
2181
2188
cItem := TransportRoutingBGPIpv6NeighborsAddressFamilies {}
@@ -2249,7 +2256,7 @@ func (data *TransportRoutingBGP) fromBody(ctx context.Context, res gjson.Result)
2249
2256
return true
2250
2257
})
2251
2258
}
2252
- if value := res .Get (path + "addressFamily.aggregateAddress" ); value .Exists () {
2259
+ if value := res .Get (path + "addressFamily.aggregateAddress" ); value .Exists () && len ( value . Array ()) > 0 {
2253
2260
data .Ipv4AggregateAddresses = make ([]TransportRoutingBGPIpv4AggregateAddresses , 0 )
2254
2261
value .ForEach (func (k , v gjson.Result ) bool {
2255
2262
item := TransportRoutingBGPIpv4AggregateAddresses {}
@@ -2297,7 +2304,7 @@ func (data *TransportRoutingBGP) fromBody(ctx context.Context, res gjson.Result)
2297
2304
return true
2298
2305
})
2299
2306
}
2300
- if value := res .Get (path + "addressFamily.network" ); value .Exists () {
2307
+ if value := res .Get (path + "addressFamily.network" ); value .Exists () && len ( value . Array ()) > 0 {
2301
2308
data .Ipv4Networks = make ([]TransportRoutingBGPIpv4Networks , 0 )
2302
2309
value .ForEach (func (k , v gjson.Result ) bool {
2303
2310
item := TransportRoutingBGPIpv4Networks {}
@@ -2363,7 +2370,7 @@ func (data *TransportRoutingBGP) fromBody(ctx context.Context, res gjson.Result)
2363
2370
data .Ipv4TableMapFilter = types .BoolValue (va .Bool ())
2364
2371
}
2365
2372
}
2366
- if value := res .Get (path + "addressFamily.redistribute" ); value .Exists () {
2373
+ if value := res .Get (path + "addressFamily.redistribute" ); value .Exists () && len ( value . Array ()) > 0 {
2367
2374
data .Ipv4Redistributes = make ([]TransportRoutingBGPIpv4Redistributes , 0 )
2368
2375
value .ForEach (func (k , v gjson.Result ) bool {
2369
2376
item := TransportRoutingBGPIpv4Redistributes {}
@@ -2389,7 +2396,7 @@ func (data *TransportRoutingBGP) fromBody(ctx context.Context, res gjson.Result)
2389
2396
return true
2390
2397
})
2391
2398
}
2392
- if value := res .Get (path + "ipv6AddressFamily.ipv6AggregateAddress" ); value .Exists () {
2399
+ if value := res .Get (path + "ipv6AddressFamily.ipv6AggregateAddress" ); value .Exists () && len ( value . Array ()) > 0 {
2393
2400
data .Ipv6AggregateAddresses = make ([]TransportRoutingBGPIpv6AggregateAddresses , 0 )
2394
2401
value .ForEach (func (k , v gjson.Result ) bool {
2395
2402
item := TransportRoutingBGPIpv6AggregateAddresses {}
@@ -2427,7 +2434,7 @@ func (data *TransportRoutingBGP) fromBody(ctx context.Context, res gjson.Result)
2427
2434
return true
2428
2435
})
2429
2436
}
2430
- if value := res .Get (path + "ipv6AddressFamily.ipv6Network" ); value .Exists () {
2437
+ if value := res .Get (path + "ipv6AddressFamily.ipv6Network" ); value .Exists () && len ( value . Array ()) > 0 {
2431
2438
data .Ipv6Networks = make ([]TransportRoutingBGPIpv6Networks , 0 )
2432
2439
value .ForEach (func (k , v gjson.Result ) bool {
2433
2440
item := TransportRoutingBGPIpv6Networks {}
@@ -2483,7 +2490,7 @@ func (data *TransportRoutingBGP) fromBody(ctx context.Context, res gjson.Result)
2483
2490
data .Ipv6TableMapFilter = types .BoolValue (va .Bool ())
2484
2491
}
2485
2492
}
2486
- if value := res .Get (path + "ipv6AddressFamily.redistribute" ); value .Exists () {
2493
+ if value := res .Get (path + "ipv6AddressFamily.redistribute" ); value .Exists () && len ( value . Array ()) > 0 {
2487
2494
data .Ipv6Redistributes = make ([]TransportRoutingBGPIpv6Redistributes , 0 )
2488
2495
value .ForEach (func (k , v gjson.Result ) bool {
2489
2496
item := TransportRoutingBGPIpv6Redistributes {}
@@ -2509,7 +2516,7 @@ func (data *TransportRoutingBGP) fromBody(ctx context.Context, res gjson.Result)
2509
2516
return true
2510
2517
})
2511
2518
}
2512
- if value := res .Get (path + "mplsInterface" ); value .Exists () {
2519
+ if value := res .Get (path + "mplsInterface" ); value .Exists () && len ( value . Array ()) > 0 {
2513
2520
data .MplsInterfaces = make ([]TransportRoutingBGPMplsInterfaces , 0 )
2514
2521
value .ForEach (func (k , v gjson.Result ) bool {
2515
2522
item := TransportRoutingBGPMplsInterfaces {}
0 commit comments