summaryrefslogtreecommitdiff
path: root/python
AgeCommit message (Collapse)Author
2021-04-29pppoe: T3250: Not mangle values for tag nodessever-sever
2021-04-25frr: T2638: fix error message grammar error and add debug howtoChristian Poessinger
2021-04-25tunnel: T3468: add interfaces to completion helper for bridgeChristian Poessinger
2021-04-23Merge pull request #817 from erkin/currentChristian Poessinger
T3356: Add support for custom source address for connections
2021-04-23T3356: Add support for custom source address for connectionserkin
2021-04-17policy: T2425: re-implement "policy" tree from vyatta-cfg-quagga in XML/PythonChristian Poessinger
2021-04-16config: T3481: add switch to prevent mangling of tag node valuesJohn Estabrook
2021-04-16Merge pull request #809 from erkin/currentChristian Poessinger
util: T3356: Fix password variables
2021-04-16util: T3356: Fix password variableserkin
2021-04-14xml: T3475: disable processing of syntaxVersion elementJohn Estabrook
2021-04-08protocols: T3464: proper handling of routing policy configurationChristian Poessinger
The introduction of key_mangling=('-', '_') when working with get_config_dict() caused more harm then good. This commit extends common helpers and adds new helpers when verifying the existence of route-maps, access-lists or prefix-lists.
2021-04-05tunnel: T3030: move erspan type into regular tunnel interfaceChristian Poessinger
Instead of having a dedicated ERSPAN interface type, rather move the specifics into "interface tunnel". A migrator is not needed as there is yet no LTS release with this feature and this is considered experimental.
2021-04-05vyos.template: T3418: add new is_interface helper functionChristian Poessinger
2021-04-02frr: T3217: Abbility to save routing configssever-sever
2021-04-01frr: T3217: Fix permissions for saved configssever-sever
2021-03-30xdp: T3448: bail out early on platforms not supporting xdp (e.g. RaspberryPi)Christian Poessinger
2021-03-30Merge pull request #794 from erkin/currentDaniil Baturin
T3354: Handle user break and prematurely closed stdin in strip-private
2021-03-30Remove SFTP empty password checkerkin
2021-03-30T3356: Encode strings given to/returned from curl in TFTP transferserkin
2021-03-27vrf: vlan: T3438: do not automatically delete upper interfaceChristian Poessinger
Removing a VLAN (VIF) interface from the CLI always deleted all interfaces the kernel listed as "upper" in the /sys/class/net folder. This had the drawback that when deleting a VIF, also the VRF interface was simply deleted - killing all VRF related services.
2021-03-24Merge pull request #784 from sever-sever/T3217Christian Poessinger
routing: T3217: Save configs of daemon per commit
2021-03-23routing: T3217: Save configs of daemon per commitsever-sever
2021-03-23vyos.util: dict_search() should not throw exception when inputs are NoneChristian Poessinger
2021-03-21configquery: T3402: add library for querying config values from op modeJohn Estabrook
A small library that allows querying existence or value(s) of config settings from op mode, and execution of arbitrary op mode commands.
2021-03-19bridge: T3415: add port isolation / private-vlan optionChristian Poessinger
Private VLAN, also known as port isolation, is a technique in computer networking where a VLAN contains switch ports that are restricted such that they can only communicate with a given "uplink". The restricted ports are called "private ports". Each private VLAN typically contains many private ports, and a single uplink. The uplink will typically be a port (or link aggregation group) connected to a router, firewall, server, provider network, or similar central resource. Q: https://en.wikipedia.org/wiki/Private_VLAN
2021-03-17vyos.configverify: T3344: verify_vrf() must handle "default" VRFChristian Poessinger
We can leak routes back to the default VRF, thus the check added by commit 9184dfb5 ("static: vrf: T3344: add target vrf verify()") must have a "bail out" option when one want's to leak routes into the default VRF.
2021-03-16Merge pull request #775 from erkin/currentChristian Poessinger
T3356: Generic download() and upload() for dynamically dispatching appropriate transfer procedure
2021-03-15Properly raise an error instead of exitingerkin
2021-03-15T3356: Generic download() and upload() for dynamically dispatching ↵erkin
appropriate transfer procedure
2021-03-14vyos.util: rename get_json_iface_options() -> get_interface_config()Christian Poessinger
2021-03-14vyos.util: add helper get_all_vrfs()Christian Poessinger
The helper will return a dict in form: {'red': {'table': 1000}, 'blue': {'table': 2000}}
2021-03-11config: T3356: Replace curl wrapper with (mostly) native remote file ↵erkin
transfer functions
2021-03-10syslog: T3396: Fix remote IPv6 hostsever-sever
2021-03-07T3357: Fix invoking TunnelIf() from op-modeChristian Poessinger
As we can also use the TunnelIf() class from op-mode we must ensure that read-only access to the class works even if required configuration keys as "encapsulation" are not passed to the class on invokation. This fixes an isse where "show interfaces tunnel" returned: Traceback (most recent call last): File "/usr/libexec/vyos/op_mode/show_interfaces.py", line 313, in <module> args.vrrp File "/usr/libexec/vyos/op_mode/show_interfaces.py", line 48, in handled_function function(*args, **kwargs) File "/usr/libexec/vyos/op_mode/show_interfaces.py", line 222, in run_show_intf_brief for interface in filtered_interfaces(ifnames, iftypes, vif, vrrp): File "/usr/libexec/vyos/op_mode/show_interfaces.py", line 77, in filtered_interfaces interface = klass(ifname, create=False, debug=False) File "/usr/lib/python3/dist-packages/vyos/ifconfig/tunnel.py", line 99, in __init__ if self.iftype in ['gretap', 'ip6gretap']: AttributeError: 'TunnelIf' object has no attribute 'iftype'
2021-03-07T3388: "show interfaces" op-mode command lacks PPPoE interfacesChristian Poessinger
Commit e5b335830ef ("vyos.ifconfig: T1579: remove calls to vyos.ifconfig.Interface.get_config()") removed the PPPoEIf class as it seemed to be unused. It turns out it is required by the op-mode commands for e.g. "show interfaces".
2021-03-04Merge pull request #729 from bstepler/T3300Christian Poessinger
dhcp: T3300: add DHCP default route distance
2021-03-03tunnel: T2966: add ip6gretap encapsulation supportChristian Poessinger
2021-03-03geneve: T1799: add additional per tunnel optionsChristian Poessinger
Support setting additional options to the GENEVE tunnel like: - ttl - tos - do not fragment bit - ipv6 flowlabel
2021-03-03smoketest: vxlan: extend testcase to verify additional tunnel parametersChristian Poessinger
Verify proper configuration of VXLAN parameters for - source-interface - source-address - remote - vni - group Before it was only verified if the VXLAN tunnel interface was configured at all but not if the parameters are correct, too.
2021-02-28vif: T3349: use fixed ordering when enabling parent and child interfaceChristian Poessinger
When a VIF/VLAN interface is placed in admin down state but the lower interface, serving the vlan, is moved from admin down -> admin up, all its vlan interfaces will be placed in admin up state, too. This is bad as a VLAN interface will become admin up even if its specified as admin down after a reboot. To reproduce: set interfaces ethernet eth1 vif 20 disable set interfaces ethernet eth1 disable commit delete interfaces ethernet eth1 disable commit Now check the interface state and it returns UP,LOWER_UP 7: eth1.20@eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether 00:50:56:b3:09:07 brd ff:ff:ff:ff:ff:ff inet6 fe80::250:56ff:feb3:907/64 scope link valid_lft forever preferred_lft forever
2021-02-28vyos.util: provide single implementation for get_json_iface_options()Christian Poessinger
There had been four implementations of "ip -d -j link show interface" scattered accross the codebase. Those implementations have now been combined into a new helper: vyos.util.get_json_iface_options()
2021-02-28vxlan: T1513: add dont-fragment CLI optionChristian Poessinger
2021-02-28l2tpv3: T3366: migrate local-ip and remote-ip CLI optionsChristian Poessinger
Rename CLI options local-ip to source-address and remote-ip to remote to get a consistent CLI experience for the user.
2021-02-28tunnel: T3366: rename remote-ip to remoteChristian Poessinger
Streamline the CLI configuration where we try to use remote on other interfaces like vxlan, geneve.
2021-02-28tunnel: T3366: rename local-ip to source-addressChristian Poessinger
Streamline the CLI configuration where we try to use source-address when creating connections which are especially sourced from a discrete address.
2021-02-28tunnel: T3364: rename encapsulation mode "gre-bridge" to "gretap"Christian Poessinger
The following list shows the mapping of VyOS tunnel encapsulation modes to the corresponding Linux modes. VyOS Linux gre gre gre-bridge gretap ipip ipip ipip6 ipip6 ip6ip6 ip6ip6 ip6gre ip6gre sit sit Besides gre-bridge this is pretty consistent. As bridge interfaces are also called tap interfaces gre-bridge will be renamed to gretap to make the post-processing much easier. This means (in detail) that there are no more child classes of _Tunnel and there will be now one geneirc TunnelIf class handling all sorts of encapsulation.
2021-02-28vyos.ifconfig: T1579: remove calls to vyos.ifconfig.Interface.get_config()Christian Poessinger
Interface.get_config() was always a pure helper which exposed a "per interface type" dictionary which was then fed by the caller to create interfaces by iproute2 which required additional options during creation time. Such interfaces had been: * tunnel * vxlan * geneve * macsec * wifi * macvlan / pseudo-ethernet The code was always duplicated to convert from the VyOS CLI based get_config_dict() to a dict which can be used to feed iproute2. This path has been removed and we now always feed in the entire dictionary retrieved by get_config_dict() or in the interfaces case, it's high-level wrapper get_interface_dict() to the interface we wan't to create. This also adds the - personally long awaited - possibility to get rid of the derived tunnel classes for e.g. GRE, IPIP, IPIP6 and so on.
2021-02-24ethernet: T3163: fix typos in vyos.ethtool commentsChristian Poessinger
2021-02-24ethernet: T3163: not all NIC drivers support ring-buffer configurationChristian Poessinger
In addition to commit cf1156a60e ("ethernet: T3163: probe driver for maximum rx/tx ring-buffer size") this extends the logic in a way as not every driver supports setting the buffers at all so it will properly error out. When invoking "ethtool -g" both stdout and stderr are captured and no exception is raised if it's an unsupported driver feature. The verify() section will inform the user about the illegal operation.
2021-02-24route: static: T2450: add missing "dhcp-interface" route optionChristian Poessinger
As thought in the beginning the dhcp-interface route option can not be superseeded by the interface option. When a route is installed for a DHCP interface, that interface is usually a broadcast interface which can not be used for plain interface-based routes. The old Vyatta logic was migrated to Python where the current received next-hop address from the DHCP interface is installed as next-hop address.