5 #ifndef vnsw_agent_vn_hpp
6 #define vnsw_agent_vn_hpp
10 #include <oper/agent_types.h>
21 struct VirtualDnsType;
25 const std::string &vrf_name);
41 VnIpam(
const std::string& ip, uint32_t len,
const std::string& gw,
42 const std::string& dns,
bool dhcp,
const std::string &name,
43 const std::vector<autogen::DhcpOptionType> &dhcp_options,
44 const std::vector<autogen::RouteType> &host_routes,
92 bool admin_state,
bool enable_rpf,
bool flood_unknown_unicast,
95 bool pbb_etree_enable,
bool pbb_evpn_enable,
96 bool layer2_control_word,
UuidList slo_list,
97 bool underlay_forwarding,
98 bool vxlan_routing_vn,
100 UuidList mp_list,
bool cfg_igmp_enable, uint32_t vn_max_flows,
101 bool mac_ip_learning_enable,
177 std::vector<OperDhcpOptions::HostRoute> *routes)
const;
180 autogen::IpamType *ipam_type)
const;
182 autogen::IpamType *ipam_type,
183 autogen::VirtualDnsType *vdns_type)
const;
185 uint8_t *plen)
const;
252 bool *is_gateway)
const;
282 const IpAddress &new_address,
bool policy);
340 const std::string &context);
352 virtual void Clear();
355 bool *flood_unknown_unicast,
357 bool *mirror_destination);
364 const std::vector<VnIpam> &ipam,
366 int vxlan_id,
bool admin_state,
bool enable_rpf,
367 bool flood_unknown_unicast,
bool pbb_etree_enable,
368 bool pbb_evpn_enable,
bool layer2_control_word);
375 int GetCfgVnId(autogen::VirtualNetwork *cfg_vn);
381 void BuildVnIpamData(
const std::vector<autogen::IpamSubnetType> &subnets,
382 const std::string &ipam_name,
383 std::vector<VnIpam> *vn_ipam);
386 std::string node_type);
426 typedef boost::function<void(IFMapNode *)>
Callback;
438 bool GetIpam(
const std::string &name, autogen::IpamType *ipam);
439 bool GetVDns(
const std::string &vdns, autogen::VirtualDnsType *vdns_type);
445 const autogen::IpamType &cur)
const;
455 #endif // vnsw_agent_vn_hpp
const UuidList & slo_list() const
bool mac_ip_learning_enable_
std::map< std::string, autogen::IpamType > IpamDomainConfigMap
bool IsGwHostRouteRequired()
const std::vector< HostRoute > & host_routes() const
IpAddress GetDnsFromIpam(const IpAddress &ip) const
void SendObjectLog(AgentLogEvent::type event) const
void ResyncReq(const boost::uuids::uuid &vn)
void ConfigDelete(IFMapNode *node)
bool IsVRFServiceChainingInstance(const string &vn_name, const string &vrf_name)
bool mac_ip_learning_enable() const
uint32_t GetRefCount() const
virtual bool IFNodeToUuid(IFMapNode *node, boost::uuids::uuid &u)
const AclDBEntry * GetAcl() const
DISALLOW_COPY_AND_ASSIGN(OperNetworkIpam)
boost::uuids::uuid logical_router_uuid_
const VnIpam * GetIpam(const IpAddress &ip) const
VnData * BuildData(IFMapNode *node)
std::pair< std::string, VnIpamLinkData > VnIpamDataPair
void set_lr_vrf(const VrfEntry *vrf)
void IpamAddChange(IFMapNode *node)
std::map< std::string, VnIpamLinkData > VnIpamDataMap
DomainConfig * domain_config_
bool UpdateForwardingMode(Agent *agent)
void CallIpamCb(IFMapNode *node)
void DelIpamRoutes(Agent *agent, VnIpam *ipam, VrfEntry *vrf)
IpamDomainConfigMap ipam_config_
static DBTableBase * CreateTable(DB *db, const std::string &name)
void CallVdnsCb(IFMapNode *node)
void set_layer3_forwarding(bool layer3_forwarding)
boost::asio::ip::address IpAddress
std::pair< std::string, autogen::VirtualDnsType > VdnsDomainConfigPair
virtual ~OperNetworkIpam()
bool ChangeHandler(Agent *agent, const DBRequest *req)
virtual AgentSandeshPtr GetAgentSandesh(const AgentSandeshArguments *args, const std::string &context)
void DelVn(const boost::uuids::uuid &vn_uuid)
VnEntry(Agent *agent, boost::uuids::uuid id)
uint32_t vn_max_flows() const
void ConfigManagerEnqueue(IFMapNode *node)
bool GetIpam(const std::string &name, autogen::IpamType *ipam)
AclDBEntryRef mirror_acl_
IpAddress GetSubnetAddress() const
Agent::ForwardingMode forwarding_mode() const
virtual ~OperVirtualDns()
bool pbb_etree_enable() const
boost::uuids::uuid acl_id_
IFMapNode * FindTarget(IFMapAgentTable *table, IFMapNode *node, std::string node_type)
virtual KeyPtr GetDBRequestKey() const
void ConfigManagerEnqueue(IFMapNode *node)
std::unique_ptr< DBRequestKey > KeyPtr
VdnsDomainConfigMap vdns_config_
bool GetIpamVdnsData(const IpAddress &vm_addr, autogen::IpamType *ipam_type, autogen::VirtualDnsType *vdns_type) const
bool ApplyIpam(Agent *agent, VnIpam *ipam, VrfEntry *old_vrf, bool del)
OperDhcpOptions oper_dhcp_options
bool flood_unknown_unicast() const
bool IsSubnetMember(const IpAddress &ip) const
bool pbb_evpn_enable() const
virtual void SetKey(const DBRequestKey *key)
std::string GetProject() const
bool cfg_igmp_enable() const
uint32_t GetRefCount() const
void VDnsAddChange(IFMapNode *node)
VnIpam(const std::string &ip, uint32_t len, const std::string &gw, const std::string &dns, bool dhcp, const std::string &name, const std::vector< autogen::DhcpOptionType > &dhcp_options, const std::vector< autogen::RouteType > &host_routes, uint32_t alloc)
OperNetworkIpam(Agent *agent, DomainConfig *domain_config)
VnData(const Agent *agent, IFMapNode *node, const string &name, const boost::uuids::uuid &acl_id, const string &vrf_name, const boost::uuids::uuid &mirror_acl_id, const boost::uuids::uuid &mc_acl_id, const std::vector< VnIpam > &ipam, const VnIpamDataMap &vn_ipam_data, int vxlan_id, int vnid, bool admin_state, bool enable_rpf, bool flood_unknown_unicast, Agent::ForwardingMode forwarding_mode, const boost::uuids::uuid &qos_config_uuid, bool mirror_destination, bool pbb_etree_enable, bool pbb_evpn_enable, bool layer2_control_word, UuidList slo_list, bool underlay_forwarding, bool vxlan_routing_vn, const boost::uuids::uuid &logical_router_uuid, UuidList mp_list, bool cfg_igmp_enable, uint32_t vn_max_flows, bool mac_ip_learning_enable, const boost::uuids::uuid &health_check_uuid)
bool IpamChanged(const autogen::IpamType &old, const autogen::IpamType &cur) const
virtual bool OperDBDelete(DBEntry *entry, const DBRequest *req)
void VnEntryWalkDone(DBTable::DBTableWalkRef walk_ref, DBTableBase *partition)
virtual std::unique_ptr< DBEntry > AllocEntry(const DBRequestKey *k) const
void ConfigAddChange(IFMapNode *node)
void ConfigAddChange(IFMapNode *node)
uint32_t GetAllocUnitFromIpam(const IpAddress &ip) const
virtual bool OperDBResync(DBEntry *entry, const DBRequest *req)
AgentRouteWalkerPtr route_resync_walker_
bool HandleIpamChange(Agent *agent, VnIpam *old_ipam, VnIpam *new_ipam)
boost::asio::ip::address_v6 Ip6Address
boost::intrusive_ptr< const AgentQosConfig > AgentQosConfigConstRef
std::vector< Callback > ipam_callback_
boost::intrusive_ptr< AclDBEntry > AclDBEntryRef
bool vxlan_routing_vn() const
std::vector< VnIpam > ipam_
bool GetVnHostRoutes(const std::string &ipam, std::vector< OperDhcpOptions::HostRoute > *routes) const
const AclDBEntry * GetMirrorAcl() const
virtual bool OperDBOnChange(DBEntry *entry, const DBRequest *req)
bool AddIpamRoutes(Agent *agent, VnIpam *ipam)
std::pair< std::string, autogen::IpamType > IpamDomainConfigPair
virtual bool IsLess(const DBEntry &rhs) const
void ConfigDelete(IFMapNode *node)
bool flood_unknown_unicast_
const VxLanId * vxlan_id_ref() const
boost::intrusive_ptr< VxLanId > VxLanIdRef
Agent::ForwardingMode forwarding_mode_
DISALLOW_COPY_AND_ASSIGN(OperVirtualDns)
VnKey(const boost::uuids::uuid &id)
std::vector< Callback > vdns_callback_
bool underlay_forwarding_
bool DBEntrySandesh(Sandesh *sresp, std::string &name) const
const std::vector< VnIpam > & GetVnIpam() const
class boost::shared_ptr< AgentSandesh > AgentSandeshPtr
const std::string & name() const
DISALLOW_COPY_AND_ASSIGN(VnEntry)
VnEntry * Find(const boost::uuids::uuid &vn_uuid)
static VnTable * GetInstance()
boost::uuids::uuid mirror_acl_id_
boost::uuids::uuid health_check_uuid_
AgentQosConfigConstRef qos_config_
void AddHostRoute(const IpAddress &address, bool policy)
boost::intrusive_ptr< AgentRouteWalker > AgentRouteWalkerPtr
VnIpamDataMap vn_ipam_data_
DISALLOW_COPY_AND_ASSIGN(DomainConfig)
std::vector< boost::uuids::uuid > UuidList
bool UpdateVxlan(Agent *agent, bool op_del)
bool underlay_forwarding_
boost::uuids::uuid qos_config_uuid_
DomainConfig * domain_config_
int GetCfgVnId(autogen::VirtualNetwork *cfg_vn)
const boost::uuids::uuid & logical_router_uuid() const
VrfEntry * GetVrf() const
const Agent * agent() const
AclDBEntryRef mirror_cfg_acl_
boost::uuids::uuid mirror_cfg_acl_id_
void CfgForwardingFlags(IFMapNode *node, bool *rpf, bool *flood_unknown_unicast, Agent::ForwardingMode *forwarding_mode, bool *mirror_destination)
boost::function< void(IFMapNode *)> Callback
bool CanInstallIpam(const VnIpam *ipam)
void AddVn(const boost::uuids::uuid &vn_uuid, const string &name, const boost::uuids::uuid &acl_id, const string &vrf_name, const std::vector< VnIpam > &ipam, const VnData::VnIpamDataMap &vn_ipam_data, int vn_id, int vxlan_id, bool admin_state, bool enable_rpf, bool flood_unknown_unicast, bool pbb_etree_enable, bool pbb_evpn_enable, bool layer2_control_word)
bool flood_unknown_unicast_
const boost::uuids::uuid & health_check_uuid() const
bool layer3_forwarding() const
void BuildVnIpamData(const std::vector< autogen::IpamSubnetType > &subnets, const std::string &ipam_name, std::vector< VnIpam > *vn_ipam)
virtual DBEntry * OperDBAdd(const DBRequest *req)
boost::uuids::uuid health_check_uuid_
void IpamDelete(IFMapNode *node)
bool layer2_control_word_
OperVirtualDns(Agent *agent, DomainConfig *domain_config)
const AgentQosConfig * qos_config() const
void DelHostRoute(const IpAddress &address)
bool operator<(const VnIpam &rhs) const
void set_bridging(bool bridging)
void RegisterIpamCb(Callback cb)
bool layer2_control_word() const
DISALLOW_COPY_AND_ASSIGN(VnTable)
const boost::uuids::uuid & GetUuid() const
bool mac_ip_learning_enable_
const string & GetName() const
OperDhcpOptions oper_dhcp_options_
void AddSubnetRoute(VnIpam *ipam)
bool IsGatewayL2(const string &gateway) const
std::vector< VnIpam > ipam_
bool GetVDns(const std::string &vdns, autogen::VirtualDnsType *vdns_type)
boost::intrusive_ptr< DBTableWalk > DBTableWalkRef
void GlobalVrouterConfigChanged()
virtual bool ProcessConfig(IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u)
const VrfEntry * lr_vrf() const
Agent::ForwardingMode forwarding_mode_
bool underlay_forwarding() const
boost::uuids::uuid logical_router_uuid_
bool operator==(const VnIpamLinkData &rhs) const
std::map< std::string, autogen::VirtualDnsType > VdnsDomainConfigMap
bool GetIpamName(const IpAddress &vm_addr, std::string *ipam_name) const
virtual size_t Hash(const DBRequestKey *key) const
const UuidList & mp_list() const
VnData::VnIpamDataMap vn_ipam_data_
virtual bool IFNodeToReq(IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u)
DBTable::DBTableWalkRef walk_ref_
const bool mirror_destination() const
virtual size_t Hash(const DBEntry *entry) const
bool VnEntryWalk(DBTablePartBase *partition, DBEntryBase *entry)
bool Resync(Agent *agent)
bool GetPrefix(const Ip6Address &ip, Ip6Address *prefix, uint8_t *plen) const
void VDnsDelete(IFMapNode *node)
void UpdateHostRoute(Agent *agent, const IpAddress &old_address, const IpAddress &new_address, bool policy)
const AclDBEntry * GetMirrorCfgAcl() const
void DelSubnetRoute(VnIpam *ipam)
virtual string ToString() const
bool UpdateIpam(Agent *agent, std::vector< VnIpam > &new_ipam)
bool layer2_control_word_
IpAddress GetGatewayFromIpam(const IpAddress &ip) const
bool IdentifyBgpRoutersServiceIp(const IpAddress &ip_address, bool *is_dns, bool *is_gateway) const
void RegisterVdnsCb(Callback cb)
bool ApplyAllIpam(Agent *agent, VrfEntry *old_vrf, bool del)
bool GetIpamData(const IpAddress &vm_addr, std::string *ipam_name, autogen::IpamType *ipam_type) const
static VnTable * vn_table_
VnTable(DB *db, const std::string &name)