summaryrefslogtreecommitdiffhomepage
path: root/config/bgp_configs.go
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2016-04-11 05:09:13 +0000
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-04-20 13:14:09 +0900
commit802879087ddf14da1c2dab90d05dd09debb747a7 (patch)
tree564416d955485fdaed137c0836a6a66907ed10b9 /config/bgp_configs.go
parentd62e65f4fe06deca5c4ce7dee957a9b517b80f12 (diff)
server: support route-target constraint
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'config/bgp_configs.go')
-rw-r--r--config/bgp_configs.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/config/bgp_configs.go b/config/bgp_configs.go
index 47d070b4..1b3d2a73 100644
--- a/config/bgp_configs.go
+++ b/config/bgp_configs.go
@@ -2597,6 +2597,22 @@ func (lhs *Collector) Equal(rhs *Collector) bool {
return true
}
+//struct for container gobgp:route-target-membership
+type RouteTargetMembership struct {
+ // original -> gobgp:deferral-time
+ DeferralTime uint16 `mapstructure:"deferral-time"`
+}
+
+func (lhs *RouteTargetMembership) Equal(rhs *RouteTargetMembership) bool {
+ if lhs == nil || rhs == nil {
+ return false
+ }
+ if lhs.DeferralTime != rhs.DeferralTime {
+ return false
+ }
+ return true
+}
+
//struct for container bgp-mp:l2vpn-evpn
type L2vpnEvpn struct {
// original -> bgp-mp:prefix-limit
@@ -3224,6 +3240,8 @@ type AfiSafi struct {
UseMultiplePaths UseMultiplePaths `mapstructure:"use-multiple-paths"`
// original -> bgp-mp:prefix-limit
PrefixLimit PrefixLimit `mapstructure:"prefix-limit"`
+ // original -> gobgp:route-target-membership
+ RouteTargetMembership RouteTargetMembership `mapstructure:"route-target-membership"`
}
func (lhs *AfiSafi) Equal(rhs *AfiSafi) bool {
@@ -3284,6 +3302,9 @@ func (lhs *AfiSafi) Equal(rhs *AfiSafi) bool {
if !lhs.PrefixLimit.Equal(&(rhs.PrefixLimit)) {
return false
}
+ if !lhs.RouteTargetMembership.Equal(&(rhs.RouteTargetMembership)) {
+ return false
+ }
return true
}