summaryrefslogtreecommitdiff
path: root/python/vyos/utils
AgeCommit message (Collapse)Author
2025-03-25Merge pull request #4413 from oniko94/fix/T7278-fix-cracklib-dep-buildJohn Estabrook
T7278: Remove cracklib hack from postconfig script template
2025-03-25T7278: Remove cracklib hack from postinstall script templateoniko94
2025-03-21firewall: T5493: Implement remote-groupAlex W
2025-03-18T6353: Add password strength check and user warningoniko94
2025-02-07Merge pull request #4333 from HollyGurza/T6058Daniil Baturin
T6058: Fix popen command wrapper handling
2025-02-07T6058: Fix popen command wrapper handlingkhramshinr
Ensure `wrapper` is only prepended to `command` when it is non-empty
2025-02-06T7069: Add function to get available cpus (#4334)Nataliia S.
2025-02-01vyconf: T6718: drop hybrid set/delete functionsJohn Estabrook
The 'hybrid' mode of vyconfd validation and Cstore commit is no longer needed, in preparation for full vyconfd support. Revert "vyconf: T6718: use vy_set/delete in configsession and util" This reverts commit 6999f85b2fc1c6e2421242e30e3810bd19250f3e.
2025-01-19wireguard: T4930: add mnemonic for WIREGUARD_REKEY_AFTER_TIMEChristian Breunig
WireGuard performs a handshake every WIREGUARD_REKEY_AFTER_TIME if data is being transmitted between the peers. If no data is transmitted, the handshake will not be initiated unless new data begins to flow. Each handshake generates a new session key, and the key is rotated at least every 120 seconds or upon data transmission after a prolonged silence.
2025-01-07Merge pull request #4253 from natali-rs1985/T6975Daniil Baturin
utils: T6975: Add 'vrf' and 'netns' arguments to functions in 'vyos.utils.process'
2025-01-06utils: T6975: Add 'vrf' and 'netns' arguments to functions in ↵Nataliia Solomko
'vyos.utils.process'
2025-01-06T6841: firewall: improve config parsing for ZBF when using VRFs and ↵Nicolas Fort
interfaces attached to VRFs
2024-12-18Merge pull request #4225 from natali-rs1985/T6767Christian Breunig
op_mode: T6767: Check latest image version in VRF context for "add system image latest vrf <name>"
2024-12-11op_mode: T6767: Check latest image version in VRF context for "add system ↵Nataliia Solomko
image latest vrf <name>"
2024-12-10vyconf: T6718: use vy_set/delete in configsession and utilJohn Estabrook
2024-11-21T264: IPsec add base64 encoded secret-type featureViacheslav Hletenko
Add the ability to configure base64 encoded passwords for VPN IPSec site-to-site peers authentication psk PSK secret 'xxxxx==' authentication psk PSK secret-type <base64|plaintext>
2024-11-12T6861: op-mode: add 0 into errno expect list (#4189)Date Huang
Signed-off-by: Date Huang <tjjh89017@hotmail.com>
2024-11-08T6861: op-mode: ignore error code 255 if this UEFI doesn't support secure bootDate Huang
`mokutil --sb-state` will output "This system doesn't support Secure Boot" to stderr. and return error code 255 if the UEFI system doesn't support secure boot. Signed-off-by: Date Huang <tjjh89017@hotmail.com>
2024-10-07cli: T6740: set_tag on created paths and add parse step for orderingJohn Estabrook
Signed-off-by: Daniil Baturin <daniil@baturin.org>
2024-10-03cli: T6740: add a converter from set commands to configDaniil Baturin
2024-09-16T861: op-mode: "show version" will display secure boot stateChristian Breunig
vyos@vyos:~$ show ver ... Architecture: x86_64 Boot via: installed image System type: KVM guest Secure Boot: enabled ...
2024-09-11T6294: Service dns forwarding add the ability to configure ZonetoCachekhramshinr
2024-08-25configdiff: T5666: provide list of scripts scheduled for proposed commitJohn Estabrook
2024-08-15utils: T6658: fix write_file check in case of empty directory pathJohn Estabrook
2024-08-01Merge pull request #3221 from lucasec/t5873Christian Breunig
T5873: ipsec remote access VPN: support VTI interfaces.
2024-07-30Merge pull request #3698 from talmakion/bugfix/T3334Christian Breunig
system: op-mode: T3334: allow delayed getty restart when configuring serial ports
2024-07-30system: op-mode: T3334: replace some print() statements with Warning()Christian Breunig
Make it more obvious for the user aber the severity of his action.
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.
2024-07-26T5873: vpn ipsec: re-write of ipsec updown hookLucas Christian
2024-07-24smoketest: T6592: verify no interface stalls in conntrack ct_iface_map on ↵Christian 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.
2024-07-22Merge pull request #3833 from c-po/wifi-fixChristian Breunig
wireless: T6597: improve hostapd startup and corresponding smoketests
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.
2024-07-19utils: T5195: fix timeout commentChristian Breunig
2024-07-03locking: T6544: Added locking utilzsdc
Sometimes we need a reliable way to lock an execution until some other operation is not done. This commit introduces locking util, which can be used as a common lock, even between different processes. Usage example: ``` from vyos.utils.locking import Lock lock = Lock('my_lock_id') lock.acquire(timeout=10) print(f'Lock acquired: {lock.is_locked}') lock.release() ```
2024-07-04T6546: unused import check permission update and fixVijayakumar A
2024-07-03op-mode: T6498: add machine-readable tech support report scriptDaniil Baturin
2024-06-28utils: T6530: add a helper for easily calling iproute2 commandsDaniil Baturin
2024-06-26migration: T6007: use load_as_module_source for files without extensionJohn Estabrook
2024-06-26vyos.utils.dict: T5195: fix syntax warningJohn Estabrook
2024-06-24Merge pull request #3718 from dmbaturin/T6514-system-storage-rawDaniil Baturin
op-mode: T6514: rework the "show system storage" code to handle live CD systems correctly
2024-06-24op-mode: T6514: rework the "show system storage" codeDaniil Baturin
to handle live CD systems correctly and allow reusing the functions from other scripts
2024-06-24Merge pull request #3701 from jestabro/configd-drop-env-sudoChristian Breunig
configd: T6504: send sudo_user on session init and set env variable
2024-06-24Merge pull request #3683 from dmbaturin/T6501-lsmod-on-steroidsJohn Estabrook
op mode: T6501: add "run show kernel modules"
2024-06-23vyos.utils: T6504: add interactive op-/configure mode support for ↵Christian Breunig
get_current_user()
2024-06-21op mode: T6498: move uptime helpers to vyos.utils.systemDaniil Baturin
to be able to call them from the new tech-support script
2024-06-19op mode: T6501: add "run show kernel modules"Daniil Baturin
2024-06-15T6489: add abstraction vyos.utils.configfs to work natively with the config ↵Christian Breunig
filesystem
2024-06-15T6489: add abstraction vyos.utils.auth.get_current_user()Christian Breunig
2024-06-10op-mode: T6471: add optimized get_config_dictJohn Estabrook
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