summaryrefslogtreecommitdiffhomepage
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/bgp_configs.go56
-rw-r--r--config/default.go4
2 files changed, 30 insertions, 30 deletions
diff --git a/config/bgp_configs.go b/config/bgp_configs.go
index d5f6975d..24fc2535 100644
--- a/config/bgp_configs.go
+++ b/config/bgp_configs.go
@@ -443,32 +443,6 @@ func (v RpkiValidationResultType) Validate() error {
return nil
}
-//struct for container gobgp:state
-type BmpServerState struct {
-}
-
-//struct for container gobgp:config
-type BmpServerConfig struct {
- // original -> gobgp:address
- //gobgp:address's original type is inet:ip-address
- Address string `mapstructure:"address"`
- // original -> gobgp:port
- Port uint32 `mapstructure:"port"`
- // original -> gobgp:route-monitoring-policy
- RouteMonitoringPolicy BmpRouteMonitoringPolicyType `mapstructure:"route-monitoring-policy"`
-}
-
-//struct for container gobgp:bmp-server
-type BmpServer struct {
- // original -> gobgp:address
- //gobgp:address's original type is inet:ip-address
- Address string `mapstructure:"address"`
- // original -> gobgp:bmp-server-config
- Config BmpServerConfig `mapstructure:"config"`
- // original -> gobgp:bmp-server-state
- State BmpServerState `mapstructure:"state"`
-}
-
//struct for container gobgp:rpki-received
type RpkiReceived struct {
// original -> gobgp:serial-notify
@@ -1119,6 +1093,32 @@ type Mrt struct {
FileName string `mapstructure:"file-name"`
}
+//struct for container gobgp:state
+type BmpServerState struct {
+}
+
+//struct for container gobgp:config
+type BmpServerConfig struct {
+ // original -> gobgp:address
+ //gobgp:address's original type is inet:ip-address
+ Address string `mapstructure:"address"`
+ // original -> gobgp:port
+ Port uint32 `mapstructure:"port"`
+ // original -> gobgp:route-monitoring-policy
+ RouteMonitoringPolicy BmpRouteMonitoringPolicyType `mapstructure:"route-monitoring-policy"`
+}
+
+//struct for container gobgp:bmp-server
+type BmpServer struct {
+ // original -> gobgp:address
+ //gobgp:address's original type is inet:ip-address
+ Address string `mapstructure:"address"`
+ // original -> gobgp:bmp-server-config
+ Config BmpServerConfig `mapstructure:"config"`
+ // original -> gobgp:bmp-server-state
+ State BmpServerState `mapstructure:"state"`
+}
+
//struct for container bgp-mp:l2vpn-evpn
type L2vpnEvpn struct {
// original -> bgp-mp:prefix-limit
@@ -1649,6 +1649,8 @@ type Global struct {
AfiSafis []AfiSafi `mapstructure:"afi-safis"`
// original -> rpol:apply-policy
ApplyPolicy ApplyPolicy `mapstructure:"apply-policy"`
+ // original -> gobgp:bmp-servers
+ BmpServers []BmpServer `mapstructure:"bmp-servers"`
// original -> gobgp:mrt
Mrt Mrt `mapstructure:"mrt"`
// original -> gobgp:zebra
@@ -1669,8 +1671,6 @@ type Bgp struct {
PeerGroups []PeerGroup `mapstructure:"peer-groups"`
// original -> gobgp:rpki-servers
RpkiServers []RpkiServer `mapstructure:"rpki-servers"`
- // original -> gobgp:bmp-servers
- BmpServers []BmpServer `mapstructure:"bmp-servers"`
}
//struct for container bgp-pol:set-ext-community-method
diff --git a/config/default.go b/config/default.go
index 82a17446..c0764c44 100644
--- a/config/default.go
+++ b/config/default.go
@@ -39,11 +39,11 @@ func SetDefaultConfigValues(v *viper.Viper, b *Bgp) error {
b.Global.ListenConfig.Port = bgp.BGP_PORT
}
- for idx, server := range b.BmpServers {
+ for idx, server := range b.Global.BmpServers {
if server.Config.Port == 0 {
server.Config.Port = bgp.BMP_DEFAULT_PORT
}
- b.BmpServers[idx] = server
+ b.Global.BmpServers[idx] = server
}
if !v.IsSet("global.mpls-label-range.min-label") {