blob: 1d0200d039ab86ab5107914057bf27661cf6cc3d [file] [log] [blame]
Matteo Scandoloc9306e42016-08-04 16:24:30 -07001namespace java org.p4.bmv2.thrift
2/* Copyright 2013-present Barefoot Networks, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/*
18 * Srikrishna Gopu (krishna@barefootnetworks.com)
19 * Antonin Bas (antonin@barefootnetworks.com)
20 *
21 */
22
23namespace cpp bm_runtime.simple_pre_lag
24namespace py bm_runtime.simple_pre_lag
25
26typedef i32 BmMcMgrp
27typedef i32 BmMcRid
28typedef i32 BmMcMgrpHandle
29typedef i32 BmMcL1Handle
30typedef i16 BmMcLagIndex
31typedef string BmMcPortMap // string of 0s and 1s
32typedef string BmMcLagMap // string of 0s and 1s
33
34enum McOperationErrorCode {
35 TABLE_FULL = 1,
36 INVALID_HANDLE = 2,
37 INVALID_MGID = 3,
38 INVALID_L1_HANDLE = 4,
39 INVALID_L2_HANLDE = 5,
40 ERROR = 6
41}
42
43exception InvalidMcOperation {
44 1:McOperationErrorCode code
45}
46
47service SimplePreLAG {
48
49 BmMcMgrpHandle bm_mc_mgrp_create(
50 1:i32 cxt_id,
51 2:BmMcMgrp mgrp
52 ) throws (1:InvalidMcOperation ouch),
53
54 void bm_mc_mgrp_destroy(
55 1:i32 cxt_id,
56 2:BmMcMgrpHandle mgrp_handle
57 ) throws (1:InvalidMcOperation ouch),
58
59 BmMcL1Handle bm_mc_node_create(
60 1:i32 cxt_id,
61 2:BmMcRid rid,
62 3:BmMcPortMap port_map,
63 4:BmMcLagMap lag_map
64 ) throws (1:InvalidMcOperation ouch),
65
66 void bm_mc_node_associate(
67 1:i32 cxt_id,
68 2:BmMcMgrpHandle mgrp_handle,
69 3:BmMcL1Handle l1_handle
70 ) throws (1:InvalidMcOperation ouch),
71
72 void bm_mc_node_dissociate(
73 1:i32 cxt_id,
74 2:BmMcMgrpHandle mgrp_handle,
75 3:BmMcL1Handle l1_handle
76 ) throws (1:InvalidMcOperation ouch),
77
78 void bm_mc_node_destroy(
79 1:i32 cxt_id,
80 2:BmMcL1Handle l1_handle
81 ) throws (1:InvalidMcOperation ouch),
82
83 void bm_mc_node_update(
84 1:i32 cxt_id,
85 2:BmMcL1Handle l1_handle,
86 3:BmMcPortMap port_map,
87 4:BmMcLagMap lag_map
88 ) throws (1:InvalidMcOperation ouch),
89
90 void bm_mc_set_lag_membership(
91 1:i32 cxt_id,
92 2:BmMcLagIndex lag_index,
93 3:BmMcPortMap port_map
94 ) throws (1:InvalidMcOperation ouch),
95}