summaryrefslogtreecommitdiffhomepage
path: root/table/policy.go
diff options
context:
space:
mode:
authorHiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>2015-10-21 11:41:40 +0900
committerHiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>2015-10-21 11:41:40 +0900
commit3462023cf05939de527aad7bc26da6de1351ed4a (patch)
treeae168bf65dc599de587d4c6818196a72347ee85a /table/policy.go
parent95619d069070cd820171f1cd3d88088dbc909c52 (diff)
policy: add field keys
Signed-off-by: Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>
Diffstat (limited to 'table/policy.go')
-rw-r--r--table/policy.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/table/policy.go b/table/policy.go
index 6bcaa5fe..5772bfbb 100644
--- a/table/policy.go
+++ b/table/policy.go
@@ -611,7 +611,7 @@ func NewAsPathSetFromApiStruct(a *api.DefinedSet) (*AsPathSet, error) {
AsPathList: make([]config.AsPath, 0, len(a.List)),
}
for _, x := range a.List {
- c.AsPathList = append(c.AsPathList, config.AsPath{x})
+ c.AsPathList = append(c.AsPathList, config.AsPath{AsPath: x})
}
return NewAsPathSet(c)
}
@@ -726,7 +726,7 @@ func NewCommunitySetFromApiStruct(a *api.DefinedSet) (*CommunitySet, error) {
CommunityList: make([]config.Community, 0, len(a.List)),
}
for _, x := range a.List {
- c.CommunityList = append(c.CommunityList, config.Community{x})
+ c.CommunityList = append(c.CommunityList, config.Community{Community: x})
}
return NewCommunitySet(c)
}
@@ -789,7 +789,7 @@ func NewExtCommunitySetFromApiStruct(a *api.DefinedSet) (*ExtCommunitySet, error
ExtCommunityList: make([]config.ExtCommunity, 0, len(a.List)),
}
for _, x := range a.List {
- c.ExtCommunityList = append(c.ExtCommunityList, config.ExtCommunity{x})
+ c.ExtCommunityList = append(c.ExtCommunityList, config.ExtCommunity{ExtCommunity: x})
}
return NewExtCommunitySet(c)
}