summaryrefslogtreecommitdiff
path: root/python
AgeCommit message (Collapse)Author
2020-03-05ifconfig: T2101: Fix undefined reference variable in VXLANIftjjh89017
change `config['remote']` to `self.config['remote']`
2020-03-04Merge branch 't31-vrf' of github.com:c-po/vyos-1x into currentChristian Poessinger
* 't31-vrf' of github.com:c-po/vyos-1x: vrf: T31: enable vrf support for dummy interface templates: T2099: make op-mode path completion helper working vrf: T31: reorder routing table lookups vrf: T31: adding unreachable routes to the routing tables vrf: T31: prior to the v4.8 kernel iif and oif rules are needed vrf: T31: create iproute2 table to name mapping reference vrf: T31: rename 'vrf disable-bind-to-all ipv4' to 'vrf bind-to-all' vrf: T31: support add/remove of interfaces from vrf vrf: T31: remove superfluous vyos.vrf library functions vrf: T31: reduce script complexity vrf: T31: no need to use sudo calls in vrf.py vrf: T31: make 'show vrf' command behave like other 'show interface commands' xml: include: description: adjust help message vrf: T31: improve help for routing table vrf: T31: reuse interface-description.xml.i for instance description vrf: T31: use embedded regex on 'vrf name' instead of python script vrf: T31: initial support for a VRF backend in XML/Python ifconfig: T2057: generic interface option setting
2020-03-04vrf: T31: support add/remove of interfaces from vrfChristian Poessinger
2020-03-04vrf: T31: remove superfluous vyos.vrf library functionsChristian Poessinger
vyos.vrf.list_vrfs() was only used in one function thus building a library is no longer needed. If it is needed in the future it should be placed into a library again.
2020-03-04vrf: T31: initial support for a VRF backend in XML/PythonThomas Mangin
This is a work in progress to complete T31 whoever thought it was less than 1 hour of work was ..... optimistic. Only VRF vreation and show is supported right now. No interface can be bound to any one VRF.
2020-03-04ifconfig: T2057: generic interface option settingThomas Mangin
this patch allows to get or change many interface options (mtu, arp settings, ...) using get_interface / set_interface functions
2020-03-04Merge pull request #240 from thomas-mangin/2057-strictChristian Poessinger
ifconfig: T2057: allow unknown config keys, and fix variable name ref.
2020-03-04ifconfig: T2057: allow unknown keys in the config, and fixThomas Mangin
2020-03-04ifconfig: T2057: fix various typosThomas Mangin
2020-03-04ifconfig: T2057: bugfix KeyErrorChristian Poessinger
Error introduced in commit b38dcaf ("ifconfig: T2057: generic interface option setting"). File "/usr/lib/python3/dist-packages/vyos/ifconfig.py", line 146, in _get_sysfs filename = self._sysfs_get[name]['location'].format(config) KeyError: 'ifname'
2020-03-04ifconfig: T2057: bugfix ValueErrorChristian Poessinger
Fixes error when creating bridge interfaces: ValueError: <module 'time' (built-in)> must be a number
2020-03-03ifconfig: T2057: generic interface option settingThomas Mangin
this patch allows to get or change many interface options (mtu, arp settings, ...) using get_interface / set_interface functions
2020-03-03ifconfig: T2074: add check for sysfs filesDmitriyEshenko
2020-02-29ifconfig: T2082: fix checking of argument passedThomas Mangin
2020-02-24ifconfig: T2057: generalised Interface configurationThomas Mangin
Provides a way to pass options to interface consistent between subclasses of Interface
2020-02-16ifconfig: bond: T2043: T2030: fix wrong call to os.listdir()Christian Poessinger
2020-02-16bond: T2030: fix incorrect delta calculation on member interfacesChristian Poessinger
THe delta check/calculation always returned False on system startup leading to a non functioning bond interface after a reboot as no physical interface actually enslaved. This was fixed by not calculating the current enslaved interfaces from the existing config but rather retrieving the interfaces from sysfs.
2020-02-14ifconfig: T2034: remove obsolete commentChristian Poessinger
2020-02-14T2034: Disallow removal of default loopback addressesRunar Borge
The removal of interfaces loopback lo results in all address being removed from the loopback interface. (also not cli controlled addresses) In this process 127.0.0.1/8 and ::1/128 are also removed witch results in error for services that are dependent on these adresses, this includes eg. snmp and ssh Removal of these addresses needs to be disallowed by the config backend and removal of the whole config block interfaces loopback lo needs to result in removal of all non-default addresses only.
2020-02-13macvlan: T1635: migrate pseudo-ethernet interface definition to XML/PythonChristian Poessinger
2020-02-05smoke-test: adding generate cmd to configsessionhagbard
- in preparation for a wireguard cli test case, generate is used to create the keys later used in the config
2020-02-05service https: T1585: add support for letsencrypt certificatesJohn Estabrook
2020-02-01Revert "ifconfig: T2002: only admin up interfaces if parent interface is up"Christian Poessinger
This reverts commit 4a4e2b6386b4c036bbf4486a8a7ac7002d08158b.
2020-02-01Revert "ifconfig: T2002: T2009: bugfix for always disabled Ethernet/Bond ↵Christian Poessinger
interfaces" This reverts commit 95f7a440031c58b47fd88d6aa9fac3ddaf6ae231.
2020-02-01ifconfig: T2002: T2009: bugfix for always disabled Ethernet/Bond interfacesChristian Poessinger
Commit 4a4e2b6 ("ifconfig: T2002: only admin up interfaces if parent interface is up") contained an inheritance issue where the Ethernet and Bond interface was always admin down. This was caused by wrong calls in the inheritance structure.
2020-01-31ifconfig: T2002: only admin up interfaces if parent interface is upChristian Poessinger
On an A/D (administrative down) interface the VLAN code tries to still admin up the interface. This won't work and the kernel will complain with: RTNETLINK answers: Operation not permitted With this change the VLAN interface is only enabled when the parent interface is administrative up, too.
2020-01-29T1989: use explicit active/working showConfig options to prevent getting diffsDaniil Baturin
when there are uncommitted changes.
2020-01-25vyos.validate: improve is_ipv6_link_local() logicChristian Poessinger
2020-01-25vyos.validate: remove interface suffix when running is_ipv6_link_local()Christian Poessinger
Commit 17dd50751d ("bfd: T1949: fix verification logic for IPv6 BFD peers") added a mechanism to probe if an IPv6 address is link-local or not. Sometimes an interface suffix is appended by %interface to a link-local address, as we need to know an interface for which this address is (hence the name) link-local. Remove any interface identifier before checking if the address is local or not.
2020-01-24Python: T1986: close subprocess channelChristian Poessinger
Without closing the communication channel to the subprocess, Python will complain e.g. when executing vyos-smoketest binary. /usr/lib/python3/dist-packages/vyos/configsession.py:110: ResourceWarning: unclosed file <_io.BufferedReader name=3> self.__run_command([CLI_SHELL_API, 'setupSession']) ResourceWarning: Enable tracemalloc to get the object allocation traceback
2020-01-20Merge pull request #199 from bmhughes/fix-ipv6-bfd-verificationChristian Poessinger
bfd: T1949: fix verification logic for IPv6 BFD peers
2020-01-14vrrp: T1884: Keep transition-script native behaviour and implement ↵DmitriyEshenko
transaction-script 'stop'
2020-01-14T1950: Add support for reading component versions from JSON fileJohn Estabrook
2020-01-09bfd: T1949: fix verification logic for IPv6 BFD peersBenjamin M. Hughes
IPv6 BFD peers only require a source address unless link-local addresses are used.
2020-01-03ifconfig: T1939: provide abstraction for interface "ip" optionChristian Poessinger
Provide an XML/Python abstraction to * ip disable-arp-filter * ip enable-arp-accept * ip enable-arp-announce * ip enable-arp-ignore The old implementation can co-exist until the last interfaces have been migrated.
2020-01-02ifconfig: T1557: refactor apply_vlan_config() functionChristian Poessinger
instead of providing three copies of the same method in bonding, ethernet and wireless, make a common function in vyos.ifconfig_vlan.apply_vlan_config().
2019-12-31l2tpv3: T1923: support interface deletionChristian Poessinger
2019-12-31l2tpv3: T1923: implementation in XML/PythonChristian Poessinger
Tested using: R1: --- set interfaces l2tpv3 l2tpeth10 address '2001:db8:beef::1/64' set interfaces l2tpv3 l2tpeth10 address '100.0.0.1/24' set interfaces l2tpv3 l2tpeth10 destination-port '3000' set interfaces l2tpv3 l2tpeth10 encapsulation 'udp' set interfaces l2tpv3 l2tpeth10 local-ip '172.18.201.10' set interfaces l2tpv3 l2tpeth10 peer-session-id '10' set interfaces l2tpv3 l2tpeth10 peer-tunnel-id '100' set interfaces l2tpv3 l2tpeth10 remote-ip '172.18.204.10' set interfaces l2tpv3 l2tpeth10 session-id '20' set interfaces l2tpv3 l2tpeth10 source-port '6000' set interfaces l2tpv3 l2tpeth10 tunnel-id '200' R2: --- set interfaces l2tpv3 l2tpeth10 address '2001:db8:beef::2/64' set interfaces l2tpv3 l2tpeth10 address '100.0.0.2/24' set interfaces l2tpv3 l2tpeth10 destination-port '6000' set interfaces l2tpv3 l2tpeth10 encapsulation 'udp' set interfaces l2tpv3 l2tpeth10 local-ip '172.18.204.10' set interfaces l2tpv3 l2tpeth10 peer-session-id '20' set interfaces l2tpv3 l2tpeth10 peer-tunnel-id '200' set interfaces l2tpv3 l2tpeth10 remote-ip '172.18.201.10' set interfaces l2tpv3 l2tpeth10 session-id '10' set interfaces l2tpv3 l2tpeth10 source-port '3000' set interfaces l2tpv3 l2tpeth10 tunnel-id '100'
2019-12-31ifconfig: vxlan: change VXLANIf APIChristian Poessinger
2019-12-31ifconfig: geneve: always place interface in A/D stateChristian Poessinger
2019-12-31geneve: use proper variable nameChristian Poessinger
2019-12-23lldp: T1898: support multiple management addressesChristian Poessinger
- management-address is not a <multi/> node - added new vyos.validate.is_loopback_addr() function - returns true is address passed is a looback address
2019-12-16Merge branch 'current' into equuleushagbard
2019-12-12ethernet: T1637: do not delete VIFs on every commitChristian Poessinger
A delta-check problem caused the deletion of each and every VLAN interface when anything under an interface has been changed. This also cause PPPoE session interruptions.
2019-12-11vyos.config: T1846: ignore edit level when obtaining running configJohn Estabrook
In addition to ignoring edit level for the session config (12a21a4b), the running config should be parsed from the top level.
2019-12-10vyos.config: T1862: restore regex after mergeJohn Estabrook
2019-12-10Merge branch 'current' of github.com:vyos/vyos-1x into equuleusChristian Poessinger
* 'current' of github.com:vyos/vyos-1x: T1855, T1826: Restore support for reboot/poweroff in M minutes. vyos.config: T1764: allow for list argument to exists, in value case vyos.config: T1846: ignore edit level when obtaining working config T1843: use include files for interface proxy-arp-pvlan option T1843: use include files for interface proxy-arp configuration T1843: use include files for interface arp-cache-timeout configuration T1843: use include files for interface link-detect feature T1843: use include files for interface MTU size T1843: use include files for interface MAC address T1843: use include files to disable interface (admin down) T1843: use include files for interface description T1843: use include files for DHCP/DHCPv6 options T1843: recursively include IP address definitions in VIF/VIF-S definitions T1843: add support for recursive includes T1843: use include files for VIF/VIF-S interfaces T1843: use include files for IPv4/IPv6 interface address configuration T1843: run interface-definitions though GCC preprocessor
2019-12-09vyos.config: T1764: allow for list argument to exists, in value caseJohn Estabrook
2019-12-09vyos.config: T1846: ignore edit level when obtaining working configJohn Estabrook
2019-12-06equuleus: T1862: Use regex pattern \s+ to split strings on whitespaceJohn Estabrook