/**
* A command class that creates or updates the GBP contract
*/
-class create_cmd : public rpc_cmd<HW::item<bool>, vapi::Gbp_contract_add_del>
+class create_cmd
+ : public rpc_cmd<HW::item<uint32_t>, vapi::Gbp_contract_add_del>
{
public:
/**
* Constructor
*/
- create_cmd(HW::item<bool>& item,
- epg_id_t src_epg_id,
- epg_id_t dst_epg_id,
+ create_cmd(HW::item<uint32_t>& 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);
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<HW::item<bool>, vapi::Gbp_contract_add_del>
+class delete_cmd
+ : public rpc_cmd<HW::item<uint32_t>, vapi::Gbp_contract_add_del>
{
public:
/**
* Constructor
*/
- delete_cmd(HW::item<bool>& item, epg_id_t src_epg_id, epg_id_t dst_epg_id);
+ delete_cmd(HW::item<uint32_t>& item,
+ scope_t scope,
+ sclass_t sclass,
+ sclass_t dclass);
/**
* Issue the command to VPP/HW
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;
};
/**