From 749df65ac97da627e8f35d91ea4e2fe585b88d5d Mon Sep 17 00:00:00 2001 From: Naoto Hanaue Date: Thu, 14 May 2015 16:51:18 +0900 Subject: cli: support the AsPathLength to display in routing policy % gobgp -u 10.0.255.1 policy routepolicy policy0 PolicyName policy0: StatementName st0: Conditions: PrefixSet: ps0 192.168.0.0/16 16..24 NeighborSet: ns0 10.0.0.2 AsPathLength: 10 eq MatchOption: ALL Actions: REJECT --- api/gobgp.pb.go | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'api/gobgp.pb.go') diff --git a/api/gobgp.pb.go b/api/gobgp.pb.go index 2d8767a8..bb93a7c4 100644 --- a/api/gobgp.pb.go +++ b/api/gobgp.pb.go @@ -35,6 +35,7 @@ It has these top-level messages: PrefixSet Neighbor NeighborSet + AsPathLength Conditions Actions Statement @@ -975,10 +976,20 @@ func (m *NeighborSet) GetNeighborList() []*Neighbor { return nil } +type AsPathLength struct { + Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"` + Operator string `protobuf:"bytes,2,opt,name=operator" json:"operator,omitempty"` +} + +func (m *AsPathLength) Reset() { *m = AsPathLength{} } +func (m *AsPathLength) String() string { return proto.CompactTextString(m) } +func (*AsPathLength) 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"` - MatchSetOptions int64 `protobuf:"varint,3,opt,name=match_set_options" json:"match_set_options,omitempty"` + 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 int64 `protobuf:"varint,4,opt,name=match_set_options" json:"match_set_options,omitempty"` } func (m *Conditions) Reset() { *m = Conditions{} } @@ -999,6 +1010,13 @@ func (m *Conditions) GetMatchNeighborSet() *NeighborSet { return nil } +func (m *Conditions) GetMatchAsPathLength() *AsPathLength { + if m != nil { + return m.MatchAsPathLength + } + return nil +} + type Actions struct { AcceptRoute bool `protobuf:"varint,1,opt,name=accept_route" json:"accept_route,omitempty"` RejectRoute bool `protobuf:"varint,2,opt,name=reject_route" json:"reject_route,omitempty"` -- cgit v1.2.3