6
6
#include " orch.h"
7
7
8
8
// trap fields
9
- const string copp_trap_id_list = " trap_ids" ;
10
- const string copp_trap_action_field = " trap_action" ;
11
- const string copp_trap_priority_field = " trap_priority" ;
9
+ const std:: string copp_trap_id_list = " trap_ids" ;
10
+ const std:: string copp_trap_action_field = " trap_action" ;
11
+ const std:: string copp_trap_priority_field = " trap_priority" ;
12
12
13
- const string copp_queue_field = " queue" ;
13
+ const std:: string copp_queue_field = " queue" ;
14
14
15
15
// policer fields
16
- const string copp_policer_meter_type_field = " meter_type" ;
17
- const string copp_policer_mode_field = " mode" ;
18
- const string copp_policer_color_field = " color" ;
19
- const string copp_policer_cbs_field = " cbs" ;
20
- const string copp_policer_cir_field = " cir" ;
21
- const string copp_policer_pbs_field = " pbs" ;
22
- const string copp_policer_pir_field = " pir" ;
23
- const string copp_policer_action_green_field = " green_action" ;
24
- const string copp_policer_action_red_field = " red_action" ;
25
- const string copp_policer_action_yellow_field = " yellow_action" ;
16
+ const std:: string copp_policer_meter_type_field = " meter_type" ;
17
+ const std:: string copp_policer_mode_field = " mode" ;
18
+ const std:: string copp_policer_color_field = " color" ;
19
+ const std:: string copp_policer_cbs_field = " cbs" ;
20
+ const std:: string copp_policer_cir_field = " cir" ;
21
+ const std:: string copp_policer_pbs_field = " pbs" ;
22
+ const std:: string copp_policer_pir_field = " pir" ;
23
+ const std:: string copp_policer_action_green_field = " green_action" ;
24
+ const std:: string copp_policer_action_red_field = " red_action" ;
25
+ const std:: string copp_policer_action_yellow_field = " yellow_action" ;
26
26
27
27
/* TrapGroupPolicerTable: trap group ID, policer ID */
28
- typedef map<sai_object_id_t , sai_object_id_t > TrapGroupPolicerTable;
28
+ typedef std:: map<sai_object_id_t , sai_object_id_t > TrapGroupPolicerTable;
29
29
/* TrapIdTrapGroupTable: trap ID, trap group ID */
30
- typedef map<sai_hostif_trap_type_t , sai_object_id_t > TrapIdTrapGroupTable;
30
+ typedef std:: map<sai_hostif_trap_type_t , sai_object_id_t > TrapIdTrapGroupTable;
31
31
32
32
class CoppOrch : public Orch
33
33
{
34
34
public:
35
- CoppOrch (DBConnector *db, string tableName);
35
+ CoppOrch (swss:: DBConnector *db, std:: string tableName);
36
36
protected:
37
37
object_map m_trap_group_map;
38
38
@@ -44,15 +44,15 @@ class CoppOrch : public Orch
44
44
void initDefaultTrapIds ();
45
45
46
46
task_process_status processCoppRule (Consumer& consumer);
47
- bool isValidList (vector<string> &trap_id_list, vector<string> &all_items) const ;
48
- void getTrapIdList (vector<string> &trap_id_name_list, vector<sai_hostif_trap_type_t > &trap_id_list) const ;
49
- bool applyTrapIds (sai_object_id_t trap_group, vector<string> &trap_id_name_list, vector<sai_attribute_t > &trap_id_attribs);
50
- bool applyAttributesToTrapIds (sai_object_id_t trap_group_id, const vector<sai_hostif_trap_type_t > &trap_id_list, vector<sai_attribute_t > &trap_id_attribs);
47
+ bool isValidList (std:: vector<std:: string> &trap_id_list, std:: vector<std:: string> &all_items) const ;
48
+ void getTrapIdList (std:: vector<std:: string> &trap_id_name_list, std:: vector<sai_hostif_trap_type_t > &trap_id_list) const ;
49
+ bool applyTrapIds (sai_object_id_t trap_group, std:: vector<std:: string> &trap_id_name_list, std:: vector<sai_attribute_t > &trap_id_attribs);
50
+ bool applyAttributesToTrapIds (sai_object_id_t trap_group_id, const std:: vector<sai_hostif_trap_type_t > &trap_id_list, std:: vector<sai_attribute_t > &trap_id_attribs);
51
51
52
- bool createPolicer (string trap_group, vector<sai_attribute_t > &policer_attribs);
53
- bool removePolicer (string trap_group_name);
52
+ bool createPolicer (std:: string trap_group, std:: vector<sai_attribute_t > &policer_attribs);
53
+ bool removePolicer (std:: string trap_group_name);
54
54
55
- sai_object_id_t getPolicer (string trap_group_name);
55
+ sai_object_id_t getPolicer (std:: string trap_group_name);
56
56
57
57
virtual void doTask (Consumer& consumer);
58
58
};
0 commit comments