summaryrefslogtreecommitdiff
path: root/python/vyos/opmode.py
AgeCommit message (Collapse)Author
2024-07-24op_mode: T6593: Release DHCP interface does not workNataliia Solomko
(cherry picked from commit 92461c35c7ef131940c885aca894a2d8b3c89592)
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.
2024-01-22T2719: Add 'update' in standard op-mode function listIndrajit Raychaudhuri
2023-05-04opmode: T5191: replace underscores with hyphens in generated optionsDaniil Baturin
2023-03-05op-mode: T5051: add support for Literal arg typesJohn Estabrook
2023-01-25Merge pull request #1778 from dmbaturin/T4950-op-mode-setChristian Breunig
opmode: T4950: add set to the list of op mode functions
2023-01-24Merge pull request #1779 from dmbaturin/T4951-resource-errorChristian Breunig
op mode: T4951: add InsufficientResources error
2023-01-23op mode: T4951: add InsufficientResources errorDaniil Baturin
2023-01-23opmode: T4950: add set to the list of op mode functionsDaniil Baturin
2023-01-19T4944: disallow bare literals in raw op mode outputsDaniil Baturin
2023-01-10opmode: T4564: add generate to the list of op mode functionsDaniil Baturin
2023-01-10opmode: T2546: add UnsupportedOperation to op mode errorsDaniil Baturin
2023-01-09container: T4880: include 'add'/'delete' in standard op-mode functionsJohn Estabrook
2022-12-12opmode: T4770: add CommitInProgess errorJohn Estabrook
2022-11-18IPsec: T4828: raise op-mode error on incorrect valueJohn Estabrook
2022-11-01op-mode: T4791: decamelize raw output of 'show_*' before normalizationJohn Estabrook
2022-10-28T4765: handle non-string fields in the raw op mode output normalizerDaniil Baturin
2022-10-21T4765: support list and primitives in op mode output normalizationcreate with ansible
2022-10-20T4765: normalize fields only if 'raw' is true; output must be dictJohn Estabrook
2022-10-20T4765: normalize dict fields in op mode ouputsDaniil Baturin
2022-08-30opmode: T4657: fixed opmode with return type hintszsdc
This commit excludes `return` from `typing.get_type_hints()` output, which allows generate argparse arguments for function properly.
2022-08-04T2719: add an exception hierarchy for op mode errorsDaniil Baturin
2022-07-20T2719: fix indentation in vyos.opmodeDaniil Baturin
2022-07-19T2719: patch for general support for boolean optionsJohn Estabrook
Signed-off-by: Daniil Baturin <daniil@vyos.io>
2022-07-05T2719: add general support for boolean options to generative op modeDaniil Baturin
Since Python as of 3.9 doesn't give us an option to look up argument's default value by its name, this implementation requires that all boolean options must default to false.
2022-06-20T2719: use _is_show for detecting show functionsDaniil Baturin
2022-06-16T2719: make re functions usage in vyos.opmode more consistentDaniil Baturin
2022-06-15T2719: correctly handle the raw argument for all show_* commandsDaniil Baturin
2022-06-15T2719: handle the case when script subcommand is not givenDaniil Baturin
2022-06-09T2719: prototype of an op mode command runnerDaniil Baturin
based on type hints and introspection