2 * Copyright (c) 2019 Cisco and/or its affiliates.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at:
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
16 #ifndef __VOM_QOS_MAP_CMDS_H__
17 #define __VOM_QOS_MAP_CMDS_H__
19 #include "vom/dump_cmd.hpp"
20 #include "vom/qos_map.hpp"
22 #include <vapi/qos.api.vapi.hpp>
29 * A command class that creates or updates the GBP endpoint
31 class create_cmd : public rpc_cmd<HW::item<bool>, vapi::Qos_egress_map_update>
37 create_cmd(HW::item<bool>& item, uint32_t id, const map::outputs_t& o);
40 * Issue the command to VPP/HW
42 rc_t issue(connection& con);
45 * convert to string format for debug purposes
47 std::string to_string() const;
50 * Comparison operator - only used for UT
52 bool operator==(const create_cmd& i) const;
56 const map::outputs_t& m_outputs;
60 * A cmd class that deletes a GBP endpoint
62 class delete_cmd : public rpc_cmd<HW::item<bool>, vapi::Qos_egress_map_update>
68 delete_cmd(HW::item<bool>& item, uint32_t id);
71 * Issue the command to VPP/HW
73 rc_t issue(connection& con);
76 * convert to string format for debug purposes
78 std::string to_string() const;
81 * Comparison operator - only used for UT
83 bool operator==(const delete_cmd& i) const;
90 * A cmd class that Dumps all the GBP endpoints
92 class dump_cmd : public VOM::dump_cmd<vapi::Qos_egress_map_dump>
99 dump_cmd(const dump_cmd& d);
102 * Issue the command to VPP/HW
104 rc_t issue(connection& con);
106 * convert to string format for debug purposes
108 std::string to_string() const;
111 * Comparison operator - only used for UT
113 bool operator==(const dump_cmd& i) const;
121 }; // namespace map_cmds
126 * fd.io coding-style-patch-verification: ON
129 * eval: (c-set-style "mozilla")