sk2 / ank_legacy_v2

Legacy edition of autonetkit. Please see https://github.com/sk2/autonetkit for latest version
www.autonetkit.org
BSD 3-Clause "New" or "Revised" License
10 stars 4 forks source link

Parsing BGP policy file (without library) #248

Open olafm opened 12 years ago

olafm commented 12 years ago

Simon,

i have a bgp.txt file containing:

(node=r1.AS1) ->ingress (as=AS2): (setLP 130) (as=AS3) ->ingress (as=AS2): (setLP 120) (as=AS4) ->ingress (as=AS2): (setLP 120)

i run:

autonetkit -f topology.graphml -b bgp.txt --junosphere INFO Loading INFO Compiling INFO Applying BGP policy from bgp.txt INFO Configuring Junos: junosphere_olive INFO Saving

(Note there are no error messages or anything).

but in the compiled output there are NO local-pref configurations at all?! The statements are just silently ignored.

Btw, it works fine with a policy library. But not if i specify it individually.

Two problems:

(a) it ignores the messages without even a warning. (b) it need to work with manual specification and not only via the library (otherwise how do i specify those exception that we always talked about)?

thanks,
olaf

sk2 commented 12 years ago

Hi Olaf, Can you run it with --debug? I'm not sure node or as are matching correctly - they might be returning the empty set. The debug output should show this up. thanks Simon

On Friday, 13 April 2012 at 5:49 PM, olafm wrote:

Simon,

i have a bgp.txt file containing:

(node=r1.AS1) ->ingress (as=AS2): (setLP 130) (as=AS3) ->ingress (as=AS2): (setLP 120) (as=AS4) ->ingress (as=AS2): (setLP 120)

i run:

autonetkit -f topology.graphml -b bgp.txt --junosphere INFO Loading INFO Compiling INFO Applying BGP policy from bgp.txt INFO Configuring Junos: junosphere_olive INFO Saving

(Note there are no error messages or anything).

but in the compiled output there are NO local-pref configurations at all?! The statements are just silently ignored.

Btw, it works fine with a policy library. But not if i specify it individually.

Two problems:

(a) it ignores the messages without even a warning. (b) it need to work with manual specification and not only via the library (otherwise how do i specify those exception that we always talked about)?

thanks, olaf


Reply to this email directly or view it on GitHub: https://github.com/sk2/autonetkit/issues/248

olafm commented 12 years ago

thanks, Simon. Here is the --debug.

