X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=extras%2Fvom%2Fvom%2Fgbp_contract_cmds.hpp;h=d9fe1d74e3785a91475bebb86309c0aceca94fe5;hb=7c0eb56f4;hp=705c1a0a3dbf2a40df90cddafa9b4966d843ee2b;hpb=164e5f8c63652028ecb9c3570e1ea8618b163071;p=vpp.git diff --git a/extras/vom/vom/gbp_contract_cmds.hpp b/extras/vom/vom/gbp_contract_cmds.hpp index 705c1a0a3db..d9fe1d74e37 100644 --- a/extras/vom/vom/gbp_contract_cmds.hpp +++ b/extras/vom/vom/gbp_contract_cmds.hpp @@ -25,19 +25,22 @@ namespace VOM { namespace gbp_contract_cmds { /** -* A command class that creates or updates the GBP contract -*/ + * A command class that creates or updates the GBP contract + */ class create_cmd - : public rpc_cmd, rc_t, vapi::Gbp_contract_add_del> + : public rpc_cmd, vapi::Gbp_contract_add_del> { public: /** * Constructor */ - create_cmd(HW::item& item, - epg_id_t src_epg_id, - epg_id_t dst_epg_id, - const handle_t& acl); + create_cmd(HW::item& item, + scope_t scope, + sclass_t sclass, + sclass_t dclass, + const handle_t& acl, + const gbp_contract::gbp_rules_t& gbp_rules, + const gbp_contract::ethertype_set_t& allowed_ethertypes); /** * Issue the command to VPP/HW @@ -55,22 +58,28 @@ public: bool operator==(const create_cmd& i) const; private: - const epg_id_t m_src_epg_id; - const epg_id_t m_dst_epg_id; + const scope_t m_scope; + const sclass_t m_sclass; + const sclass_t m_dclass; const handle_t m_acl; + const gbp_contract::gbp_rules_t& m_gbp_rules; + const gbp_contract::ethertype_set_t& m_allowed_ethertypes; }; /** * A cmd class that deletes a GBP contract */ class delete_cmd - : public rpc_cmd, rc_t, vapi::Gbp_contract_add_del> + : public rpc_cmd, vapi::Gbp_contract_add_del> { public: /** * Constructor */ - delete_cmd(HW::item& item, epg_id_t src_epg_id, epg_id_t dst_epg_id); + delete_cmd(HW::item& item, + scope_t scope, + sclass_t sclass, + sclass_t dclass); /** * Issue the command to VPP/HW @@ -88,12 +97,13 @@ public: bool operator==(const delete_cmd& i) const; private: - const epg_id_t m_src_epg_id; - const epg_id_t m_dst_epg_id; + const scope_t m_scope; + const sclass_t m_sclass; + const sclass_t m_dclass; }; /** - * A cmd class that Dumps all the GBP endpoints + * A cmd class that Dumps all the GBP contracts */ class dump_cmd : public VOM::dump_cmd {