summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--config/bgp_configs.go9
-rw-r--r--tools/pyang_plugins/bgpyang2golang.py1
-rw-r--r--tools/pyang_plugins/gobgp.yang6
3 files changed, 16 insertions, 0 deletions
diff --git a/config/bgp_configs.go b/config/bgp_configs.go
index ae19a162..8cf443e8 100644
--- a/config/bgp_configs.go
+++ b/config/bgp_configs.go
@@ -799,6 +799,13 @@ type MplsLabelRange struct {
MaxLabel uint32
}
+//struct for container gobgp:redistribute-route-type
+type RedistributeRouteType struct {
+ // original -> gobgp:route-type
+ //gobgp:route-type's original type is ptypes:install-protocol-type
+ RouteType string
+}
+
//struct for container gobgp:zebra
type Zebra struct {
// original -> gobgp:enabled
@@ -806,6 +813,8 @@ type Zebra struct {
Enabled bool
// original -> gobgp:url
Url string
+ // original -> gobgp:redistribute-route-type
+ RedistributeRouteTypeList []RedistributeRouteType
}
//struct for container gobgp:mrt
diff --git a/tools/pyang_plugins/bgpyang2golang.py b/tools/pyang_plugins/bgpyang2golang.py
index 00e68954..d8f619dd 100644
--- a/tools/pyang_plugins/bgpyang2golang.py
+++ b/tools/pyang_plugins/bgpyang2golang.py
@@ -531,6 +531,7 @@ _type_translation_map = {
'identityref' : 'string',
'inet:port-number': 'uint16',
'yang:timeticks': 'int64',
+ 'ptypes:install-protocol-type': 'string',
}
diff --git a/tools/pyang_plugins/gobgp.yang b/tools/pyang_plugins/gobgp.yang
index c1107ea6..7168e669 100644
--- a/tools/pyang_plugins/gobgp.yang
+++ b/tools/pyang_plugins/gobgp.yang
@@ -10,6 +10,7 @@ module bgp-gobgp {
// import some basic types
import bgp { prefix bgp; }
import routing-policy {prefix rpol; }
+ import policy-types {prefix ptypes; }
import bgp-policy {prefix bgp-pol; }
import ietf-inet-types { prefix inet; }
@@ -639,6 +640,11 @@ module bgp-gobgp {
description
"Configure url for zebra.";
}
+ list redistribute-route-type {
+ leaf route-type {
+ type ptypes:install-protocol-type;
+ }
+ }
}
}