olafm$ autonetkit -f topology.graphml -b bgp.txt --junosphere --debug internet INFO Loading graphml DEBUG Setting device_type for r4 to router graphml DEBUG Setting device_type for s4 to router graphml DEBUG Setting device_type for s3 to router graphml DEBUG Setting device_type for r21 to router graphml DEBUG Setting device_type for s5 to router graphml DEBUG Setting device_type for r5 to router graphml DEBUG Setting device_type for a to router graphml DEBUG Setting device_type for c to router graphml DEBUG Setting device_type for b to router graphml DEBUG Setting device_type for e to router graphml DEBUG Setting device_type for d to router graphml DEBUG Setting device_type for s2 to router graphml DEBUG Setting device_type for r3 to router graphml DEBUG Setting device_type for r1 to router graphml DEBUG Setting device_type for r22 to router graphml DEBUG Setting device_type for s1 to router internet INFO Compiling housekeeping DEBUG Tidying archives bgp DEBUG Initialising BGP bgp DEBUG Initialising eBGP bgp DEBUG Initialising iBGP bgp DEBUG Configuring iBGP route reflectors bgp DEBUG Setting default ibgp_level of 1 for nodes s1.AS1, r1.AS1, a.AS1, p1.AS1 bgp DEBUG Max ibgp level for 1 is 1 bgp DEBUG iBGP edges [(s1.AS1, r1.AS1, {'rr_dir': 'peer'}), (s1.AS1, a.AS1, {'rr_dir': 'peer'}), (s1.AS1, p1.AS1, {'rr_dir': 'peer'}), (r1.AS1, s1.AS1, {'rr_dir': 'peer'}), (r1.AS1, a.AS1, {'rr_dir': 'peer'}), (r1.AS1, p1.AS1, {'rr_dir': 'peer'}), (a.AS1, s1.AS1, {'rr_dir': 'peer'}), (a.AS1, r1.AS1, {'rr_dir': 'peer'}), (a.AS1, p1.AS1, {'rr_dir': 'peer'}), (p1.AS1, s1.AS1, {'rr_dir': 'peer'}), (p1.AS1, r1.AS1, {'rr_dir': 'peer'}), (p1.AS1, a.AS1, {'rr_dir': 'peer'})] bgp DEBUG Setting default ibgp_level of 1 for nodes r22.AS2, e.AS2, p2.AS2, s2.AS2, r21.AS2 bgp DEBUG Max ibgp level for 2 is 1 bgp DEBUG iBGP edges [(r22.AS2, e.AS2, {'rr_dir': 'peer'}), (r22.AS2, p2.AS2, {'rr_dir': 'peer'}), (r22.AS2, s2.AS2, {'rr_dir': 'peer'}), (r22.AS2, r21.AS2, {'rr_dir': 'peer'}), (e.AS2, r22.AS2, {'rr_dir': 'peer'}), (e.AS2, p2.AS2, {'rr_dir': 'peer'}), (e.AS2, s2.AS2, {'rr_dir': 'peer'}), (e.AS2, r21.AS2, {'rr_dir': 'peer'}), (p2.AS2, r22.AS2, {'rr_dir': 'peer'}), (p2.AS2, e.AS2, {'rr_dir': 'peer'}), (p2.AS2, s2.AS2, {'rr_dir': 'peer'}), (p2.AS2, r21.AS2, {'rr_dir': 'peer'}), (s2.AS2, r22.AS2, {'rr_dir': 'peer'}), (s2.AS2, e.AS2, {'rr_dir': 'peer'}), (s2.AS2, p2.AS2, {'rr_dir': 'peer'}), (s2.AS2, r21.AS2, {'rr_dir': 'peer'}), (r21.AS2, r22.AS2, {'rr_dir': 'peer'}), (r21.AS2, e.AS2, {'rr_dir': 'peer'}), (r21.AS2, p2.AS2, {'rr_dir': 'peer'}), (r21.AS2, s2.AS2, {'rr_dir': 'peer'})] bgp DEBUG Setting default ibgp_level of 1 for nodes r3.AS3, p3.AS3, s3.AS3, p4.AS3, b.AS3 bgp DEBUG Max ibgp level for 3 is 1 bgp DEBUG iBGP edges [(r3.AS3, p3.AS3, {'rr_dir': 'peer'}), (r3.AS3, s3.AS3, {'rr_dir': 'peer'}), (r3.AS3, p4.AS3, {'rr_dir': 'peer'}), (r3.AS3, b.AS3, {'rr_dir': 'peer'}), (p3.AS3, r3.AS3, {'rr_dir': 'peer'}), (p3.AS3, s3.AS3, {'rr_dir': 'peer'}), (p3.AS3, p4.AS3, {'rr_dir': 'peer'}), (p3.AS3, b.AS3, {'rr_dir': 'peer'}), (s3.AS3, r3.AS3, {'rr_dir': 'peer'}), (s3.AS3, p3.AS3, {'rr_dir': 'peer'}), (s3.AS3, p4.AS3, {'rr_dir': 'peer'}), (s3.AS3, b.AS3, {'rr_dir': 'peer'}), (p4.AS3, r3.AS3, {'rr_dir': 'peer'}), (p4.AS3, p3.AS3, {'rr_dir': 'peer'}), (p4.AS3, s3.AS3, {'rr_dir': 'peer'}), (p4.AS3, b.AS3, {'rr_dir': 'peer'}), (b.AS3, r3.AS3, {'rr_dir': 'peer'}), (b.AS3, p3.AS3, {'rr_dir': 'peer'}), (b.AS3, s3.AS3, {'rr_dir': 'peer'}), (b.AS3, p4.AS3, {'rr_dir': 'peer'})] bgp DEBUG Setting default ibgp_level of 1 for nodes p5.AS4, s4.AS4, p6.AS4, c.AS4, r4.AS4 bgp DEBUG Max ibgp level for 4 is 1 bgp DEBUG iBGP edges [(p5.AS4, s4.AS4, {'rr_dir': 'peer'}), (p5.AS4, p6.AS4, {'rr_dir': 'peer'}), (p5.AS4, c.AS4, {'rr_dir': 'peer'}), (p5.AS4, r4.AS4, {'rr_dir': 'peer'}), (s4.AS4, p5.AS4, {'rr_dir': 'peer'}), (s4.AS4, p6.AS4, {'rr_dir': 'peer'}), (s4.AS4, c.AS4, {'rr_dir': 'peer'}), (s4.AS4, r4.AS4, {'rr_dir': 'peer'}), (p6.AS4, p5.AS4, {'rr_dir': 'peer'}), (p6.AS4, s4.AS4, {'rr_dir': 'peer'}), (p6.AS4, c.AS4, {'rr_dir': 'peer'}), (p6.AS4, r4.AS4, {'rr_dir': 'peer'}), (c.AS4, p5.AS4, {'rr_dir': 'peer'}), (c.AS4, s4.AS4, {'rr_dir': 'peer'}), (c.AS4, p6.AS4, {'rr_dir': 'peer'}), (c.AS4, r4.AS4, {'rr_dir': 'peer'}), (r4.AS4, p5.AS4, {'rr_dir': 'peer'}), (r4.AS4, s4.AS4, {'rr_dir': 'peer'}), (r4.AS4, p6.AS4, {'rr_dir': 'peer'}), (r4.AS4, c.AS4, {'rr_dir': 'peer'})] bgp DEBUG Setting default ibgp_level of 1 for nodes s5.AS5, p7.AS5, d.AS5, r5.AS5 bgp DEBUG Max ibgp level for 5 is 1 bgp DEBUG iBGP edges [(s5.AS5, p7.AS5, {'rr_dir': 'peer'}), (s5.AS5, d.AS5, {'rr_dir': 'peer'}), (s5.AS5, r5.AS5, {'rr_dir': 'peer'}), (p7.AS5, s5.AS5, {'rr_dir': 'peer'}), (p7.AS5, d.AS5, {'rr_dir': 'peer'}), (p7.AS5, r5.AS5, {'rr_dir': 'peer'}), (d.AS5, s5.AS5, {'rr_dir': 'peer'}), (d.AS5, p7.AS5, {'rr_dir': 'peer'}), (d.AS5, r5.AS5, {'rr_dir': 'peer'}), (r5.AS5, s5.AS5, {'rr_dir': 'peer'}), (r5.AS5, p7.AS5, {'rr_dir': 'peer'}), (r5.AS5, d.AS5, {'rr_dir': 'peer'})] bgp DEBUG Initialising iBGP sessions bgp DEBUG Initialising BGP attributes dns DEBUG DNS currently disabled dns DEBUG Non-hierarchical DNS not yet implemented ip DEBUG Allocating subnets ip DEBUG Allocating interfaces ip DEBUG Allocating TAP hosts internet INFO Applying BGP policy from bgp.txt bgp_policy DEBUG Applying policy file bgp.txt bgp_policy DEBUG Applying BGP policy (node=r1.AS1) ->ingress (as=AS2): (setLP 130) bgp_policy DEBUG Query string is (node=r1.AS1) ->ingress (as=AS2): (setLP 130) bgp_policy DEBUG Processing node select query [['node', '=', 'r1.AS1']] bgp_policy DEBUG Evaluating node stack [set(['r1.AS1'])] bgp_policy DEBUG Set a is set(['r1.AS1']) bgp_policy DEBUG Processing node select query [['as', '=', 'AS2']] bgp_policy DEBUG Evaluating node stack [set([])] bgp_policy DEBUG Set b is set([]) bgp_policy DEBUG Processing if-then-else query [[['setLP', 130]]] bgp_policy DEBUG Selected edges are [] bgp_policy DEBUG Applying BGP policy (as=AS3) ->ingress (as=AS2): (setLP 120) bgp_policy DEBUG Query string is (as=AS3) ->ingress (as=AS2): (setLP 120) bgp_policy DEBUG Processing node select query [['as', '=', 'AS3']] bgp_policy DEBUG Evaluating node stack [set([])] bgp_policy DEBUG Set a is set([]) bgp_policy DEBUG Processing node select query [['as', '=', 'AS2']] bgp_policy DEBUG Evaluating node stack [set([])] bgp_policy DEBUG Set b is set([]) bgp_policy DEBUG Processing if-then-else query [[['setLP', 120]]] bgp_policy DEBUG Selected edges are [] bgp_policy DEBUG Applying BGP policy (as=AS4) ->ingress (as=AS2): (setLP 120) bgp_policy DEBUG Query string is (as=AS4) ->ingress (as=AS2): (setLP 120) bgp_policy DEBUG Processing node select query [['as', '=', 'AS4']] bgp_policy DEBUG Evaluating node stack [set([])] bgp_policy DEBUG Set a is set([]) bgp_policy DEBUG Processing node select query [['as', '=', 'AS2']] bgp_policy DEBUG Evaluating node stack [set([])] bgp_policy DEBUG Set b is set([]) bgp_policy DEBUG Processing if-then-else query [[['setLP', 120]]] bgp_policy DEBUG Selected edges are [] bgp_policy DEBUG Extracting community lists and prefix lists per node, adding sequence numbers bgp_policy DEBUG Allocating community values to tags bgp_policy DEBUG Storing allocated tags to routers junoscompiler DEBUG Configuring Junosphere junoscompiler INFO Configuring Junos: junosphere_olive junoscompiler DEBUG Configuring interfaces for b.AS3 ip DEBUG Converting IP to OSI ENT format junoscompiler DEBUG Configuring IGP for b junoscompiler DEBUG Configuring BGP for b.AS3 junoscompiler DEBUG Configuring interfaces for s2.AS2 ip DEBUG Converting IP to OSI ENT format junoscompiler DEBUG Configuring IGP for s2 junoscompiler DEBUG Configuring BGP for s2.AS2 junoscompiler DEBUG Configuring interfaces for r1.AS1 ip DEBUG Converting IP to OSI ENT format junoscompiler DEBUG Configuring IGP for r1 junoscompiler DEBUG Configuring BGP for r1.AS1 junoscompiler DEBUG Configuring interfaces for c.AS4 ip DEBUG Converting IP to OSI ENT format junoscompiler DEBUG Configuring IGP for c junoscompiler DEBUG Configuring BGP for c.AS4 junoscompiler DEBUG Configuring interfaces for r21.AS2 ip DEBUG Converting IP to OSI ENT format junoscompiler DEBUG Configuring IGP for r21 junoscompiler DEBUG Configuring BGP for r21.AS2 junoscompiler DEBUG Configuring interfaces for r5.AS5 ip DEBUG Converting IP to OSI ENT format junoscompiler DEBUG Configuring IGP for r5 junoscompiler DEBUG Configuring BGP for r5.AS5 junoscompiler DEBUG Configuring interfaces for s3.AS3 ip DEBUG Converting IP to OSI ENT format junoscompiler DEBUG Configuring IGP for s3 junoscompiler DEBUG Configuring BGP for s3.AS3 junoscompiler DEBUG Configuring interfaces for d.AS5 ip DEBUG Converting IP to OSI ENT format junoscompiler DEBUG Configuring IGP for d junoscompiler DEBUG Configuring BGP for d.AS5 junoscompiler DEBUG Configuring interfaces for s1.AS1 ip DEBUG Converting IP to OSI ENT format junoscompiler DEBUG Configuring IGP for s1 junoscompiler DEBUG Configuring BGP for s1.AS1 junoscompiler DEBUG Configuring interfaces for a.AS1 ip DEBUG Converting IP to OSI ENT format junoscompiler DEBUG Configuring IGP for a junoscompiler DEBUG Configuring BGP for a.AS1 junoscompiler DEBUG Configuring interfaces for s4.AS4 ip DEBUG Converting IP to OSI ENT format junoscompiler DEBUG Configuring IGP for s4 junoscompiler DEBUG Configuring BGP for s4.AS4 junoscompiler DEBUG Configuring interfaces for s5.AS5 ip DEBUG Converting IP to OSI ENT format junoscompiler DEBUG Configuring IGP for s5 junoscompiler DEBUG Configuring BGP for s5.AS5 junoscompiler DEBUG Configuring interfaces for e.AS2 ip DEBUG Converting IP to OSI ENT format junoscompiler DEBUG Configuring IGP for e junoscompiler DEBUG Configuring BGP for e.AS2 junoscompiler DEBUG Configuring interfaces for r3.AS3 ip DEBUG Converting IP to OSI ENT format junoscompiler DEBUG Configuring IGP for r3 junoscompiler DEBUG Configuring BGP for r3.AS3 junoscompiler DEBUG Configuring interfaces for r4.AS4 ip DEBUG Converting IP to OSI ENT format junoscompiler DEBUG Configuring IGP for r4 junoscompiler DEBUG Configuring BGP for r4.AS4 junoscompiler DEBUG Configuring interfaces for r22.AS2 ip DEBUG Converting IP to OSI ENT format junoscompiler DEBUG Configuring IGP for r22 junoscompiler DEBUG Configuring BGP for r22.AS2 internet INFO Saving olafm$

