summaryrefslogtreecommitdiffhomepage
path: root/config/default.go
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2016-04-21 08:48:24 +0000
committerISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2016-04-21 08:57:21 +0000
commita34d8d2651877998fe01d35350259c979a49d295 (patch)
tree220802d9c7b596c8636a80d116b9b9a38518c825 /config/default.go
parentc6ddfb1d8ecc5944a775a458fbce648713ae3b02 (diff)
config: simplify config structures
stop generating self-contained leafref fields in openconfig model. (e.g. bgp:neighbor/bgp:neighbor-address ) Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'config/default.go')
-rw-r--r--config/default.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/config/default.go b/config/default.go
index 6d70e9e5..613b0880 100644
--- a/config/default.go
+++ b/config/default.go
@@ -24,7 +24,6 @@ func SetDefaultConfigValues(v *viper.Viper, b *BgpConfigSet) error {
defaultAfiSafi := func(typ AfiSafiType, enable bool) AfiSafi {
return AfiSafi{
- AfiSafiName: typ,
Config: AfiSafiConfig{
AfiSafiName: typ,
Enabled: enable,
@@ -132,8 +131,7 @@ func SetDefaultConfigValues(v *viper.Viper, b *BgpConfigSet) error {
if len(afs) > i {
vvv.Set("afi-safi", afs[i])
}
- af.Config.AfiSafiName = af.AfiSafiName
- af.State.AfiSafiName = af.AfiSafiName
+ af.State.AfiSafiName = af.Config.AfiSafiName
if !vvv.IsSet("afi-safi.config") {
af.Config.Enabled = true
}