summaryrefslogtreecommitdiff
path: root/python
AgeCommit message (Collapse)Author
2020-04-20airbag: T2186: generic syslogThomas Mangin
2020-04-19vyos.validate: remove extra print() in is_bridge_member()Christian Poessinger
2020-04-19bridge: T2232: move helper to vyos.validateChristian Poessinger
2020-04-18Merge branch 'ipoe-server' of github.com:c-po/vyos-1x into currentChristian Poessinger
* 'ipoe-server' of github.com:c-po/vyos-1x: pppoe-server: T2314: fix RADIUS migration vyos.configtree: bugfix exception message used non existent variable ipoe-server: T2324: migrate RADIUS configuration to common CLI syntax ipoe-server: T2324: migrate IPv4/IPv6 name-servers to common node ipoe-server: T2324: remove boilerplate code and adjust to other accel implementations router-advert: rename XML/Python files for a common pattern ipoe-server: rename XML/Python files for a common pattern
2020-04-18vyos.configtree: bugfix exception message used non existent variableChristian Poessinger
2020-04-18interfaces: T2320: correctly honour create and debug optionsThomas Mangin
2020-04-18ipoe-server: T2324: remove boilerplate code and adjust to other accel ↵Christian Poessinger
implementations
2020-04-17util: T2226: restore/fix ifconfig debugingThomas Mangin
2020-04-17Merge pull request #341 from thomas-mangin/T2223Christian Poessinger
op_mode: T2223: convert vyatta-show-interfaces.pl to show_interfaces.py
2020-04-15vyos.util: T1607: move imports locally to functions using themChristian Poessinger
2020-04-15dns-forwarding: T2298: fix path to control fileChristian Poessinger
After migrating PowerDNS to systemd and also its configuration files to a volatile directory in commit 77d725f ("dns-forwarding: T2185: move configuration files to volatile /run directory") the path for the control file has not been altered and pushed to the client rec_control binary"
2020-04-14op_mode: T2223: two cosmetic change and bug fixThomas Mangin
2020-04-14ifconfig: T2223: group all operational commandsThomas Mangin
All operational command are moved within an Operational class and an inherited on for wireguard.
2020-04-14vrrp: T2223: move VRRP within ifconfigThomas Mangin
Tidied up the code and moved it under VRRP in view to use with show-interface (which has VRRP filtering) No change in functionality
2020-04-13cmd: T2226: improve debuggingThomas Mangin
allow to setup the debugging from environment variables. allow to set the name of the file used for logging change the name of the debug options to be: - developer: enable pdb of raise - log: all logging messages are logged to a file - ifconfig: show on screen action peformed to change intefaces - command: print all the result of command to screen also provide a way to setup the debugging using environment variables.
2020-04-13cmd: T2226: add the a full log of all commandsThomas Mangin
2020-04-12template: T2230: use render to generate templatesThomas Mangin
convert all call to jinja to use template.render
2020-04-12tunnel: T2236: missed mtu command on all tunnelsThomas Mangin
2020-04-12Merge pull request #334 from thomas-mangin/T31Christian Poessinger
ifconfig: T31: add skeleton VTI and input classes
2020-04-12vyos.util: openvpn: migrate to chmod_600()Christian Poessinger
2020-04-12ifconfig: T31: add skeleton VTI and input classesThomas Mangin
also add a function to Section which provides a list of reserved names
2020-04-12vyos.util: rename chmod_x() -> chmod_755()Christian Poessinger
2020-04-11Merge pull request #329 from thomas-mangin/T2226Christian Poessinger
util: T2226: improvement and fixes
2020-04-11completion: T2238: use interface dataThomas Mangin
Use the data in the default dict of the interface to generate the output of list interface.
2020-04-11ifconfig: T2223: rename Section.listing to interfacesThomas Mangin
update all code using the API. Interface.interfaces() could be used but the code was change to use Section.interfaces() which make more sense when reading it.
2020-04-11ifconfig: T2223: rename Register to SectionThomas Mangin
While the class does indeed all the registration, it work is really to map classes to interface section. ie: interface ethernet -> EthernetIf Therefore it can also list which interface are from which type, therefore the name change. Other function name will also be renamed as a consequence
2020-04-11util: T2226: prevent string over bytes for inputThomas Mangin
2020-04-11util: T2205: convert remote to use cmdThomas Mangin
2020-04-11util: T2226: passthrough for stderr, fix input, always newlineThomas Mangin
Change the code to let stderr passthrough to the screen as it is the behaviout of os.system and subprocess.call/check_out The input feature was not working and was fixed Also always convert '\r\n' to '\n'
2020-04-11Merge pull request #326 from thomas-mangin/T2265Christian Poessinger
dhcp: T2265: refactor DHCP class
2020-04-11dhcp: T2230: use external template filesThomas Mangin
2020-04-11template: T2230: helper to generate templatesThomas Mangin
Currently the pattern is to import jinja2 and re-generate the template in every file. Dimitriy reported a reduction in performance (1s) when commiting. This code provide an helper function which caches the Environment and template renderer, and can generate template from one line (instead of the few currently)
2020-04-11dhcp: T2265: refactor DHCP classThomas Mangin
Break the code between v4 and v6, remove need for getter/setter as they are just exposing the underlying dict. Move FixedDict from tunnel code and expose it to other part so it can be used to prevent accidental change to the dhcp option if no default exists already.
2020-04-10util: T2253: fix translation of subprocess.check_output to cmdJohn Estabrook
2020-04-10Revert "Revert "util: T2226: rewrite remote function helpers to use cmd""John Estabrook
This reverts commit 10717c6a3cdf7da7025b03c1abdbd813b4970b19.
2020-04-09vxlan: T2172: add source-address optionChristian Poessinger
This is a base requirement for l2vpn evpn. When source-address is configured, the option "local <source-addr> nolearning" is appended when creating the interface as mentioned here: https://vincent.bernat.ch/en/blog/2017-vxlan-bgp-evpn
2020-04-09Merge branch 'vxlan' of github.com:c-po/vyos-1x into currentChristian Poessinger
* 'vxlan' of github.com:c-po/vyos-1x: vxlan: pseudo-ethernet: T2260: convert link nodes to source-interface wireguard: T2206: fix comment in migration script pppoe: enable Jinja2 trim_blocks
2020-04-09vxlan: pseudo-ethernet: T2260: convert link nodes to source-interfaceChristian Poessinger
2020-04-09util: T2226: os.system was wrongly converted to runThomas Mangin
os.system does print the ouput of the command, run() does not. A new function called call() does the printing and return the error code.
2020-04-09util: T2205: do not display debuging when it is not setThomas Mangin
2020-04-09Merge pull request #316 from thomas-mangin/T2242Christian Poessinger
import: T2242: remove all import *
2020-04-09Merge pull request #317 from thomas-mangin/T2028-remoteChristian Poessinger
tunnel: T2028: fix remote and registration
2020-04-09Merge pull request #314 from thomas-mangin/T2186Christian Poessinger
airbag: T2186: report friendly user message and log to syslog
2020-04-08tunnel: T2028: register the _Tunnel classThomas Mangin
All interface classes register themselves so that we can figure out from an interface name what class is responsible for its creation. In the case of Tunnel, it is not the case as multiple different interfaces are sharing the same "tun" prefix. Still many operations are the same and it should be done.
2020-04-08Revert "util: T2226: rewrite remote function helpers to use cmd"John Estabrook
This reverts commit 7219d4013814a55c4eeaf36b7a36d5e8076d09f0.
2020-04-08vyos.util: introduce chmod_750() for files/directoriesChristian Poessinger
2020-04-08vyos-util: rename chown_file() > chown()Christian Poessinger
... to make it clear also directories can be chown(-ed)
2020-04-08logging: T2186: cosmetic changesThomas Mangin
2020-04-08import: T2242: remove all import *Thomas Mangin
2020-04-08logging: T2186: Initial implementation of loggingThomas Mangin
All messages sent to stderr are now logged to syslog. Also should a raise statement not be handled by the program, a friendlier message is sent to the user (with the trace to syslog) It provide a new debug option: /tmp/vyos.developer.debug when the file exists and the code raise without being caught up the program will automatically fall into pdb port-morterm mode allowing to investigate the reason for the failure