olafm$ autonetkit --version autonetkit 0.6.0dev-20120320

On 13/04/2012 09:21, "Simon Knight" <reply+i-4099397-8d04d2112280a5dd12ccc0724f50125f4140a4df-1309481@reply.git hub.com> wrote:

Hi Olaf, Can you run it with --debug? I'm not sure node or as are matching correctly - they might be returning the empty set. The debug output should show this up. thanks Simon

On Friday, 13 April 2012 at 5:49 PM, olafm wrote:

Simon,

i have a bgp.txt file containing:

(node=r1.AS1) ->ingress (as=AS2): (setLP 130) (as=AS3) ->ingress (as=AS2): (setLP 120) (as=AS4) ->ingress (as=AS2): (setLP 120)

i run:

autonetkit -f topology.graphml -b bgp.txt --junosphere INFO Loading INFO Compiling INFO Applying BGP policy from bgp.txt INFO Configuring Junos: junosphere_olive INFO Saving

(Note there are no error messages or anything).

but in the compiled output there are NO local-pref configurations at all?! The statements are just silently ignored.

Btw, it works fine with a policy library. But not if i specify it individually.

Two problems:

(a) it ignores the messages without even a warning. (b) it need to work with manual specification and not only via the library (otherwise how do i specify those exception that we always talked about)?

