diff options
author | Naoto Hanaue <hanaue.naoto@po.ntts.co.jp> | 2015-06-16 19:14:01 +0900 |
---|---|---|
committer | Naoto Hanaue <hanaue.naoto@po.ntts.co.jp> | 2015-06-16 19:38:41 +0900 |
commit | 4db834afe35306ede35a73aeb4486844da264920 (patch) | |
tree | 195a3071ae87b0cee7d75d912ffb62f0efbd8064 /api | |
parent | 5bdee9c91b4c0af701d37916d24808fb323f3cb9 (diff) |
cli: add aspath subcommand to policy conditions
Diffstat (limited to 'api')
-rw-r--r-- | api/gobgp.pb.go | 29 | ||||
-rw-r--r-- | api/gobgp.proto | 11 |
2 files changed, 34 insertions, 6 deletions
diff --git a/api/gobgp.pb.go b/api/gobgp.pb.go index 78a9b6a3..32ace22d 100644 --- a/api/gobgp.pb.go +++ b/api/gobgp.pb.go @@ -37,6 +37,7 @@ It has these top-level messages: Neighbor NeighborSet AsPathLength + AsPathSet Conditions Actions Statement @@ -68,7 +69,8 @@ const ( Resource_ADJ_OUT Resource = 3 Resource_POLICY_PREFIX Resource = 4 Resource_POLICY_NEIGHBOR Resource = 5 - Resource_POLICY_ROUTEPOLICY Resource = 6 + Resource_POLICY_ASPATH Resource = 6 + Resource_POLICY_ROUTEPOLICY Resource = 7 ) var Resource_name = map[int32]string{ @@ -78,7 +80,8 @@ var Resource_name = map[int32]string{ 3: "ADJ_OUT", 4: "POLICY_PREFIX", 5: "POLICY_NEIGHBOR", - 6: "POLICY_ROUTEPOLICY", + 6: "POLICY_ASPATH", + 7: "POLICY_ROUTEPOLICY", } var Resource_value = map[string]int32{ "GLOBAL": 0, @@ -87,7 +90,8 @@ var Resource_value = map[string]int32{ "ADJ_OUT": 3, "POLICY_PREFIX": 4, "POLICY_NEIGHBOR": 5, - "POLICY_ROUTEPOLICY": 6, + "POLICY_ASPATH": 6, + "POLICY_ROUTEPOLICY": 7, } func (x Resource) String() string { @@ -994,11 +998,21 @@ func (m *AsPathLength) Reset() { *m = AsPathLength{} } func (m *AsPathLength) String() string { return proto.CompactTextString(m) } func (*AsPathLength) ProtoMessage() {} +type AsPathSet struct { + AsPathSetName string `protobuf:"bytes,1,opt,name=as_path_set_name" json:"as_path_set_name,omitempty"` + AsPathMembers []string `protobuf:"bytes,2,rep,name=as_path_members" json:"as_path_members,omitempty"` +} + +func (m *AsPathSet) Reset() { *m = AsPathSet{} } +func (m *AsPathSet) String() string { return proto.CompactTextString(m) } +func (*AsPathSet) ProtoMessage() {} + type Conditions struct { MatchPrefixSet *PrefixSet `protobuf:"bytes,1,opt,name=match_prefix_set" json:"match_prefix_set,omitempty"` MatchNeighborSet *NeighborSet `protobuf:"bytes,2,opt,name=match_neighbor_set" json:"match_neighbor_set,omitempty"` MatchAsPathLength *AsPathLength `protobuf:"bytes,3,opt,name=match_as_path_length" json:"match_as_path_length,omitempty"` - MatchSetOptions string `protobuf:"bytes,4,opt,name=match_set_options" json:"match_set_options,omitempty"` + MatchAsPathSet *AsPathSet `protobuf:"bytes,4,opt,name=match_as_path_set" json:"match_as_path_set,omitempty"` + MatchSetOptions string `protobuf:"bytes,5,opt,name=match_set_options" json:"match_set_options,omitempty"` } func (m *Conditions) Reset() { *m = Conditions{} } @@ -1026,6 +1040,13 @@ func (m *Conditions) GetMatchAsPathLength() *AsPathLength { return nil } +func (m *Conditions) GetMatchAsPathSet() *AsPathSet { + if m != nil { + return m.MatchAsPathSet + } + return nil +} + type Actions struct { RouteAction string `protobuf:"bytes,1,opt,name=route_action" json:"route_action,omitempty"` } diff --git a/api/gobgp.proto b/api/gobgp.proto index 29038ea8..e61c2243 100644 --- a/api/gobgp.proto +++ b/api/gobgp.proto @@ -75,7 +75,8 @@ enum Resource { ADJ_OUT = 3; POLICY_PREFIX = 4; POLICY_NEIGHBOR = 5; - POLICY_ROUTEPOLICY = 6; + POLICY_ASPATH = 6; + POLICY_ROUTEPOLICY = 7; } enum Operation { @@ -373,11 +374,17 @@ message AsPathLength { string operator = 2; } +message AsPathSet { + string as_path_set_name = 1; + repeated string as_path_members = 2; +} + message Conditions { PrefixSet match_prefix_set = 1; NeighborSet match_neighbor_set = 2; AsPathLength match_as_path_length = 3; - string match_set_options = 4; + AsPathSet match_as_path_set = 4; + string match_set_options = 5; } message Actions { |