- Dec 08, 2021
-
-
Robert Franklin authored
all the BGP commands we update and now parsed BGP conversions not added yet fixed bug where comparing lists (ACLs, prefix-lists, etc.) would crash when adding a new list (one of the lists was None) -V (debug converter) option now supports three levels (only print converters that are matched; also print 'from', 'update' and 'to'; also print non-matched converters) added level 3 -P option to print arguments passed to parse()
-
Robert Franklin authored
was printing blank lines between each converter, even if debugging was not enabled
-
Robert Franklin authored
and to_str_func was not specified (conversion to an empty list was not done)
-
- Dec 07, 2021
-
-
Robert Franklin authored
no longer outputs the from/update/remove configuration blocks if remove() or add() are called (instead of truncate() and update()) as these are not passed to the conversion method anyway this just reduces the output to remove unused data
-
Robert Franklin authored
now, converters which don't match anything are only printed at convert debug level 3 and greater (level 2 prints 'from' and 'to') blank lines also added between individual matches and after the converter name
-
Robert Franklin authored
-
Robert Franklin authored
this excludes commands we aren't using nor forms of commands we're not using, as well as commands for neighbors at the router process level (as we use 'no bgp default ipv4-unicast', so all this happens underneath that address-family block) no converters yet
-
- Dec 06, 2021
-
-
Robert Franklin authored
haven't yet done address-family subtexts, not many commands for neighbors - only the ones we use outside the address-family parts no converters yet
-
Robert Franklin authored
-
Robert Franklin authored
'router ospfv3' support added regular IP/IPv6 ACLs and prefix-lists were not being deleted before being recreated, when updated fixed bug VRF address-family context handling
-
Robert Franklin authored
were created by entering a subcontext rather than directly, by mistake also, an AS-path ACL is no longer removed first, if it didn't exist (i.e. it will only be removed if it is being changed, not created)
-
Robert Franklin authored
changes to move to new remove() and update() methods recently broke ACL and prefix-lists because the old list wasn't removed before the new, replacement list was loaded (so the new rules were just appended) also, calling explain_diffs() without a to_str_func argument also resulted in a crash with a missing variable: this wasn't tested because it required a change other than the AS path ACL to see it
-
- Dec 05, 2021
-
-
Robert Franklin authored
this required an extension to the explain_diffs() utils function to convert a list element into a string for printing (ip as-path access-lists are stored in a structured form, unlike regular IP/IPv6 access-lists and prefix-lists - really they should all be stored in structured form but that is more complicated and was skipped - this may be retrospectively added, at some point, if the parser is to be used more widely)
-
Robert Franklin authored
-
Robert Franklin authored
-
- Dec 03, 2021
-
-
Robert Franklin authored
handling of this command is a little weird
-
Robert Franklin authored
-
Robert Franklin authored
the enter() method should be calling super.enter() (all the others were changed to call self.enter() but this one shouldn't be)
-
Robert Franklin authored
not converters yet, though
-
Robert Franklin authored
same as with command classes
-
Robert Franklin authored
in anticipation of longer names when doing BGP and wanting to be consistent with 'router ...' classes
-
Robert Franklin authored
these were brought on by a bug in deepops.deepsetdefault() which resulted in a review of the handling of some parse()s the deepops bug was causing a crash on older systems but hopefully the more correct handling will resolve that
-
Robert Franklin authored
these were incorrectly using 'last' to set a value, rather than explicitly storing the configuration this was messy and also wrong, in that the command wouldn't override anything that had been seen before
-
Robert Franklin authored
these now make it clearer what action was being performed (instantiating the object in add_command() or running the parse() method) rather than having to pick through the call trace this fits the way convert() reports exceptions
-
Robert Franklin authored
was using 'return *l, e' to expand the list into a number of return arguments (as a tuple) support for this was only added in Python 3.8 (which is running on rcf34's Mac so wasn't spotted until it was tried on netsys-mgt1, which is running 3.5) this can be worked around by enclosing the return value in parentheses (either round or square)
-
- Dec 02, 2021
-
-
Robert Franklin authored
were using super().enter which was wrong, although it was never overridden in the child classes so nothing ever broke
-
Robert Franklin authored
command parser and converter classes are now added automatically by enumerating subclasses of IndentedContextualCommand and DiffConvert - as well as being simpler and using less code, it avoids the mistake of forgetting to add a class to the list added handling of changes to the following: * VRF definitions * OSPF - interface and router process * OSPFv3 - interface fixed a crash in handling interface service-policy changes
-
Robert Franklin authored
missing space
-
Robert Franklin authored
there was a missing parameter but took the opportunity to convert the parser into one that understands the full command rather than treating it as an opaque string this also fixed the potential problem of a new policy being applied the old one was removed, if the new one came ASCIIbetically before
-
- Nov 30, 2021
-
-
Robert Franklin authored
the logic for these previously was complex and wrong - it is now simpler and (hopefully) correct for example, interfaces missing from the 'to' configuration are no longer 'no shutdown' but deleted interfaces are removed also, tidied and corrected some of the VRF commands: the enter() method compresses some methods onto one line and some of the contexts for converters were wrong
-
Robert Franklin authored
previously, checking to see if a converter's remove action was required due to the context only saw if the exact context was being removed - this meant that, if a point higher than a converter's context was being removed, the removal would not be skipped now, the context of a converter is considered removed if the context, OR some point above it, is being removed this means that converters in subcontexts are now skipped if the parent context to the subcontext is being removed for example, if 'vrf ... / address-family ... / route-target ...' would previously be removed if 'vrf ...' itself was being removed, as the context for the 'route-target' command was not matched - this change will cause that to happen and everything will be removed just by the 'vrf ...' converter's remove being triggered
-
Robert Franklin authored
this would have happened when converters.py was separated from diff.py for IOS - it only gets triggered when an ACL needs updating
-
- Nov 28, 2021
-
-
Robert Franklin authored
previously details were just an opaque string but now the details are parsed into a set also, only parses and processes NSSA-type areas (other commands at the 'area ...' level are not for different area types so would need different handling)
-
Robert Franklin authored
-
Robert Franklin authored
will just dump a specified subtree of the configuration dictionary - this is helpful when developing new command parsers and converters
-
Robert Franklin authored
also, simplified usage code to use *list expansion, avoiding need to use list operations on result as can use in simple tuple format
-
Robert Franklin authored
this return the command(s) required to enter the context and reduce the amount of code in each of the subcontext conversion methods this will be expanded to other converters
-
Robert Franklin authored
cmds renamed to commands (including exported list) cvts renamed to converters (including exported list)
-
Robert Franklin authored
moved into separate files, similar to commands tidied up imports, removing unnecessary ones and cleaned up paths
-
Robert Franklin authored
only as far as the context and router-id
-