summaryrefslogtreecommitdiff
path: root/python
AgeCommit message (Collapse)Author
2024-08-13configverify: T6642: verify_interface_exists requires config_dict argmergify/bp/sagitta/pr-3961John Estabrook
The function verify_interface_exists requires a reference to the ambient config_dict rather than creating an instance. As access is required to the 'interfaces' path, provide as attribute of class ConfigDict, so as not to confuse path searches of script-specific config_dict instances. (cherry picked from commit 5f23b7275564cfaa7c178d320868b5f5e86ae606)
2024-08-11T6643: firewall: fix ip address range parsing on firewall rules.mergify/bp/sagitta/pr-3964Nicolas Fort
(cherry picked from commit ff58f3e5f30d3775487a6a3b561863aa37d11d43)
2024-08-09qos: T6638: require interface state existence in verify conditionalmergify/bp/sagitta/pr-3960John Estabrook
(cherry picked from commit ed63c9d1896a218715e13e1799fc059f4561f75e)
2024-07-31ipsec: T6148: Fixed reset command by adding init after terminating (#3763) ↵mergify[bot]
(#3909) Strongswan does not initiate session after termination via vici. Added an CHILD SAs initialization on the initiator side of the tunnel. (cherry picked from commit 8838b29180ccc26d2aca0c22c9c8ca5e274825b2) Co-authored-by: aapostoliuk <108394744+aapostoliuk@users.noreply.github.com>
2024-07-30system: op-mode: T3334: replace some print() statements with Warning()mergify/bp/sagitta/pr-3698Christian Breunig
Make it more obvious for the user aber the severity of his action. (cherry picked from commit b3b31153963cc4338e8229f9f94b339682dd73a0)
2024-07-30system: op-mode: T3334: allow delayed getty restart when configuring serial ↵Andrew Topp
ports * Created op-mode command "restart serial console" * Relocated service control to vyos.utils.serial helpers, used by conf- and op-mode serial console handling * Checking for logged-in serial sessions that may be affected by getty reconfig * Warning the user when changes are committed and serial sessions are active, otherwise restart services as normal. No prompts issued during commit, all config gen/commit steps still occur except for the service restarts (everything remains consistent) * To apply committed changes, user will need to run "restart serial console" to complete the process or reboot the whole router * Added additional flags and target filtering for generic use of helpers. (cherry picked from commit bc9049ebd76576d727fa87b10b96d1616950237c)
2024-07-26vxlan: T6505: Support VXLAN VLAN-VNI range mapping in CLI (#3756)mergify/bp/sagitta/pr-3756Nataliia S
(cherry picked from commit 115e99630a317cab62c6f99e0461f6ce2c1edaf3)
2024-07-25smoketest: T6592: verify no interface stalls in conntrack ct_iface_map on ↵mergify/bp/sagitta/pr-3857Christian Breunig
deletion Now that interfaces are deleted from ct_iface_map during deletion it's time to also add a smoketest ensuring there is no entry in the ct_iface_map once an interface was deleted from the CLI. (cherry picked from commit 1c42ee9d16dd49fff2cbde652bf24a38f364526c)
2024-07-25interface: T6592: remove interface from conntrack ct_iface_map on deletionChristian Breunig
We always have had stale interface entries in the ct_iface_map of nftables/ conntrack for any interface that once belonged to a VRF. This commit will always clean the nftables interface map when the interface is deleted from the system. (cherry picked from commit 17c12bde5c6f314311e7524842fd1ddc254009b4)
2024-07-25Merge pull request #3866 from vyos/mergify/bp/sagitta/pr-3861Christian Breunig
op_mode: T6593: Release DHCP interface does not work (backport #3861)
2024-07-24op_mode: T6593: Release DHCP interface does not workmergify/bp/sagitta/pr-3861Nataliia Solomko
(cherry picked from commit 92461c35c7ef131940c885aca894a2d8b3c89592)
2024-07-23utils: T5195: fix timeout commentChristian Breunig
(cherry picked from commit 11b273108d78ab1588be3c077f40b2ac876369a4)
2024-07-20interfaces: T6592: moving an interface between VRF instances failedChristian Breunig
To reproduce: set vrf name mgmt table '150' set vrf name no-mgmt table '151' set interfaces ethernet eth2 vrf 'mgmt' commit set interfaces ethernet eth2 vrf no-mgmt commit This resulted in an error while interacting with nftables: [Errno 1] failed to run command: nft add element inet vrf_zones ct_iface_map { "eth2" : 151 } The reason is that the old mapping entry still exists and was not removed. This commit adds a new utility function get_vrf_tableid() and compares the current and new VRF table IDs assigned to an interface. If the IDs do not match, the nftables ct_iface_map entry is removed before the new entry is added. (cherry picked from commit 452068ce78581bb6fba2df4dba197e95b9aeb33d) # Conflicts: # python/vyos/ifconfig/interface.py # python/vyos/utils/network.py
2024-07-17configdep: T6559: use single dependency list with reset under configdJohn Estabrook
(cherry picked from commit 52d08b1ec5b2943744daac7123e35fd415f85db2)
2024-07-17configdep: T6559: drop global redundancy removal to fix error reportingJohn Estabrook
(cherry picked from commit 7249d10f1fbb3f90a4bdbcd0223926d0380ddd3a)
2024-06-26interfaces: T6519: harden config migration if ethernet interface is missingChristian Breunig
During a corner case where the configuration is migrated to a different system with fewer ethernet interfaces, migration will fail during an image upgrade. vyos.ethtool.Ethtool() is instantiated with an invalid interface leading to an exception that kills the migrator (cherry picked from commit e47d4fd385631236da6882233b09f6364cbb077b)
2024-06-22Merge pull request #3686 from vyos/mergify/bp/sagitta/pr-3685Daniil Baturin
macsec: T5447: fix error message syntax - there is no tx and rx key, only key (backport #3685)
2024-06-21op-mode: T5514: Allow safe reboots to config defaults when config.boot is ↵Andrew Topp
deleted * Added flag to vyos.config_mgmt.unsaved_commits() that will tolerate missing config.boot for specific circumstances * Shutdown/reboot uses this flag; config will regenerate from defaults after a reboot (cherry picked from commit 8281383a09f12da20a1c9b4864b38ac3f541b48f)
2024-06-19macsec: T5447: fix error message syntax - there is no tx and rx key, only keyChristian Breunig
(cherry picked from commit f29caa824c02c833a3978b9236391e4277c1a6ba)
2024-06-10vyos.utils: T5195: import vyos.cpu to this packageChristian Breunig
The intention of vyos.utils package is to have a common ground for repeating actions/helpers. This is also true for number of CPUs and their respective core count. Move vyos.cpu to vyos.utils.cpu (cherry picked from commit e318eb33446de47835480d4b8f1646b39fb5c388)
2024-06-10op-mode: T6424: ipsec: honor certificate CN and CA chain during profile ↵Christian Breunig
generation In e6fe6e50a5c ("op-mode: ipsec: T6407: fix profile generation") we fixed support for multiple CAs when dealing with the generation of Apple IOS profiles. This commit extends support to properly include the common name of the server certificate issuer and all it's paren't CAs. A list of parent CAs is automatically generated from the "PKI" subsystem content and embedded into the resulting profile. (cherry picked from commit d65f43589612c30dfaa5ce30aca5b8b48bf73211)
2024-06-09Merge pull request #3604 from vyos/mergify/bp/sagitta/pr-3592Christian Breunig
grub: T6453: Fixed GRUB variables parsing (backport #3592)
2024-06-09grub: T6453: Fixed GRUB variables parsingzsdc
To parse variables with `=` a variable name should be limited by alphanumerical characters only. (cherry picked from commit d3acecdf129cd940f8b2d1b229a6e2a343cab74b)
2024-06-09vxlan: T6401: Avoid calling get_vxlan_vni_filter() unless we need itAndrew Topp
`bridge vni show dev vxlanX` will exit with an error if no VNI filters are installed, but the getter is used even when we haven't installed any. This fix avoids fetching a list of VNI filters unless we know we've created some. (cherry picked from commit ac7ee2b36df23c3a4dd2be393132631556b6ef40)
2024-05-30vyos.ifconfig: T6421: verify /etc/hostname exists before readingChristian Breunig
Inspired-By: Brandon Zhi <Huiyuze_Zhi@protonmail.com> (cherry picked from commit cf07a55d183be1f4d28b8b50a0784513d91d6fe2)
2024-05-22vyos.utils.io: T6385: handle keyboard interrupts in ask_yes_noDaniil Baturin
and return False if the user interrupts the prompt with Ctrl-C (cherry picked from commit 5a5dda14fd3d472680568f1792e9fbdb030f3995)
2024-05-22rollback-soft: T6384: tell the user to compare or commitDaniil Baturin
after applying the diff (cherry picked from commit 7bba95c8052af5b0cc5908cb9e740caa01b44161)
2024-05-22Merge pull request #3495 from vyos/mergify/bp/sagitta/pr-3493Christian Breunig
T6375: Fix/Update NAT logging (backport #3493)
2024-05-21T6373: QoS Policy Limiter - classes for marked traffic do not workkhramshinr
(cherry picked from commit e50b7afc9d5b727d04933116ccf364a2b9a48c30)
2024-05-21T6375: Fix/Update NAT loggingl0crian1
Fixed broken logging for "show log nat" Added the following commands: show log nat source show log nat source rule <ruleNum> show log nat destination nat show log nat destination nat rule <ruleNum> show log nat static show log nat static rule <ruleNum> (cherry picked from commit 5cb9b84bd9ce909460d8da7f039d9371143ede6c)
2024-05-18T6354: do an explicit read from version file to avoid circular referenceJohn Estabrook
(cherry picked from commit e0105ef380f1575613982f3b43c8ea3856654208)
2024-05-17T6354: Get rid of the custom boot type check in version.pykhramshinr
(cherry picked from commit 783edc98f82f8718ccc856976d9a8f59bc6822e9)
2024-05-16op mode: T3355: remove the mention of legacy non-image installationsDaniil Baturin
They were never supported by VyOS, that was just for very old systens upgraded from Vyatta Core (cherry picked from commit d8223d50ab627d2b58e14101891bf8ffb8111234)
2024-05-11image-tools: T6327: prune, instead of ignore, menu entries with ttyUSBJohn Estabrook
(cherry picked from commit ecee10d0512daff3034499d1163463d1390e35d4)
2024-05-10image-tools: T6327: drop boot console type ttyUSBJohn Estabrook
(cherry picked from commit 32658e981babffb5b7149534bd50a64d11f7c74f)
2024-05-10bond: T6303: must reset system-mac to 00:00:00:00:00:00 on deletionChristian Breunig
(cherry picked from commit 314901e7b45782fb6266b35b0e788ab7ea1404b8)
2024-05-10bond: T6303: system-mac is not allowed to be a multicast MAC addressChristian Breunig
(cherry picked from commit d8ddd7191d3004e886fa45a2cf9bd8dd5e7f5e14)
2024-05-10bond: T6303: add system mac address on bondfett0
(cherry picked from commit 234f35d8bae71b5d33ad97cdabc236ec6b13c3a2)
2024-05-08vyos.system.grub: T3664: add chroot argument to the GRUB install functionDaniil Baturin
to faciliate running it outside of a VyOS installation (cherry picked from commit 90507681cfb39c5570f0afbf1542bd49feb5c0ab)
2024-05-06vyos.template: T3664: add a module-level variable for template directoryDaniil Baturin
to enable calling scripts outside of live VyOS systems
2024-05-03config-sync: T6185: combine data for sections/configs in one commandJohn Estabrook
Package path/section data in single command containing a tree (dict) of section paths and the accompanying config data. This drops the call to get_config_dict and the need for a list of commands in request. (cherry picked from commit 30a530839cdbd934ea62369e385dc33fa50ab6de)
2024-05-03configtree: T6180: add masking function mask_inclusiveJohn Estabrook
(cherry picked from commit b2248b68afac795ad391b7203117d6d40a7ba6ed)
2024-05-03xml: T6146: add utils and helper to provide priority dataJohn Estabrook
(cherry picked from commit e915900bfec8d24276afb73599c94ab93f3c24ee)
2024-05-02netns: T6295: disable incomplete support in VyOS 1.4 sagittaChristian Breunig
The netns support currently available on the VyOS CLI is only a proof-of-technology, we have no real support for any service behind it. In order to not confuse anyone on the LTS branch we decided to remove the netns option for interfaces until there is a proper usecase and implementation available.
2024-05-02Merge pull request #3394 from vyos/mergify/bp/sagitta/pr-3367Christian Breunig
T6269: policy: ensure correct rule parsing when using, and when not using <set table> option in policy route. (backport #3367)
2024-05-02qos: T6225: Fix qos random-detect policykhramshinr
Fix default values for random-detect Remove dsmakr qdisc from gred cofig because dsmark was deleted from kernel (cherry picked from commit 0b54c1bc411a21833ec573031cf5ad98fe709a2f)
2024-05-02T6269: policy: ensure correct rule parsing when using, and when not using ↵Nicolas Fort
<set table> option in policy route. (cherry picked from commit d518386d74ab09c7e75fdbf7f67e14839180f24b)
2024-04-28configdep: T5660: remove global redundancies under vyos-configdJohn Estabrook
(cherry picked from commit 70e1df1b5fcb3b1791cca320ed45b71e01e1ffda)
2024-04-28configdep: T5839: remove trivially redundant config dependency callsJohn Estabrook
(cherry picked from commit 5c173c5935eab3a8bd0f169759617c4296a92df7)
2024-04-28configdep: T5836: add boolean check whether script called as dependencyJohn Estabrook
(cherry picked from commit 80077eee89e4f0aa3af5dca1a4b2b5e1665bda6f)