diff --git a/src/vnsw/agent/oper/bridge_route.cc b/src/vnsw/agent/oper/bridge_route.cc index cfbf5963f17..8415494671a 100644 --- a/src/vnsw/agent/oper/bridge_route.cc +++ b/src/vnsw/agent/oper/bridge_route.cc @@ -129,6 +129,7 @@ void BridgeAgentRouteTable::AddBridgeRoute(const AgentRoute *rt) { void BridgeAgentRouteTable::AddOvsPeerMulticastRoute(const Peer *peer, uint32_t vxlan_id, + const std::string &vn_name, Ip4Address tsn, Ip4Address tor_ip) { const VrfEntry *vrf = vrf_entry(); @@ -142,7 +143,7 @@ void BridgeAgentRouteTable::AddOvsPeerMulticastRoute(const Peer *peer, vrf->GetName(), MacAddress::BroadcastMac(), vxlan_id)); - req.data.reset(new MulticastRoute(vrf->vn()->GetName(), 0, vxlan_id, + req.data.reset(new MulticastRoute(vn_name, 0, vxlan_id, TunnelType::VxlanType(), nh_req, Composite::L2COMP)); BridgeTableProcess(agent(), vrf_name(), req); diff --git a/src/vnsw/agent/oper/bridge_route.h b/src/vnsw/agent/oper/bridge_route.h index a5a42dd8c0e..7d106303027 100644 --- a/src/vnsw/agent/oper/bridge_route.h +++ b/src/vnsw/agent/oper/bridge_route.h @@ -30,6 +30,7 @@ class BridgeAgentRouteTable : public AgentRouteTable { const VmInterface *vm_intf); void AddOvsPeerMulticastRoute(const Peer* peer, uint32_t vxlan_id, + const std::string &vn_name, Ip4Address vtep, Ip4Address tor_ip); void AddBridgeRoute(const AgentRoute *rt); diff --git a/src/vnsw/agent/oper/vn.cc b/src/vnsw/agent/oper/vn.cc index 2276e52fc80..6c3ddcb84d6 100644 --- a/src/vnsw/agent/oper/vn.cc +++ b/src/vnsw/agent/oper/vn.cc @@ -786,14 +786,14 @@ bool VnTable::IFNodeToReq(IFMapNode *node, DBRequest &req) { void VnTable::AddVn(const uuid &vn_uuid, const string &name, const uuid &acl_id, const string &vrf_name, const std::vector &ipam, - const VnData::VnIpamDataMap &vn_ipam_data, + const VnData::VnIpamDataMap &vn_ipam_data, int vn_id, int vxlan_id, bool admin_state, bool enable_rpf, bool flood_unknown_unicast) { DBRequest req; VnKey *key = new VnKey(vn_uuid); VnData *data = new VnData(agent(), name, acl_id, vrf_name, nil_uuid(), nil_uuid(), ipam, vn_ipam_data, - vxlan_id, vxlan_id, true, true, + vn_id, vxlan_id, true, true, admin_state, enable_rpf, flood_unknown_unicast); diff --git a/src/vnsw/agent/oper/vn.h b/src/vnsw/agent/oper/vn.h index c6bd47848a2..0f12b3d32d0 100644 --- a/src/vnsw/agent/oper/vn.h +++ b/src/vnsw/agent/oper/vn.h @@ -229,8 +229,8 @@ class VnTable : public AgentOperDBTable { void AddVn(const uuid &vn_uuid, const string &name, const uuid &acl_id, const string &vrf_name, const std::vector &ipam, - const VnData::VnIpamDataMap &vn_ipam_data, int vxlan_id, - bool admin_state, bool enable_rpf, + const VnData::VnIpamDataMap &vn_ipam_data, int vn_id, + int vxlan_id, bool admin_state, bool enable_rpf, bool flood_unknown_unicast); void DelVn(const uuid &vn_uuid); VnEntry *Find(const uuid &vn_uuid); diff --git a/src/vnsw/agent/ovs_tor_agent/ovsdb_client/multicast_mac_local_ovsdb.cc b/src/vnsw/agent/ovs_tor_agent/ovsdb_client/multicast_mac_local_ovsdb.cc index 0052e80d712..beffa24889d 100644 --- a/src/vnsw/agent/ovs_tor_agent/ovsdb_client/multicast_mac_local_ovsdb.cc +++ b/src/vnsw/agent/ovs_tor_agent/ovsdb_client/multicast_mac_local_ovsdb.cc @@ -41,18 +41,23 @@ MulticastMacLocalEntry::MulticastMacLocalEntry(MulticastMacLocalOvsdb *table, logical_switch_(logical_switch) { } -bool MulticastMacLocalEntry::Add() { - MulticastMacLocalOvsdb *table = static_cast(table_); +OVSDB::VnOvsdbEntry *MulticastMacLocalEntry::GetVnEntry() const { VnOvsdbObject *vn_object = table_->client_idl()->vn_ovsdb(); VnOvsdbEntry vn_key(vn_object, StringToUuid(logical_switch_name_)); VnOvsdbEntry *vn_entry = static_cast(vn_object->GetReference(&vn_key)); + return vn_entry; +} +bool MulticastMacLocalEntry::Add() { + MulticastMacLocalOvsdb *table = static_cast(table_); + OVSDB::VnOvsdbEntry *vn_entry = GetVnEntry(); // Take vrf reference to genrate withdraw/delete route request vrf_ = vn_entry->vrf(); OVSDB_TRACE(Trace, "Adding multicast Route VN uuid " + logical_switch_name_); vxlan_id_ = logical_switch_->vxlan_id(); table->peer()->AddOvsPeerMulticastRoute(vrf_.get(), vxlan_id_, + vn_entry->name(), table_->client_idl()->tsn_ip(), logical_switch_->tor_ip().to_v4()); return true; @@ -79,15 +84,13 @@ bool MulticastMacLocalEntry::IsLess(const KSyncEntry& entry) const { } KSyncEntry *MulticastMacLocalEntry::UnresolvedReference() { - VnOvsdbObject *vn_object = table_->client_idl()->vn_ovsdb(); - VnOvsdbEntry vn_key(vn_object, StringToUuid(logical_switch_name_)); - VnOvsdbEntry *vn_entry = - static_cast(vn_object->GetReference(&vn_key)); + VnOvsdbEntry *vn_entry = GetVnEntry(); if (!vn_entry->IsResolved()) { OVSDB_TRACE(Trace, "Skipping multicast route add " + logical_switch_name_ + " due to unavailable VN "); return vn_entry; } + return NULL; } diff --git a/src/vnsw/agent/ovs_tor_agent/ovsdb_client/multicast_mac_local_ovsdb.h b/src/vnsw/agent/ovs_tor_agent/ovsdb_client/multicast_mac_local_ovsdb.h index 92a9e0778fb..f4a0a2ce4c3 100644 --- a/src/vnsw/agent/ovs_tor_agent/ovsdb_client/multicast_mac_local_ovsdb.h +++ b/src/vnsw/agent/ovs_tor_agent/ovsdb_client/multicast_mac_local_ovsdb.h @@ -10,6 +10,8 @@ class OvsPeer; namespace OVSDB { +class VnOvsdbEntry; + class MulticastMacLocalOvsdb : public OvsdbObject { public: MulticastMacLocalOvsdb(OvsdbClientIdl *idl, OvsPeer *peer); @@ -42,6 +44,7 @@ class MulticastMacLocalEntry : public OvsdbEntry { const std::string &logical_switch_name() const; const LogicalSwitchEntry *logical_switch() {return logical_switch_;} const uint32_t vxlan_id() const {return vxlan_id_;} + OVSDB::VnOvsdbEntry *GetVnEntry() const; private: friend class MulticastMacLocalOvsdb; diff --git a/src/vnsw/agent/ovs_tor_agent/ovsdb_client/ovsdb_route_peer.cc b/src/vnsw/agent/ovs_tor_agent/ovsdb_client/ovsdb_route_peer.cc index 805d4e90c40..0669e6751ca 100644 --- a/src/vnsw/agent/ovs_tor_agent/ovsdb_client/ovsdb_route_peer.cc +++ b/src/vnsw/agent/ovs_tor_agent/ovsdb_client/ovsdb_route_peer.cc @@ -84,11 +84,12 @@ void OvsPeer::DeleteOvsRoute(VrfEntry *vrf, uint32_t vxlan_id, void OvsPeer::AddOvsPeerMulticastRoute(const VrfEntry *vrf, uint32_t vxlan_id, + const std::string &vn_name, const Ip4Address &tsn_ip, const Ip4Address &tor_ip) { BridgeAgentRouteTable *table = static_cast (vrf->GetBridgeRouteTable()); - table->AddOvsPeerMulticastRoute(this, vxlan_id, tsn_ip, tor_ip); + table->AddOvsPeerMulticastRoute(this, vxlan_id, vn_name, tsn_ip, tor_ip); } void OvsPeer::DeleteOvsPeerMulticastRoute(const VrfEntry *vrf, diff --git a/src/vnsw/agent/ovs_tor_agent/ovsdb_client/ovsdb_route_peer.h b/src/vnsw/agent/ovs_tor_agent/ovsdb_client/ovsdb_route_peer.h index de114201f96..c4c49b40ba0 100644 --- a/src/vnsw/agent/ovs_tor_agent/ovsdb_client/ovsdb_route_peer.h +++ b/src/vnsw/agent/ovs_tor_agent/ovsdb_client/ovsdb_route_peer.h @@ -23,6 +23,7 @@ class OvsPeer : public Peer { void DeleteOvsRoute(VrfEntry *vrf, uint32_t vxlan, const MacAddress &mac); void AddOvsPeerMulticastRoute(const VrfEntry *vrf, uint32_t vxlan_id, + const std::string &vn_name_, const Ip4Address &tsn_ip, const Ip4Address &tor_ip); void DeleteOvsPeerMulticastRoute(const VrfEntry *vrf, uint32_t vxlan_id); diff --git a/src/vnsw/agent/ovs_tor_agent/ovsdb_client/test/SConscript b/src/vnsw/agent/ovs_tor_agent/ovsdb_client/test/SConscript index b21129a5d04..cda0eab6fad 100644 --- a/src/vnsw/agent/ovs_tor_agent/ovsdb_client/test/SConscript +++ b/src/vnsw/agent/ovs_tor_agent/ovsdb_client/test/SConscript @@ -53,6 +53,7 @@ disabled_ovsdb_suite = [] test_ovs_route = AgentEnv.MakeTestCmd(env, 'test_ovs_route', flaky_agent_suite) test_ovs_route = AgentEnv.MakeTestCmd(env, 'test_ovs_base', agent_suite) test_ovs_route = AgentEnv.MakeTestCmd(env, 'test_ovs_logical_switch', agent_suite) +AgentEnv.MakeTestCmd(env, 'test_ovs_multicast_local', agent_suite) AgentEnv.MakeTestCmd(env, 'test_ovs_unicast_remote', agent_suite) AgentEnv.MakeTestCmd(env, 'test_ovs_unicast_local', agent_suite) AgentEnv.MakeTestCmd(env, 'test_ovs_vlan_port', agent_suite) diff --git a/src/vnsw/agent/ovs_tor_agent/ovsdb_client/test/test_ovs_multicast_local.cc b/src/vnsw/agent/ovs_tor_agent/ovsdb_client/test/test_ovs_multicast_local.cc new file mode 100644 index 00000000000..59f7143c4d5 --- /dev/null +++ b/src/vnsw/agent/ovs_tor_agent/ovsdb_client/test/test_ovs_multicast_local.cc @@ -0,0 +1,188 @@ +/* + * Copyright (c) 2015 Juniper Networks, Inc. All rights reserved. + */ + +#include "base/os.h" +#include "testing/gunit.h" + +#include +#include +#include +#include +#include + +#include + +#include "cfg/cfg_init.h" +#include "cfg/cfg_interface.h" +#include "pkt/pkt_init.h" +#include "services/services_init.h" +#include "vrouter/ksync/ksync_init.h" +#include "oper/interface_common.h" +#include "oper/nexthop.h" +#include "oper/tunnel_nh.h" +#include "route/route.h" +#include "oper/vrf.h" +#include "oper/mpls.h" +#include "oper/vm.h" +#include "oper/vn.h" +#include "oper/physical_device_vn.h" +#include "filter/acl.h" +#include "openstack/instance_service_server.h" +#include "test_cmn_util.h" +#include "vr_types.h" + +#include "openstack/instance_service_server.h" +#include "xmpp/xmpp_init.h" +#include "xmpp/test/xmpp_test_util.h" +#include "vr_types.h" +#include "control_node_mock.h" +#include "xml/xml_pugi.h" +#include "controller/controller_peer.h" +#include "controller/controller_export.h" +#include "controller/controller_vrf_export.h" + +#include "ovs_tor_agent/ovsdb_client/ovsdb_route_peer.h" +#include "ovs_tor_agent/ovsdb_client/physical_switch_ovsdb.h" +#include "ovs_tor_agent/ovsdb_client/logical_switch_ovsdb.h" +#include "ovs_tor_agent/ovsdb_client/physical_port_ovsdb.h" +#include "test_ovs_agent_init.h" +#include "test-xml/test_xml.h" +#include "test-xml/test_xml_oper.h" +#include "test_xml_physical_device.h" +#include "test_xml_ovsdb.h" + +#include + +using namespace pugi; +using namespace OVSDB; + +EventManager evm1; +ServerThread *thread1; +test::ControlNodeMock *bgp_peer1; + +EventManager evm2; +ServerThread *thread2; +test::ControlNodeMock *bgp_peer2; + +void RouterIdDepInit(Agent *agent) { + Agent::GetInstance()->controller()->Connect(); +} + +class OvsBaseTest : public ::testing::Test { +protected: + OvsBaseTest() { + } + + virtual void SetUp() { + agent_ = Agent::GetInstance(); + init_ = static_cast(client->agent_init()); + peer_manager_ = init_->ovs_peer_manager(); + WAIT_FOR(100, 10000, + (tcp_session_ = static_cast + (init_->ovsdb_client()->NextSession(NULL))) != NULL); + WAIT_FOR(100, 10000, + (tcp_session_->client_idl() != NULL)); + } + + virtual void TearDown() { + } + + void AddPhysicalDeviceVn(int dev_id, int vn_id) { + DBRequest req(DBRequest::DB_ENTRY_ADD_CHANGE); + req.key.reset(new PhysicalDeviceVnKey(MakeUuid(dev_id), + MakeUuid(vn_id))); + agent_->physical_device_vn_table()->Enqueue(&req); + PhysicalDeviceVn key(MakeUuid(dev_id), MakeUuid(vn_id)); + WAIT_FOR(100, 10000, + (agent_->physical_device_vn_table()->Find(&key, false) != NULL)); + } + + void DelPhysicalDeviceVn(int dev_id, int vn_id) { + DBRequest req(DBRequest::DB_ENTRY_DELETE); + req.key.reset(new PhysicalDeviceVnKey(MakeUuid(dev_id), + MakeUuid(vn_id))); + agent_->physical_device_vn_table()->Enqueue(&req); + PhysicalDeviceVn key(MakeUuid(dev_id), MakeUuid(vn_id)); + WAIT_FOR(100, 10000, + (agent_->physical_device_vn_table()->Find(&key, false) == NULL)); + } + + Agent *agent_; + TestOvsAgentInit *init_; + OvsPeerManager *peer_manager_; + OvsdbClientTcpSession *tcp_session_; +}; + +TEST_F(OvsBaseTest, BasicOvsdb) { + WAIT_FOR(100, 10000, (tcp_session_->status() == string("Established"))); +} + +TEST_F(OvsBaseTest, MulticastLocalBasic) { + AgentUtXmlTest + test("controller/src/vnsw/agent/ovs_tor_agent/ovsdb_client/test/xml/multicast-local-base.xml"); + // set current session in test context + OvsdbTestSetSessionContext(tcp_session_); + AgentUtXmlOperInit(&test); + AgentUtXmlPhysicalDeviceInit(&test); + AgentUtXmlOvsdbInit(&test); + if (test.Load() == true) { + test.ReadXml(); + string str; + test.ToString(&str); + cout << str << endl; + test.Run(); + } +} + +TEST_F(OvsBaseTest, MulticastLocal_add_mcroute_without_vrf_vn_link_present) { + //Add vrf + VrfAddReq("vrf1"); + WAIT_FOR(100, 10000, (VrfGet("vrf1", false) != NULL)); + //Add VN + VnAddReq(1, "vn1", "vrf1"); + WAIT_FOR(100, 10000, (VnGet(1) != NULL)); + //Add device + DBRequest device_req(DBRequest::DB_ENTRY_ADD_CHANGE); + device_req.key.reset(new PhysicalDeviceKey(MakeUuid(1))); + device_req.data.reset(new PhysicalDeviceData(agent_, "test-router", + "test-router", "", + Ip4Address::from_string("1.1.1.1"), + Ip4Address::from_string("2.2.2.2"), + "OVS", NULL)); + agent_->physical_device_table()->Enqueue(&device_req); + WAIT_FOR(100, 10000, + (agent_->physical_device_table()->Find(MakeUuid(1)) != NULL)); + //Add device_vn + AddPhysicalDeviceVn(1, 1); + + //Initialization done, now delete VRF VN link and then update VXLAN id in + //VN. + TestClient::WaitForIdle(); + VxLanNetworkIdentifierMode(true); + TestClient::WaitForIdle(); + + //Delete + DelPhysicalDeviceVn(1, 1); + DBRequest del_dev_req(DBRequest::DB_ENTRY_DELETE); + del_dev_req.key.reset(new PhysicalDeviceVnKey(MakeUuid(1), + MakeUuid(1))); + agent_->physical_device_table()->Enqueue(&del_dev_req); + WAIT_FOR(1000, 10000, + (agent_->physical_device_table()-> + Find(MakeUuid(1)) == NULL)); + VrfDelReq("vrf1"); + VnDelReq(1); + WAIT_FOR(1000, 10000, (VrfGet("vrf1", true) != NULL)); + WAIT_FOR(1000, 10000, (VnGet(1) != NULL)); +} + +int main(int argc, char *argv[]) { + GETUSERARGS(); + // override with true to initialize ovsdb server and client + ksync_init = true; + client = OvsTestInit(init_file, ksync_init); + int ret = RUN_ALL_TESTS(); + TestShutdown(); + return ret; +} diff --git a/src/vnsw/agent/ovs_tor_agent/ovsdb_client/test/test_xml_ovsdb.cc b/src/vnsw/agent/ovs_tor_agent/ovsdb_client/test/test_xml_ovsdb.cc index 2069a59fbfa..191aede357a 100644 --- a/src/vnsw/agent/ovs_tor_agent/ovsdb_client/test/test_xml_ovsdb.cc +++ b/src/vnsw/agent/ovs_tor_agent/ovsdb_client/test/test_xml_ovsdb.cc @@ -21,6 +21,8 @@ #include #include #include +#include +#include #include #include @@ -50,6 +52,8 @@ CreateOvsdbValidateNode(const string &type, const string &name, return new AgentUtXmlOvsdbVrfValidate(name, id, node); if (type == "ovs-vlan-port-binding") return new AgentUtXmlVlanPortBindingValidate(name, id, node); + if (type == "ovs-mc-local") + return new AgentUtXmlMulticastLocalValidate(name, id, node); } void AgentUtXmlOvsdbInit(AgentUtXmlTest *test) { @@ -57,6 +61,7 @@ void AgentUtXmlOvsdbInit(AgentUtXmlTest *test) { test->AddValidateEntry("ovs-uc-remote", CreateOvsdbValidateNode); test->AddValidateEntry("ovs-vrf", CreateOvsdbValidateNode); test->AddValidateEntry("ovs-vlan-port-binding", CreateOvsdbValidateNode); + test->AddValidateEntry("ovs-mc-local", CreateOvsdbValidateNode); } ///////////////////////////////////////////////////////////////////////////// @@ -240,7 +245,6 @@ bool AgentUtXmlVlanPortBindingValidate::ReadXml() { cout << "Attribute Parsing failed " << endl; return false; } - return true; } @@ -279,3 +283,58 @@ const string AgentUtXmlVlanPortBindingValidate::ToString() { return "ovs-vlan-port-binding"; } +///////////////////////////////////////////////////////////////////////////// +// AgentUtXmlMulticastLocalValidate routines +///////////////////////////////////////////////////////////////////////////// +AgentUtXmlMulticastLocalValidate::AgentUtXmlMulticastLocalValidate +(const string &name, const uuid &id, const xml_node &node) : + AgentUtXmlValidationNode(name, node), id_(id) { +} + +AgentUtXmlMulticastLocalValidate::~AgentUtXmlMulticastLocalValidate() { +} + +bool AgentUtXmlMulticastLocalValidate::ReadXml() { + if (AgentUtXmlValidationNode::ReadXml() == false) + return false; + if (GetStringAttribute(node(), "mac", &mac_) == false) { + cout << "Attribute Parsing failed " << endl; + return false; + } + + uint16_t id = 0; + if (GetUintAttribute(node(), "vn-uuid", &id) == false) { + cout << "Attribute Parsing failed " << endl; + return false; + } + + vn_uuid_ = MakeUuid(id); + + return true; +} + +bool AgentUtXmlMulticastLocalValidate::Validate() { + LogicalSwitchTable *ls_table = ovs_test_session->client_idl()-> + logical_switch_table(); + LogicalSwitchEntry ls_key(ls_table, UuidToString(vn_uuid_)); + LogicalSwitchEntry *ls_entry = static_cast + (ls_table->Find(&ls_key)); + + MulticastMacLocalOvsdb *table = + ovs_test_session->client_idl()->multicast_mac_local_ovsdb(); + + MulticastMacLocalEntry key(table, ls_entry); + MulticastMacLocalEntry *mc_entry = + static_cast(table->Find(&key)); + if (present()) { + return (mc_entry != NULL); + } else { + return (mc_entry == NULL); + } + + return true; +} + +const string AgentUtXmlMulticastLocalValidate::ToString() { + return "ovs-multicast-local"; +} diff --git a/src/vnsw/agent/ovs_tor_agent/ovsdb_client/test/test_xml_ovsdb.h b/src/vnsw/agent/ovs_tor_agent/ovsdb_client/test/test_xml_ovsdb.h index 4725d373125..1592591827f 100644 --- a/src/vnsw/agent/ovs_tor_agent/ovsdb_client/test/test_xml_ovsdb.h +++ b/src/vnsw/agent/ovs_tor_agent/ovsdb_client/test/test_xml_ovsdb.h @@ -91,4 +91,23 @@ class AgentUtXmlVlanPortBindingValidate : public AgentUtXmlValidationNode { std::string logical_switch_name_; }; +class AgentUtXmlMulticastLocalValidate : public AgentUtXmlValidationNode { +public: + AgentUtXmlMulticastLocalValidate(const std::string &name, + const boost::uuids::uuid &id, + const pugi::xml_node &node); + virtual ~AgentUtXmlMulticastLocalValidate(); + + virtual bool ReadXml(); + virtual bool Validate(); + virtual const std::string ToString(); + virtual uint32_t wait_count() const { return 2000; } + virtual uint32_t sleep_time() const { return 2000; } + +private: + const boost::uuids::uuid id_; + std::string mac_; + boost::uuids::uuid vn_uuid_; +}; + #endif // SRC_VNSW_AGENT_OVS_TOR_AGENT_OVSDB_CLIENT_TEST_TEST_XML_OVSDB_H_ diff --git a/src/vnsw/agent/ovs_tor_agent/ovsdb_client/test/xml/multicast-local-base.xml b/src/vnsw/agent/ovs_tor_agent/ovsdb_client/test/xml/multicast-local-base.xml new file mode 100644 index 00000000000..2a29914bc90 --- /dev/null +++ b/src/vnsw/agent/ovs_tor_agent/ovsdb_client/test/xml/multicast-local-base.xml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/vnsw/agent/test/test_util.cc b/src/vnsw/agent/test/test_util.cc index 99fc5d75305..35b6504f7a2 100644 --- a/src/vnsw/agent/test/test_util.cc +++ b/src/vnsw/agent/test/test_util.cc @@ -920,7 +920,7 @@ void VnAddReq(int id, const char *name) { VnData::VnIpamDataMap vn_ipam_data; Agent::GetInstance()->vn_table()->AddVn(MakeUuid(id), name, nil_uuid(), name, ipam, vn_ipam_data, id, - true, true, false); + (id + 100), true, true, false); usleep(1000); } @@ -930,7 +930,7 @@ void VnAddReq(int id, const char *name, int acl_id) { Agent::GetInstance()->vn_table()->AddVn(MakeUuid(id), name, MakeUuid(acl_id), name, ipam, vn_ipam_data, id, - true, true, false); + (id + 100), true, true, false); usleep(1000); } @@ -939,7 +939,8 @@ void VnAddReq(int id, const char *name, int acl_id, const char *vrf_name) { VnData::VnIpamDataMap vn_ipam_data; Agent::GetInstance()->vn_table()->AddVn(MakeUuid(id), name, MakeUuid(acl_id), vrf_name, ipam, - vn_ipam_data, id, true, true, false); + vn_ipam_data, id, (id + 100), + true, true, false); usleep(1000); } @@ -948,7 +949,7 @@ void VnAddReq(int id, const char *name, const char *vrf_name) { VnData::VnIpamDataMap vn_ipam_data; Agent::GetInstance()->vn_table()->AddVn(MakeUuid(id), name, nil_uuid(), vrf_name, ipam, vn_ipam_data, id, - true, true, false); + (id + 100), true, true, false); usleep(1000); }