route-map rm_1c_AS1_in permit 10
match community xyz;
set local-preference 100
continue
route-map rm_1c_AS1_in deny 20
match community zzz;
set local-preference 150
!
route-map rm_1c_AS1_out permit 10
match community cde;
set community 1234:20 additive
continue
route-map rm_1c_AS1_out permit 20
match community def;
set metric 200
continue
route-map rm_1c_AS1_out permit 30
match community ghi;
set community 1234:20 additive
!
from abstract policy:
('1c.AS1', '2a.AS2'): {'egress': [rm_egress_2a_AS2_1 [seq 1 if [tag = cde] then [addTag a300] reject: False, seq 2 if [tag = def] then [setMED 200] reject: False],
rm_egress_2a_AS2_2 [seq 1 if [tag = ghi] then [addTag a300] reject: False]],
'ingress': [rm_ingress_1c_AS1_1 [seq 1 if [] then [setLP 200] reject: False]]},
('2a.AS2', '1c.AS1'): {'egress': [],
'ingress': [rm_ingress_2a_AS2_1 [seq 1 if [tag = xyz] then [setLP 100] reject: False],
rm_ingress_2a_AS2_2 [seq 1 if [tag = zzz] then [setLP 150] reject: True]]},
gives on hostname 1c_AS1
from abstract policy: