- Feb 22, 2022
-
-
Robert Franklin authored
the last commit revealed a problem where an interface existed in the old configuration but not in the new but the only thing in it was a 'shutdown' option - this would cause the interface to be defaulted now, a special case is handled: an interface is only defaulted if it does not existing the new configuration AND there is configuration other than 'shutdown if the interface does not exist but only contains a 'shutdown' option, no changes are made the above only applies to physical interfaces - non physical interfaces will still be deleted (with 'no interface ...')
-
Robert Franklin authored
previously we skipped deleting physical interfaces, if they were removed from the target configuration as we can't remove them, but this would mean that all the commands would be left inside instead now we 'default' them, which should remove all the configuration inside
-
Robert Franklin authored
'no switchport trunk allowed vlan' used syntax unavailable in Python 3.5 (running on server) so had to regress that to be compatible
-
- Feb 11, 2022
-
-
Robert Franklin authored
service-policy change was using %s rather than policy name 'switchport trunk allowed vlan' now correctly handles changes where the previous list was not specified (=> 'all') missing or 'none'
-
Robert Franklin authored
these were ignored, previously
-
Robert Franklin authored
this is to handle changing to/from the situation where no 'switchport trunk allowed vlan' comands are present - the code previously just added and remove the VLANs from the list when adding a list and the command was not present, the interface is now reset with 'switchport trunk allowed vlan none' to clear it first when removing the entire list, the 'switchport trunk allowed vlan' command is just removed (along with the list of VLANs, resetting the interface to 'allow all')
-
Robert Franklin authored
parameter was not being replaced with value
-
- Dec 21, 2021
-
-
Robert Franklin authored
previously, converters were sorted within each block, according to their class name - now they're sorted using the full path (context + cmd + ext) as the key this ensures things like 'interface VlanX' are run before the commands are configured inside, regardless of the class naming
-
Robert Franklin authored
moved methods which will be overridden to the end to group things and make them a little easier to understand
-
Robert Franklin authored
ordering ensures that certain differences are applied before others (e.g. the VRF is set on an interface before the IP address information) triggers can cause configuration updates where there was no command-level change because of another command - e.g. if the VRF on an interface is set/removed/changed, the IP address configuration can be re-applied
-
Robert Franklin authored
when a particular converter returns some commands to change the configuration, it can optionally set up some triggers the triggers are in a set() attribute of the converter class and are the names of particular converter blocks the context of the converter which set up the trigger will also be stored against the trigger block when the list of converters is worked through, in addition to the normal remove and update matches, if the block matches one for which a trigger has been set AND the context of that trigger matches in the 'to' configuration, the trigger() method will be called on the converter, unless there was already a remove or update match against the same converter this allows a command such as 'vrf forwarding' to set up a trigger against the interface context, using the block name (the same as used to order changes) and cause the IP address information to be re-applied this has been done for this situation to resolve this longstanding issue
-
- Dec 20, 2021
-
-
Robert Franklin authored
this causes the 'vrf forwarding' command to be entered before any addresses are set (but after all other commands) this still doesn't handle a VRF change triggering address re-application (this will need a new feature)
-
Robert Franklin authored
previous system used insert_before which only worked if the converter had already been added and made it difficult to do more complex dependencies the insert_before function was largely broken with the move to automatically adding subclasses of converters as the order was no longer explicitly defined and insert_before required that the dependent class already exists the new system organises the sequence of converters into 'blocks', which have an explcit order and each converter is added to a specific block, with the default being the 'None' block this should enable the support of VRF-triggered changes more easily the 'interface / shutdown' and 'interface / no shutdown' converters have been changed to use the new method
-
- Dec 09, 2021
-
-
Robert Franklin authored
OSPFv3 class had the same name so was overriding it and preventing the IPv4 version from being created also, fixed another class with the wrong name (but wasn't breaking anything)
-
- 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
-