summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIWASE Yusuke <iwase.yusuke0@gmail.com>2017-07-04 16:41:26 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-07-26 14:37:04 +0900
commit415710f94d85ed3c3e042ee6cfb83751b0ec003c (patch)
treeaf2b56538a8d71b97ef9f3f046c01840c91f2332
parent075f5a719f5d07756915b9766806a5759f0b321e (diff)
config: Use BmpServerConfig struct in BmpServerState
Currently, BmpServerState has empty structure and can not store any configration information. This patch fixes to use BmpServerConfig structure in BmpServerState to store the same information. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
-rw-r--r--config/bgp_configs.go12
-rw-r--r--tools/pyang_plugins/gobgp.yang6
2 files changed, 13 insertions, 5 deletions
diff --git a/config/bgp_configs.go b/config/bgp_configs.go
index f170e97c..87542200 100644
--- a/config/bgp_configs.go
+++ b/config/bgp_configs.go
@@ -1206,6 +1206,18 @@ func (lhs *Mrt) Equal(rhs *Mrt) bool {
//struct for container gobgp:state
type BmpServerState struct {
+ // original -> gobgp:address
+ //gobgp:address's original type is inet:ip-address
+ Address string `mapstructure:"address" json:"address,omitempty"`
+ // original -> gobgp:port
+ Port uint32 `mapstructure:"port" json:"port,omitempty"`
+ // original -> gobgp:route-monitoring-policy
+ RouteMonitoringPolicy BmpRouteMonitoringPolicyType `mapstructure:"route-monitoring-policy" json:"route-monitoring-policy,omitempty"`
+ // original -> gobgp:statistics-timeout
+ StatisticsTimeout uint16 `mapstructure:"statistics-timeout" json:"statistics-timeout,omitempty"`
+ // original -> gobgp:route-mirroring-enabled
+ //gobgp:route-mirroring-enabled's original type is boolean
+ RouteMirroringEnabled bool `mapstructure:"route-mirroring-enabled" json:"route-mirroring-enabled,omitempty"`
}
//struct for container gobgp:config
diff --git a/tools/pyang_plugins/gobgp.yang b/tools/pyang_plugins/gobgp.yang
index 9ada88d4..46d3866f 100644
--- a/tools/pyang_plugins/gobgp.yang
+++ b/tools/pyang_plugins/gobgp.yang
@@ -585,10 +585,6 @@ module gobgp {
}
}
- grouping gobgp-bmp-server-state {
- description "additional BMP state";
- }
-
grouping gobgp-bmp-server-set {
description "additional BMP configuration and state";
@@ -601,7 +597,7 @@ module gobgp {
container state {
description
"Configuration parameters relating to BMP server";
- uses gobgp-bmp-server-state;
+ uses gobgp-bmp-server-config;
}
}