diff options
author | Naoto Hanaue <hanaue.naoto@po.ntts.co.jp> | 2015-05-25 12:03:50 +0900 |
---|---|---|
committer | Naoto Hanaue <hanaue.naoto@po.ntts.co.jp> | 2015-05-26 17:31:58 +0900 |
commit | cdf36e2a7d01c4aa713a1c3883d15a7c59964879 (patch) | |
tree | 2317c24811b1f9f0faae8fd44c6471b1a91b09b5 /api/gobgp.proto | |
parent | fd4f6a91efb81646281ae8175433872627ec8611 (diff) |
cli: add the add/del commands to policy of neighbor
% gobgp -u 10.0.255.1 neighbor 10.0.0.3 policy
DefaultImportPolicy: ACCEPT
DefaultExportPolicy: ACCEPT
ImportPolicies:
PolicyName policy1:
StatementName st0:
Conditions:
PrefixSet: ps2 192.168.20.0/24
NeighborSet: ns0 10.0.0.2
10.0.0.3
AsPathLength: eq 5
MatchOption: ALL
Actions:
ACCEPT
ExportPolicies:
% gobgp -u 10.0.255.1 neighbor 10.0.0.3 policy add export policy0 reject
% gobgp -u 10.0.255.1 neighbor 10.0.0.3 policy del import
% gobgp -u 10.0.255.1 neighbor 10.0.0.3 policy
DefaultImportPolicy: ACCEPT
DefaultExportPolicy: REJECT
ImportPolicies:
ExportPolicies:
PolicyName policy0:
StatementName st0:
Conditions:
PrefixSet: ps0 192.168.0.0/16 16..24
NeighborSet: ns2 10.0.0.4
AsPathLength:
MatchOption: ALL
Actions:
REJECT
Diffstat (limited to 'api/gobgp.proto')
-rw-r--r-- | api/gobgp.proto | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/api/gobgp.proto b/api/gobgp.proto index dd6fc46d..9bb0075f 100644 --- a/api/gobgp.proto +++ b/api/gobgp.proto @@ -33,6 +33,7 @@ service Grpc { rpc Disable(Arguments) returns (Error) {} rpc ModPath(stream ModPathArguments) returns (stream Error) {} rpc GetNeighborPolicy(Arguments) returns (ApplyPolicy) {} + rpc ModNeighborPolicy(stream PolicyArguments) returns (stream Error) {} rpc GetPolicyPrefixes(PolicyArguments) returns (stream PrefixSet) {} rpc GetPolicyPrefix(PolicyArguments) returns (PrefixSet) {} rpc ModPolicyPrefix(stream PolicyArguments) returns (stream Error) {} @@ -66,11 +67,13 @@ message ModPathArguments { message PolicyArguments { Resource resource = 1; - Operation operation = 2; - string name = 3; - PrefixSet prefix_set = 4; - NeighborSet neighbor_set = 5; - PolicyDefinition policy_difinition = 6; + Operation operation = 2; + string router_id = 3; + string name = 4; + PrefixSet prefix_set = 5; + NeighborSet neighbor_set = 6; + PolicyDefinition policy_difinition = 7; + ApplyPolicy apply_policy = 8; } enum Resource { |