diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-10-18 17:42:02 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-10-20 10:33:10 +0900 |
commit | f834e421284080a8d4b9150d19148be3b886779e (patch) | |
tree | 516e86d87691baccf50f5d0799fe2db2138237de /api | |
parent | a88e0b5592b5f344981983d91f4f55a6d3f002bf (diff) |
cli: support statement configuration
- create statement
$ gobgp policy statement add st01
- add community condition
$ gobgp policy statement st01 condition add community c1
- add route action
$ gobgp policy statement st01 action add accept
- add set-community action
$ gobgp policy statement st01 action add community 100:100
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'api')
-rw-r--r-- | api/gobgp.pb.go | 14 | ||||
-rw-r--r-- | api/gobgp.proto | 7 |
2 files changed, 3 insertions, 18 deletions
diff --git a/api/gobgp.pb.go b/api/gobgp.pb.go index e3d4e8b3..5dc0f6fc 100644 --- a/api/gobgp.pb.go +++ b/api/gobgp.pb.go @@ -24,7 +24,6 @@ It has these top-level messages: Peer Prefix DefinedSet - PrefixSet MatchSet AsPathLength Conditions @@ -452,15 +451,6 @@ func (m *DefinedSet) GetPrefixes() []*Prefix { return nil } -type PrefixSet struct { - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Option int32 `protobuf:"varint,2,opt,name=option" json:"option,omitempty"` -} - -func (m *PrefixSet) Reset() { *m = PrefixSet{} } -func (m *PrefixSet) String() string { return proto.CompactTextString(m) } -func (*PrefixSet) ProtoMessage() {} - type MatchSet struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Option int32 `protobuf:"varint,2,opt,name=option" json:"option,omitempty"` @@ -480,7 +470,7 @@ func (m *AsPathLength) String() string { return proto.CompactTextString(m) } func (*AsPathLength) ProtoMessage() {} type Conditions struct { - PrefixSet *PrefixSet `protobuf:"bytes,1,opt,name=prefix_set" json:"prefix_set,omitempty"` + PrefixSet *MatchSet `protobuf:"bytes,1,opt,name=prefix_set" json:"prefix_set,omitempty"` NeighborSet *MatchSet `protobuf:"bytes,2,opt,name=neighbor_set" json:"neighbor_set,omitempty"` AsPathLength *AsPathLength `protobuf:"bytes,3,opt,name=as_path_length" json:"as_path_length,omitempty"` AsPathSet *MatchSet `protobuf:"bytes,4,opt,name=as_path_set" json:"as_path_set,omitempty"` @@ -493,7 +483,7 @@ func (m *Conditions) Reset() { *m = Conditions{} } func (m *Conditions) String() string { return proto.CompactTextString(m) } func (*Conditions) ProtoMessage() {} -func (m *Conditions) GetPrefixSet() *PrefixSet { +func (m *Conditions) GetPrefixSet() *MatchSet { if m != nil { return m.PrefixSet } diff --git a/api/gobgp.proto b/api/gobgp.proto index 84eb8c74..212f4073 100644 --- a/api/gobgp.proto +++ b/api/gobgp.proto @@ -201,11 +201,6 @@ message DefinedSet { repeated Prefix prefixes = 4; } -message PrefixSet { - string name = 1; - int32 option = 2; -} - message MatchSet { string name = 1; int32 option = 2; @@ -217,7 +212,7 @@ message AsPathLength { } message Conditions { - PrefixSet prefix_set = 1; + MatchSet prefix_set = 1; MatchSet neighbor_set = 2; AsPathLength as_path_length = 3; MatchSet as_path_set = 4; |