This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
repo init -u git@github.com:Juniper/contrail-vnc | |
repo sync | |
python third_party/fetch_packages.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsd:complexType name='BgpSessionAttributes'> | |
<xsd:sequence> | |
<!-- When the parameters are uni-directional the bgp-router element | |
specifies to which node the configuration applies. If missing | |
the attributes apply to both ends of the session. | |
--> | |
<xsd:element name='bgp-router' type='xsd:string'/> | |
<xsd:element name='address-families' type='AddressFamilies'/> | |
<!-- Configuration items such as import and export policy --> | |
+ <xsd:element name='rtarget-strip-private' type='xsd:boolean'/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -45,6 +45,8 @@ class BgpProvisioner(object): | |
bgp_addr_fams = AddressFamilies(['inet-vpn']) | |
bgp_sess_attrs = [ | |
BgpSessionAttributes(address_families=bgp_addr_fams)] | |
+ if router_type == 'mx': | |
+ bgp_sess_attrs[0].rtarget_strip_private = True | |
bgp_sessions = [BgpSession(attributes=bgp_sess_attrs)] | |
bgp_peering_attrs = BgpPeeringAttributes(session=bgp_sessions) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scons controller/src/config/api-server | |
scons controller/src/config/common | |
scons controller/src/sandesh | |
scons controller/src/discovery | |
scons tools/sandesh/library/python | |
(cd controller/src/config/api-server/tests; fab -f fab_tasks.py setup_and_run_api_srv:listen_port=50000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
testdir = os.path.dirname(__file__) | |
topdir = os.path.abspath(os.path.join(testdir, '../../../../../')) | |
sys.path.insert(0, os.path.join(topdir, 'build/debug/config/api-server/ut-venv/lib/python2.7/site-packages')) | |
sys.path.append(os.path.join(testdir, '../../utils')) | |
from provision_bgp import BgpProvisioner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -284,7 +284,8 @@ BgpPeer::BgpPeer(BgpServer *server, RoutingInstance *instance, | |
remote_bgp_id_(0), | |
local_bgp_id_(server_->bgp_identifier()), | |
peer_type_((peer_as_ == local_as_) ? BgpProto::IBGP : BgpProto::EBGP), | |
- policy_(peer_type_, RibExportPolicy::BGP, peer_as_, -1, 0), | |
+ policy_(peer_type_, RibExportPolicy::BGP, peer_as_, -1, 0, | |
+ config->session_attributes().rtarget_strip_private), | |
peer_close_(new PeerClose(this)), | |
peer_stats_(new PeerStats(this)), | |
deleter_(new DeleteActor(this)), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -129,11 +129,41 @@ BgpRoute *InetVpnTable::RouteReplicate(BgpServer *server, | |
return dest_route; | |
} | |
+static void RTargetStripPrivate(UpdateInfo *uinfo) { | |
+ const BgpAttr *attr = uinfo->roattr.attr(); | |
+ const ExtCommunity *comm = attr->ext_community(); | |
+ ExtCommunitySpec cspec; | |
+ bool changed = false; | |
+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ENABLE_CONTRAIL=yes | |
Q_PLUGIN=contrail | |
PHYSICAL_INTERFACE=eth0 | |
disable_service n-net | |
enable_service q-svc | |
enable_service q-meta | |
enable_service neutron |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import vnc_api.vnc_api | |
class SubnetModifier(): | |
def __init__(self, netname): | |
self._vnc = vnc_api.vnc_api.VncApi() | |
self._netname = netname | |
def toggle(self, onoff): | |
vnet = self._vnc.virtual_network_read( | |
fq_name = self._netname.split(':')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/vnsw/agent/oper/vn.h b/src/vnsw/agent/oper/vn.h | |
index f8e6488..55046b9 100644 | |
--- a/src/vnsw/agent/oper/vn.h | |
+++ b/src/vnsw/agent/oper/vn.h | |
@@ -28,11 +28,13 @@ struct VnIpam { | |
uint32_t plen; | |
Ip4Address default_gw; | |
bool installed; // is the route to send pkts to host installed | |
+ bool advertise_default; | |
std::string ipam_name; |
OlderNewer