thanks, olaf


Reply to this email directly or view it on GitHub: https://github.com/sk2/autonetkit/issues/248


Reply to this email directly or view it on GitHub: https://github.com/sk2/autonetkit/issues/248#issuecomment-5110427

sk2 commented 12 years ago

Hi Olaf, I believe this is the problem:

bgp_policy  DEBUG  Processing node select query [['as', '=', 'AS3']]
bgp_policy  DEBUG  Evaluating node stack [set([])]
bgp_policy  DEBUG  Set a is set([])

Please try the query as (as=3) ->ingress (as=2): (setLP 120) Instead. This may be another subtlety that needs to be documented or corrected.

olafm commented 12 years ago

Oh, I see. just "2" instead of "AS2".

No documentation don't help. There needs to be a warning. A configuration statement must not be silently ignored.

thanks,

olaf

On 17/04/2012 03:29, "Simon Knight" <reply+i-4099397-8d04d2112280a5dd12ccc0724f50125f4140a4df-1309481@reply.git hub.com> wrote:

Hi Olaf, I beleive this is the problem:

bgp_policy DEBUG  Processing node select query [['as', '=', 'AS3']]
bgp_policy DEBUG  Evaluating node stack [set([])]
bgp_policy DEBUG  Set a is set([])

Try the query as (as=3) ->ingress (as=2): (setLP 120) Instead. This may be another subtlety that needs to be documented or corrected.


