summaryrefslogtreecommitdiff
path: root/src/op_mode
AgeCommit message (Collapse)Author
2024-05-12T6329: firewall: use isinstance() in op-mode scriptChristian Breunig
(cherry picked from commit b705adc40b761e338026b938d80398fdb281a197)
2024-05-12T6329: firewall: add a patch for op-mode command <show firewall group>Nicolas Fort
(cherry picked from commit 72c95ec1df8ad7be8a715b3338001349684cafa9)
2024-05-11image-tools: T6176: use console_hint as defaultJohn Estabrook
(cherry picked from commit 0eb09b81f763a62684a7be905267f081f9d6aeb1)
2024-05-10image-tools: T6176: add console hint during image installJohn Estabrook
(cherry picked from commit 428d03e47e7d01b08ccb8cf1acc0ab8a53275286)
2024-05-10image-tools: T6184: add op-mode set boot-consoleJohn Estabrook
(cherry picked from commit eb281199ba35de52a8a97146dfc063e557755648)
2024-05-10image-tools: T6327: drop boot console type ttyUSBJohn Estabrook
(cherry picked from commit 32658e981babffb5b7149534bd50a64d11f7c74f)
2024-05-07op-mode: T6284: IPoE-server op-mode does not show IPv6 address fieldNataliia Solomko
(cherry picked from commit 40b9085171ecf97f791b5f3b5cb32dd5f46d0f21)
2024-05-04op-mode: T6291: add LACP related commandsl0crian1
show interfaces bonding lacp detail show interfaces bonding <bondif> lacp detail show interfaces bonding <bondif> lacp neighbors Co-authored-by: l0crian1 <ryan.claridge13@gmail.com> (cherry picked from commit 0c2bf3192382cffc5ed2dcead3889c332a48820f)
2024-05-02ntp: T4909: Rewrite NTP op mode in new formatGinko
ntp: T4909: Rewrite NTP op mode in new format Adapts ntp.xml.in to reference new ntp.py file Add ntp.py Adds a check to ntp.py to verify if the ntp service is configured Adds raw mode to ntp.py For raw output, replaces the original method of parsing the command line output FROM re.split+regex TO csv.reader. Separates chrony commands into equivalent functions show_tracking, show_sources, source_sourcestats and show_activity Revises the names of raw dictionary keys variables to be lowercase Corrects a comment typo and renames function name used for raw mode (cherry picked from commit d2a82c30695c2f4265dc5ca2165d27d5aa3e2cef)
2024-05-01firewall: T6257: Show member information for dynamic groups in op-modesarthurdev
(cherry picked from commit 456419c7930405b80d322586736734f707affaed)
2024-04-23Merge pull request #3350 from vyos/mergify/bp/sagitta/pr-3346Christian Breunig
image-tools: T6260: remove persistence image directory if no space error (backport #3346)
2024-04-23image-tools: T6260: remove persistence image directory if no space errorJohn Estabrook
(cherry picked from commit c2fc2dba32ba861684f5e34635f810c56d551d51)
2024-04-23connect_disconnect: T6261: correction to typo in check_ppp_running functionGinko
Connect_disconnect: T6261: correction to typo in check_ppp_running function Changes include: 1. Replaces "beeing" -> being in print statement for check_ppp_running 2. Replaces "can not" -> cannot in print statement on lines 61 and 93 (cherry picked from commit 19e0d3b74f66e082c3f131b9044e7ca2371b1d85)
2024-04-22op-mode: T6244: add whitespace after time unit in "show system uptime"Christian Breunig
(cherry picked from commit 31b21d26751b7db7ab784486da5b8690ddd4a058)
2024-04-18openvpn: T6245: return 'n/a' if client info not availableJohn Estabrook
(cherry picked from commit a43f1c00bdc5047eb20840ebb274418362612526)
2024-04-17image-tools: T6154: installer prompts to confirm a non-default passwdJohn Estabrook
(cherry picked from commit f43edbd7cd36f52a0cd9c475b53f317882f4a6f9)
2024-04-12Merge pull request #3243 from vyos/mergify/bp/sagitta/pr-3242Daniil Baturin
T6166: Tech support generation error for custom output location (backport #3242)
2024-04-09T5858: Fix op-mode format for show conntrack statisticsViacheslav Hletenko
(cherry picked from commit 13ed4f9d489dd5b8ee80c5f2fdebf1b0565e9137)
2024-04-08image-tools: T6207: restore choice of config.boot.default as boot configJohn Estabrook
(cherry picked from commit 619e2262e77621c6110164712fed0a42f16715e3)
2024-04-06Merge pull request #3258 from vyos/mergify/bp/sagitta/pr-3255Daniil Baturin
T6203: remove obsoleted xml lib (backport #3255)
2024-04-06Merge pull request #3264 from vyos/mergify/bp/sagitta/pr-3219Daniil Baturin
T6188: add description to show firewall (backport #3219)
2024-04-06T6188: Add description to detail view onlyl0crian1
For readability in console sessions, moved the description column to only be shown in the detail view. Changed wrapping in the detail view for description to 65 characters to prevent full line wrapping in console sessions. (cherry picked from commit 4dba82c7517f4a93b9727d22104e4a339bad127a)
2024-04-06 T6188:l0crian1
- modified: src/op_mode/firewall.py Changed behavior of "show firewall" for specific rule to only show rule and not also default-action (cherry picked from commit a7c5205ab12e767c6c60887033694c597e01f21b)
2024-04-06 modified: op-mode-definitions/firewall.xml.inl0crian1
- Added show firewall <sections> detail paths modified: src/op_mode/firewall.py - Added Description as a header to normal "show firewall" commands - Added 'detail' view which shows the output in a list key-pair format Description column was added for these commands and their subsections: show firewall statistics show firewall groups show firewall <family> Detail view was added for these commands: show firewall bridge forward filter detail show firewall bridge forward filter rule <rule#> detail show firewall bridge name <chain> detail show firewall bridge name <chain> rule <rule#> detail show firewall ipv4 forward filter detail show firewall ipv4 forward filter rule <rule#> detail show firewall ipv4 input filter detail show firewall ipv4 input filter rule <rule#> detail show firewall ipv4 output filter detail show firewall ipv4 output filter rule <rule#> detail show firewall ipv4 name <chain> detail show firewall ipv4 name <chain> rule <rule#> detail show firewall ipv6 forward filter detail show firewall ipv6 forward filter rule <rule#> detail show firewall ipv6 input filter detail show firewall ipv6 input filter rule <rule#> detail show firewall ipv6 output filter detail show firewall ipv6 output filter rule <rule#> detail show firewall ipv6 name <chain> detail show firewall ipv6 name <chain> rule <rule#> detail show firewall group detail show firewall group <group> detail (cherry picked from commit 025438ccacc654274efbd3bea8b13fcc73ae08b6)
2024-04-06T6188: add description to show firewalll0crian1
(cherry picked from commit b2ced47bdc547ada59b37e6617422188e150282c)
2024-04-06T6199: remove unused Python imports from migration scriptsChristian Breunig
(cherry picked from commit 489e6fababa60d9c0fbfdb421305cbe563432499) # Conflicts: # src/migration-scripts/dhcp-server/9-to-10 # src/migration-scripts/dhcpv6-server/3-to-4
2024-04-05op-mode: T6203: replace use of vyos.xml.defaults with automatic defaultsJohn Estabrook
(cherry picked from commit aa1fb0733f18dfb0ccdfb37df36839c6a358d8ee)
2024-04-04T6166: Tech support generation error for custom output locationkhramshinr
(cherry picked from commit bec23808af82b0f84e8a7707bbd56839da2c48b0)
2024-04-03T6199: drop unused Python importsChristian Breunig
found using "git ls-files *.py | xargs pylint | grep W0611" (cherry picked from commit 274b2da242acd1f1f64ff1dee471e34295137c5f)
2024-03-30image-tools: T6186: simplify image annotations fixing regressionJohn Estabrook
(cherry picked from commit 1f0c33c00118c42fc2796d99aff94c428f434d4a)
2024-03-28openvpn: T6159: Openvpn Server Op-cmd adds heading "OpenVPN status on vtunx" ↵khramshinr
for every client connection Don't show duplicate info of vtunx show header when clints is not connected but server is configured (cherry picked from commit 66a009f367f8bf274eac9a4d4e1f4f8911c85872)
2024-03-28op-mode: T6175: "renew dhcp interface <name>" does not check for DHCP interfaceChristian Breunig
The current op-mode script simply calls sudo systemctl restart "dhclient@$4.service" with no additional information about a client interface at all. This results in useless dhclient processes root 47812 4.7 0.0 5848 3584 ? Ss 00:30 0:00 /sbin/dhclient -4 -d root 48121 0.0 0.0 4188 3072 ? S 00:30 0:00 \_ /bin/sh /sbin/dhclient-script root 48148 50.0 0.2 18776 11264 ? R 00:30 0:00 \_ python3 - Which also assign client leases to all local interfaces, if we receive one valid DHCPOFFER vyos@vyos:~$ show interfaces Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down Interface IP Address MAC VRF MTU S/L Description ----------- ----------------- ----------------- ------- ----- ----- ------------- eth0 - 00:50:56:bf:c5:6d default 1500 u/u eth0.10 172.16.33.102/24 00:50:56:bf:c5:6d default 1500 u/u eth1 172.16.33.131/24 00:50:56:b3:38:c5 default 1500 u/u 172.16.33.102/24 and 172.16.33.131/24 are stray DHCP addresses. This commit moved the renew command to the DHCP op-mode script to properly validate if the interface we request a renew for, has actually a dhcp address configured. In additional this exposes the renew feature to the API. (cherry picked from commit 7dbaa25a199a781aaa9f269741547e576410cb11)
2024-03-21dhcp: T5164: op cmd: "show dhcp server leases state" with available options ↵khramshinr
does not show any result
2024-03-19T6138: Fix op-mode show conntrack table with flowtable offloadsViacheslav Hletenko
The op-mode command `show conntrack table ipv4` fails if gets a conntrack entrie with `flowtable` offload. Those entries do not have key `timeout` ``` File "/usr/libexec/vyos/op_mode/conntrack.py", line 115, in get_formatted_output timeout = meta['timeout'] ~~~~^^^^^^^^^^^ ``` Use the timeout `n/a` for those offload conntrack entries (cherry picked from commit a75be3b6814dd39711c157c29405ee6bd83993f5)
2024-03-13grub: T4548: Fixed configuration files orderzsdc
To iterate files on ext* file systems GRUB reads their inodes one by one, ignoring names. This breaks our configuration logic that relies on proper loading order. This commit adds a helper `sort_inodes()` that needs to be used whenever GRUB configuration files are created. It recreates files, changing their inodes in a way where inodes order matches alphabetical order. (cherry picked from commit f74923202311e853b677e52cd83bae2be9605c26)
2024-02-28container: T6074: do not allow deleting images which have a container runningChristian Breunig
The current VyOS container image manipulation "delete container image" command allows force removal of container images - even if they still have a container running. Drop the --force option from the op-mode script. vyos@vyos:~$ delete container image 2636705a815a Error: image used by 6adb0175d47f.. image is in use by a container: consider listing external containers and force-removing image (cherry picked from commit bfc065f2c4dcfc969981453e49b8156330674006)
2024-02-24Merge pull request #3048 from vyos/mergify/bp/sagitta/pr-3046Christian Breunig
container: T6060: support removing all container images at once via op-mode (backport #3046)
2024-02-24Merge pull request #3047 from vyos/mergify/bp/sagitta/pr-2633Daniil Baturin
T5781: add ability to add additional minisign keys (backport #2633)
2024-02-24container: T6060: support removing all container images at once via op-modeChristian Breunig
cpo@LR1.wue3:~$ show container image REPOSITORY TAG IMAGE ID CREATED SIZE docker.io/library/busybox latest 3f57d9401f8d 5 weeks ago 4.5 MB docker.io/jacobalberty/unifi v7.5 f6df690d6c67 4 months ago 827 MB docker.io/jacobalberty/unifi v7.4 7838b75ef7b9 7 months ago 786 MB cpo@LR1.wue3:~$ delete container image Possible completions: 3f57d9401f8d Delete container image 7838b75ef7b9 all f6df690d6c67 cpo@LR1.wue3:~$ delete container image all cpo@LR1.wue3:~$ show container image REPOSITORY TAG IMAGE ID CREATED SIZE (cherry picked from commit 9e51a1661fac3e0d762cffdd28705e7e4bad76e9)
2024-02-24T5781: use dynamic minisign key listKyleM
Updated image_installer.py to try and validate image with all minisign public keys in /usr/share/vyos/keys/ (cherry picked from commit dfbc854157fa4655a8f459b2447df64dc74119d1)
2024-02-24container: T5909: move registry login to op-modeChristian Breunig
It does not make sense to perform the "podman login" command when setting up containers, as images are not automatically pulled in from the registry - due to issues with the default route during startup. The same issue manifests in "podman login" where we can not login to a registry unless there is a default route present. This commit changes the behavior that the container registry is part of the configuration, but it is only referenced during "add container image" and thus never during system boot. (cherry picked from commit baf30d8319ef4d0f0cc4cdf0f7c12f03f8a492b6)
2024-02-17T3722: Fixed L-Time in 'show vpn ike sa' commandaapostoliuk
Fixed L-Time in 'show vpn ike sa' command (cherry picked from commit bb6e6fc2119584df6ec571e7e9335dc509d5faeb)
2024-02-09T5703: Fix reapply QoS for connection-oriented interfacesViacheslav Hletenko
After `disconnect` and `connect` connection-oriented interfaces like PPPoE, QoS policy has to be reapplied (cherry picked from commit ffc6dc28780f4d3e8c548f3709c7f3d17babda68)
2024-02-06image-tools: T6016: wait for umount in cleanup functionJohn Estabrook
(cherry picked from commit d80530c48a78dfeb55293494a257f6234b0ef76d)
2024-02-06op-mode:T6015:Fix the charon file generated by ipsec debug scriptsrividya0208
2024-02-01ddclient: T5966: Streamline dynamic dns op-mode configurationIndrajit Raychaudhuri
Update op-mode for dynamic dns to standardize on `vyos.opmode`. All methods of `op_mode/dns_dynamic.py` are now available in standardized `op_mode/dns.py`. Move op-mode command `update dns dynamic` to `reset dns dynamic` to reflect that it is not an update but a reset of the dynamic dns service. Also, make the help texts more consistent for all op-mode commands for `dns dynamic` and `dns forwarding`.
2024-02-01Merge pull request #2924 from vyos/mergify/bp/sagitta/pr-2756Christian Breunig
T4839: firewall: Add dynamic address group in firewall configuration (backport #2756)
2024-02-01T4839: firewall: Add dynamic address group in firewall configuration, and ↵Nicolas Fort
appropiate commands to populate such groups using source and destination address of the packet. (cherry picked from commit 6ce5fedb602c5ea0df52049a5e9c4fb4f5a86122)
2024-02-01dns: T5959: Streamline dns forwarding serviceIndrajit Raychaudhuri
Streamline configuration and operation of dns forwarding service in following ways: - Remove `dns_forwarding_reset.py` as its functionality is now covered by `dns.py` - Adjust function names in `dns.py` to disambiguate between DNS forwarding and dynamic DNS - Remove `dns_forwarding_restart.sh` as its functionality is inlined in `dns-forwarding.xml` - Templatize systemd override for `pdns-recursor.service` and move the generated override files in /run. This ensures that the override files are always generated afresh after boot - Simplify the systemd override file by removing the redundant overrides - Relocate configuration path for pdns-recursor to `/run/pdns-recursor` and utilize the `RuntimeDirectory` default that pdns-recursor expects - We do not need to use custom `--socket-dir` path anymore, the default path (viz., `/run/pdns-recursor` is fine) (cherry picked from commit 1c1fb5fb4bd7c0d205b28caf90357ad56423464f)
2024-02-01dns: T4578: Remove unnecessary dns forwarding statistics scriptIndrajit Raychaudhuri
(cherry picked from commit 119efb6d8d353482d598287f49e22aa68a22e960)