DM: Add comments to generated configs

Bug #1468954 reported by Nischal Sheth
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
Trunk
Fix Committed
Wishlist
Suresh Balineni

Bug Description

Since we're somewhat limited in the amount of useful information
that can be conveyed by the names of configuration objects, it will
be useful to generate comments for the objects where applicable.
This will be useful in understanding the generated configs in case
things don't work as expected and someone needs to debug the
MX behavior.

There are 2 types of comments that can/should be generated.

The first kind conveys facts about objects. For example, the name
and UUID of the VN for a routing-instance, the name of bgp-router
for a neighbor in the bgp configuration, the name of the VN for
which a policy-statement was added etc.

The second kind describes the intent of the configuration.

A good example would be redirect_to_public_vrf_filter whose purpose
is to take traffic destined to any address in the floating ip pool
from inet.0 and redirect it to the corresponding VRF.

Another good example would be the so-called -nat VRF whose purpose
is to implement FIB lookup for BMS that have floating IP associated
with them. Same for the service sets and nat rules used to implement
1:1 NAT.

Nischal Sheth (nsheth)
description: updated
description: updated
description: updated
Nischal Sheth (nsheth)
no longer affects: juniperopenstack/r2.20
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/28771
Submitter: Suresh Balineni (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/28771
Committed: http://github.org/Juniper/contrail-controller/commit/34cb0fbec4aaccdccdfffece302bb9923987c0a1
Submitter: Zuul (<email address hidden>)
Branch: master

commit 34cb0fbec4aaccdccdfffece302bb9923987c0a1
Author: sbalineni <email address hidden>
Date: Tue Feb 14 15:43:04 2017 -0800

[DM]: Generate Comments for Contrail Generated JUNOS Config

- RI: Include vn-name, uuid, vrf type, fwd mode
- BGP Groups: BGP Router Name, UUID
- Policy: VN Name/UUID, Route Target types (import/export)
- NAT/FIP Service Sets configuration
- General Annotations

- Also fixed, some UT infra fixes (api server is not coming up in UT)

Sample Config Generated:
root@vibrant# show groups __contrail__
interfaces {
/* Virtual Network: MGMT, UUID: 7c58c763-34ca-4d26-a2a8-48669b30b5d7, VRF Type: L2 L3 */
irb {
gratuitous-arp-reply;
unit 15 {
family inet {
address 12.184.193.19/24 {
virtual-gateway-address 12.184.193.1;
}
}
}

forwarding-options {
/* Forwarding Options */
family inet {
filter {
input redirect_to_public_vrf_filter_inet4;
}
}
}
routing-options {
/* Global Routing Options */
static {
route 16.193.0.0/16 discard;
}

protocols {
/* Protocols Configuration */
bgp {
/* BGP Router: vibrant, UUID: b57ab458-14c3-4bc5-98d8-39d72d00abb6 */
group __contrail__ {
family evpn {
signaling;
}
/* BGP Router: csol1-node3, UUID: d9eef317-c9f2-4343-8ced-36077c8e1d89 */
neighbor 172.16.80.3 {
peer-as 64512;
}
/* BGP Router: vibrant, UUID: b57ab458-14c3-4bc5-98d8-39d72d00abb6 */
group __contrail_external__ {
type external;
multihop;

policy-options {
/* Policy Options */
/* Virtual Network: tenant150.test_id1.Private_VN0, UUID: c76ff23e-54b0-49c6-8aad-0672a5ddc198, Route Targets Type: import */
policy-statement _contrail_l2_15_tenant150.test_id1.Private_VN0-export {
term t1 {
then {
community add target_64512_8000004;
accept;
}
}
}

firewall {
/* Firwalls Configuration */
family inet {
/* Public VRF Filter for Floating IPs*/
filter redirect_to_public_vrf_filter_inet4 {
term term-_contrail_l3_16_tenant150.test_id1.Public_FIP_VN0 {
from {

routing-instances {
/* Routing Instances Confguration */
/* Virtual Network: tenant150.test_id1.Private_VN0, UUID: c76ff23e-54b0-49c6-8aad-0672a5ddc198, VRF Type: L2, Forwarding Mode: L2 */
_contrail_l2_15_tenant150.test_id1.Private_VN0 {
instance-type virtual-switch;
vrf-import _contrail_l2_15_tenant150.test_id1.Private_VN0-import;
vrf-export _contrail_l2_15_tenant150.test_id1.Private_VN0-export;
protocols {
evpn {
encapsulation vxlan;
extended-vni-list all;
}
}
bridge-domains {
/* Virtual Network: tenant150.test_id1.Private_VN0, UUID: c76ff23e-54b0-49c6-8aad-0672a5ddc198, Encapsulation: VXLAN */

Change-Id: I086a0dfa4b9f276cbb09d7b40b17b4b37574f394
Partial-Bug: #1468954

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/28863
Submitter: Suresh Balineni (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/28863
Committed: http://github.org/Juniper/contrail-controller/commit/48b4ee86bf3c605cf283644215945fff54d424e4
Submitter: Zuul (<email address hidden>)
Branch: master

commit 48b4ee86bf3c605cf283644215945fff54d424e4
Author: sbalineni <email address hidden>
Date: Thu Feb 16 11:41:19 2017 -0800

[DM]: More comments added to DM generated JUNOS config

- Added comments to interfaces/ifls, addresses, service interfaces
- fixed some issues

few samples:
interfaces {
/* Interfaces Configuration */
irb {
gratuitous-arp-reply;
/* Virtual Network: tenant150.test_id1.Private_VN0, UUID: c76ff23e-54b0-49c6-8aad-0672a5ddc198, VRF Type: L2-L3 */
unit 15 {
family inet {
/* Allocated IPv4 Address from Subnet: 12.184.193.0/24 */
address 12.184.193.25/24 {
virtual-gateway-address 12.184.193.1;
}
}
}
lo0 {
/* Routing Interface For L2 EVPNs */
unit 0 {
family inet {
address 172.16.89.200/32 {
primary;
preferred;
}
}
}
}
ge-0/0/0 {
flexible-vlan-tagging;
encapsulation flexible-ethernet-services;
/* L2 EVPN Tagged Interface, Virtual Network: MGMT, UUID: 7c58c763-34ca-4d26-a2a8-48669b30b5d7, VLAN Tag: 2001 */
unit 2001 {
encapsulation vlan-bridge;
vlan-id 2001;
}
}

policy-options {
/* Policy Options */
/* Virtual Network: tenant150.test_id1.Private_VN0, UUID: c76ff23e-54b0-49c6-8aad-0672a5ddc198, Route Targets Type: Export */
policy-statement _contrail_l2_15_tenant150.test_id1.Private_VN0-export {
term t1 {
then {
community add target_64512_8000004;
accept;
}
}
}

Change-Id: I2e9bedb83d87728ccaf1667977a5f1aee28de041
Partial-Bug: #1468954

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/28898
Submitter: Suresh Balineni (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/28898
Committed: http://github.org/Juniper/contrail-controller/commit/381a21e2e488f9cadc6e3420e5a5fc9c05c4fb8f
Submitter: Zuul (<email address hidden>)
Branch: master

commit 381a21e2e488f9cadc6e3420e5a5fc9c05c4fb8f
Author: sbalineni <email address hidden>
Date: Fri Feb 17 11:20:29 2017 -0800

[DM]: Dynamic Tunnels Destination Networks, Static Routes Comments for JUNOS Config

This fix generates comments for :
- FIP Routes
- L3 Static Routes
- Dynamic Tunnel Destination Networks

Alos, Fixed some typo errors in the code

Change-Id: I5616bb586c13bed52fb3513af35afffdbe1d6527
Partial-Bug: #1468954

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/29042
Submitter: Suresh Balineni (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/29042
Committed: http://github.org/Juniper/contrail-controller/commit/b0210bc5e4054b2513a70a5d58a9d9671112623d
Submitter: Zuul (<email address hidden>)
Branch: master

commit b0210bc5e4054b2513a70a5d58a9d9671112623d
Author: sbalineni <email address hidden>
Date: Wed Feb 22 12:38:55 2017 -0800

[DM]: Router Loopback interface should be conifgured all the time

- Fix for confguration router loopback interface if bgp is configured
- Fixes spell errors in comments

Partial-Bug: #1468954

Change-Id: I4a1adb27390b810911739b82931eab58678d782a

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.