Reply to this email directly or view it on GitHub: https://github.com/sk2/autonetkit/issues/248#issuecomment-5167120

olafm commented 12 years ago

maybe what we need to do is straighten a bit our object syntax?

it's btw more intuitive to reverse it: it would be better to say node=AS1.r1 instead of node=r1.AS1

but then the following would look a bit strange:

(node=AS1.r1) ->ingress (as=2): (setLP 130)

sk2 commented 12 years ago

The problem is that for all cases other than asn, the attribute is up to the user - the free form nature of graphml is used to allow the user to add whatever attribute they like. It might make sense to warn if: Asn != integer is used in a query The selection returns an empty set

Thanks Simon

On 20/04/2012, at 4:24 AM, olafm reply@reply.github.com wrote:

Oh, I see. just "2" instead of "AS2".

No documentation don't help. There needs to be a warning. A configuration statement must not be silently ignored.

thanks,

olaf

On 17/04/2012 03:29, "Simon Knight" <reply+i-4099397-8d04d2112280a5dd12ccc0724f50125f4140a4df-1309481@reply.git hub.com> wrote:

Hi Olaf, I beleive this is the problem:

bgp_policy    DEBUG  Processing node select query [['as', '=', 'AS3']]
bgp_policy    DEBUG  Evaluating node stack [set([])]
bgp_policy    DEBUG  Set a is set([])

