summaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/config
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@gmail.com>2018-12-23 23:12:49 +0900
committerFUJITA Tomonori <fujita.tomonori@gmail.com>2018-12-23 23:40:37 +0900
commit8d0a8b0ffa696a3838740fec7accc54ccfb452ab (patch)
treecc9dd2da324045dba80bb6dc1d1149ed0114c639 /internal/pkg/config
parentababf3068c48d665e2d9d7816cbb521c74fc47c5 (diff)
make the usage of type name in protobuf consistent
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Diffstat (limited to 'internal/pkg/config')
-rw-r--r--internal/pkg/config/util.go36
1 files changed, 18 insertions, 18 deletions
diff --git a/internal/pkg/config/util.go b/internal/pkg/config/util.go
index 0cd8e2a9..6d3af91b 100644
--- a/internal/pkg/config/util.go
+++ b/internal/pkg/config/util.go
@@ -675,50 +675,50 @@ func NewAPIDefinedSetsFromConfigStruct(t *DefinedSets) ([]*api.DefinedSet, error
prefixes = append(prefixes, ap)
}
definedSets = append(definedSets, &api.DefinedSet{
- Type: api.DefinedType_PREFIX,
- Name: ps.PrefixSetName,
- Prefixes: prefixes,
+ DefinedType: api.DefinedType_PREFIX,
+ Name: ps.PrefixSetName,
+ Prefixes: prefixes,
})
}
for _, ns := range t.NeighborSets {
definedSets = append(definedSets, &api.DefinedSet{
- Type: api.DefinedType_NEIGHBOR,
- Name: ns.NeighborSetName,
- List: ns.NeighborInfoList,
+ DefinedType: api.DefinedType_NEIGHBOR,
+ Name: ns.NeighborSetName,
+ List: ns.NeighborInfoList,
})
}
bs := t.BgpDefinedSets
for _, cs := range bs.CommunitySets {
definedSets = append(definedSets, &api.DefinedSet{
- Type: api.DefinedType_COMMUNITY,
- Name: cs.CommunitySetName,
- List: cs.CommunityList,
+ DefinedType: api.DefinedType_COMMUNITY,
+ Name: cs.CommunitySetName,
+ List: cs.CommunityList,
})
}
for _, es := range bs.ExtCommunitySets {
definedSets = append(definedSets, &api.DefinedSet{
- Type: api.DefinedType_EXT_COMMUNITY,
- Name: es.ExtCommunitySetName,
- List: es.ExtCommunityList,
+ DefinedType: api.DefinedType_EXT_COMMUNITY,
+ Name: es.ExtCommunitySetName,
+ List: es.ExtCommunityList,
})
}
for _, ls := range bs.LargeCommunitySets {
definedSets = append(definedSets, &api.DefinedSet{
- Type: api.DefinedType_LARGE_COMMUNITY,
- Name: ls.LargeCommunitySetName,
- List: ls.LargeCommunityList,
+ DefinedType: api.DefinedType_LARGE_COMMUNITY,
+ Name: ls.LargeCommunitySetName,
+ List: ls.LargeCommunityList,
})
}
for _, as := range bs.AsPathSets {
definedSets = append(definedSets, &api.DefinedSet{
- Type: api.DefinedType_AS_PATH,
- Name: as.AsPathSetName,
- List: as.AsPathList,
+ DefinedType: api.DefinedType_AS_PATH,
+ Name: as.AsPathSetName,
+ List: as.AsPathList,
})
}