summaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/config/bgp_configs.go
diff options
context:
space:
mode:
authorJieJhih Jhang <aawer12345tw@yahoo.com.tw>2019-03-23 21:52:06 +0800
committerFUJITA Tomonori <fujita.tomonori@gmail.com>2019-03-25 20:11:44 +0900
commit80ff3a325cbced352489fa4ea4b570e5f08062ef (patch)
tree86ecd1732490a907cda674b10de71d52c4df42b0 /internal/pkg/config/bgp_configs.go
parenta61191604194e0ab1a4500ba57ecbec5de88b2e3 (diff)
support BMP sysName and sysDescr configuration
Diffstat (limited to 'internal/pkg/config/bgp_configs.go')
-rw-r--r--internal/pkg/config/bgp_configs.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/internal/pkg/config/bgp_configs.go b/internal/pkg/config/bgp_configs.go
index a49bfe57..f5a8215b 100644
--- a/internal/pkg/config/bgp_configs.go
+++ b/internal/pkg/config/bgp_configs.go
@@ -1394,6 +1394,12 @@ type BmpServerState struct {
// Enable feature for mirroring of received BGP messages
// mainly for debugging purpose.
RouteMirroringEnabled bool `mapstructure:"route-mirroring-enabled" json:"route-mirroring-enabled,omitempty"`
+ // original -> gobgp:sys-name
+ // Reference to the SysName of the BMP server.
+ SysName string `mapstructure:"sys-name" json:"sys-name,omitempty"`
+ // original -> gobgp:sys-descr
+ // Reference to the SysDescr of the BMP server.
+ SysDescr string `mapstructure:"sys-descr" json:"sys-descr,omitempty"`
}
// struct for container gobgp:config.
@@ -1417,6 +1423,12 @@ type BmpServerConfig struct {
// Enable feature for mirroring of received BGP messages
// mainly for debugging purpose.
RouteMirroringEnabled bool `mapstructure:"route-mirroring-enabled" json:"route-mirroring-enabled,omitempty"`
+ // original -> gobgp:sys-name
+ // Reference to the SysName of the BMP server.
+ SysName string `mapstructure:"sys-name" json:"sys-name,omitempty"`
+ // original -> gobgp:sys-descr
+ // Reference to the SysDescr of the BMP server.
+ SysDescr string `mapstructure:"sys-descr" json:"sys-descr,omitempty"`
}
func (lhs *BmpServerConfig) Equal(rhs *BmpServerConfig) bool {
@@ -1438,6 +1450,12 @@ func (lhs *BmpServerConfig) Equal(rhs *BmpServerConfig) bool {
if lhs.RouteMirroringEnabled != rhs.RouteMirroringEnabled {
return false
}
+ if lhs.SysName != rhs.SysName {
+ return false
+ }
+ if lhs.SysDescr != rhs.SysDescr {
+ return false
+ }
return true
}