Try the query as (as=3) ->ingress (as=2): (setLP 120) Instead. This may be another subtlety that needs to be documented or corrected.


Reply to this email directly or view it on GitHub: https://github.com/sk2/autonetkit/issues/248#issuecomment-5167120


Reply to this email directly or view it on GitHub: https://github.com/sk2/autonetkit/issues/248#issuecomment-5229178

olafm commented 12 years ago

No, i don't have a problem with user input errors. if i'm supposed to say asn=2 and i've said asn=AS2 that's wrong. my mistake.

in the code-redesign, however, we need to make sure to get error handling right. this would otherwise be a show-stopper! for us the tool ran, didn't report an error and just produced partial output (a config file, none of the expected policies). it's impossible to debug why the configuration lines had been skipped. the only logical consequence is to assume the "system has a bug" and is not working properly. there is no hint that the user did something wrong.

sound error handling is very important!

sorry,

olaf

On 20/04/2012 00:11, "Simon Knight" <reply+i-4099397-8d04d2112280a5dd12ccc0724f50125f4140a4df-1309481@reply.git hub.com> wrote:

The problem is that for all cases other than asn, the attribute is up to the user - the free form nature of graphml is used to allow the user to add whatever attribute they like. It might make sense to warn if: Asn != integer is used in a query The selection returns an empty set

Thanks Simon

On 20/04/2012, at 4:24 AM, olafm reply@reply.github.com wrote:

Oh, I see. just "2" instead of "AS2".

No documentation don't help. There needs to be a warning. A configuration statement must not be silently ignored.

thanks,

olaf

On 17/04/2012 03:29, "Simon Knight"

<reply+i-4099397-8d04d2112280a5dd12ccc0724f50125f4140a4df-1309481@reply.g it hub.com> wrote:

Hi Olaf, I beleive this is the problem:

bgp_policy    DEBUG  Processing node select query [['as', '=', 'AS3']]
bgp_policy    DEBUG  Evaluating node stack [set([])]
bgp_policy    DEBUG  Set a is set([])

Try the query as (as=3) ->ingress (as=2): (setLP 120) Instead. This may be another subtlety that needs to be documented or corrected.


Reply to this email directly or view it on GitHub: https://github.com/sk2/autonetkit/issues/248#issuecomment-5167120


Reply to this email directly or view it on GitHub: https://github.com/sk2/autonetkit/issues/248#issuecomment-5229178


Reply to this email directly or view it on GitHub: https://github.com/sk2/autonetkit/issues/248#issuecomment-5234691

olafm commented 12 years ago

I see simon's point - that asn is the only xml attribute that has a semantic meaning this far down the model, so checking would just be for this tag. However, I see olaf's point too, we cannot trust users and users won't trust us if we don't tell them when they're about to hang themselves. also we plan to add other attributes that will also have meaning this far down, so some type checking will be necessary.

can't we use an XML schema to ensure this? in the old days it would have been a DTD ...

iain

On 23 Apr 2012, at 21:04, O.M.Maennel@lboro.ac.uk wrote:

No, i don't have a problem with user input errors. if i'm supposed to say asn=2 and i've said asn=AS2 that's wrong. my mistake.

