summaryrefslogtreecommitdiff
path: root/src/conf_mode/dhcpv6_server.py
AgeCommit message (Collapse)Author
2023-12-31T5474: establish common file name pattern for XML conf mode commandsChristian Breunig
We will use _ as CLI level divider. The XML definition filename and also the Python helper should match the CLI node. Example: set interfaces ethernet -> interfaces_ethernet.xml.in set interfaces bond -> interfaces_bond.xml.in set service dhcp-server -> service_dhcp-server-xml.in
2023-12-29dhcp: T3316: Adjust kea lease files' location and permissionsIndrajit Raychaudhuri
Move the kea lease file to a separate directory `/config/dhcp` that `kea` process can write to so that subprocesses spawned by `kea` process can operate on the lease files. To allow `kea` process to write to `/config/dhcp`, add `_kea` user to `vyattacfg` group. And the lease files are owned completely by `_kea` user to play well with `kea-lfc` process. Specifically, this is necessary for `kea-lfc` which is spawned by `kea` process to clean up expired leases. Since `kea-lfc` creates additional backup lease files, it needs write access to the lease file directory. Additionally, change the extension of the lease file from `.leases` to `.csv` to reflect the actual file format.
2023-12-21dhcp: T3316: Support hostname, DUID and MAC address in reservationIndrajit Raychaudhuri
Reinstate support for hostname in DHCP reservation. Having `hostname` in allows for server-side assignment of hostname. This is useful for static lookup of hostname. Ensure that hostname is a valid FQDN (doesn't have underscore, etc.) Additionally, support using either of DUID or MAC address for reservation. While MAC address is typically used for IPv4, and DUID is typically used for IPv6, either of them can be used in IPv4 and IPv6 reservations in Kea.
2023-12-17dhcp: T3316: Kea DHCP and DHCPv6 fixessarthurdev
* Move Kea socket permission change on-demand and speed up conf scripts * Fix issue with DHCP reservations when no `ip-address` value
2023-12-08dhcp: T3316: Migrate dhcp/dhcpv6 server to Keasarthurdev
2023-08-06T5195: move helpers from vyos.validate to vyos.utils packageChristian Breunig
2023-07-14T5195: vyos.util -> vyos.utils package refactoring (#2093)Christian Breunig
* T5195: move run, cmd, call, rc_cmd helper to vyos.utils.process * T5195: use read_file and write_file implementation from vyos.utils.file Changed code automatically using: find . -type f -not -path '*/\.*' -exec sed -i 's/^from vyos.util import read_file$/from vyos.utils.file import read_file/g' {} + find . -type f -not -path '*/\.*' -exec sed -i 's/^from vyos.util import write_file$/from vyos.utils.file import write_file/g' {} + * T5195: move chmod* helpers to vyos.utils.permission * T5195: use colon_separated_to_dict from vyos.utils.dict * T5195: move is_systemd_service_* to vyos.utils.process * T5195: fix boot issues with missing imports * T5195: move dict_search_* helpers to vyos.utils.dict * T5195: move network helpers to vyos.utils.network * T5195: move commit_* helpers to vyos.utils.commit * T5195: move user I/O helpers to vyos.utils.io
2022-04-22dhcpv6: T4357: use variable for systemd service nameChristian Poessinger
2022-04-22dhcpv6: T4357: only two IPv6 Cisco tftp servers should be definedChristian Poessinger
2022-04-22dhcpv6: T4357: remove ConfigError() line breaks - this is done automaticallyChristian Poessinger
2022-04-22dhcpv6: T4357: no need to make the vendor options conditional - they do not hurtChristian Poessinger
Always render int he vendor specific option definition - it doesn't hurt.
2022-04-22dhcpv6: T4357: Add dhcpv6 options for cisco VoIP tftpViacheslav Hletenko
Add vendor specific options for DHCPv6-server for working with cisco VoIP phone provisioning over IPv6
2022-04-15dhcp(v6)-server: T4353: fix Jinja2 linting errorsChristian Poessinger
2022-04-08dhcp-server: T4344: Fix underscores for shared network nameViacheslav Hletenko
Shared network name should not be handled by tag node mangling I.e. should not replace underscores with dashed set service dhcp-server shared-network-name NET_01 shared-network NET_01 { authoritative; ... on commit { set shared-networkname = "NET_01"; } }
2021-10-20dhcpv6-server: T3918: Fix subnets verify raise ConfigErrorViacheslav
2020-12-06dhcpv6: T3100: migrate server configuration to get_config_dict()Christian Poessinger
2020-12-01dhcpv6: T1433: combine templates for v4 and v6Christian Poessinger
2020-11-13vyos.template: provide general is_ip(v4|v6) helpersChristian Poessinger
We had two places were the is_ip, is_ipv4 and is_ipv6 helpers had been defined. All places now have been converged into vyos.template as they are used both in the Jinja2 templates and also in our scripts.
2020-10-04dhcpv6: T2961: support stateless dhcpv6 clientsLucas Christian
This commit adds support for configuring the DHCPv6 server to serve "stateless" DHCPv6 clients (those that send an information-request message and do not request an address). The change introduces a `common-options` node at the `shared-network-name` level, which allows specifying options applicable to clients regardless of subnet assigned (or in the case of stateless clients, when no subnet is assigned). Parameters specified at the subnet level take precedence over those set at the shared-network level. Presently, only parameters that are meaningful to stateless clients have been exposed under `common-options`, as there is no precedent of exposing parameters at multiple levels under the current DHCPv4 or DHCPv6 configuration syntax. If desired, additional parameters could certainly be added with relative ease.
2020-08-31configd: T2582: add scripts to include list for daemonJohn Estabrook
2020-05-29airbag: T2088: explicit enabling of the featureThomas Mangin
airbag must now be explicitly installed. the patch also allow to fully disables the installation of the logging code at setup (and not just installing and doing nothing)
2020-05-19dhcpv6-server: T815: support delegating IPv6 prefixesChristian Poessinger
2020-04-30dhcpv6-server: T2406: migrate from string to list when reading configChristian Poessinger
2020-04-30dhcpv6-server: T2406: move FQDN quoting to Jinja2 templateChristian Poessinger
... no need to reinvent the wheel in our Python code.
2020-04-30dhcpv6-server: T2406: merge sip-server-{address,name} to sip-server nodeChristian Poessinger
The subnet specific nodes sip-server-address & sip-server-name do the same for the user - specify a SIP server. Only the backend is rendered in a different way, as ISC DHCPv6 expects different options. There is absolutely no need for the user to distinguish between both two nodes.
2020-04-27template: T2388: move mkdir/chmod/chown within render()Thomas Mangin
2020-04-20dhcpv6-server: T2328: fix for service not startingJernej Jakob
- fix wrong unindent - add missing 'else:' - add check for all shared-networks disabled
2020-04-12dhcpv6-server: T2185: migrate from SysVinit to systemdChristian Poessinger
2020-04-12template: T2230: use render to generate templatesThomas Mangin
convert all call to jinja to use template.render
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-06util: T2226: covert most calls from os.system to utilThomas Mangin
As little change a possible but the function call The behaviour should be totally unchanged.
2020-04-05dhcpv6-server: T2230: move inlined templates to dedicated filesChristian Poessinger
2019-12-13T1873: DHCP: ship our own server init scriptsJernej Jakob
2019-07-19[DHCPv6 server] T1440: add subnet uniqueness check to DHCPv6.Daniil Baturin
2019-07-04T1435 plus other dhcp/dhcpv6-server enhancementsJernej Jakob
- T1435: dhcp-server: make ip-address optional in static-mapping - remove [REQUIRED] from dhcpv6-server static-mapping identifier and ipv6-address - verify if static-mapping ipv6-address is in subnet - make help and error messages in conf-mode more descriptive - remove regex ^$ anchors (implied in re.fullmatch)
2019-06-24 T1470: improve output of "show dhcpv6 server leases"Jernej Jakob
- change DUID to IAID_DUID - format IAID_DUID as colon-separated hex list - implement functions: pool, sort, state - add op-mode definitions for pool, sort, state - add columns: State, Type, Last communication, Pool - implement json output - implement completionHelp function
2019-06-22T1433: fix also filenames in /etc/default/isc-dhcpv6-serverJernej Jakob
2019-06-16T1439: remove quotes around dhcp6.client-idJernej Jakob
2019-06-16DHCPDv6 T1433: rename daemon configuration fileChristian Poessinger
... to have the same pattern as the DHCPDv6 lease file
2019-06-16DHCPDv6 T1433: fix wrong lease file nameChristian Poessinger
A wrong lease file caused the show command to fail: vyos@vyos:~$ show dhcpv6 server leases Traceback (most recent call last): File "/usr/libexec/vyos/op_mode/show_dhcpv6.py", line 81, in <module> leases = get_leases(lease_file, state='active') File "/usr/libexec/vyos/op_mode/show_dhcpv6.py", line 44, in get_leases leases = IscDhcpLeases(lease_file).get() File "/usr/lib/python3/dist-packages/isc_dhcp_leases/iscdhcpleases.py", line 110, in get with open(self.filename) as lease_file: FileNotFoundError: [Errno 2] No such file or directory: '/config/dhcpdv6.leases'
2018-08-31T811: dhcpv6_server.py: add missing validators when comitting config changesChristian Poessinger
2018-08-30T778: dhcpv6-server: XML and Python rewriteChristian Poessinger