sk2/autonetkit — Issue #127: Policies bug?
Author: coaj
Created: 2012-01-10 06:55:26+00:00
State: open

the policy is:
(asn = 1) egress-> (asn = 2): (if Origin(asn=2) then addTag a100 )

coajmacbook:~ askarjaboldinov$ autonetkit -f 2as.graphml --deploy --olive --ospf --bgp_policy=policy.txt --save
2012-01-10 17:23:48,159 INFO Loading
2012-01-10 17:23:48,167 INFO Compiling
2012-01-10 17:23:48,225 INFO Applying BGP policy from policy.txt
Traceback (most recent call last):
File "/usr/local/bin/autonetkit", line 8, in
load_entry_point('AutoNetkit==0.5.65dev-20120110', 'console_scripts', 'autonetkit')()
File "/Library/Python/2.6/site-packages/AutoNetkit/console_script.py", line 91, in main
inet.compile()
File "/Library/Python/2.6/site-packages/AutoNetkit/internet.py", line 271, in compile
pol_parser.apply_policy_file(self.policy_file)
File "/Library/Python/2.6/site-packages/AutoNetkit/algorithms/bgp_policy.py", line 642, in apply_policy_file
self.apply_bgp_policy(line)
File "/Library/Python/2.6/site-packages/AutoNetkit/algorithms/bgp_policy.py", line 229, in apply_bgp_policy
per_session_policy = self.process_if_then_else(result.bgpSessionQuery)
File "/Library/Python/2.6/site-packages/AutoNetkit/algorithms/bgp_policy.py", line 425, in process_if_then_else
for (attribute, comparison, value) in if_clause]
File "/Library/Python/2.6/site-packages/AutoNetkit/algorithms/bgp_policy.py", line 389, in proc_ot_match
self.apply_bgp_policy(apply_prefix_query)
File "/Library/Python/2.6/site-packages/AutoNetkit/algorithms/bgp_policy.py", line 225, in apply_bgp_policy
result = self.bgpApplicationQuery.parseString(qstring)
File "/Library/Python/2.6/site-packages/pyparsing.py", line 1032, in parseString
raise exc
pyparsing.ParseException: Expected ")" (at char 13), (line:1, col:14)