in the code-redesign, however, we need to make sure to get error handling right. this would otherwise be a show-stopper! for us the tool ran, didn't report an error and just produced partial output (a config file, none of the expected policies). it's impossible to debug why the configuration lines had been skipped. the only logical consequence is to assume the "system has a bug" and is not working properly. there is no hint that the user did something wrong.

sound error handling is very important!

sorry,

olaf

On 20/04/2012 00:11, "Simon Knight" <reply+i-4099397-8d04d2112280a5dd12ccc0724f50125f4140a4df-1309481@reply.git hub.com> wrote:

The problem is that for all cases other than asn, the attribute is up to the user - the free form nature of graphml is used to allow the user to add whatever attribute they like. It might make sense to warn if: Asn != integer is used in a query The selection returns an empty set

Thanks Simon

On 20/04/2012, at 4:24 AM, olafm reply@reply.github.com wrote:

Oh, I see. just "2" instead of "AS2".

No documentation don't help. There needs to be a warning. A configuration statement must not be silently ignored.

thanks,

olaf

On 17/04/2012 03:29, "Simon Knight"

<reply+i-4099397-8d04d2112280a5dd12ccc0724f50125f4140a4df-1309481@reply.g it hub.com> wrote:

Hi Olaf, I beleive this is the problem:

bgp_policy    DEBUG  Processing node select query [['as', '=', 'AS3']]
bgp_policy    DEBUG  Evaluating node stack [set([])]
bgp_policy    DEBUG  Set a is set([])

Try the query as (as=3) ->ingress (as=2): (setLP 120) Instead. This may be another subtlety that needs to be documented or corrected.


Reply to this email directly or view it on GitHub: https://github.com/sk2/autonetkit/issues/248#issuecomment-5167120


Reply to this email directly or view it on GitHub: https://github.com/sk2/autonetkit/issues/248#issuecomment-5229178


Reply to this email directly or view it on GitHub: https://github.com/sk2/autonetkit/issues/248#issuecomment-5234691

sk2 commented 12 years ago

Will an XML schema give helpful error messages? Where would it be applied?

And we need to stop thinking in terms of XML. Currently we use GraphML because it is a convenient input. It is very important to realise this is only one input format, and AutoNetkit has to be flexible to allow different topology specifications in the future - eg text file, CSV, IGP LSDB dumps...

It will be hard to find the right balance between flexibility for modules and user warnings.

The way I see it, each plugin/module should raise appropriate warnings if the input is invalid. I don't think a global check on read-in would work for covering extensible modules in the future.

olafm commented 12 years ago

No, XML will not help. A code that is flexible, but unusable will just scare users away. We need to work on usability, sorry.

olaf

On 26/04/2012 07:02, "Simon Knight" <reply+i-4099397-8d04d2112280a5dd12ccc0724f50125f4140a4df-1309481@reply.git hub.com> wrote:

Will an XML schema give helpful error messages? Where would it be applied?

It will be hard to find the right balance between flexibility for modules and user warnings.


Reply to this email directly or view it on GitHub: https://github.com/sk2/autonetkit/issues/248#issuecomment-5350175

olafm commented 12 years ago

If I understand things:

an xml schema will enable some semantic checking to be done and will point out where things don't match. So it should tell you at a code level where types don't match and ANK can turn these into sensible error messages.

The schema doesn't give error messages, it defines semantic correctness.

Might be a bit OTT though - and I've no recent first hand experience - possibly a job for when i'm in Adelaide

Olaf is right in saying that what we say to the user is most important.

iain

On 26/04/2012 21:28, "O.M.Maennel@lboro.ac.uk" olaf@maennel.net wrote:

No, XML will not help. A code that is flexible, but unusable will just scare users away. We need to work on usability, sorry.

olaf

On 26/04/2012 07:02, "Simon Knight" <reply+i-4099397-8d04d2112280a5dd12ccc0724f50125f4140a4df-1309481@reply.gi t hub.com> wrote:

Will an XML schema give helpful error messages? Where would it be applied?

It will be hard to find the right balance between flexibility for modules and user warnings.


Reply to this email directly or view it on GitHub: https://github.com/sk2/autonetkit/issues/248#issuecomment-5350175

sk2 commented 12 years ago

It is hard to find the right balance between flexible and usable. I think making query results more explicit will help in this instance - ie stating the query and the fact no nodes matched.