VOM: support for pipes

Change-Id: I5c381dfe2f926f94a34ee8ed8f1b9ec6038d5fe2
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
This commit is contained in:
Neale Ranns
2018-04-11 08:08:30 -07:00
committed by Neale Ranns
parent 4faab21a75
commit 208c29aac5
84 changed files with 978 additions and 316 deletions

View File

@ -127,6 +127,8 @@ libvom_la_SOURCES = \
neighbour_cmds.cpp \
object_base.cpp \
om.cpp \
pipe.cpp \
pipe_cmds.cpp \
prefix.cpp \
ra_config.cpp \
ra_prefix.cpp \
@ -214,6 +216,7 @@ vominclude_HEADERS = \
neighbour.hpp \
object_base.hpp \
om.hpp \
pipe.hpp \
prefix.hpp \
ra_config.hpp \
ra_prefix.hpp \

View File

@ -34,9 +34,7 @@ l3_bind_cmd::issue(connection& con)
VAPI_CALL(req.execute());
m_hw_item.set(wait());
return rc_t::OK;
return (wait());
}
template <>
@ -64,9 +62,7 @@ l3_unbind_cmd::issue(connection& con)
VAPI_CALL(req.execute());
m_hw_item.set(wait());
return rc_t::OK;
return (wait());
}
template <>
@ -116,9 +112,7 @@ l2_bind_cmd::issue(connection& con)
VAPI_CALL(req.execute());
m_hw_item.set(wait());
return rc_t::OK;
return (wait());
}
template <>
@ -145,9 +139,7 @@ l2_unbind_cmd::issue(connection& con)
VAPI_CALL(req.execute());
m_hw_item.set(wait());
return rc_t::OK;
return (wait());
}
template <>

View File

@ -29,7 +29,7 @@ namespace binding_cmds {
* A command class that binds the ACL to the interface
*/
template <typename BIND>
class bind_cmd : public rpc_cmd<HW::item<bool>, rc_t, BIND>
class bind_cmd : public rpc_cmd<HW::item<bool>, BIND>
{
public:
/**
@ -39,7 +39,7 @@ public:
const direction_t& direction,
const handle_t& itf,
const handle_t& acl)
: rpc_cmd<HW::item<bool>, rc_t, BIND>(item)
: rpc_cmd<HW::item<bool>, BIND>(item)
, m_direction(direction)
, m_itf(itf)
, m_acl(acl)
@ -85,7 +85,7 @@ private:
* A command class that binds the ACL to the interface
*/
template <typename BIND>
class unbind_cmd : public rpc_cmd<HW::item<bool>, rc_t, BIND>
class unbind_cmd : public rpc_cmd<HW::item<bool>, BIND>
{
public:
/**
@ -95,7 +95,7 @@ public:
const direction_t& direction,
const handle_t& itf,
const handle_t& acl)
: rpc_cmd<HW::item<bool>, rc_t, BIND>(item)
: rpc_cmd<HW::item<bool>, BIND>(item)
, m_direction(direction)
, m_itf(itf)
, m_acl(acl)

View File

@ -58,9 +58,7 @@ bind_cmd::issue(connection& con)
VAPI_CALL(req.execute());
m_hw_item.set(wait());
return rc_t::OK;
return (wait());
}
std::string

View File

@ -28,9 +28,8 @@ namespace acl_ethertype_cmds {
/**
* A command class that binds the ethertype list to the interface
*/
class bind_cmd : public rpc_cmd<HW::item<bool>,
rc_t,
vapi::Acl_interface_set_etype_whitelist>
class bind_cmd
: public rpc_cmd<HW::item<bool>, vapi::Acl_interface_set_etype_whitelist>
{
public:
/**
@ -69,9 +68,8 @@ private:
/**
* A command class that unbinds the ethertype list to the interface
*/
class unbind_cmd : public rpc_cmd<HW::item<bool>,
rc_t,
vapi::Acl_interface_set_etype_whitelist>
class unbind_cmd
: public rpc_cmd<HW::item<bool>, vapi::Acl_interface_set_etype_whitelist>
{
public:
/**

View File

@ -74,7 +74,8 @@ l3_update_cmd::issue(connection& con)
VAPI_CALL(req.execute());
m_hw_item = wait();
wait();
if (m_hw_item.rc() == rc_t::OK)
insert_acl();
@ -140,7 +141,8 @@ l2_update_cmd::issue(connection& con)
VAPI_CALL(req.execute());
m_hw_item = wait();
wait();
if (m_hw_item.rc() == rc_t::OK)
insert_acl();

View File

@ -29,8 +29,7 @@ namespace list_cmds {
* A command class that Create the list
*/
template <typename RULE, typename UPDATE>
class update_cmd
: public rpc_cmd<HW::item<handle_t>, HW::item<handle_t>, UPDATE>
class update_cmd : public rpc_cmd<HW::item<handle_t>, UPDATE>
{
public:
typedef typename list<RULE>::rules_t cmd_rules_t;
@ -42,7 +41,7 @@ public:
update_cmd(HW::item<handle_t>& item,
const cmd_key_t& key,
const cmd_rules_t& rules)
: rpc_cmd<HW::item<handle_t>, HW::item<handle_t>, UPDATE>(item)
: rpc_cmd<HW::item<handle_t>, UPDATE>(item)
, m_key(key)
, m_rules(rules)
{
@ -78,7 +77,7 @@ public:
void succeeded()
{
rpc_cmd<HW::item<handle_t>, HW::item<handle_t>, UPDATE>::succeeded();
rpc_cmd<HW::item<handle_t>, UPDATE>::succeeded();
list<RULE>::add(m_key, this->item());
}
@ -124,14 +123,14 @@ private:
* A cmd class that Deletes an ACL
*/
template <typename RULE, typename DELETE>
class delete_cmd : public rpc_cmd<HW::item<handle_t>, rc_t, DELETE>
class delete_cmd : public rpc_cmd<HW::item<handle_t>, DELETE>
{
public:
/**
* Constructor
*/
delete_cmd(HW::item<handle_t>& item)
: rpc_cmd<HW::item<handle_t>, rc_t, DELETE>(item)
: rpc_cmd<HW::item<handle_t>, DELETE>(item)
{
}

View File

@ -41,9 +41,7 @@ bind_cmd::issue(connection& con)
VAPI_CALL(req.execute());
m_hw_item.set(wait());
return rc_t::OK;
return (wait());
}
std::string

View File

@ -27,7 +27,7 @@ namespace arp_proxy_binding_cmds {
* A command class that binds the LLDP config to the interface
*/
class bind_cmd
: public rpc_cmd<HW::item<bool>, rc_t, vapi::Proxy_arp_intfc_enable_disable>
: public rpc_cmd<HW::item<bool>, vapi::Proxy_arp_intfc_enable_disable>
{
public:
/**
@ -60,7 +60,7 @@ private:
* A cmd class that Unbinds ArpProxy Config from an interface
*/
class unbind_cmd
: public rpc_cmd<HW::item<bool>, rc_t, vapi::Proxy_arp_intfc_enable_disable>
: public rpc_cmd<HW::item<bool>, vapi::Proxy_arp_intfc_enable_disable>
{
public:
/**

View File

@ -48,7 +48,7 @@ config_cmd::issue(connection& con)
VAPI_CALL(req.execute());
m_hw_item.set(wait());
wait();
return (rc_t::OK);
}

View File

@ -27,7 +27,7 @@ namespace arp_proxy_config_cmds {
/**
* A command class that adds the ARP Proxy config
*/
class config_cmd : public rpc_cmd<HW::item<bool>, rc_t, vapi::Proxy_arp_add_del>
class config_cmd : public rpc_cmd<HW::item<bool>, vapi::Proxy_arp_add_del>
{
public:
/**
@ -62,8 +62,7 @@ private:
/**
* A cmd class that Unconfigs ArpProxy Config from an interface
*/
class unconfig_cmd
: public rpc_cmd<HW::item<bool>, rc_t, vapi::Proxy_arp_add_del>
class unconfig_cmd : public rpc_cmd<HW::item<bool>, vapi::Proxy_arp_add_del>
{
public:
/**

View File

@ -161,7 +161,7 @@ bond_group_binding::event_handler::order() const
* We want enslaved interfaces bind to bond after interface
* but before anything else.
*/
return (dependency_t::BOND_BINDING);
return (dependency_t::VIRTUAL_INTERFACE);
}
void

View File

@ -45,9 +45,7 @@ bind_cmd::issue(connection& con)
VAPI_CALL(req.execute());
m_hw_item.set(wait());
return rc_t::OK;
return (wait());
}
std::string

View File

@ -26,7 +26,7 @@ namespace bond_group_binding_cmds {
/**
* A command class that binds the slave interface to the bond interface
*/
class bind_cmd : public rpc_cmd<HW::item<bool>, rc_t, vapi::Bond_enslave>
class bind_cmd : public rpc_cmd<HW::item<bool>, vapi::Bond_enslave>
{
public:
/**
@ -65,7 +65,7 @@ private:
/**
* A cmd class that detach slave from a bond interface
*/
class unbind_cmd : public rpc_cmd<HW::item<bool>, rc_t, vapi::Bond_detach_slave>
class unbind_cmd : public rpc_cmd<HW::item<bool>, vapi::Bond_detach_slave>
{
public:
/**

View File

@ -51,7 +51,8 @@ create_cmd::issue(connection& con)
VAPI_CALL(req.execute());
m_hw_item = wait();
wait();
if (m_hw_item.rc() == rc_t::OK) {
insert_interface();
}

View File

@ -49,9 +49,7 @@ create_cmd::issue(connection& con)
VAPI_CALL(req.execute());
m_hw_item.set(wait());
return rc_t::OK;
return (wait());
}
std::string

View File

@ -27,7 +27,7 @@ namespace bridge_domain_arp_entry_cmds {
/**
* A command class that creates or updates the bridge domain ARP Entry
*/
class create_cmd : public rpc_cmd<HW::item<bool>, rc_t, vapi::Bd_ip_mac_add_del>
class create_cmd : public rpc_cmd<HW::item<bool>, vapi::Bd_ip_mac_add_del>
{
public:
/**
@ -62,7 +62,7 @@ private:
/**
* A cmd class that deletes a bridge domain ARP entry
*/
class delete_cmd : public rpc_cmd<HW::item<bool>, rc_t, vapi::Bd_ip_mac_add_del>
class delete_cmd : public rpc_cmd<HW::item<bool>, vapi::Bd_ip_mac_add_del>
{
public:
/**

View File

@ -55,9 +55,7 @@ create_cmd::issue(connection& con)
VAPI_CALL(req.execute());
m_hw_item.set(wait());
return (rc_t::OK);
return (wait());
}
std::string

View File

@ -28,7 +28,7 @@ namespace bridge_domain_cmds {
* A command class that creates an Bridge-Domain
*/
class create_cmd
: public rpc_cmd<HW::item<uint32_t>, rc_t, vapi::Bridge_domain_add_del>
: public rpc_cmd<HW::item<uint32_t>, vapi::Bridge_domain_add_del>
{
public:
/**
@ -77,7 +77,7 @@ private:
* A cmd class that Delete an Bridge-Domain
*/
class delete_cmd
: public rpc_cmd<HW::item<uint32_t>, rc_t, vapi::Bridge_domain_add_del>
: public rpc_cmd<HW::item<uint32_t>, vapi::Bridge_domain_add_del>
{
public:
/**

View File

@ -51,9 +51,7 @@ create_cmd::issue(connection& con)
VAPI_CALL(req.execute());
m_hw_item.set(wait());
return rc_t::OK;
return (wait());
}
std::string

View File

@ -28,7 +28,7 @@ namespace bridge_domain_entry_cmds {
/**
* A command class that creates or updates the bridge_domain
*/
class create_cmd : public rpc_cmd<HW::item<bool>, rc_t, vapi::L2fib_add_del>
class create_cmd : public rpc_cmd<HW::item<bool>, vapi::L2fib_add_del>
{
public:
/**
@ -65,7 +65,7 @@ private:
/**
* A cmd class that deletes a bridge_domain
*/
class delete_cmd : public rpc_cmd<HW::item<bool>, rc_t, vapi::L2fib_add_del>
class delete_cmd : public rpc_cmd<HW::item<bool>, vapi::L2fib_add_del>
{
public:
/**

View File

@ -63,9 +63,7 @@ bind_cmd::issue(connection& con)
VAPI_CALL(req.execute());
m_hw_item.set(wait());
return rc_t::OK;
return (wait());
}
std::string

View File

@ -29,7 +29,7 @@ namespace dhcp_client_cmds {
/**
* A command class that binds the DHCP config to the interface
*/
class bind_cmd : public rpc_cmd<HW::item<bool>, rc_t, vapi::Dhcp_client_config>
class bind_cmd : public rpc_cmd<HW::item<bool>, vapi::Dhcp_client_config>
{
public:
/**
@ -80,8 +80,7 @@ private:
/**
* A cmd class that Unbinds Dhcp Config from an interface
*/
class unbind_cmd
: public rpc_cmd<HW::item<bool>, rc_t, vapi::Dhcp_client_config>
class unbind_cmd : public rpc_cmd<HW::item<bool>, vapi::Dhcp_client_config>
{
public:
/**

View File

@ -36,14 +36,14 @@ namespace VOM {
* The client can then 'pop' these events from this command object.
*/
template <typename WANT, typename EVENT>
class event_cmd : public rpc_cmd<HW::item<bool>, rc_t, WANT>
class event_cmd : public rpc_cmd<HW::item<bool>, WANT>
{
public:
/**
* Default constructor
*/
event_cmd(HW::item<bool>& b)
: rpc_cmd<HW::item<bool>, rc_t, WANT>(b)
: rpc_cmd<HW::item<bool>, WANT>(b)
{
}

View File

@ -49,9 +49,7 @@ create_cmd::issue(connection& con)
VAPI_CALL(req.execute());
m_hw_item.set(wait());
return rc_t::OK;
return (wait());
}
std::string
@ -94,9 +92,7 @@ delete_cmd::issue(connection& con)
VAPI_CALL(req.execute());
m_hw_item.set(wait());
return rc_t::OK;
return (wait());
}
std::string

View File

@ -27,8 +27,7 @@ namespace gbp_contract_cmds {
/**
* A command class that creates or updates the GBP contract
*/
class create_cmd
: public rpc_cmd<HW::item<bool>, rc_t, vapi::Gbp_contract_add_del>
class create_cmd : public rpc_cmd<HW::item<bool>, vapi::Gbp_contract_add_del>
{
public:
/**
@ -63,8 +62,7 @@ private:
/**
* A cmd class that deletes a GBP contract
*/
class delete_cmd
: public rpc_cmd<HW::item<bool>, rc_t, vapi::Gbp_contract_add_del>
class delete_cmd : public rpc_cmd<HW::item<bool>, vapi::Gbp_contract_add_del>
{
public:
/**

View File

@ -54,9 +54,7 @@ create_cmd::issue(connection& con)
VAPI_CALL(req.execute());
m_hw_item.set(wait());
return rc_t::OK;
return (wait());
}
std::string
@ -97,9 +95,7 @@ delete_cmd::issue(connection& con)
VAPI_CALL(req.execute());
m_hw_item.set(wait());
return rc_t::OK;
return (wait());
}
std::string

View File

@ -27,8 +27,7 @@ namespace gbp_endpoint_cmds {
/**
* A command class that creates or updates the GBP endpoint
*/
class create_cmd
: public rpc_cmd<HW::item<bool>, rc_t, vapi::Gbp_endpoint_add_del>
class create_cmd : public rpc_cmd<HW::item<bool>, vapi::Gbp_endpoint_add_del>
{
public:
/**
@ -65,8 +64,7 @@ private:
/**
* A cmd class that deletes a GBP endpoint
*/
class delete_cmd
: public rpc_cmd<HW::item<bool>, rc_t, vapi::Gbp_endpoint_add_del>
class delete_cmd : public rpc_cmd<HW::item<bool>, vapi::Gbp_endpoint_add_del>
{
public:
/**

View File

@ -53,9 +53,7 @@ create_cmd::issue(connection& con)
VAPI_CALL(req.execute());
m_hw_item.set(wait());
return rc_t::OK;
return (wait());
}
std::string
@ -92,9 +90,7 @@ delete_cmd::issue(connection& con)
VAPI_CALL(req.execute());
m_hw_item.set(wait());
return rc_t::OK;
return (wait());
}
std::string

View File

@ -28,7 +28,7 @@ namespace gbp_endpoint_group_cmds {
* A command class that creates or updates the GBP endpoint_group
*/
class create_cmd
: public rpc_cmd<HW::item<bool>, rc_t, vapi::Gbp_endpoint_group_add_del>
: public rpc_cmd<HW::item<bool>, vapi::Gbp_endpoint_group_add_del>
{
public:
/**
@ -66,7 +66,7 @@ private:
* A cmd class that deletes a GBP endpoint_group
*/
class delete_cmd
: public rpc_cmd<HW::item<bool>, rc_t, vapi::Gbp_endpoint_group_add_del>
: public rpc_cmd<HW::item<bool>, vapi::Gbp_endpoint_group_add_del>
{
public:
/**

Some files were not shown because too many files have changed in this diff Show More