diff options
| author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2026-03-20 18:41:24 +0200 |
|---|---|---|
| committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2026-03-24 17:02:56 +0000 |
| commit | bb2aee1e58c1cd30087b935798060e6bf3c698c8 (patch) | |
| tree | 99f692623ad596519ff26da443f62415cc3bcf59 | |
| parent | a9a75eb7dce077bceee1ae13dc943b05d8759925 (diff) | |
| download | vyos-1x-bb2aee1e58c1cd30087b935798060e6bf3c698c8.tar.gz vyos-1x-bb2aee1e58c1cd30087b935798060e6bf3c698c8.zip | |
T8410: Fix typos and mistakes for operational and configuration commands
Fix typos and mistakes in the commands and comments
No functional changes
191 files changed, 327 insertions, 327 deletions
diff --git a/data/templates/firewall/sysctl-firewall.conf.j2 b/data/templates/firewall/sysctl-firewall.conf.j2 index 6c33ffdc8..52806d066 100644 --- a/data/templates/firewall/sysctl-firewall.conf.j2 +++ b/data/templates/firewall/sysctl-firewall.conf.j2 @@ -1,6 +1,6 @@ # Autogenerated by firewall.py -# gloabl options +# global options net.ipv4.icmp_echo_ignore_all = {{ 0 if global_options.all_ping == 'enable' else 1 }} net.ipv4.icmp_echo_ignore_broadcasts = {{ 0 if global_options.broadcast_ping == 'enable' else 1 }} net.ipv4.conf.all.bc_forwarding = {{ 1 if global_options.directed_broadcast == 'enable' else 0 }} diff --git a/data/templates/igmp-proxy/igmpproxy.conf.j2 b/data/templates/igmp-proxy/igmpproxy.conf.j2 index 85a04de7d..6e0d691ea 100644 --- a/data/templates/igmp-proxy/igmpproxy.conf.j2 +++ b/data/templates/igmp-proxy/igmpproxy.conf.j2 @@ -9,7 +9,7 @@ # option can be used in order to define legal multicast sources. # # The "quickleave" should be used to avoid saturation of the upstream link. The -# option should only be used if it's absolutely nessecary to accurately imitate +# option should only be used if it's absolutely necessary to accurately imitate # just one Client. # ######################################################## diff --git a/data/templates/login/tacplus_servers.j2 b/data/templates/login/tacplus_servers.j2 index 23e8e495e..c38ddc593 100644 --- a/data/templates/login/tacplus_servers.j2 +++ b/data/templates/login/tacplus_servers.j2 @@ -41,7 +41,7 @@ vrf={{ tacacs.vrf }} {% if tacacs.source_address is vyos_defined %} # Sets the IPv4 address used as the source IP address when communicating with # the TACACS+ server. IPv6 addresses are not supported, nor are hostnames. -# The address must work when passsed to the bind() system call, that is, it must +# The address must work when passed to the bind() system call, that is, it must # be valid for the interface being used. source_ip={{ tacacs.source_address }} {% endif %} diff --git a/data/templates/ndppd/ndppd.conf.j2 b/data/templates/ndppd/ndppd.conf.j2 index 6369dbdeb..fabe7feb8 100644 --- a/data/templates/ndppd/ndppd.conf.j2 +++ b/data/templates/ndppd/ndppd.conf.j2 @@ -10,7 +10,7 @@ route-ttl {{ route_refresh }} proxy {{ iface }} { # Turn on or off the router flag for Neighbor Advertisements router {{ 'yes' if iface_config.enable_router_bit is vyos_defined else 'no' }} - # Control how long to wait for a Neighbor Advertisment message before invalidating the entry (milliseconds) + # Control how long to wait for a Neighbor Advertisement message before invalidating the entry (milliseconds) timeout {{ iface_config.timeout }} # Control how long a valid or invalid entry remains in the cache (milliseconds) ttl {{ iface_config.ttl }} diff --git a/data/templates/sflow/hsflowd.conf.j2 b/data/templates/sflow/hsflowd.conf.j2 index fc251e92b..2bc249176 100644 --- a/data/templates/sflow/hsflowd.conf.j2 +++ b/data/templates/sflow/hsflowd.conf.j2 @@ -1,4 +1,4 @@ -# Genereated by /usr/libexec/vyos/conf_mode/system_sflow.py +# Generated by /usr/libexec/vyos/conf_mode/system_sflow.py # Parameters http://sflow.net/host-sflow-linux-config.php sflow { diff --git a/debian/changelog b/debian/changelog index 68aeecac3..c9fed1f82 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,7 +4,7 @@ vyos-1x (999.0) unstable; urgency=medium This is a internal VyOS package and the VyOS package process does not use the debian package changelog for its changes, please refer to the GitHub commitlog and the vyos release-notes for more details. - The correct verion number of this package is auto-generated by GIT + The correct version number of this package is auto-generated by GIT on build-time -- VyOS maintainers and contributors <maintainers@vyos.io> Sun, 10 Sep 2023 15:42:53 +0200 diff --git a/interface-definitions/container.xml.in b/interface-definitions/container.xml.in index f19beedb9..8a0da46a4 100644 --- a/interface-definitions/container.xml.in +++ b/interface-definitions/container.xml.in @@ -55,7 +55,7 @@ </valueHelp> <valueHelp> <format>sys-admin</format> - <description>Administation operations (quotactl, mount, sethostname, setdomainame)</description> + <description>Administration operations (quotactl, mount, sethostname, setdomainname)</description> </valueHelp> <valueHelp> <format>sys-module</format> diff --git a/interface-definitions/include/accel-ppp/max-concurrent-sessions.xml.i b/interface-definitions/include/accel-ppp/max-concurrent-sessions.xml.i index f6ef41019..20b40f60e 100644 --- a/interface-definitions/include/accel-ppp/max-concurrent-sessions.xml.i +++ b/interface-definitions/include/accel-ppp/max-concurrent-sessions.xml.i @@ -9,7 +9,7 @@ <constraint> <validator name="numeric" argument="--allow-range --range 0-65535"/> </constraint> - <constraintErrorMessage>Maximum concurent sessions must be in range 0-65535</constraintErrorMessage> + <constraintErrorMessage>Maximum concurrent sessions must be in range 0-65535</constraintErrorMessage> </properties> </leafNode> <!-- include end --> diff --git a/interface-definitions/include/bgp/neighbor-local-role.xml.i b/interface-definitions/include/bgp/neighbor-local-role.xml.i index 6ddb4908f..472e5ab8b 100644 --- a/interface-definitions/include/bgp/neighbor-local-role.xml.i +++ b/interface-definitions/include/bgp/neighbor-local-role.xml.i @@ -33,7 +33,7 @@ <children> <leafNode name="strict"> <properties> - <help>Neighbor must send this exact capability, otherwise a role missmatch notification will be sent</help> + <help>Neighbor must send this exact capability, otherwise a role mismatch notification will be sent</help> <valueless/> </properties> </leafNode> diff --git a/interface-definitions/include/firewall/global-options.xml.i b/interface-definitions/include/firewall/global-options.xml.i index 7ec07100d..5ff5acfd8 100644 --- a/interface-definitions/include/firewall/global-options.xml.i +++ b/interface-definitions/include/firewall/global-options.xml.i @@ -62,7 +62,7 @@ </completionHelp> <valueHelp> <format>arp</format> - <description>Adress Resolution Protocol (ARP)</description> + <description>Address Resolution Protocol (ARP)</description> </valueHelp> <valueHelp> <format>dhcp</format> @@ -371,7 +371,7 @@ </node> <leafNode name="twa-hazards-protection"> <properties> - <help>RFC1337 TCP TIME-WAIT assasination hazards protection</help> + <help>RFC1337 TCP TIME-WAIT assassination hazards protection</help> <completionHelp> <list>enable disable</list> </completionHelp> diff --git a/interface-definitions/include/firewall/match-ether-type.xml.i b/interface-definitions/include/firewall/match-ether-type.xml.i index abfa9034d..536e59bb3 100644 --- a/interface-definitions/include/firewall/match-ether-type.xml.i +++ b/interface-definitions/include/firewall/match-ether-type.xml.i @@ -15,7 +15,7 @@ </valueHelp> <valueHelp> <format>arp</format> - <description>Adress Resolution Protocol</description> + <description>Address Resolution Protocol</description> </valueHelp> <valueHelp> <format>_ipv4</format> diff --git a/interface-definitions/include/interface/arp-cache-timeout.xml.i b/interface-definitions/include/interface/arp-cache-timeout.xml.i index 06d7ffe96..f3cbac24d 100644 --- a/interface-definitions/include/interface/arp-cache-timeout.xml.i +++ b/interface-definitions/include/interface/arp-cache-timeout.xml.i @@ -4,7 +4,7 @@ <help>ARP cache entry timeout in seconds</help> <valueHelp> <format>u32:1-86400</format> - <description>ARP cache entry timout in seconds</description> + <description>ARP cache entry timeout in seconds</description> </valueHelp> <constraint> <validator name="numeric" argument="--range 1-86400"/> diff --git a/interface-definitions/include/interface/ipv6-dup-addr-detect-transmits.xml.i b/interface-definitions/include/interface/ipv6-dup-addr-detect-transmits.xml.i index 3b9294dd0..82bf52876 100644 --- a/interface-definitions/include/interface/ipv6-dup-addr-detect-transmits.xml.i +++ b/interface-definitions/include/interface/ipv6-dup-addr-detect-transmits.xml.i @@ -4,7 +4,7 @@ <help>Number of NS messages to send while performing DAD</help> <valueHelp> <format>u32:0</format> - <description>Disable Duplicate Address Dectection (DAD)</description> + <description>Disable Duplicate Address Detection (DAD)</description> </valueHelp> <valueHelp> <format>u32:1-n</format> diff --git a/interface-definitions/include/nat64/protocol.xml.i b/interface-definitions/include/nat64/protocol.xml.i index a640873b5..3905f8190 100644 --- a/interface-definitions/include/nat64/protocol.xml.i +++ b/interface-definitions/include/nat64/protocol.xml.i @@ -1,7 +1,7 @@ <!-- include start from nat64/protocol.xml.i --> <node name="protocol"> <properties> - <help>Apply translation address to a specfic protocol</help> + <help>Apply translation address to a specific protocol</help> </properties> <children> <leafNode name="tcp"> diff --git a/interface-definitions/include/ospf/default-information.xml.i b/interface-definitions/include/ospf/default-information.xml.i index 50cda54a4..dc44617f7 100644 --- a/interface-definitions/include/ospf/default-information.xml.i +++ b/interface-definitions/include/ospf/default-information.xml.i @@ -1,7 +1,7 @@ <!-- include start from ospf/intervals.xml.i --> <node name="default-information"> <properties> - <help>Default route advertisment settings</help> + <help>Default route advertisement settings</help> </properties> <children> <node name="originate"> diff --git a/interface-definitions/include/stunnel/protocol-value-cifs.xml.i b/interface-definitions/include/stunnel/protocol-value-cifs.xml.i index 5b9484750..12eae6584 100644 --- a/interface-definitions/include/stunnel/protocol-value-cifs.xml.i +++ b/interface-definitions/include/stunnel/protocol-value-cifs.xml.i @@ -1,6 +1,6 @@ <!-- include start from stunnel/protocol-value-cifs.xml.i --> <valueHelp> <format>cifs</format> - <description>Proprietary (undocummented) extension of CIFS protocol</description> + <description>Proprietary (undocumented) extension of CIFS protocol</description> </valueHelp> <!-- include end --> diff --git a/interface-definitions/include/vrrp/garp.xml.i b/interface-definitions/include/vrrp/garp.xml.i index b56b490df..54bb34572 100644 --- a/interface-definitions/include/vrrp/garp.xml.i +++ b/interface-definitions/include/vrrp/garp.xml.i @@ -32,7 +32,7 @@ </leafNode> <leafNode name="master-refresh"> <properties> - <help>Minimum time interval for refreshing gratuitous ARPs while beeing master</help> + <help>Minimum time interval for refreshing gratuitous ARPs while being master</help> <valueHelp> <format>u32:0</format> <description>No refresh</description> @@ -49,7 +49,7 @@ </leafNode> <leafNode name="master-refresh-repeat"> <properties> - <help>Number of gratuitous ARP messages to send at a time while beeing master</help> + <help>Number of gratuitous ARP messages to send at a time while being master</help> <valueHelp> <format>u32:1-255</format> <description>Number of gratuitous ARP messages</description> diff --git a/interface-definitions/interfaces_openvpn.xml.in b/interface-definitions/interfaces_openvpn.xml.in index 9ce05db9c..005d7c015 100644 --- a/interface-definitions/interfaces_openvpn.xml.in +++ b/interface-definitions/interfaces_openvpn.xml.in @@ -374,11 +374,11 @@ </valueHelp> <valueHelp> <format>_ipv4</format> - <description>Accept connections on or initate connections to IPv4 addresses only</description> + <description>Accept connections on or initiate connections to IPv4 addresses only</description> </valueHelp> <valueHelp> <format>_ipv6</format> - <description>Accept connections on or initate connections to IPv6 addresses only</description> + <description>Accept connections on or initiate connections to IPv6 addresses only</description> </valueHelp> <valueHelp> <format>dual-stack</format> @@ -811,7 +811,7 @@ </valueHelp> <valueHelp> <format>enable</format> - <description>Enable chalenge-response</description> + <description>Enable challenge-response</description> </valueHelp> <constraint> <regex>(disable|enable)</regex> diff --git a/interface-definitions/interfaces_tunnel.xml.in b/interface-definitions/interfaces_tunnel.xml.in index fe1dad371..74849be5d 100644 --- a/interface-definitions/interfaces_tunnel.xml.in +++ b/interface-definitions/interfaces_tunnel.xml.in @@ -158,7 +158,7 @@ <help>ERSPAN version 1 index field</help> <valueHelp> <format>u32:0-63</format> - <description>Platform-depedent field for specifying port number and direction</description> + <description>Platform-dependent field for specifying port number and direction</description> </valueHelp> <constraint> <validator name="numeric" argument="--range 0-63"/> diff --git a/interface-definitions/interfaces_virtual-ethernet.xml.in b/interface-definitions/interfaces_virtual-ethernet.xml.in index 2dfbd50b8..1559a6038 100644 --- a/interface-definitions/interfaces_virtual-ethernet.xml.in +++ b/interface-definitions/interfaces_virtual-ethernet.xml.in @@ -42,7 +42,7 @@ <constraint> <regex>veth[0-9]+</regex> </constraint> - <constraintErrorMessage>Virutal Ethernet interface must be named vethN</constraintErrorMessage> + <constraintErrorMessage>Virtual Ethernet interface must be named vethN</constraintErrorMessage> </properties> </leafNode> </children> diff --git a/interface-definitions/load-balancing_haproxy.xml.in b/interface-definitions/load-balancing_haproxy.xml.in index 163ffa869..f3baf86ca 100644 --- a/interface-definitions/load-balancing_haproxy.xml.in +++ b/interface-definitions/load-balancing_haproxy.xml.in @@ -295,7 +295,7 @@ </tagNode> <node name="global-parameters"> <properties> - <help>Global perfomance parameters and limits</help> + <help>Global performance parameters and limits</help> </properties> <children> #include <include/haproxy/logging.xml.i> diff --git a/interface-definitions/policy.xml.in b/interface-definitions/policy.xml.in index d2082fd7a..c93c55c03 100644 --- a/interface-definitions/policy.xml.in +++ b/interface-definitions/policy.xml.in @@ -1567,7 +1567,7 @@ </leafNode> <leafNode name="origin"> <properties> - <help>Border Gateway Protocl (BGP) origin code</help> + <help>Border Gateway Protocol (BGP) origin code</help> <completionHelp> <list>igp egp incomplete</list> </completionHelp> diff --git a/interface-definitions/protocols_igmp-proxy.xml.in b/interface-definitions/protocols_igmp-proxy.xml.in index 5cde484f5..a1deeb3fc 100644 --- a/interface-definitions/protocols_igmp-proxy.xml.in +++ b/interface-definitions/protocols_igmp-proxy.xml.in @@ -26,7 +26,7 @@ <children> <leafNode name="alt-subnet"> <properties> - <help>Unicast source networks allowed for multicast traffic to be proxyed</help> + <help>Unicast source networks allowed for multicast traffic to be proxied</help> <valueHelp> <format>ipv4net</format> <description>IPv4 network</description> diff --git a/interface-definitions/service_dns_dynamic.xml.in b/interface-definitions/service_dns_dynamic.xml.in index 75e5520b7..9f8f1a1b5 100644 --- a/interface-definitions/service_dns_dynamic.xml.in +++ b/interface-definitions/service_dns_dynamic.xml.in @@ -55,7 +55,7 @@ <help>Pattern to skip from the HTTP(S) respose</help> <valueHelp> <format>txt</format> - <description>Pattern to skip from the HTTP(S) respose to extract the external IP address</description> + <description>Pattern to skip from the HTTP(S) response to extract the external IP address</description> </valueHelp> </properties> </leafNode> diff --git a/interface-definitions/service_monitoring_telegraf.xml.in b/interface-definitions/service_monitoring_telegraf.xml.in index 2ac0d940e..1ea2a23dd 100644 --- a/interface-definitions/service_monitoring_telegraf.xml.in +++ b/interface-definitions/service_monitoring_telegraf.xml.in @@ -124,7 +124,7 @@ </valueHelp> <valueHelp> <format>table-per-metric</format> - <description>One table per gorups of metric by the metric name</description> + <description>One table per groups of metric by the metric name</description> </valueHelp> <constraint> <regex>(single-table|table-per-metric)</regex> diff --git a/interface-definitions/service_router-advert.xml.in b/interface-definitions/service_router-advert.xml.in index 878b53e78..31ed503d5 100644 --- a/interface-definitions/service_router-advert.xml.in +++ b/interface-definitions/service_router-advert.xml.in @@ -49,7 +49,7 @@ <constraint> <validator name="numeric" argument="--range 0-0 --range 4-9000"/> </constraint> - <constraintErrorMessage>Default router livetime bust be 0 or between 4 and 9000</constraintErrorMessage> + <constraintErrorMessage>Default router lifetime must be 0 or between 4 and 9000</constraintErrorMessage> </properties> </leafNode> <leafNode name="default-preference"> @@ -85,7 +85,7 @@ </leafNode> <leafNode name="link-mtu"> <properties> - <help>Link MTU value placed in RAs, exluded in RAs if unset</help> + <help>Link MTU value placed in RAs, excluded in RAs if unset</help> <valueHelp> <format>u32:1280-9000</format> <description>Link MTU value in RAs</description> diff --git a/interface-definitions/system_option.xml.in b/interface-definitions/system_option.xml.in index e6a2b0b65..4f9103e56 100644 --- a/interface-definitions/system_option.xml.in +++ b/interface-definitions/system_option.xml.in @@ -415,7 +415,7 @@ </leafNode> <leafNode name="root-partition-auto-resize"> <properties> - <help>Enable root partition auto-extention on system boot</help> + <help>Enable root partition auto-extension on system boot</help> <valueless/> </properties> </leafNode> diff --git a/interface-definitions/system_static-host-mapping.xml.in b/interface-definitions/system_static-host-mapping.xml.in index 492741f11..2e72b97ec 100644 --- a/interface-definitions/system_static-host-mapping.xml.in +++ b/interface-definitions/system_static-host-mapping.xml.in @@ -23,7 +23,7 @@ <constraint> <regex>.{1,63}</regex> </constraint> - <constraintErrorMessage>invalid alias hostname, needs to be between 1 and 63 charactes</constraintErrorMessage> + <constraintErrorMessage>invalid alias hostname, needs to be between 1 and 63 characters</constraintErrorMessage> <multi /> </properties> </leafNode> diff --git a/interface-definitions/vpn_ipsec.xml.in b/interface-definitions/vpn_ipsec.xml.in index ffdfeaedf..3e3bece61 100644 --- a/interface-definitions/vpn_ipsec.xml.in +++ b/interface-definitions/vpn_ipsec.xml.in @@ -1223,7 +1223,7 @@ </leafNode> <leafNode name="default-esp-group"> <properties> - <help>Defult ESP group name</help> + <help>Default ESP group name</help> <completionHelp> <path>vpn ipsec esp-group</path> </completionHelp> @@ -1246,11 +1246,11 @@ </completionHelp> <valueHelp> <format>yes</format> - <description>Enable remote host re-autentication during an IKE re-key. Currently broken due to a strong swan bug</description> + <description>Enable remote host re-authentication during an IKE re-key. Currently broken due to a strong swan bug</description> </valueHelp> <valueHelp> <format>no</format> - <description>Disable remote host re-authenticaton during an IKE re-key.</description> + <description>Disable remote host re-authentication during an IKE re-key.</description> </valueHelp> <valueHelp> <format>inherit</format> diff --git a/interface-definitions/vpn_openconnect.xml.in b/interface-definitions/vpn_openconnect.xml.in index 13e5142fd..fc90e5865 100644 --- a/interface-definitions/vpn_openconnect.xml.in +++ b/interface-definitions/vpn_openconnect.xml.in @@ -65,7 +65,7 @@ </leafNode> <leafNode name="radius"> <properties> - <help>Use RADIUS server for user autentication</help> + <help>Use RADIUS server for user authentication</help> <valueless/> </properties> </leafNode> @@ -247,7 +247,7 @@ #include <include/radius-timeout.xml.i> <leafNode name="groupconfig"> <properties> - <help>If the groupconfig option is set, then config-per-user will be overriden, and all configuration will be read from RADIUS.</help> + <help>If the groupconfig option is set, then config-per-user will be overridden, and all configuration will be read from RADIUS.</help> </properties> </leafNode> </children> diff --git a/op-mode-definitions/generate-openvpn-config-client.xml.in b/op-mode-definitions/generate-openvpn-config-client.xml.in index 351742f1e..e91b67933 100644 --- a/op-mode-definitions/generate-openvpn-config-client.xml.in +++ b/op-mode-definitions/generate-openvpn-config-client.xml.in @@ -30,7 +30,7 @@ <children> <tagNode name="certificate"> <properties> - <help>Cerificate used by client</help> + <help>Certificate used by client</help> <completionHelp> <path>pki certificate</path> </completionHelp> diff --git a/op-mode-definitions/monitor-protocol.xml.in b/op-mode-definitions/monitor-protocol.xml.in index fec30c8a5..7c32ca335 100644 --- a/op-mode-definitions/monitor-protocol.xml.in +++ b/op-mode-definitions/monitor-protocol.xml.in @@ -701,7 +701,7 @@ </node> <node name="lsa"> <properties> - <help>Disable OSPFv3 Link State Advertisments debugging</help> + <help>Disable OSPFv3 Link State Advertisements debugging</help> </properties> <command>vtysh -c "no debug ospf6 ${@:5}"</command> <children> @@ -956,7 +956,7 @@ </node> <node name="lsa"> <properties> - <help>Enable OSPFv3 Link State Advertisments debugging</help> + <help>Enable OSPFv3 Link State Advertisements debugging</help> </properties> <command>vtysh -c "debug ospf6 ${@:5}"</command> <children> diff --git a/op-mode-definitions/show-hardware.xml.in b/op-mode-definitions/show-hardware.xml.in index f7803df9a..84ecd8559 100644 --- a/op-mode-definitions/show-hardware.xml.in +++ b/op-mode-definitions/show-hardware.xml.in @@ -9,7 +9,7 @@ <children> <node name="cpu"> <properties> - <help>Show CPU informaion</help> + <help>Show CPU information</help> </properties> <command>${vyos_op_scripts_dir}/cpu.py show</command> <children> diff --git a/python/vyos/accel_ppp_util.py b/python/vyos/accel_ppp_util.py index 85e8a964c..844bc56e5 100644 --- a/python/vyos/accel_ppp_util.py +++ b/python/vyos/accel_ppp_util.py @@ -130,7 +130,7 @@ def verify_accel_ppp_authentication(config, local_users=True): Common helper function which must be used by all Accel-PPP services based on get_config_dict() """ - # vertify auth settings + # verify auth settings if local_users and dict_search("authentication.mode", config) == "local": if ( dict_search("authentication.local_users", config) is None @@ -173,7 +173,7 @@ def verify_accel_ppp_authentication(config, local_users=True): user_config = config["authentication"]["interface"][interface] if "mac" not in user_config: raise ConfigError( - f'Users MAC addreses are not configured for interface "{interface}"') + f'Users MAC addresses are not configured for interface "{interface}"') if dict_search('authentication.radius.dynamic_author.server', config): if not dict_search('authentication.radius.dynamic_author.key', config): diff --git a/python/vyos/config.py b/python/vyos/config.py index 0476d7945..827246d05 100644 --- a/python/vyos/config.py +++ b/python/vyos/config.py @@ -53,7 +53,7 @@ VyOS has two distinct modes: operational mode and configuration mode. When a use the CLI is in the operational mode. In this mode, only the running (effective) config is accessible for reading. When a user enters the "configure" command, a configuration session is setup. Every config session -has its *proposed* (or *session*) config built on top of the current running config. When changes are commited, if commit succeeds, +has its *proposed* (or *session*) config built on top of the current running config. When changes are committed, if commit succeeds, the proposed config is merged into the running config. In configuration mode, "base" functions like `exists`, `return_value` return values from the session config, @@ -259,7 +259,7 @@ class Config(object): def session_changed(self): """ Returns: - True if the config session has uncommited changes, False otherwise. + True if the config session has uncommitted changes, False otherwise. """ return self._config_source.session_changed() @@ -544,7 +544,7 @@ class Config(object): Note: This function is safe to use in operational mode. In configuration mode, - it ignores uncommited changes. + it ignores uncommitted changes. """ if self._running_config is None: return False diff --git a/python/vyos/config_mgmt.py b/python/vyos/config_mgmt.py index ec29f82b7..e1e38b26f 100644 --- a/python/vyos/config_mgmt.py +++ b/python/vyos/config_mgmt.py @@ -841,7 +841,7 @@ def run(): rollback = subparsers.add_parser('rollback', help='Rollback to earlier config') rollback.add_argument('--rev', type=int, help='Revision number for rollback') rollback.add_argument( - '-y', dest='no_prompt', action='store_true', help='Excute without prompt' + '-y', dest='no_prompt', action='store_true', help='Execute without prompt' ) rollback_soft = subparsers.add_parser( diff --git a/python/vyos/configdep.py b/python/vyos/configdep.py index 04de66493..f1dd7895a 100644 --- a/python/vyos/configdep.py +++ b/python/vyos/configdep.py @@ -186,7 +186,7 @@ def graph_from_dependency_dict(d: dict) -> dict: for k in list(d): g[k] = set() # add the dependencies for every sub-case; should there be cases - # that are mutally exclusive in the future, the graphs will be + # that are mutually exclusive in the future, the graphs will be # distinguished for el in list(d[k]): g[k] |= set(d[k][el]) diff --git a/python/vyos/configdict.py b/python/vyos/configdict.py index b16c3cf1d..0603b42b8 100644 --- a/python/vyos/configdict.py +++ b/python/vyos/configdict.py @@ -430,7 +430,7 @@ def get_interface_dict(config, base, ifname='', recursive_defaults=True, with_pk """ Common utility function to retrieve and mangle the interfaces configuration from the CLI input nodes. All interfaces have a common base where value - retrival is identical. This function must be used whenever possible when + retrieval is identical. This function must be used whenever possible when working on the interfaces node! Return a dictionary with the necessary interface config keys. @@ -489,14 +489,14 @@ def get_interface_dict(config, base, ifname='', recursive_defaults=True, with_pk bond = is_member(config, ifname, 'bonding') if bond: dict.update({'is_bond_member' : bond}) - # Check if any DHCP options changed which require a client restat + # Check if any DHCP options changed which require a client restart dhcp = is_node_changed(config, base + [ifname, 'dhcp-options']) if dhcp: dict.update({'dhcp_options_changed' : {}}) dhcpv6 = is_node_changed(config, base + [ifname, 'dhcpv6-options']) if dhcpv6: dict.update({'dhcpv6_options_changed' : {}}) # Some interfaces come with a source_interface which must also not be part - # of any other bond or bridge interface as it is exclusivly assigned as the + # of any other bond or bridge interface as it is exclusively assigned as the # Kernels "lower" interface to this new "virtual/upper" interface. if 'source_interface' in dict: # Check if source interface is member of another bridge @@ -666,7 +666,7 @@ def get_accel_dict(config, base, chap_secrets, with_pki=False): """ Common utility function to retrieve and mangle the Accel-PPP configuration from different CLI input nodes. All Accel-PPP services have a common base - where value retrival is identical. This function must be used whenever + where value retrieval is identical. This function must be used whenever possible when working with Accel-PPP services! Return a dictionary with the necessary interface config keys. diff --git a/python/vyos/configdiff.py b/python/vyos/configdiff.py index 5e21a16e5..b7c3ef7c6 100644 --- a/python/vyos/configdiff.py +++ b/python/vyos/configdiff.py @@ -263,7 +263,7 @@ class ConfigDiff(object): to provide full dict; for example, Diff.MERGE will expand dict['merge'] into dict under value - no_detaults=False: if expand_nodes & Diff.MERGE, do not merge default + no_defaults=False: if expand_nodes & Diff.MERGE, do not merge default values to ret['merge'] recursive: if true, use config_tree diff algorithm provided by diff_tree class @@ -343,7 +343,7 @@ class ConfigDiff(object): to provide full dict; for example, Diff.MERGE will expand dict['merge'] into dict under value - no_detaults=False: if expand_nodes & Diff.MERGE, do not merge default + no_defaults=False: if expand_nodes & Diff.MERGE, do not merge default values to ret['merge'] recursive: if true, use config_tree diff algorithm provided by diff_tree class diff --git a/python/vyos/configsession.py b/python/vyos/configsession.py index 62ce34b22..8fee8eca1 100644 --- a/python/vyos/configsession.py +++ b/python/vyos/configsession.py @@ -219,7 +219,7 @@ class ConfigSession(object): ) if output: print( - 'cli-shell-api teardownSession output for sesion {0}: {1}'.format( + 'cli-shell-api teardownSession output for session {0}: {1}'.format( self.__session_id, output ), file=sys.stderr, diff --git a/python/vyos/configsource.py b/python/vyos/configsource.py index 33852a182..b54f6283a 100644 --- a/python/vyos/configsource.py +++ b/python/vyos/configsource.py @@ -51,7 +51,7 @@ class ConfigSource: def session_changed(self): """ Returns: - True if the config session has uncommited changes, False otherwise. + True if the config session has uncommitted changes, False otherwise. """ raise NotImplementedError(f"function not available for {type(self)}") @@ -198,7 +198,7 @@ class ConfigSourceSession(ConfigSource): def session_changed(self): """ Returns: - True if the config session has uncommited changes, False otherwise. + True if the config session has uncommitted changes, False otherwise. """ try: self._run(self._make_command('sessionChanged', '')) @@ -245,7 +245,7 @@ class ConfigSourceSession(ConfigSource): # FIXUP: by default, showConfig will give you a diff # if there are uncommitted changes. # The config parser obviously cannot work with diffs, - # so we need to supress diff production using appropriate + # so we need to suppress diff production using appropriate # options for getting either running (active) # or proposed (working) config. if effective: @@ -364,7 +364,7 @@ class ConfigSourceVyconfSession(ConfigSource): def session_changed(self): """ Returns: - True if the config session has uncommited changes, False otherwise. + True if the config session has uncommitted changes, False otherwise. """ try: return self._vyconf_session.session_changed() diff --git a/python/vyos/configtree.py b/python/vyos/configtree.py index afe1d7fe4..61ef6428c 100644 --- a/python/vyos/configtree.py +++ b/python/vyos/configtree.py @@ -282,8 +282,8 @@ class ConfigTree(object): """Set new entry in VyOS configuration. path: configuration path e.g. 'system dns forwarding listen-address' value: value to be added to node, e.g. '172.18.254.201' - replace: True: current occurance will be replaced - False: new value will be appended to current occurances - use + replace: True: current occurrence will be replaced + False: new value will be appended to current occurrences - use this for adding values to a multi node """ diff --git a/python/vyos/configverify.py b/python/vyos/configverify.py index 6e2fd1618..00cde7cdf 100644 --- a/python/vyos/configverify.py +++ b/python/vyos/configverify.py @@ -33,7 +33,7 @@ dynamic_interface_pattern = r'(ppp|pppoe|sstpc|l2tp|ipoe)[0-9]+' def verify_mtu(config): """ Common helper function used by interface implementations to perform - recurring validation if the specified MTU can be used by the underlaying + recurring validation if the specified MTU can be used by the underlying hardware. """ from vyos.ifconfig import Interface @@ -456,7 +456,7 @@ def verify_common_route_maps(config): # XXX: This function is called in combination with a previous call to: # tmp = conf.get_config_dict(['policy']) - see protocols_ospf.py as example. # We should NOT call this with the key_mangling option as this would rename - # route-map hypens '-' to underscores '_' and one could no longer distinguish + # route-map hyphens '-' to underscores '_' and one could no longer distinguish # what should have been the "proper" route-map name, as foo-bar and foo_bar # are two entire different route-map instances! for route_map in ['route-map', 'route_map']: diff --git a/python/vyos/debug.py b/python/vyos/debug.py index 1a6924ef5..3b71693ab 100644 --- a/python/vyos/debug.py +++ b/python/vyos/debug.py @@ -64,7 +64,7 @@ def enabled(flag): - command: print command run with result Having the flag setup on the filesystem is required to have - debuging at boot time, however, setting the flag via environment + debugging at boot time, however, setting the flag via environment does not require a seek to the filesystem and is more efficient it can be done on the shell on via .bashrc for the user diff --git a/python/vyos/defaults.py b/python/vyos/defaults.py index c584ddd77..6aa93ebed 100644 --- a/python/vyos/defaults.py +++ b/python/vyos/defaults.py @@ -52,7 +52,7 @@ systemd_services = { } internal_ports = { - 'certbot_haproxy' : 65080, # Certbot running behing haproxy + 'certbot_haproxy' : 65080, # Certbot running behind haproxy } config_files = { diff --git a/python/vyos/ethtool.py b/python/vyos/ethtool.py index ea3ed0b7c..79db25324 100644 --- a/python/vyos/ethtool.py +++ b/python/vyos/ethtool.py @@ -34,9 +34,9 @@ _drivers_without_bonding_support = _drivers_without_mac_change + [] class Ethtool: """ - Class is used to retrive and cache information about an ethernet adapter + Class is used to retrieve and cache information about an ethernet adapter """ - # dictionary containing driver featurs, it will be populated on demand and + # dictionary containing driver features, it will be populated on demand and # the content will look like: # [{'esp-hw-offload': {'active': False, 'fixed': True, 'requested': False}, # 'esp-tx-csum-hw-offload': {'active': False, @@ -79,7 +79,7 @@ class Ethtool: if driver: self._driver_name = driver.group(1) - # Build a dictinary of supported link-speed and dupley settings. + # Build a dictionary of supported link-speed and dupley settings. # [ { # "ifname": "eth0", # "supported-ports": [ "TP" ], @@ -187,7 +187,7 @@ class Ethtool: def check_speed_duplex(self, speed, duplex): """ Check if the passed speed and duplex combination is supported by - the underlaying network adapter. """ + the underlying network adapter. """ if isinstance(speed, int): speed = str(speed) if speed != 'auto' and not speed.isdigit(): diff --git a/python/vyos/frrender.py b/python/vyos/frrender.py index 1aed31f96..ff69f8266 100644 --- a/python/vyos/frrender.py +++ b/python/vyos/frrender.py @@ -14,7 +14,7 @@ # along with this library. If not, see <http://www.gnu.org/licenses/>. """ -Helper class attached to vyos-configd to interfact between our CLI configuration +Helper class attached to vyos-configd to interact between our CLI configuration and FRR. Class will render one full FRR configuration and apply this via frr-reload.py, if the configuration has no errors. @@ -102,7 +102,7 @@ def get_frrender_dict(conf: Config, argv=None) -> dict: def dict_helper_ospf_defaults(ospf, path): # We have gathered the dict representation of the CLI, but there are default - # options which we need to update into the dictionary retrived. + # options which we need to update into the dictionary retrieved. default_values = conf.get_config_defaults(path, key_mangling=('-', '_'), get_first_key=True, recursive=True) @@ -140,7 +140,7 @@ def get_frrender_dict(conf: Config, argv=None) -> dict: def dict_helper_ospfv3_defaults(ospfv3, path): # We have gathered the dict representation of the CLI, but there are default - # options which we need to update into the dictionary retrived. + # options which we need to update into the dictionary retrieved. default_values = conf.get_config_defaults(path, key_mangling=('-', '_'), get_first_key=True, recursive=True) @@ -168,7 +168,7 @@ def get_frrender_dict(conf: Config, argv=None) -> dict: def dict_helper_pim_defaults(pim, path): # We have gathered the dict representation of the CLI, but there are default - # options which we need to update into the dictionary retrived. + # options which we need to update into the dictionary retrieved. default_values = conf.get_config_defaults(path, key_mangling=('-', '_'), get_first_key=True, recursive=True) @@ -510,7 +510,7 @@ def get_frrender_dict(conf: Config, argv=None) -> dict: bgp_vrf_path = ['vrf', 'name', vrf_name, 'protocols', 'bgp'] if 'bgp' in vrf_config.get('protocols', []): # We have gathered the dict representation of the CLI, but there are default - # options which we need to update into the dictionary retrived. + # options which we need to update into the dictionary retrieved. default_values = conf.get_config_defaults(bgp_vrf_path, key_mangling=('-', '_'), get_first_key=True, recursive=True) @@ -818,7 +818,7 @@ class FRRender: output += inline_helper(vrf_config['protocols']) - # remove any accidently added empty newline to not confuse FRR + # remove any accidentally added empty newline to not confuse FRR output = os.linesep.join([s for s in output.splitlines() if s]) if '!!' in output: diff --git a/python/vyos/ifconfig/bond.py b/python/vyos/ifconfig/bond.py index ea38b9c42..ace84c6f2 100644 --- a/python/vyos/ifconfig/bond.py +++ b/python/vyos/ifconfig/bond.py @@ -405,9 +405,9 @@ class BondIf(Interface): return self.set_interface('bond_system_mac', mac) def update(self, config): - """ General helper function which works on a dictionary retrived by + """ General helper function which works on a dictionary retrieved by get_config_dict(). It's main intention is to consolidate the scattered - interface setup code and provide a single point of entry when workin + interface setup code and provide a single point of entry when working on any interface. """ # Use ref-counting function to place an interface into admin down state. @@ -435,7 +435,7 @@ class BondIf(Interface): # administratively down # # We can not move the upper "shutdown_required" code path here - as this - # would break initial bond creation and inital mode assignment during + # would break initial bond creation and initial mode assignment during # interface creation! if self.get_admin_state() == 'down': # Bonding policy/mode - default value, always present @@ -460,10 +460,10 @@ class BondIf(Interface): # result in the following exception: OSError: [Errno 22] Invalid argument. # # We remove ALL addresses prior to adding new ones, this will remove - # addresses manually added by the user too - but as we are limited to 16 adresses + # addresses manually added by the user too - but as we are limited to 16 addresses # from the kernel side this looks valid to me. We won't run into an error - # when a user added manual adresses which would result in having more - # then 16 adresses in total. + # when a user added manual addresses which would result in having more + # then 16 addresses in total. arp_tgt_addr = list(map(str, self.get_arp_ip_target().split())) for addr in arp_tgt_addr: self.set_arp_ip_target('-' + addr) @@ -503,7 +503,7 @@ class BondIf(Interface): self.set_mac(tmp_if.get_mac()) is_first = False - # Assign underlaying interface to logical bond + # Assign underlying interface to logical bond self.add_port(interface) bond_members.append(interface) diff --git a/python/vyos/ifconfig/bridge.py b/python/vyos/ifconfig/bridge.py index ba06e3757..6b5f49778 100644 --- a/python/vyos/ifconfig/bridge.py +++ b/python/vyos/ifconfig/bridge.py @@ -273,9 +273,9 @@ class BridgeIf(Interface): return self.set_interface('vlan_protocol', map[protocol]) def update(self, config): - """ General helper function which works on a dictionary retrived by + """ General helper function which works on a dictionary retrieved by get_config_dict(). It's main intention is to consolidate the scattered - interface setup code and provide a single point of entry when workin + interface setup code and provide a single point of entry when working on any interface. """ # Set ageing time diff --git a/python/vyos/ifconfig/control.py b/python/vyos/ifconfig/control.py index 3cf3297b4..1ef42f981 100644 --- a/python/vyos/ifconfig/control.py +++ b/python/vyos/ifconfig/control.py @@ -33,13 +33,13 @@ class Control(Section): ifname = None def __init__(self, **kargs): - # some commands (such as operation comands - show interfaces, etc.) + # some commands (such as operation commands - show interfaces, etc.) # need to query the interface statistics. If the interface # code is used and the debugging is enabled, the screen output # will include both the command but also the debugging for that command - # to prevent this, debugging can be explicitely disabled + # to prevent this, debugging can be explicitly disabled - # if debug is not explicitely disabled the the config, enable it + # if debug is not explicitly disabled the the config, enable it self.debug = '' if kargs.get('debug', True) and debug.enabled('ifconfig'): self.debug = 'ifconfig' diff --git a/python/vyos/ifconfig/ethernet.py b/python/vyos/ifconfig/ethernet.py index fb29c018c..c70190e38 100644 --- a/python/vyos/ifconfig/ethernet.py +++ b/python/vyos/ifconfig/ethernet.py @@ -244,7 +244,7 @@ class EthernetIf(Interface): cmd += f' speed {speed} duplex {duplex} autoneg off' return self._cmd(cmd) except PermissionError: - # Some NICs do not tell that they don't suppport settings speed/duplex, + # Some NICs do not tell that they don't support settings speed/duplex, # but they do not actually support it either. # In that case it's probably better to ignore the error # than end up with a broken config. @@ -450,7 +450,7 @@ class EthernetIf(Interface): cmd = f'ethtool --set-ring {ifname} {rx_tx} {size}' output, code = self._popen(cmd) # ethtool error codes: - # 80 - value already setted + # 80 - value already set # 81 - does not possible to set value if code and code != 80: print(f'could not set "{rx_tx}" ring-buffer for {ifname}') @@ -550,9 +550,9 @@ class EthernetIf(Interface): self._cmd(f'/sbin/devlink dev eswitch set pci/{addr} mode legacy') def update(self, config): - """General helper function which works on a dictionary retrived by + """General helper function which works on a dictionary retrieved by get_config_dict(). It's main intention is to consolidate the scattered - interface setup code and provide a single point of entry when workin + interface setup code and provide a single point of entry when working on any interface.""" # disable ethernet flow control (pause frames) diff --git a/python/vyos/ifconfig/interface.py b/python/vyos/ifconfig/interface.py index c49f497fc..febd68f44 100644 --- a/python/vyos/ifconfig/interface.py +++ b/python/vyos/ifconfig/interface.py @@ -498,7 +498,7 @@ class Interface(Control): def get_mac(self): """ - Get current interface MAC (Media Access Contrl) address used. + Get current interface MAC (Media Access Control) address used. Example: >>> from vyos.ifconfig import Interface @@ -554,7 +554,7 @@ class Interface(Control): def set_mac(self, mac): """ - Set interface MAC (Media Access Contrl) address to given value. + Set interface MAC (Media Access Control) address to given value. Example: >>> from vyos.ifconfig import Interface @@ -572,7 +572,7 @@ class Interface(Control): self.set_interface('mac', mac) - # Turn an interface to the 'up' state if it was changed to 'down' by this fucntion + # Turn an interface to the 'up' state if it was changed to 'down' by this function if prev_state == 'up': self.set_admin_state('up') @@ -1528,7 +1528,7 @@ class Interface(Control): render(systemd_override_file, 'dhcp-client/override.conf.j2', self.config) render(dhclient_config_file, 'dhcp-client/ipv4.j2', self.config) - # Reload systemd unit definitons as some options are dynamically generated + # Reload systemd unit definitions as some options are dynamically generated self._cmd('systemctl daemon-reload') # When the DHCP client is restarted a brief outage will occur, as @@ -1543,7 +1543,7 @@ class Interface(Control): if is_systemd_service_active(systemd_service): self._cmd(f'systemctl stop {systemd_service}') - # Smoketests occationally fail if the lease is not removed from the Kernel fast enough: + # Smoketests occasionally fail if the lease is not removed from the Kernel fast enough: # AssertionError: 2 unexpectedly found in {17: [{'addr': '52:54:00:00:00:00', # 'broadcast': 'ff:ff:ff:ff:ff:ff'}], 2: [{'addr': '192.0.2.103', 'netmask': '255.255.255.0', # @@ -1587,7 +1587,7 @@ class Interface(Control): render(config_file, 'dhcp-client/ipv6.j2', config) render(script_file, 'dhcp-client/dhcp6c-script.j2', config, permission=0o755) - # Reload systemd unit definitons as some options are dynamically generated + # Reload systemd unit definitions as some options are dynamically generated self._cmd('systemctl daemon-reload') # We must ignore any return codes. This is required to enable @@ -1610,7 +1610,7 @@ class Interface(Control): # Please refer to the document for details # - https://man7.org/linux/man-pages/man8/tc.8.html # - https://man7.org/linux/man-pages/man8/tc-mirred.8.html - # Depening if we are the source or the target interface of the port + # Depending if we are the source or the target interface of the port # mirror we need to setup some variables. # Don't allow for netns yet @@ -1744,9 +1744,9 @@ class Interface(Control): os.unlink(wpa_supplicant_conf) def update(self, config): - """ General helper function which works on a dictionary retrived by + """ General helper function which works on a dictionary retrieved by get_config_dict(). It's main intention is to consolidate the scattered - interface setup code and provide a single point of entry when workin + interface setup code and provide a single point of entry when working on any interface. """ if self.debug: diff --git a/python/vyos/ifconfig/loopback.py b/python/vyos/ifconfig/loopback.py index f4fc2c906..e2cf69a15 100644 --- a/python/vyos/ifconfig/loopback.py +++ b/python/vyos/ifconfig/loopback.py @@ -56,9 +56,9 @@ class LoopbackIf(Interface): self.del_addr(addr) def update(self, config): - """ General helper function which works on a dictionary retrived by + """ General helper function which works on a dictionary retrieved by get_config_dict(). It's main intention is to consolidate the scattered - interface setup code and provide a single point of entry when workin + interface setup code and provide a single point of entry when working on any interface. """ address = config.get('address', []) diff --git a/python/vyos/ifconfig/tunnel.py b/python/vyos/ifconfig/tunnel.py index f96364161..eb8fcdd1f 100644 --- a/python/vyos/ifconfig/tunnel.py +++ b/python/vyos/ifconfig/tunnel.py @@ -161,7 +161,7 @@ class TunnelIf(Interface): return self.set_interface('multicast', enable) def update(self, config): - """ General helper function which works on a dictionary retrived by + """ General helper function which works on a dictionary retrieved by get_config_dict(). It's main intention is to consolidate the scattered interface setup code and provide a single point of entry when workin on any interface. """ diff --git a/python/vyos/ifconfig/vxlan.py b/python/vyos/ifconfig/vxlan.py index 0f55acf10..974a53566 100644 --- a/python/vyos/ifconfig/vxlan.py +++ b/python/vyos/ifconfig/vxlan.py @@ -190,9 +190,9 @@ class VXLANIf(Interface): self._cmd(f'bridge vni add dev {self.ifname} vni {vni}') def update(self, config): - """ General helper function which works on a dictionary retrived by + """ General helper function which works on a dictionary retrieved by get_config_dict(). It's main intention is to consolidate the scattered - interface setup code and provide a single point of entry when workin + interface setup code and provide a single point of entry when working on any interface. """ # call base class last diff --git a/python/vyos/ifconfig/wireguard.py b/python/vyos/ifconfig/wireguard.py index c4e70056c..fb576bac0 100644 --- a/python/vyos/ifconfig/wireguard.py +++ b/python/vyos/ifconfig/wireguard.py @@ -266,9 +266,9 @@ class WireGuardIf(Interface): return public_keys def update(self, config): - """General helper function which works on a dictionary retrived by + """General helper function which works on a dictionary retrieved by get_config_dict(). It's main intention is to consolidate the scattered - interface setup code and provide a single point of entry when workin + interface setup code and provide a single point of entry when working on any interface.""" # Wireguard base command is identical for every peer diff --git a/python/vyos/ifconfig/wireless.py b/python/vyos/ifconfig/wireless.py index 69fd87347..1026fcd57 100644 --- a/python/vyos/ifconfig/wireless.py +++ b/python/vyos/ifconfig/wireless.py @@ -42,9 +42,9 @@ class WiFiIf(Interface): self._cmd(cmd) def update(self, config): - """ General helper function which works on a dictionary retrived by + """ General helper function which works on a dictionary retrieved by get_config_dict(). It's main intention is to consolidate the scattered - interface setup code and provide a single point of entry when workin + interface setup code and provide a single point of entry when working on any interface. """ # We can not call add_to_bridge() until wpa_supplicant is running, thus diff --git a/python/vyos/ipsec.py b/python/vyos/ipsec.py index 81f3d0812..0d03f8cf9 100644 --- a/python/vyos/ipsec.py +++ b/python/vyos/ipsec.py @@ -65,7 +65,7 @@ def get_vici_sas_by_name(ike_name: str, tunnel: str) -> list: Find installed SAs by IKE_SA name and/or CHILD_SA name and return list with SASs info. If tunnel is not None return a list contained only - CHILD_SAs wich names equal tunnel value. + CHILD_SAs which names equal tunnel value. :param ike_name: IKE SA name :type ike_name: str :param tunnel: CHILD SA name diff --git a/python/vyos/kea.py b/python/vyos/kea.py index a8b38d999..c950a0d67 100644 --- a/python/vyos/kea.py +++ b/python/vyos/kea.py @@ -79,7 +79,7 @@ def _format_hex_string(in_str): def _find_list_of_dict_index(lst, key='ip', value=''): """ Find the index entry of list of dict matching the dict value - Exampe: + Example: % lst = [{'ip': '192.0.2.1'}, {'ip': '192.0.2.2'}] % _find_list_of_dict_index(lst, key='ip', value='192.0.2.2') % 1 @@ -658,7 +658,7 @@ def kea_get_server_leases(config, inet, vrf_name, pools=[], state=[], origin=Non now = datetime.now(timezone.utc) if lease['valid-lft'] > 0 and lease['expire_time'] > now: - # substraction gives us a timedelta object which can't be formatted + # subtraction gives us a timedelta object which can't be formatted # with strftime so we use str(), split gets rid of the microseconds data_lease['remaining'] = str(lease['expire_time'] - now).split('.')[0] diff --git a/python/vyos/system/compat.py b/python/vyos/system/compat.py index 23a34d38a..f4a50b237 100644 --- a/python/vyos/system/compat.py +++ b/python/vyos/system/compat.py @@ -179,7 +179,7 @@ def prune_vyos_versions(root_dir: str = '') -> None: def update_cfg_ver(root_dir:str = '') -> int: - """Get minumum version of image-tools across all installed images + """Get minimum version of image-tools across all installed images Args: root_dir (str): an optional path to the root directory diff --git a/python/vyos/system/disk.py b/python/vyos/system/disk.py index 268a3b195..7ae9a15bb 100644 --- a/python/vyos/system/disk.py +++ b/python/vyos/system/disk.py @@ -50,7 +50,7 @@ def find_persistence() -> str: """Find a mountpoint for persistence storage Returns: - str: Path where 'persistance' pertition is mounted, Empty if not found + str: Path where 'persistence' pertition is mounted, Empty if not found """ mounted_partitions = disk_partitions() for partition in mounted_partitions: @@ -77,7 +77,7 @@ def parttable_create(drive_path: str, root_size: int) -> None: -n3:0:+{root_size_text}K -t3:8300 {drive_path}' run(command) - # update partitons in kernel + # update partitions in kernel sync() run(f'partx -u {drive_path}') diff --git a/python/vyos/utils/assertion.py b/python/vyos/utils/assertion.py index aa0614743..35baa556b 100644 --- a/python/vyos/utils/assertion.py +++ b/python/vyos/utils/assertion.py @@ -57,7 +57,7 @@ def assert_mac(m, test_all_zero=True): split = m.split(':') size = len(split) - # a mac address consits out of 6 octets + # a mac address consists out of 6 octets if size != 6: raise ValueError(f'wrong number of MAC octets ({size}): {m}') diff --git a/python/vyos/utils/auth.py b/python/vyos/utils/auth.py index f9551419f..7123bd0a5 100644 --- a/python/vyos/utils/auth.py +++ b/python/vyos/utils/auth.py @@ -28,7 +28,7 @@ from vyos.utils.process import cmd # Minimum UID used when adding system users MIN_USER_UID: int = 1000 -# Maximim UID used when adding system users +# Maximum UID used when adding system users MAX_USER_UID: int = 59999 # List of local user accounts that must be preserved SYSTEM_USER_SKIP_LIST: frozenset = { diff --git a/python/vyos/utils/dict.py b/python/vyos/utils/dict.py index 5d41900b6..3fcda902f 100644 --- a/python/vyos/utils/dict.py +++ b/python/vyos/utils/dict.py @@ -187,7 +187,7 @@ def dict_search_args(dict_object, *path): return dict_object def dict_search_recursive(dict_object, key, path=[]): - """ Traverse a dictionary recurisvely and return the value of the key + """ Traverse a dictionary recursively and return the value of the key we are looking for. Thankfully copied from https://stackoverflow.com/a/19871956 @@ -380,7 +380,7 @@ def check_mutually_exclusive_options(d, keys, required=False): class FixedDict(dict): """ - FixedDict: A dictionnary not allowing new keys to be created after initialisation. + FixedDict: A dictionary not allowing new keys to be created after initialisation. >>> f = FixedDict(**{'count':1}) >>> f['count'] = 2 diff --git a/python/vyos/utils/network.py b/python/vyos/utils/network.py index de283e546..366433146 100644 --- a/python/vyos/utils/network.py +++ b/python/vyos/utils/network.py @@ -178,7 +178,7 @@ def get_interface_address(interface): def get_interface_namespace(interface: str): """ - Returns wich netns the interface belongs to + Returns which netns the interface belongs to """ # Bail out early if netns does not exist tmp = cmd(f'ip --json netns ls') diff --git a/python/vyos/utils/process.py b/python/vyos/utils/process.py index 74546a172..94d6670dc 100644 --- a/python/vyos/utils/process.py +++ b/python/vyos/utils/process.py @@ -56,7 +56,7 @@ def popen(command, flag='', shell=None, input=None, timeout=None, env=None, - STDOUT, send the data to be merged with stdout - DEVNULL, discard the output decode: specify the expected text encoding (utf-8, ascii, ...) - the default is explicitely utf-8 which is python's own default + the default is explicitly utf-8 which is python's own default vrf: run command in a VRF context netns: run command in the named network namespace buffered: define how process output shall be presented to stdout @@ -69,7 +69,7 @@ def popen(command, flag='', shell=None, input=None, timeout=None, env=None, """ # airbag must be left as an import in the function as otherwise we have a - # a circual import dependency + # a circular import dependency from vyos import debug from vyos import airbag diff --git a/python/vyos/utils/system.py b/python/vyos/utils/system.py index e2197daf2..578537544 100644 --- a/python/vyos/utils/system.py +++ b/python/vyos/utils/system.py @@ -80,7 +80,7 @@ def sysctl_apply(sysctl_dict: dict[str, str], revert: bool = True) -> bool: return True def find_device_file(device): - """ Recurively search /dev for the given device file and return its full path. + """ Recursively search /dev for the given device file and return its full path. If no device file was found 'None' is returned """ from fnmatch import fnmatch diff --git a/python/vyos/utils/vti_updown_db.py b/python/vyos/utils/vti_updown_db.py index 0587b48e8..2931df86c 100644 --- a/python/vyos/utils/vti_updown_db.py +++ b/python/vyos/utils/vti_updown_db.py @@ -111,7 +111,7 @@ class VTIUpDownDB: """ Removes a matching entry from the DB. - If no matching entry can be fonud, the operation returns successfully. + If no matching entry can be found, the operation returns successfully. """ ifspec = f"{interface}:{connection}:{protocol}" if (connection is not None and protocol is not None) else interface if ifspec in self._ifspecs: diff --git a/python/vyos/vpp/control_host.py b/python/vyos/vpp/control_host.py index 9808c9418..707f56740 100644 --- a/python/vyos/vpp/control_host.py +++ b/python/vyos/vpp/control_host.py @@ -420,7 +420,7 @@ def get_eth_mac(iface_name: str) -> str: def xdp_remove(iface_name: str) -> None: - """Remove XDP BPF program from an interfce + """Remove XDP BPF program from an interface Args: iface_name (str): name of an interface diff --git a/python/vyos/vyconf_session.py b/python/vyos/vyconf_session.py index 5748ab2dd..91e51338c 100644 --- a/python/vyos/vyconf_session.py +++ b/python/vyos/vyconf_session.py @@ -111,7 +111,7 @@ class VyconfSession: def exit_config_mode(self): if self.session_changed(): - return 'Uncommited changes', Errnum.UNCOMMITED_CHANGES + return 'Uncommitted changes', Errnum.UNCOMMITED_CHANGES out = vyconf_client.send_request('exit_configuration_mode', token=self.__token) return self.output(out), out.status diff --git a/python/vyos/xml_ref/definition.py b/python/vyos/xml_ref/definition.py index 015e7ee6e..cee762b02 100644 --- a/python/vyos/xml_ref/definition.py +++ b/python/vyos/xml_ref/definition.py @@ -104,7 +104,7 @@ class Xml: if self.exists(path): if self.is_valueless(path) or not self.is_leaf(path): # It's a complete path for a valueless node - # or a path to an empy non-leaf node + # or a path to an empty non-leaf node return (path, None) else: raise ValueError(f'Path "{path}" needs a value or children') diff --git a/python/vyos/xml_ref/generate_cache.py b/python/vyos/xml_ref/generate_cache.py index f0a3ec35b..daea50dc9 100755 --- a/python/vyos/xml_ref/generate_cache.py +++ b/python/vyos/xml_ref/generate_cache.py @@ -52,7 +52,7 @@ def non_trivial(s): return s def main(): - parser = ArgumentParser(description='generate and save dict from xml defintions') + parser = ArgumentParser(description='generate and save dict from xml definitions') parser.add_argument('--xml-dir', type=str, required=True, help='transcluded xml interface-definition directory') parser.add_argument('--internal-cache', type=str, required=True, diff --git a/python/vyos/xml_ref/generate_op_cache.py b/python/vyos/xml_ref/generate_op_cache.py index 1c183fc8c..ca939f550 100755 --- a/python/vyos/xml_ref/generate_op_cache.py +++ b/python/vyos/xml_ref/generate_op_cache.py @@ -89,7 +89,7 @@ def translate_command(s: str, pos: list[str]) -> str: s = translate_exec(s) s = translate_position(s, pos) - # If there are any untranslated occurences of '_place_holder_", + # If there are any untranslated occurrences of "_place_holder_", # it means the command is incorrect, # e.g., it references "$6" when it only has five words. if re.search(r'_place_holder_', s): @@ -317,7 +317,7 @@ def main(): # pylint: disable=global-statement global CHECK_XML_CONSISTENCY - parser = ArgumentParser(description='generate dict from xml defintions') + parser = ArgumentParser(description='generate dict from xml definitions') parser.add_argument( '--xml-dir', type=str, diff --git a/schema/interface_definition.rnc b/schema/interface_definition.rnc index bded5b0a6..0c929ad2c 100644 --- a/schema/interface_definition.rnc +++ b/schema/interface_definition.rnc @@ -187,7 +187,7 @@ valueHelp = element valueHelp # completionHelp tags contain information about allowed values of a node that is used for generating # tab completion in the CLI frontend and drop-down lists in GUI frontends -# It is only meaninful for leaf nodes +# It is only meaningful for leaf nodes # Allowed values can be given as a fixed list of values (e.g. <list>foo bar baz</list>), # as a configuration path (e.g. <path>interfaces ethernet</path>), # or as a path to a script file that generates the list (e.g. <script>/usr/lib/foo/list-things</script> diff --git a/schema/interface_definition.rng b/schema/interface_definition.rng index cb9b46ecb..2c46266d3 100644 --- a/schema/interface_definition.rng +++ b/schema/interface_definition.rng @@ -340,7 +340,7 @@ <!-- completionHelp tags contain information about allowed values of a node that is used for generating tab completion in the CLI frontend and drop-down lists in GUI frontends - It is only meaninful for leaf nodes + It is only meaningful for leaf nodes Allowed values can be given as a fixed list of values (e.g. <list>foo bar baz</list>), as a configuration path (e.g. <path>interfaces ethernet</path>), or as a path to a script file that generates the list (e.g. <script>/usr/lib/foo/list-things</script> diff --git a/src/conf_mode/container.py b/src/conf_mode/container.py index 80a91b1ff..20ec300aa 100755 --- a/src/conf_mode/container.py +++ b/src/conf_mode/container.py @@ -130,7 +130,7 @@ def verify(container): # Check if requested container image exists locally. If it does not # exist locally - inform the user. This is required as there is a - # shared container image storage accross all VyOS images. A user can + # shared container image storage across all VyOS images. A user can # delete a container image from the system, boot into another version # of VyOS and then it would fail to boot. This is to prevent any # configuration error when container images are deleted from the @@ -663,7 +663,7 @@ def apply(container): if run(f'podman image exists {image}') != 0: # container image does not exist locally - user already got - # informed by a WARNING in verfiy() - bail out early + # informed by a WARNING in verify() - bail out early continue if 'disable' in container_config: diff --git a/src/conf_mode/interfaces_bonding.py b/src/conf_mode/interfaces_bonding.py index 0b27c8cad..4d6cafc9d 100755 --- a/src/conf_mode/interfaces_bonding.py +++ b/src/conf_mode/interfaces_bonding.py @@ -68,7 +68,7 @@ def get_bond_mode(mode): def get_config(config=None): """ - Retrive CLI config as dictionary. Dictionary can never be empty, as at least the + Retrieve CLI config as dictionary. Dictionary can never be empty, as at least the interface name will be added or a deleted flag """ if config: @@ -78,7 +78,7 @@ def get_config(config=None): base = ['interfaces', 'bonding'] ifname, bond = get_interface_dict(conf, base, with_pki=True) - # To make our own life easier transfor the list of member interfaces + # To make our own life easier transform the list of member interfaces # into a dictionary - we will use this to add additional information # later on for each member if 'member' in bond and 'interface' in bond['member']: diff --git a/src/conf_mode/interfaces_bridge.py b/src/conf_mode/interfaces_bridge.py index c6792404b..2060ecd8b 100755 --- a/src/conf_mode/interfaces_bridge.py +++ b/src/conf_mode/interfaces_bridge.py @@ -40,7 +40,7 @@ airbag.enable() def get_config(config=None): """ - Retrive CLI config as dictionary. Dictionary can never be empty, as at least the + Retrieve CLI config as dictionary. Dictionary can never be empty, as at least the interface name will be added or a deleted flag """ if config: diff --git a/src/conf_mode/interfaces_dummy.py b/src/conf_mode/interfaces_dummy.py index 0a83eb23b..c35511199 100755 --- a/src/conf_mode/interfaces_dummy.py +++ b/src/conf_mode/interfaces_dummy.py @@ -29,7 +29,7 @@ airbag.enable() def get_config(config=None): """ - Retrive CLI config as dictionary. Dictionary can never be empty, as at least the + Retrieve CLI config as dictionary. Dictionary can never be empty, as at least the interface name will be added or a deleted flag """ if config: diff --git a/src/conf_mode/interfaces_ethernet.py b/src/conf_mode/interfaces_ethernet.py index 774a042fe..2eb36a231 100755 --- a/src/conf_mode/interfaces_ethernet.py +++ b/src/conf_mode/interfaces_ethernet.py @@ -138,7 +138,7 @@ def update_bond_options(conf: Config, eth_conf: dict) -> list: def get_config(config=None): """ - Retrive CLI config as dictionary. Dictionary can never be empty, as at least the + Retrieve CLI config as dictionary. Dictionary can never be empty, as at least the interface name will be added or a deleted flag """ if config: @@ -200,11 +200,11 @@ def verify_speed_duplex(ethernet: dict, ethtool: Ethtool): if ((ethernet['speed'] == 'auto' and ethernet['duplex'] != 'auto') or (ethernet['speed'] != 'auto' and ethernet['duplex'] == 'auto')): raise ConfigError( - 'Speed/Duplex missmatch. Must be both auto or manually configured') + 'Speed/Duplex mismatch. Must be both auto or manually configured') if ethernet['speed'] != 'auto' and ethernet['duplex'] != 'auto': # We need to verify if the requested speed and duplex setting is - # supported by the underlaying NIC. + # supported by the underlying NIC. speed = ethernet['speed'] duplex = ethernet['duplex'] if not ethtool.check_speed_duplex(speed, duplex): @@ -287,7 +287,7 @@ def verify_offload(ethernet: dict, ethtool: Ethtool): """ if dict_search('offload.rps', ethernet) != None: if not os.path.exists(f'/sys/class/net/{ethernet["ifname"]}/queues/rx-0/rps_cpus'): - raise ConfigError('Interface does not suport RPS!') + raise ConfigError('Interface does not support RPS!') driver = ethtool.get_driver_name() # T3342 - Xen driver requires special treatment if driver == 'vif': @@ -308,7 +308,7 @@ def verify_mac_change(ethernet: dict, ethtool: Ethtool): if 'mac' not in ethernet: return None if not ethtool.check_mac_change(): - raise ConfigError(f'Driver does not suport changing MAC address!') + raise ConfigError(f'Driver does not support changing MAC address!') def verify_allowedbond_changes(ethernet: dict): """ diff --git a/src/conf_mode/interfaces_geneve.py b/src/conf_mode/interfaces_geneve.py index 2f3e3cb8c..faaa7b848 100755 --- a/src/conf_mode/interfaces_geneve.py +++ b/src/conf_mode/interfaces_geneve.py @@ -36,7 +36,7 @@ airbag.enable() def get_config(config=None): """ - Retrive CLI config as dictionary. Dictionary can never be empty, as at least the + Retrieve CLI config as dictionary. Dictionary can never be empty, as at least the interface name will be added or a deleted flag """ if config: diff --git a/src/conf_mode/interfaces_input.py b/src/conf_mode/interfaces_input.py index 6ed0bd2cf..d41610b6d 100755 --- a/src/conf_mode/interfaces_input.py +++ b/src/conf_mode/interfaces_input.py @@ -26,7 +26,7 @@ airbag.enable() def get_config(config=None): """ - Retrive CLI config as dictionary. Dictionary can never be empty, as at + Retrieve CLI config as dictionary. Dictionary can never be empty, as at least the interface name will be added or a deleted flag """ if config: diff --git a/src/conf_mode/interfaces_l2tpv3.py b/src/conf_mode/interfaces_l2tpv3.py index 8478f3c40..85438b6c5 100755 --- a/src/conf_mode/interfaces_l2tpv3.py +++ b/src/conf_mode/interfaces_l2tpv3.py @@ -39,7 +39,7 @@ k_mod = ['l2tp_eth', 'l2tp_netlink', 'l2tp_ip', 'l2tp_ip6'] def get_config(config=None): """ - Retrive CLI config as dictionary. Dictionary can never be empty, as at least the + Retrieve CLI config as dictionary. Dictionary can never be empty, as at least the interface name will be added or a deleted flag """ if config: diff --git a/src/conf_mode/interfaces_loopback.py b/src/conf_mode/interfaces_loopback.py index bac36b7f0..c19ea162e 100755 --- a/src/conf_mode/interfaces_loopback.py +++ b/src/conf_mode/interfaces_loopback.py @@ -26,7 +26,7 @@ airbag.enable() def get_config(config=None): """ - Retrive CLI config as dictionary. Dictionary can never be empty, as at least the + Retrieve CLI config as dictionary. Dictionary can never be empty, as at least the interface name will be added or a deleted flag """ if config: diff --git a/src/conf_mode/interfaces_macsec.py b/src/conf_mode/interfaces_macsec.py index 2904e69cb..3c043e11e 100755 --- a/src/conf_mode/interfaces_macsec.py +++ b/src/conf_mode/interfaces_macsec.py @@ -55,7 +55,7 @@ GCM_256_KEY_ERROR = 'gcm-aes-256 requires a 256bit long key!' def get_config(config=None): """ - Retrive CLI config as dictionary. Dictionary can never be empty, as at least the + Retrieve CLI config as dictionary. Dictionary can never be empty, as at least the interface name will be added or a deleted flag """ if config: @@ -154,11 +154,11 @@ def verify(macsec): if 'source_interface' in macsec: # MACsec adds a 40 byte overhead (32 byte MACsec + 8 bytes VLAN 802.1ad - # and 802.1q) - we need to check the underlaying MTU if our configured + # and 802.1q) - we need to check the underlying MTU if our configured # MTU is at least 40 bytes less then the MTU of our physical interface. lower_mtu = Interface(macsec['source_interface']).get_mtu() if lower_mtu < (int(macsec['mtu']) + 40): - raise ConfigError('MACsec overhead does not fit into underlaying device MTU,\n' \ + raise ConfigError('MACsec overhead does not fit into underlying device MTU,\n' \ f'{lower_mtu} bytes is too small!') return None diff --git a/src/conf_mode/interfaces_openvpn.py b/src/conf_mode/interfaces_openvpn.py index 861f2e679..16a4ed0b5 100755 --- a/src/conf_mode/interfaces_openvpn.py +++ b/src/conf_mode/interfaces_openvpn.py @@ -80,7 +80,7 @@ service_file = '/run/systemd/system/openvpn@{ifname}.service.d/20-override.conf' def get_config(config=None): """ - Retrive CLI config as dictionary. Dictionary can never be empty, as at least the + Retrieve CLI config as dictionary. Dictionary can never be empty, as at least the interface name will be added or a deleted flag """ if config: @@ -747,7 +747,7 @@ def generate(openvpn): # create client config directory on demand makedir(ccd_dir, user, group) - # Fix file permissons for keys + # Fix file permissions for keys generate_pki_files(openvpn) # Generate User/Password authentication file diff --git a/src/conf_mode/interfaces_pppoe.py b/src/conf_mode/interfaces_pppoe.py index 976702aba..b622f5632 100755 --- a/src/conf_mode/interfaces_pppoe.py +++ b/src/conf_mode/interfaces_pppoe.py @@ -36,7 +36,7 @@ airbag.enable() def get_config(config=None): """ - Retrive CLI config as dictionary. Dictionary can never be empty, as at least the + Retrieve CLI config as dictionary. Dictionary can never be empty, as at least the interface name will be added or a deleted flag """ if config: diff --git a/src/conf_mode/interfaces_pseudo-ethernet.py b/src/conf_mode/interfaces_pseudo-ethernet.py index 7f9345abb..6a4219343 100755 --- a/src/conf_mode/interfaces_pseudo-ethernet.py +++ b/src/conf_mode/interfaces_pseudo-ethernet.py @@ -39,7 +39,7 @@ airbag.enable() def get_config(config=None): """ - Retrive CLI config as dictionary. Dictionary can never be empty, as at + Retrieve CLI config as dictionary. Dictionary can never be empty, as at least the interface name will be added or a deleted flag """ if config: diff --git a/src/conf_mode/interfaces_sstpc.py b/src/conf_mode/interfaces_sstpc.py index 276fab4f9..50d3d1cb3 100755 --- a/src/conf_mode/interfaces_sstpc.py +++ b/src/conf_mode/interfaces_sstpc.py @@ -37,7 +37,7 @@ airbag.enable() def get_config(config=None): """ - Retrive CLI config as dictionary. Dictionary can never be empty, as at least the + Retrieve CLI config as dictionary. Dictionary can never be empty, as at least the interface name will be added or a deleted flag """ if config: diff --git a/src/conf_mode/interfaces_tunnel.py b/src/conf_mode/interfaces_tunnel.py index 4cf5ef115..053c831d1 100755 --- a/src/conf_mode/interfaces_tunnel.py +++ b/src/conf_mode/interfaces_tunnel.py @@ -37,7 +37,7 @@ airbag.enable() def get_config(config=None): """ - Retrive CLI config as dictionary. Dictionary can never be empty, as at least + Retrieve CLI config as dictionary. Dictionary can never be empty, as at least the interface name will be added or a deleted flag """ if config: diff --git a/src/conf_mode/interfaces_virtual-ethernet.py b/src/conf_mode/interfaces_virtual-ethernet.py index 4bcabe304..00fc9cce9 100755 --- a/src/conf_mode/interfaces_virtual-ethernet.py +++ b/src/conf_mode/interfaces_virtual-ethernet.py @@ -33,7 +33,7 @@ airbag.enable() def get_config(config=None): """ - Retrive CLI config as dictionary. Dictionary can never be empty, as at + Retrieve CLI config as dictionary. Dictionary can never be empty, as at least the interface name will be added or a deleted flag """ if config: @@ -46,7 +46,7 @@ def get_config(config=None): # We need to know all other veth related interfaces as veth requires a 1:1 # mapping for the peer-names. The Linux kernel automatically creates both # interfaces, the local one and the peer-name, but VyOS also needs a peer - # interfaces configrued on the CLI so we can assign proper IP addresses etc. + # interfaces configured on the CLI so we can assign proper IP addresses etc. veth['other_interfaces'] = conf.get_config_dict(base, key_mangling=('-', '_'), get_first_key=True, no_tag_node_value_mangle=True) diff --git a/src/conf_mode/interfaces_vti.py b/src/conf_mode/interfaces_vti.py index 0461c4f68..b4652d727 100755 --- a/src/conf_mode/interfaces_vti.py +++ b/src/conf_mode/interfaces_vti.py @@ -28,7 +28,7 @@ airbag.enable() def get_config(config=None): """ - Retrive CLI config as dictionary. Dictionary can never be empty, as at least the + Retrieve CLI config as dictionary. Dictionary can never be empty, as at least the interface name will be added or a deleted flag """ if config: diff --git a/src/conf_mode/interfaces_vxlan.py b/src/conf_mode/interfaces_vxlan.py index 968214354..819920009 100755 --- a/src/conf_mode/interfaces_vxlan.py +++ b/src/conf_mode/interfaces_vxlan.py @@ -42,7 +42,7 @@ airbag.enable() def get_config(config=None): """ - Retrive CLI config as dictionary. Dictionary can never be empty, as at least + Retrieve CLI config as dictionary. Dictionary can never be empty, as at least the interface name will be added or a deleted flag """ if config: @@ -101,7 +101,7 @@ def verify(vxlan): if 'group' in vxlan: if 'source_interface' not in vxlan: - raise ConfigError('Multicast VXLAN requires an underlaying interface') + raise ConfigError('Multicast VXLAN requires an underlying interface') if 'remote' in vxlan: raise ConfigError('Both group and remote cannot be specified') verify_source_interface(vxlan) @@ -125,7 +125,7 @@ def verify(vxlan): if dict_search('parameters.vni_filter', tunnel_config) != None: other_vni_filter = True break - # eqivalent of the C foo ? 'a' : 'b' statement + # equivalent of the C foo ? 'a' : 'b' statement vni_filter = True and (dict_search('parameters.vni_filter', vxlan) != None) or False # If either one is enabled, so must be the other. Both can be off and both can be on if (vni_filter and not other_vni_filter) or (not vni_filter and other_vni_filter): @@ -144,7 +144,7 @@ def verify(vxlan): if 'source_interface' in vxlan: # VXLAN adds at least an overhead of 50 byte - we need to check the - # underlaying device if our VXLAN package is not going to be fragmented! + # underlying device if our VXLAN package is not going to be fragmented! vxlan_overhead = 50 if 'source_address' in vxlan and is_ipv6(vxlan['source_address']): # IPv6 adds an extra 20 bytes overhead because the IPv6 header is 20 diff --git a/src/conf_mode/interfaces_wireguard.py b/src/conf_mode/interfaces_wireguard.py index 33d782ec6..b430fa94a 100755 --- a/src/conf_mode/interfaces_wireguard.py +++ b/src/conf_mode/interfaces_wireguard.py @@ -43,7 +43,7 @@ airbag.enable() def get_config(config=None): """ - Retrive CLI config as dictionary. Dictionary can never be empty, as at least the + Retrieve CLI config as dictionary. Dictionary can never be empty, as at least the interface name will be added or a deleted flag """ if config: diff --git a/src/conf_mode/interfaces_wireless.py b/src/conf_mode/interfaces_wireless.py index a2e31484b..e1a2b22bf 100755 --- a/src/conf_mode/interfaces_wireless.py +++ b/src/conf_mode/interfaces_wireless.py @@ -77,7 +77,7 @@ def find_other_stations(conf, base, ifname): def get_config(config=None): """ - Retrive CLI config as dictionary. Dictionary can never be empty, as at least the + Retrieve CLI config as dictionary. Dictionary can never be empty, as at least the interface name will be added or a deleted flag """ if config: @@ -197,7 +197,7 @@ def verify(wifi): elif 'wpa' in wifi['security']: wpa = wifi['security']['wpa'] if not any(i in ['passphrase', 'radius'] for i in wpa): - raise ConfigError('Misssing WPA key or RADIUS server') + raise ConfigError('Missing WPA key or RADIUS server') if 'username' in wpa: if 'passphrase' not in wpa: diff --git a/src/conf_mode/interfaces_wwan.py b/src/conf_mode/interfaces_wwan.py index bde31ebe1..166b857a8 100755 --- a/src/conf_mode/interfaces_wwan.py +++ b/src/conf_mode/interfaces_wwan.py @@ -46,7 +46,7 @@ cron_script = '/etc/cron.d/vyos-wwan' def get_config(config=None): """ - Retrive CLI config as dictionary. Dictionary can never be empty, as at least the + Retrieve CLI config as dictionary. Dictionary can never be empty, as at least the interface name will be added or a deleted flag """ if config: diff --git a/src/conf_mode/pki.py b/src/conf_mode/pki.py index 6d2817384..356a8dd89 100755 --- a/src/conf_mode/pki.py +++ b/src/conf_mode/pki.py @@ -153,7 +153,7 @@ def certbot_request(name: str, config: dict, dry_run: bool=True) -> None: elif listen_address: tmp += f' --http-01-address {listen_address}' - # verify() does not need to actually request a cert but only test for plausability + # verify() does not need to actually request a cert but only test for plausibility if dry_run: tmp += ' --dry-run' @@ -217,7 +217,7 @@ def get_config(config=None): # We only merge on the defaults if there is a configuration at all if conf.exists(base): # We have gathered the dict representation of the CLI, but there are default - # options which we need to update into the dictionary retrived. + # options which we need to update into the dictionary retrieved. default_values = conf.get_config_defaults(**pki.kwargs, recursive=True) # remove ACME default configuration if unused by CLI if 'certificate' in pki: @@ -296,7 +296,7 @@ def get_config(config=None): # Check PKI certificates if they are auto-generated by ACME. If they are, # traverse the current configuration and determine the service where the # certificate is used by. - # Required to check if we might need to run certbot behing a reverse proxy. + # Required to check if we might need to run certbot behind a reverse proxy. if 'certificate' in pki: for name, cert_config in pki['certificate'].items(): if 'acme' not in cert_config: @@ -420,7 +420,7 @@ def verify(pki): # A call to check_port_availability() will always fail during system # boot when listen_address is set and the address is not yet assigned # to an interface. This happens b/c PKI subsystem is called prior - # to any inteface - e.g. ethernet - and thus the OS will always + # to any interface - e.g. ethernet - and thus the OS will always # be unable to bind() a socket() to a non existing IP address. if boot_configuration_complete() and not check_port_availability(listen_address, 80): raise ConfigError('Port 80 is already in use and not available '\ @@ -498,7 +498,7 @@ def verify(pki): continue for found_name, found_path in dict_search_recursive(search_dict, key): - # Check if the name matches either by string compare, or beeing + # Check if the name matches either by string compare, or being # part of a list if ((isinstance(found_name, str) and found_name == item_name) or (isinstance(found_name, list) and item_name in found_name)): @@ -563,7 +563,7 @@ def generate(pki): # the PEM files on disk. We need to add the certificate to # certbot_list_on_disk to automatically import the CA chain certbot_list_on_disk.append(name) - # We alredy had an ACME managed certificate on the system, but + # We already had an ACME managed certificate on the system, but # something changed in the configuration elif changed_certificates != None and name in changed_certificates: # Delete old ACME certificate first diff --git a/src/conf_mode/policy.py b/src/conf_mode/policy.py index 84962c807..689365724 100755 --- a/src/conf_mode/policy.py +++ b/src/conf_mode/policy.py @@ -131,7 +131,7 @@ def verify(config_dict): if 'rule' not in instance_config: continue - # human readable instance name (hypen instead of underscore) + # human readable instance name (hyphen instead of underscore) policy_hr = policy_type.replace('_', '-') entries = [] for rule, rule_config in instance_config['rule'].items(): diff --git a/src/conf_mode/policy_local-route.py b/src/conf_mode/policy_local-route.py index 77b39e59f..23aadfade 100755 --- a/src/conf_mode/policy_local-route.py +++ b/src/conf_mode/policy_local-route.py @@ -299,8 +299,8 @@ def apply(pbr): if 'rule' in pbr_route: for rule, rule_config in pbr_route['rule'].items(): - # VRFs get configred as route table alias names for iproute2 and only - # one 'set' can get past validation. Either can be fed to lookup. + # VRFs get configured as route table alias names for iproute2 and only + # one 'set' can get past validation. Either can be fed to lookup. vrf = rule_config['set'].get('vrf', '') if vrf == 'default': table_or_vrf = 'main' diff --git a/src/conf_mode/protocols_bgp.py b/src/conf_mode/protocols_bgp.py index a7b9ea39b..24e244bb9 100755 --- a/src/conf_mode/protocols_bgp.py +++ b/src/conf_mode/protocols_bgp.py @@ -52,7 +52,7 @@ def verify_vrf_as_import(search_vrf_name: str, afi_name: str, vrfs_config: dict) :type afi_name: str :param vrfs_config: configuration dependents vrfs :type vrfs_config: dict - :return: if vrf in import list retrun true else false + :return: if vrf in import list return true else false :rtype: bool """ for vrf_name, vrf_config in vrfs_config.items(): @@ -155,7 +155,7 @@ def verify_remote_as(peer_config, bgp_config): return None def verify_afi(peer_config, bgp_config): - # If address_family configured under neighboor + # If address_family configured under neighbor if 'address_family' in peer_config: return True @@ -183,7 +183,7 @@ def verify(config_dict): if 'vrf_context' in config_dict: vrf = config_dict['vrf_context'] - # eqivalent of the C foo ? 'a' : 'b' statement + # equivalent of the C foo ? 'a' : 'b' statement bgp = vrf and dict_search(f'vrf.name.{vrf}.protocols.bgp', config_dict) or config_dict['bgp'] bgp['policy'] = config_dict['policy'] @@ -277,7 +277,7 @@ def verify(config_dict): raise ConfigError(f'Only one local-as number can be specified for peer "{peer}"!') # Neighbor local-as override can not be the same as the local-as - # we use for this BGP instane! + # we use for this BGP instance! asn = list(peer_config['local_as'].keys())[0] if asn == bgp['system_as']: raise ConfigError('Cannot have local-as same as system-as number') @@ -287,11 +287,11 @@ def verify(config_dict): raise ConfigError(f'Neighbor "{peer}" has local-as specified which is '\ 'the same as remote-as, this is not allowed!') - # ttl-security and ebgp-multihop can't be used in the same configration + # ttl-security and ebgp-multihop can't be used in the same configuration if 'ebgp_multihop' in peer_config and 'ttl_security' in peer_config: raise ConfigError('You can not set both ebgp-multihop and ttl-security hops') - # interface and ebgp-multihop can't be used in the same configration + # interface and ebgp-multihop can't be used in the same configuration if 'ebgp_multihop' in peer_config and 'interface' in peer_config: raise ConfigError(f'Ebgp-multihop can not be used with directly connected '\ f'neighbor "{peer}"') @@ -395,13 +395,13 @@ def verify(config_dict): if 'conditionally_advertise' in afi_config: if 'advertise_map' not in afi_config['conditionally_advertise']: - raise ConfigError('Must speficy advertise-map when conditionally-advertise is in use!') + raise ConfigError('Must specify advertise-map when conditionally-advertise is in use!') # Verify advertise-map (which is a route-map) exists verify_route_map(afi_config['conditionally_advertise']['advertise_map'], bgp) if ('exist_map' not in afi_config['conditionally_advertise'] and 'non_exist_map' not in afi_config['conditionally_advertise']): - raise ConfigError('Must either speficy exist-map or non-exist-map when ' \ + raise ConfigError('Must either specify exist-map or non-exist-map when ' \ 'conditionally-advertise is in use!') if {'exist_map', 'non_exist_map'} <= set(afi_config['conditionally_advertise']): @@ -417,7 +417,7 @@ def verify(config_dict): # T4332: bgp deterministic-med cannot be disabled while addpath-tx-bestpath-per-AS is in use if 'addpath_tx_per_as' in afi_config: if dict_search('parameters.deterministic_med', bgp) == None: - raise ConfigError('addpath-tx-per-as requires BGP deterministic-med paramtere to be set!') + raise ConfigError('addpath-tx-per-as requires BGP deterministic-med parameter to be set!') # Validate if configured Prefix list exists if 'prefix_list' in afi_config: diff --git a/src/conf_mode/protocols_eigrp.py b/src/conf_mode/protocols_eigrp.py index 281909ceb..92e34237c 100755 --- a/src/conf_mode/protocols_eigrp.py +++ b/src/conf_mode/protocols_eigrp.py @@ -44,7 +44,7 @@ def verify(config_dict): if 'vrf_context' in config_dict: vrf = config_dict['vrf_context'] - # eqivalent of the C foo ? 'a' : 'b' statement + # equivalent of the C foo ? 'a' : 'b' statement eigrp = vrf and dict_search(f'vrf.name.{vrf}.protocols.eigrp', config_dict) or config_dict['eigrp'] eigrp['policy'] = config_dict['policy'] diff --git a/src/conf_mode/protocols_isis.py b/src/conf_mode/protocols_isis.py index 3d172087e..3812515a1 100755 --- a/src/conf_mode/protocols_isis.py +++ b/src/conf_mode/protocols_isis.py @@ -47,7 +47,7 @@ def verify(config_dict): if 'vrf_context' in config_dict: vrf = config_dict['vrf_context'] - # eqivalent of the C foo ? 'a' : 'b' statement + # equivalent of the C foo ? 'a' : 'b' statement isis = vrf and dict_search(f'vrf.name.{vrf}.protocols.isis', config_dict) or config_dict['isis'] isis['policy'] = config_dict['policy'] diff --git a/src/conf_mode/protocols_nhrp.py b/src/conf_mode/protocols_nhrp.py index be08080b1..3901b20ba 100755 --- a/src/conf_mode/protocols_nhrp.py +++ b/src/conf_mode/protocols_nhrp.py @@ -92,7 +92,7 @@ def verify(config_dict): nbma_list.append(nbma_ip) else: raise ConfigError( - f'Nbma address {nbma_ip} cannot be maped to several tunnel-ip') + f'Nbma address {nbma_ip} cannot be mapped to several tunnel-ip') return None diff --git a/src/conf_mode/protocols_ospf.py b/src/conf_mode/protocols_ospf.py index 46023e486..b20cea25a 100755 --- a/src/conf_mode/protocols_ospf.py +++ b/src/conf_mode/protocols_ospf.py @@ -49,7 +49,7 @@ def verify(config_dict): if 'vrf_context' in config_dict: vrf = config_dict['vrf_context'] - # eqivalent of the C foo ? 'a' : 'b' statement + # equivalent of the C foo ? 'a' : 'b' statement ospf = vrf and dict_search(f'vrf.name.{vrf}.protocols.ospf', config_dict) or config_dict['ospf'] ospf['policy'] = config_dict['policy'] diff --git a/src/conf_mode/protocols_ospfv3.py b/src/conf_mode/protocols_ospfv3.py index 2db7b1d42..acf6cadfb 100755 --- a/src/conf_mode/protocols_ospfv3.py +++ b/src/conf_mode/protocols_ospfv3.py @@ -48,7 +48,7 @@ def verify(config_dict): if 'vrf_context' in config_dict: vrf = config_dict['vrf_context'] - # eqivalent of the C foo ? 'a' : 'b' statement + # equivalent of the C foo ? 'a' : 'b' statement ospfv3 = vrf and dict_search(f'vrf.name.{vrf}.protocols.ospfv3', config_dict) or config_dict['ospfv3'] ospfv3['policy'] = config_dict['policy'] diff --git a/src/conf_mode/protocols_rpki.py b/src/conf_mode/protocols_rpki.py index 9b1abd752..81039d3da 100755 --- a/src/conf_mode/protocols_rpki.py +++ b/src/conf_mode/protocols_rpki.py @@ -51,7 +51,7 @@ def verify(config_dict): if 'vrf_context' in config_dict: vrf = config_dict['vrf_context'] - # eqivalent of the C foo ? 'a' : 'b' statement + # equivalent of the C foo ? 'a' : 'b' statement rpki = vrf and dict_search(f'vrf.name.{vrf}.protocols.rpki', config_dict) or config_dict['rpki'] @@ -91,7 +91,7 @@ def generate(config_dict): if 'vrf_context' in config_dict: vrf = config_dict['vrf_context'] - # eqivalent of the C foo ? 'a' : 'b' statement + # equivalent of the C foo ? 'a' : 'b' statement rpki = vrf and dict_search(f'vrf.name.{vrf}.protocols.rpki', config_dict) or config_dict['rpki'] diff --git a/src/conf_mode/protocols_static.py b/src/conf_mode/protocols_static.py index 144c64efa..d84cfd77f 100755 --- a/src/conf_mode/protocols_static.py +++ b/src/conf_mode/protocols_static.py @@ -53,7 +53,7 @@ def verify(config_dict): if 'vrf_context' in config_dict: vrf = config_dict['vrf_context'] - # eqivalent of the C foo ? 'a' : 'b' statement + # equivalent of the C foo ? 'a' : 'b' statement static = vrf and dict_search(f'vrf.name.{vrf}.protocols.static', config_dict) or config_dict['static'] static['policy'] = config_dict['policy'] @@ -95,7 +95,7 @@ def generate(config_dict): if 'vrf_context' in config_dict: vrf = config_dict['vrf_context'] - # eqivalent of the C foo ? 'a' : 'b' statement + # equivalent of the C foo ? 'a' : 'b' statement static = vrf and dict_search(f'vrf.name.{vrf}.protocols.static', config_dict) or config_dict['static'] diff --git a/src/conf_mode/qos.py b/src/conf_mode/qos.py index 4ea900bb8..35b9c0aa2 100755 --- a/src/conf_mode/qos.py +++ b/src/conf_mode/qos.py @@ -364,7 +364,7 @@ def apply(qos): for interface, interface_config in qos['interface'].items(): if not verify_interface_exists(qos, interface, state_required=True, warning_only=True): # When shaper is bound to a dialup (e.g. PPPoE) interface it is - # possible that it is yet not availbale when to QoS code runs. + # possible that it is yet not available when to QoS code runs. # Skip the configuration and inform the user via warning_only=True continue diff --git a/src/conf_mode/service_console-server.py b/src/conf_mode/service_console-server.py index 82386babf..595d7888a 100755 --- a/src/conf_mode/service_console-server.py +++ b/src/conf_mode/service_console-server.py @@ -46,7 +46,7 @@ def get_config(config=None): # 'stop_bits': '2'}}} # We have gathered the dict representation of the CLI, but there are default - # options which we need to update into the dictionary retrived. + # options which we need to update into the dictionary retrieved. proxy = conf.merge_defaults(proxy, recursive=True) return proxy diff --git a/src/conf_mode/service_dhcp-server.py b/src/conf_mode/service_dhcp-server.py index c022d0a96..24df20bb7 100755 --- a/src/conf_mode/service_dhcp-server.py +++ b/src/conf_mode/service_dhcp-server.py @@ -168,7 +168,7 @@ def get_config(config=None): else: conf = Config() - # if running in vrf, set base diffrently + # if running in vrf, set base differently if argv and len(argv) > 1: vrf_name = argv[1] base = ['vrf', 'name', vrf_name, 'service', 'dhcp-server'] @@ -617,7 +617,7 @@ def generate(dhcp): def apply(dhcp): - # if running in vrf, set base diffrently + # if running in vrf, set base differently if argv and len(argv) > 1: vrf_name = argv[1] services = [f'isc-kea-dhcp4-server@{vrf_name}', f'isc-kea-dhcp-ddns-server@{vrf_name}'] diff --git a/src/conf_mode/service_dhcpv6-server.py b/src/conf_mode/service_dhcpv6-server.py index b567c8ed9..308ed82a8 100755 --- a/src/conf_mode/service_dhcpv6-server.py +++ b/src/conf_mode/service_dhcpv6-server.py @@ -77,7 +77,7 @@ def get_config(config=None): else: conf = Config() - # if running in vrf, set base diffrently + # if running in vrf, set base differently if argv and len(argv) > 1: vrf_name = argv[1] base = ['vrf', 'name', vrf_name, 'service', 'dhcpv6-server'] @@ -292,7 +292,7 @@ def generate(dhcpv6): return None def apply(dhcpv6): - # if running in vrf, set base diffrently + # if running in vrf, set base differently if argv and len(argv) > 1: vrf_name = argv[1] service_name = f'isc-kea-dhcp6-server@{vrf_name}.service' diff --git a/src/conf_mode/service_https.py b/src/conf_mode/service_https.py index 38bb485e7..59fb90bd1 100755 --- a/src/conf_mode/service_https.py +++ b/src/conf_mode/service_https.py @@ -69,11 +69,11 @@ def get_config(config=None): # store path to API config file for later use in templates https['api_config_state'] = api_config_state - # get fully qualified system hsotname + # get fully qualified system hostname https['hostname'] = socket.getfqdn() # We have gathered the dict representation of the CLI, but there are default - # options which we need to update into the dictionary retrived. + # options which we need to update into the dictionary retrieved. default_values = conf.get_config_defaults(**https.kwargs, recursive=True) if 'api' not in https or 'graphql' not in https['api']: del default_values['api'] @@ -107,7 +107,7 @@ def verify(https): Warning('No certificate specified, using build-in self-signed certificates. '\ 'Do not use them in a production environment!') - # Check if server port is already in use by a different appliaction + # Check if server port is already in use by a different application listen_address = ['0.0.0.0'] port = int(https['port']) if 'listen_address' in https: diff --git a/src/conf_mode/service_mdns_repeater.py b/src/conf_mode/service_mdns_repeater.py index aa10a687e..a6d9d0224 100755 --- a/src/conf_mode/service_mdns_repeater.py +++ b/src/conf_mode/service_mdns_repeater.py @@ -60,7 +60,7 @@ def verify(mdns): if not mdns or 'disable' in mdns: return None - # We need at least two interfaces to repeat mDNS advertisments + # We need at least two interfaces to repeat mDNS advertisements if 'interface' not in mdns or len(mdns['interface']) < 2: raise ConfigError('mDNS repeater requires at least 2 configured interfaces!') diff --git a/src/conf_mode/service_monitoring_network_event.py b/src/conf_mode/service_monitoring_network_event.py index f43ea23ca..8ae831b66 100644 --- a/src/conf_mode/service_monitoring_network_event.py +++ b/src/conf_mode/service_monitoring_network_event.py @@ -43,7 +43,7 @@ def get_config(config=None): no_tag_node_value_mangle=True) # We have gathered the dict representation of the CLI, but there are default - # options which we need to update into the dictionary retrived. + # options which we need to update into the dictionary retrieved. monitoring = conf.merge_defaults(monitoring, recursive=True) return monitoring diff --git a/src/conf_mode/service_monitoring_telegraf.py b/src/conf_mode/service_monitoring_telegraf.py index de8097e11..2271f240f 100755 --- a/src/conf_mode/service_monitoring_telegraf.py +++ b/src/conf_mode/service_monitoring_telegraf.py @@ -80,7 +80,7 @@ def get_config(config=None): if tmp: monitoring.update({'restart_required': {}}) # We have gathered the dict representation of the CLI, but there are default - # options which we need to update into the dictionary retrived. + # options which we need to update into the dictionary retrieved. monitoring = conf.merge_defaults(monitoring, recursive=True) monitoring['custom_scripts_dir'] = custom_scripts_dir @@ -198,7 +198,7 @@ def generate(monitoring): chown(cache_dir, 'telegraf', 'telegraf') - # Create custome scripts dir + # Create custom scripts dir if not os.path.exists(custom_scripts_dir): os.mkdir(custom_scripts_dir) diff --git a/src/conf_mode/service_ntp.py b/src/conf_mode/service_ntp.py index fbdcd6b58..e58da2737 100755 --- a/src/conf_mode/service_ntp.py +++ b/src/conf_mode/service_ntp.py @@ -51,7 +51,7 @@ def get_config(config=None): if tmp: ntp.update({'restart_required': {}}) # We have gathered the dict representation of the CLI, but there are default - # options which we need to update into the dictionary retrived. + # options which we need to update into the dictionary retrieved. default_values = conf.get_config_defaults(**ntp.kwargs, recursive=True) # Only defined PTP default port, if PTP feature is in use if 'ptp' not in ntp: diff --git a/src/conf_mode/service_salt-minion.py b/src/conf_mode/service_salt-minion.py index f4a339d0d..f035485d3 100755 --- a/src/conf_mode/service_salt-minion.py +++ b/src/conf_mode/service_salt-minion.py @@ -52,7 +52,7 @@ def get_config(config=None): if 'id' not in salt: salt['id'] = gethostname() # We have gathered the dict representation of the CLI, but there are default - # options which we need to update into the dictionary retrived. + # options which we need to update into the dictionary retrieved. salt = conf.merge_defaults(salt, recursive=True) if not conf.exists(base): diff --git a/src/conf_mode/service_snmp.py b/src/conf_mode/service_snmp.py index c6059c260..b0b57a723 100755 --- a/src/conf_mode/service_snmp.py +++ b/src/conf_mode/service_snmp.py @@ -72,7 +72,7 @@ def get_config(config=None): snmp['vyos_user_pass'] = random(16) # We have gathered the dict representation of the CLI, but there are default - # options which we need to update into the dictionary retrived. + # options which we need to update into the dictionary retrieved. snmp = conf.merge_defaults(snmp, recursive=True) if 'listen_address' in snmp: diff --git a/src/conf_mode/service_ssh.py b/src/conf_mode/service_ssh.py index d67c1fa3f..15d9d37ba 100755 --- a/src/conf_mode/service_ssh.py +++ b/src/conf_mode/service_ssh.py @@ -74,7 +74,7 @@ def get_config(config=None): ssh.update({'restart_required': {}}) # We have gathered the dict representation of the CLI, but there are default - # options which we need to update into the dictionary retrived. + # options which we need to update into the dictionary retrieved. ssh = conf.merge_defaults(ssh, recursive=True) # Ignore default XML values if config doesn't exists @@ -127,7 +127,7 @@ def generate(ssh): return None # This usually happens only once on a fresh system, SSH keys need to be - # freshly generted, one per every system! + # freshly generated, one per every system! if not os.path.isfile(key_rsa): syslog(LOG_INFO, 'SSH RSA host key not found, generating new key!') call(f'ssh-keygen -q -N "" -t rsa -f {key_rsa}') diff --git a/src/conf_mode/service_webproxy.py b/src/conf_mode/service_webproxy.py index 7a4954de2..eb45f8fcb 100755 --- a/src/conf_mode/service_webproxy.py +++ b/src/conf_mode/service_webproxy.py @@ -123,7 +123,7 @@ def get_config(config=None): proxy = conf.get_config_dict(base, key_mangling=('-', '_'), get_first_key=True) # We have gathered the dict representation of the CLI, but there are default - # options which we need to update into the dictionary retrived. + # options which we need to update into the dictionary retrieved. default_values = conf.get_config_defaults(**proxy.kwargs, recursive=True) diff --git a/src/conf_mode/system_conntrack.py b/src/conf_mode/system_conntrack.py index eed1a4458..e6710223a 100755 --- a/src/conf_mode/system_conntrack.py +++ b/src/conf_mode/system_conntrack.py @@ -168,7 +168,7 @@ def verify(conntrack): if not group_obj: Warning(f'{error_group} "{group_name}" has no members!') - Warning(f'It is prefered to define {inet} conntrack ignore rules in <firewall {inet} prerouting raw> section') + Warning(f'It is preferred to define {inet} conntrack ignore rules in <firewall {inet} prerouting raw> section') if dict_search_args(conntrack, 'timeout', 'custom', inet, 'rule') != None: for rule, rule_config in conntrack['timeout']['custom'][inet]['rule'].items(): diff --git a/src/conf_mode/system_console.py b/src/conf_mode/system_console.py index fe910c1b0..4411257e3 100755 --- a/src/conf_mode/system_console.py +++ b/src/conf_mode/system_console.py @@ -67,7 +67,7 @@ def verify(console): # If the device name still starts with usbXXX no matching tty was found # and it can not be used as a serial interface if not os.path.isdir(by_bus_dir) or not os.path.exists(by_bus_device): - raise ConfigError(f'Device {device} does not support beeing used as tty') + raise ConfigError(f'Device {device} does not support being used as tty') if not is_tty(device): Warning(f'Device "{device}" used for console is not a TTY!') @@ -99,7 +99,7 @@ def generate(console): console['device'][device_updated] = console['device'][device] del console['device'][device] else: - raise ConfigError(f'Device {device} does not support beeing used as tty') + raise ConfigError(f'Device {device} does not support being used as tty') for device, device_config in console['device'].items(): # Do not render getty configuration if specified device is not a TTY. @@ -114,7 +114,7 @@ def generate(console): # GRUB # For existing serial line change speed (if necessary) - # Only applys to ttyS0 + # Only applies to ttyS0 if 'ttyS0' not in console['device']: return None diff --git a/src/conf_mode/system_host-name.py b/src/conf_mode/system_host-name.py index 2a5592484..5a9265eba 100755 --- a/src/conf_mode/system_host-name.py +++ b/src/conf_mode/system_host-name.py @@ -119,7 +119,7 @@ def verify(hosts): raise ConfigError(f'Invalid alias "{a}" in static-host-mapping "{host}"') for interface, interface_config in hosts['nameservers_dhcp_interfaces'].items(): - # Warnin user if interface does not have DHCP or DHCPv6 configured + # Warning user if interface does not have DHCP or DHCPv6 configured if not set(interface_config).intersection(['dhcp', 'dhcpv6']): Warning(f'"{interface}" is not a DHCP interface but uses DHCP name-server option!') diff --git a/src/conf_mode/system_login.py b/src/conf_mode/system_login.py index 270d7c2bf..537a87ae9 100755 --- a/src/conf_mode/system_login.py +++ b/src/conf_mode/system_login.py @@ -65,7 +65,7 @@ login_motd_dsa_warning = r'/run/motd.d/92-vyos-user-dsa-deprecation-warning' # LOGIN_TIMEOUT from /etc/loign.defs minus 10 sec MAX_RADIUS_TIMEOUT: int = 50 -# MAX_RADIUS_TIMEOUT divided by 2 sec (minimum recomended timeout) +# MAX_RADIUS_TIMEOUT divided by 2 sec (minimum recommended timeout) MAX_RADIUS_COUNT: int = 8 # Maximum number of supported TACACS servers MAX_TACACS_COUNT: int = 8 diff --git a/src/conf_mode/system_option.py b/src/conf_mode/system_option.py index 5f23a5633..41b9a23bb 100755 --- a/src/conf_mode/system_option.py +++ b/src/conf_mode/system_option.py @@ -283,7 +283,7 @@ def generate(options): # XXX: This code path and if statements must be kept in sync with the Kernel # option handling in image_installer.py:get_cli_kernel_options(). This - # occurance is used for having the appropriate options passed to GRUB + # occurrence is used for having the appropriate options passed to GRUB # when re-configuring options on the CLI. cmdline_options = [] kernel_opts = options.get('kernel', {}) diff --git a/src/conf_mode/vpn_ipsec.py b/src/conf_mode/vpn_ipsec.py index 3b5918218..53cf4ed36 100755 --- a/src/conf_mode/vpn_ipsec.py +++ b/src/conf_mode/vpn_ipsec.py @@ -190,7 +190,7 @@ def get_config(config=None): ipsec['l2tp_ike_default'] = 'aes256-sha1-modp1024,3des-sha1-modp1024' ipsec['l2tp_esp_default'] = 'aes256-sha1,3des-sha1' - # Collect the interface dicts for any refernced VTI interfaces in + # Collect the interface dicts for any referenced VTI interfaces in # case we need to bring the interface up ipsec['vti_interface_dicts'] = {} diff --git a/src/conf_mode/vpp.py b/src/conf_mode/vpp.py index bd8aad3f7..2ccc03078 100755 --- a/src/conf_mode/vpp.py +++ b/src/conf_mode/vpp.py @@ -88,7 +88,7 @@ dependency_interface_type_map = { 'vpp_interfaces_xconnect': 'xconnect', } -# dict of drivers that needs to be overrided +# dict of drivers that needs to be overridden override_drivers: dict[str, str] = { 'hv_netvsc': 'uio_hv_generic', } @@ -139,7 +139,7 @@ def _load_module(module_name: str): module_name (str): Name of the module to load. """ if module_name in list_loaded_modules(): - vpp_log.info(f"Module '{module_name}' is alrady loaded") + vpp_log.info(f"Module '{module_name}' is already loaded") return try: check_kmod(module_name) @@ -888,7 +888,7 @@ def apply(config): ) vpp_control.iface_rxmode(lcp_name, rx_mode) - # Syncronize routes via LCP + # Synchronize routes via LCP vpp_control.lcp_resync() except (VPPIOError, VPPValueError, VppNotRunningError) as e: diff --git a/src/conf_mode/vrf.py b/src/conf_mode/vrf.py index 1f2e43381..c9b34fe8e 100755 --- a/src/conf_mode/vrf.py +++ b/src/conf_mode/vrf.py @@ -177,7 +177,7 @@ def verify(vrf): for name, vrf_config in vrf['name'].items(): # Reserved VRF names if name in reserved_names: - raise ConfigError(f'VRF name "{name}" is reserved and connot be used!') + raise ConfigError(f'VRF name "{name}" is reserved and cannot be used!') # table id is mandatory if 'table' not in vrf_config: @@ -249,7 +249,7 @@ def apply(vrf): for tmp in (dict_search('vrf_remove', vrf) or []): if interface_exists(tmp): # T5492: deleting a VRF instance may leafe processes running - # (e.g. dhclient) as there is a depedency ordering issue in the CLI. + # (e.g. dhclient) as there is a dependency ordering issue in the CLI. # We need to ensure that we stop the dhclient processes first so # a proper DHCLP RELEASE message is sent for interface in get_vrf_members(tmp): @@ -342,7 +342,7 @@ def apply(vrf): cmd(f'nft {nft_add_element}') # Only call into nftables as long as there is nothing setup to avoid wasting - # CPU time and thus lenghten the commit process + # CPU time and thus lengthen the commit process if not nft_vrf_zone_rule_setup: nft_vrf_zone_rule_setup = is_nft_vrf_zone_rule_setup() # Install nftables conntrack rules only once diff --git a/src/etc/bash_completion.d/vyatta-op b/src/etc/bash_completion.d/vyatta-op index 8ac2d9b20..fbd2045f3 100644 --- a/src/etc/bash_completion.d/vyatta-op +++ b/src/etc/bash_completion.d/vyatta-op @@ -243,7 +243,7 @@ _vyatta_op_set_completions () _vyatta_op_noncompletions=( ) completions=( ) - # make runable commands have a non-comp + # make runnable commands have a non-comp ndef=${_vyatta_op_node_path}/node.def [ -f $ndef ] && \ node_run=$( _vyatta_op_get_node_def_field $ndef run ) @@ -503,7 +503,7 @@ commands () { if [ "$_OFR_CONFIGURE" != "" ]; then if $(cli-shell-api sessionChanged); then - echo "You have uncommited changes, please commit them before using the commands pipe" + echo "You have uncommitted changes, please commit them before using the commands pipe" else vyos-config-to-commands fi @@ -516,7 +516,7 @@ json () { if [ "$_OFR_CONFIGURE" != "" ]; then if $(cli-shell-api sessionChanged); then - echo "You have uncommited changes, please commit them before using the JSON pipe" + echo "You have uncommitted changes, please commit them before using the JSON pipe" else vyos-config-to-json fi diff --git a/src/etc/telegraf/custom_scripts/vyos_services_input_filter.py b/src/etc/telegraf/custom_scripts/vyos_services_input_filter.py index 78c5249fb..36c1643b3 100755 --- a/src/etc/telegraf/custom_scripts/vyos_services_input_filter.py +++ b/src/etc/telegraf/custom_scripts/vyos_services_input_filter.py @@ -20,7 +20,7 @@ from vyos.configquery import ConfigTreeQuery from vyos.utils.process import is_systemd_service_running from vyos.utils.process import process_named_running -# Availible services and prouceses +# Available services and processes # 1 - service # 2 - process services = { diff --git a/src/etc/udev/rules.d/90-vyos-serial.rules b/src/etc/udev/rules.d/90-vyos-serial.rules index f86b2258f..1fe7ee5ba 100644 --- a/src/etc/udev/rules.d/90-vyos-serial.rules +++ b/src/etc/udev/rules.d/90-vyos-serial.rules @@ -14,7 +14,7 @@ SUBSYSTEMS=="usb-serial", ENV{.ID_PORT}="$attr{port_number}" IMPORT{builtin}="path_id", IMPORT{builtin}="usb_id" -# Change the name of the usb id to a "more" human redable format. +# Change the name of the usb id to a "more" human readable format. # # - $env{ID_PATH} usually is a name like: "pci-0000:00:10.0-usb-0:2.3.3.4:1.0-port0" so we strip the "pci-*" # portion and only use the usb part diff --git a/src/helpers/config_dependency.py b/src/helpers/config_dependency.py index d6358bef8..4a7383cc2 100755 --- a/src/helpers/config_dependency.py +++ b/src/helpers/config_dependency.py @@ -59,7 +59,7 @@ def graph_from_dependency_dict(d: dict) -> dict: for k in list(d): g[k] = set() # add the dependencies for every sub-case; should there be cases - # that are mutally exclusive in the future, the graphs will be + # that are mutually exclusive in the future, the graphs will be # distinguished for el in list(d[k]): g[k] |= set(d[k][el]) @@ -94,7 +94,7 @@ def path_exists(s): return s def main(): - parser = ArgumentParser(description='generate and save dict from xml defintions') + parser = ArgumentParser(description='generate and save dict from xml definitions') parser.add_argument('--dependency-dir', type=path_exists, default=dependency_dir, help='location of vyos-1x dependency directory') diff --git a/src/helpers/geoip-update.py b/src/helpers/geoip-update.py index 18ad0ecb8..1879ab7ef 100755 --- a/src/helpers/geoip-update.py +++ b/src/helpers/geoip-update.py @@ -60,7 +60,7 @@ if __name__ == '__main__': db_initialise() if options['provider'] == 'db-ip': - print('Dowloading latest DB-IP database...') + print('Downloading latest DB-IP database...') if not geoip_download_dbip(): print('Failed to download, aborting.') sys.exit(1) @@ -75,7 +75,7 @@ if __name__ == '__main__': license_key = options['maxmind_license_key'] lite = 'maxmind_lite' in options - print('Dowloading latest MaxMind database...') + print('Downloading latest MaxMind database...') if not geoip_download_maxmind(account_id, license_key, lite): print('Failed to download, aborting.') sys.exit(1) diff --git a/src/helpers/vyos-failover.py b/src/helpers/vyos-failover.py index de89f20d0..22f8f1d35 100755 --- a/src/helpers/vyos-failover.py +++ b/src/helpers/vyos-failover.py @@ -496,7 +496,7 @@ if __name__ == '__main__': # keys: NextHopNamedTuple with dhcp_interface != None # values: NextHopNamedTuple with next_hop != None - # Translates nexthop with dhcp_interface to ususal nexthop + # Translates nexthop with dhcp_interface to usual nexthop nexthop_by_dhcp_nexthop = {} had_sleeps = True diff --git a/src/init/vyos-router b/src/init/vyos-router index 0e31d8c23..735eb4213 100755 --- a/src/init/vyos-router +++ b/src/init/vyos-router @@ -490,7 +490,7 @@ start () chmod 775 /var/run/vyatta /var/log/vyatta log_daemon_msg "Waiting for NICs to settle down" - # On boot time udev migth take a long time to reorder nic's, this will ensure that + # On boot time udev might take a long time to reorder nic's, this will ensure that # all udev activity is completed and all nics presented at boot-time will have their # final name before continuing with vyos-router initialization. SECONDS=0 diff --git a/src/migration-scripts/bgp/5-to-6 b/src/migration-scripts/bgp/5-to-6 index 5e5090587..3443e8000 100644 --- a/src/migration-scripts/bgp/5-to-6 +++ b/src/migration-scripts/bgp/5-to-6 @@ -25,7 +25,7 @@ def migrate(config: ConfigTree) -> None: return for address_family in ['ipv4-unicast', 'ipv6-unicast']: - # there is no non-main routing table beeing redistributed under this addres family + # there is no non-main routing table being redistributed under this address family # bail out early and continue with next AFI table_path = bgp_base + ['address-family', address_family, 'redistribute', 'table'] if not config.exists(table_path): diff --git a/src/migration-scripts/container/0-to-1 b/src/migration-scripts/container/0-to-1 index db0b6de2b..6f11bdbac 100644 --- a/src/migration-scripts/container/0-to-1 +++ b/src/migration-scripts/container/0-to-1 @@ -13,7 +13,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see <http://www.gnu.org/licenses/>. -# T4870: change underlaying container filesystem from vfs to overlay +# T4870: change underlying container filesystem from vfs to overlay import os import shutil @@ -35,7 +35,7 @@ def migrate(config: ConfigTree) -> None: image_name = config.return_value(base + [container, 'image']) call(f'sudo podman image save --quiet --output /root/{container}.tar --format oci-archive {image_name}') - # No need to adjust the strage driver online (this is only used for testing and + # No need to adjust the storage driver online (this is only used for testing and # debugging on a live system) - it is already overlay2 when the migration script # is run during system update. But the specified driver in the image is actually # overwritten by the still present VFS filesystem on disk. Thus podman still diff --git a/src/migration-scripts/dns-dynamic/2-to-3 b/src/migration-scripts/dns-dynamic/2-to-3 index bd6ed7c00..9e79078fa 100644 --- a/src/migration-scripts/dns-dynamic/2-to-3 +++ b/src/migration-scripts/dns-dynamic/2-to-3 @@ -33,7 +33,7 @@ def normalize_name(name): the old name format. """ # Normalize unicode characters to ASCII (NFKD) - # Replace all separators with hypens, strip leading and trailing hyphens + # Replace all separators with hyphens, strip leading and trailing hyphens name = normalize('NFKD', name).encode('ascii', 'ignore').decode() name = re.sub(r'(\s|_|\W)+', '-', name).strip('-') diff --git a/src/migration-scripts/firewall/11-to-12 b/src/migration-scripts/firewall/11-to-12 index ff4f71614..5e9e9de32 100644 --- a/src/migration-scripts/firewall/11-to-12 +++ b/src/migration-scripts/firewall/11-to-12 @@ -13,7 +13,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see <http://www.gnu.org/licenses/>. -# T5681: Firewall re-writing. Simplify cli when mathcing interface +# T5681: Firewall re-writing. Simplify cli when matching interface # From # set firewall ... rule <rule> [inbound-interface | outboubd-interface] interface-name <iface> # set firewall ... rule <rule> [inbound-interface | outboubd-interface] interface-group <iface_group> diff --git a/src/migration-scripts/firewall/14-to-15 b/src/migration-scripts/firewall/14-to-15 index e3f5bd554..692b4d949 100644 --- a/src/migration-scripts/firewall/14-to-15 +++ b/src/migration-scripts/firewall/14-to-15 @@ -13,7 +13,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see <http://www.gnu.org/licenses/>. -# T5535: Migrate <set system ip disable-directed-broadcast> to <set firewall global-options directed-broadcas [enable|disable] +# T5535: Migrate <set system ip disable-directed-broadcast> to <set firewall global-options directed-broadcast [enable|disable] from vyos.configtree import ConfigTree diff --git a/src/migration-scripts/interfaces/1-to-2 b/src/migration-scripts/interfaces/1-to-2 index 65da60f24..d0abb4466 100644 --- a/src/migration-scripts/interfaces/1-to-2 +++ b/src/migration-scripts/interfaces/1-to-2 @@ -34,7 +34,7 @@ def migrate(config: ConfigTree) -> None: if config.exists(['interfaces', 'ethernet', intf, 'bond-group']): # get configured bond interface bond = config.return_value(['interfaces', 'ethernet', intf, 'bond-group']) - # delete old interface asigned (nested) bond group + # delete old interface assigned (nested) bond group config.delete(['interfaces', 'ethernet', intf, 'bond-group']) # create new bond member interface config.set(base + [bond, 'member', 'interface'], value=intf, replace=False) @@ -42,7 +42,7 @@ def migrate(config: ConfigTree) -> None: # # some combinations were allowed in the past from a CLI perspective # but the kernel overwrote them - remove from CLI to not confuse the users. - # In addition new consitency checks are in place so users can't repeat the + # In addition new consistency checks are in place so users can't repeat the # mistake. One of those nice issues is https://vyos.dev/T532 for bond in config.list_nodes(base): if config.exists(base + [bond, 'arp-monitor', 'interval']) and config.exists(base + [bond, 'mode']): diff --git a/src/migration-scripts/interfaces/5-to-6 b/src/migration-scripts/interfaces/5-to-6 index 8f406b5c8..e172d9c80 100644 --- a/src/migration-scripts/interfaces/5-to-6 +++ b/src/migration-scripts/interfaces/5-to-6 @@ -13,7 +13,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see <http://www.gnu.org/licenses/>. -# Migrate IPv6 router advertisments from a nested interface configuration to +# Migrate IPv6 router advertisements from a nested interface configuration to # a denested "service router-advert" from vyos.configtree import ConfigTree diff --git a/src/migration-scripts/interfaces/7-to-8 b/src/migration-scripts/interfaces/7-to-8 index a2e875b82..e670deb37 100644 --- a/src/migration-scripts/interfaces/7-to-8 +++ b/src/migration-scripts/interfaces/7-to-8 @@ -43,7 +43,7 @@ def migrate(config: ConfigTree) -> None: # Nothing to do return - # list all individual wireguard interface isntance + # list all individual wireguard interface instance for i in config.list_nodes(base): iface = base + [i] for peer in config.list_nodes(iface + ['peer']): diff --git a/src/migration-scripts/interfaces/8-to-9 b/src/migration-scripts/interfaces/8-to-9 index 8e1881911..baabce8bc 100644 --- a/src/migration-scripts/interfaces/8-to-9 +++ b/src/migration-scripts/interfaces/8-to-9 @@ -26,7 +26,7 @@ def migrate(config: ConfigTree) -> None: # Nothing to do continue - # list all individual interface isntance + # list all individual interface instance for i in config.list_nodes(base): iface = base + [i] if config.exists(iface + ['link']): diff --git a/src/migration-scripts/interfaces/9-to-10 b/src/migration-scripts/interfaces/9-to-10 index 06429ba98..354416975 100644 --- a/src/migration-scripts/interfaces/9-to-10 +++ b/src/migration-scripts/interfaces/9-to-10 @@ -13,7 +13,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see <http://www.gnu.org/licenses/>. -# - rename CLI node 'dhcpv6-options delgate' to 'dhcpv6-options prefix-delegation +# - rename CLI node 'dhcpv6-options delegate' to 'dhcpv6-options prefix-delegation # interface' # - rename CLI node 'interface-id' for prefix-delegation to 'address' as it # represents the local interface IPv6 address assigned by DHCPv6-PD @@ -41,5 +41,5 @@ def migrate(config: ConfigTree) -> None: for interface in config.list_nodes(new_path + ['interface']): config.rename(new_path + ['interface', interface, 'interface-id'], 'address') - # delete old noe + # delete old node config.delete(base_path) diff --git a/src/migration-scripts/ipoe-server/1-to-2 b/src/migration-scripts/ipoe-server/1-to-2 index cf1cb5ca6..6db4a7167 100644 --- a/src/migration-scripts/ipoe-server/1-to-2 +++ b/src/migration-scripts/ipoe-server/1-to-2 @@ -21,7 +21,7 @@ # - changed cli of all named pools # - moved gateway-address from pool to global configuration with / netmask # gateway can exist without pool if radius is used -# and Framed-ip-address is transmited +# and Framed-ip-address is transmitted # - There are several gateway-addresses in ipoe # - default-pool by migration. # 1. The first pool that contains next-poll. diff --git a/src/migration-scripts/l2tp/5-to-6 b/src/migration-scripts/l2tp/5-to-6 index c1f13a8c7..d57819d2a 100644 --- a/src/migration-scripts/l2tp/5-to-6 +++ b/src/migration-scripts/l2tp/5-to-6 @@ -28,7 +28,7 @@ def migrate(config: ConfigTree) -> None: value=config.return_value(idle_path)) config.delete(idle_path) - #migrate mppe from authentication to ppp-otion + #migrate mppe from authentication to ppp-options mppe_path = base + ['authentication', 'mppe'] if config.exists(mppe_path): config.set(base + ['ppp-options', 'mppe'], diff --git a/src/migration-scripts/nat/6-to-7 b/src/migration-scripts/nat/6-to-7 index 651179f4e..2e8929b1c 100644 --- a/src/migration-scripts/nat/6-to-7 +++ b/src/migration-scripts/nat/6-to-7 @@ -13,7 +13,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see <http://www.gnu.org/licenses/>. -# T5681: Firewall re-writing. Simplify cli when mathcing interface +# T5681: Firewall re-writing. Simplify cli when matching interface # From # 'set nat [source|destination] rule X [inbound-interface|outbound interface] interface-name <iface>' # 'set nat [source|destination] rule X [inbound-interface|outbound interface] interface-group <iface_group>' diff --git a/src/migration-scripts/nat66/1-to-2 b/src/migration-scripts/nat66/1-to-2 index b506f891b..eef55e878 100644 --- a/src/migration-scripts/nat66/1-to-2 +++ b/src/migration-scripts/nat66/1-to-2 @@ -29,7 +29,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see <http://www.gnu.org/licenses/>. -# T5681: Firewall re-writing. Simplify cli when mathcing interface +# T5681: Firewall re-writing. Simplify cli when matching interface # From # 'set nat66 [source|destination] rule X [inbound-interface|outbound interface] <iface>' # to diff --git a/src/migration-scripts/nhrp/0-to-1 b/src/migration-scripts/nhrp/0-to-1 index daed73993..1923f9283 100644 --- a/src/migration-scripts/nhrp/0-to-1 +++ b/src/migration-scripts/nhrp/0-to-1 @@ -112,7 +112,7 @@ def migrate(config: ConfigTree) -> None: config.set(base + [tunnel_name, 'multicast'], value=nbma, replace=False) - ## Delete non-cahching + ## Delete non-caching if config.exists(base + [tunnel_name, 'non-caching']): config.delete(base + [tunnel_name, 'non-caching']) ## Delete shortcut-destination @@ -126,4 +126,4 @@ def migrate(config: ConfigTree) -> None: config.set(base + [tunnel_name, 'shortcut']) config.delete(base + [tunnel_name, 'shortcut-target']) ## Set registration-no-unique - config.set(base + [tunnel_name, 'registration-no-unique'])
\ No newline at end of file + config.set(base + [tunnel_name, 'registration-no-unique']) diff --git a/src/migration-scripts/openconnect/1-to-2 b/src/migration-scripts/openconnect/1-to-2 index 07b1903b8..b145ccb0f 100644 --- a/src/migration-scripts/openconnect/1-to-2 +++ b/src/migration-scripts/openconnect/1-to-2 @@ -13,7 +13,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see <http://www.gnu.org/licenses/>. -# Delete depricated outside-nexthop address +# Delete deprecated outside-nexthop address from vyos.configtree import ConfigTree diff --git a/src/migration-scripts/policy/3-to-4 b/src/migration-scripts/policy/3-to-4 index 4e213eec1..b34411c39 100644 --- a/src/migration-scripts/policy/3-to-4 +++ b/src/migration-scripts/policy/3-to-4 @@ -105,7 +105,7 @@ def migrate(config: ConfigTree) -> None: for rule in config.list_nodes(base + [route_map, 'rule']): base_rule: list[str] = base + [route_map, 'rule', rule, 'set'] - # IF additive presents in coummunity then comm-list is redundant + # IF additive presents in community then comm-list is redundant isAdditive: bool = True #### Change Set community ######## if config.exists(base_rule + ['community']): diff --git a/src/migration-scripts/quagga/11-to-12 b/src/migration-scripts/quagga/11-to-12 index 83fd1d0d3..6aee33c5f 100644 --- a/src/migration-scripts/quagga/11-to-12 +++ b/src/migration-scripts/quagga/11-to-12 @@ -14,7 +14,7 @@ # along with this library. If not, see <http://www.gnu.org/licenses/>. # T6747: -# - Migrate static BFD configuration to match FRR possibillities +# - Migrate static BFD configuration to match FRR possibilities # - Consolidate static multicast routing configuration under a new node from vyos.configtree import ConfigTree diff --git a/src/migration-scripts/snmp/1-to-2 b/src/migration-scripts/snmp/1-to-2 index d2b8457ce..0d1b0aa21 100644 --- a/src/migration-scripts/snmp/1-to-2 +++ b/src/migration-scripts/snmp/1-to-2 @@ -16,7 +16,7 @@ from vyos.configtree import ConfigTree # We no longer support hashed values prefixed with '0x' to unclutter -# CLI and also calculate the hases in advance instead of retrieving +# CLI and also calculate the hashes in advance instead of retrieving # them after service startup - which was always a bad idea prefix = '0x' diff --git a/src/migration-scripts/snmp/2-to-3 b/src/migration-scripts/snmp/2-to-3 index b0020a7a5..2cacea007 100644 --- a/src/migration-scripts/snmp/2-to-3 +++ b/src/migration-scripts/snmp/2-to-3 @@ -13,7 +13,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with this library. If not, see <http://www.gnu.org/licenses/>. -# T4857: Implement FRR SNMP recomendations +# T4857: Implement FRR SNMP recommendations # cli changes from: # set service snmp oid-enable route-table # To diff --git a/src/migration-scripts/sstp/0-to-1 b/src/migration-scripts/sstp/0-to-1 index 5cc091965..f5d5c4715 100644 --- a/src/migration-scripts/sstp/0-to-1 +++ b/src/migration-scripts/sstp/0-to-1 @@ -15,7 +15,7 @@ # - migrate from "service sstp-server" to "vpn sstp" # - remove primary/secondary identifier from nameserver -# - migrate RADIUS configuration to a more uniform syntax accross the system +# - migrate RADIUS configuration to a more uniform syntax across the system # - authentication radius-server x.x.x.x to authentication radius server x.x.x.x # - authentication radius-settings to authentication radius # - do not migrate radius server req-limit, use default of unlimited diff --git a/src/migration-scripts/system/22-to-23 b/src/migration-scripts/system/22-to-23 index 92695668f..177a206e4 100644 --- a/src/migration-scripts/system/22-to-23 +++ b/src/migration-scripts/system/22-to-23 @@ -22,7 +22,7 @@ def migrate(config: ConfigTree) -> None: # Nothing to do return - # T4346: drop support to disbale IPv6 address family within the OS Kernel + # T4346: drop support to disable IPv6 address family within the OS Kernel if config.exists(base + ['disable']): config.delete(base + ['disable']) # IPv6 address family disable was the only CLI option set - we can cleanup diff --git a/src/migration-scripts/system/23-to-24 b/src/migration-scripts/system/23-to-24 index ad88a4a2b..0efd54de7 100644 --- a/src/migration-scripts/system/23-to-24 +++ b/src/migration-scripts/system/23-to-24 @@ -43,7 +43,7 @@ def migrate(config: ConfigTree) -> None: return # We need a temporary copy of the config tree as the original one needs to be - # deleted first due to a change iun thge tagNode structure. + # deleted first due to a change in the tagNode structure. config.copy(base, tmp_base) config.delete(base) diff --git a/src/op_mode/bridge.py b/src/op_mode/bridge.py index 2db462db8..9056e16d4 100755 --- a/src/op_mode/bridge.py +++ b/src/op_mode/bridge.py @@ -83,7 +83,7 @@ def _get_raw_data_fdb(bridge): def _get_raw_data_mdb(bridge): - """Get MAC-address multicast gorup for the bridge brX + """Get MAC-address multicast group for the bridge brX :return list """ json_data = cmd(f'bridge --json mdb show br {bridge}') diff --git a/src/op_mode/container.py b/src/op_mode/container.py index d513bb623..e0753f1be 100755 --- a/src/op_mode/container.py +++ b/src/op_mode/container.py @@ -74,7 +74,7 @@ def _get_raw_data(command: str) -> list: def add_image(name: str): """ Pull image from container registry. If registry authentication - is defined within VyOS CLI, credentials are used to login befroe pull """ + is defined within VyOS CLI, credentials are used to login before pull """ from vyos.configquery import ConfigTreeQuery conf = ConfigTreeQuery() diff --git a/src/op_mode/firewall.py b/src/op_mode/firewall.py index 96ce3f7f4..d5cd088e6 100755 --- a/src/op_mode/firewall.py +++ b/src/op_mode/firewall.py @@ -592,7 +592,7 @@ def show_firewall_group(name=None): header_tail = [] for group_type, group_type_conf in firewall['group'].items(): - # interate over dynamic-groups + # iterate over dynamic-groups if group_type == 'dynamic_group': if not args.detail: header_tail = ['Timeout', 'Expires'] diff --git a/src/op_mode/flow_accounting_op.py b/src/op_mode/flow_accounting_op.py index 0c3184fc1..078634610 100755 --- a/src/op_mode/flow_accounting_op.py +++ b/src/op_mode/flow_accounting_op.py @@ -86,7 +86,7 @@ def _get_ifaces_dict(): if regex_filter.search(iface_line): ifaces_dict[int(regex_filter.search(iface_line).group('iface_index'))] = regex_filter.search(iface_line).group('iface_name') - # return dictioanry + # return dictionary return ifaces_dict diff --git a/src/op_mode/format_disk.py b/src/op_mode/format_disk.py index 052c89105..56cb51a02 100755 --- a/src/op_mode/format_disk.py +++ b/src/op_mode/format_disk.py @@ -123,10 +123,10 @@ if __name__ == '__main__': f'\ndata on {target_disk}.\n') if not ask_yes_no('Do you wish to proceed?'): - print(f'Disk drive {target_disk} will not be re-formated') + print(f'Disk drive {target_disk} will not be re-formatted') exit(0) - print(f'Re-formating disk drive {target_disk}...') + print(f'Re-formatting disk drive {target_disk}...') print('Making backup copy of partitions...') backup_partitions(target_disk) diff --git a/src/op_mode/generate_ovpn_client_file.py b/src/op_mode/generate_ovpn_client_file.py index 86d94b191..a55f2e3c5 100755 --- a/src/op_mode/generate_ovpn_client_file.py +++ b/src/op_mode/generate_ovpn_client_file.py @@ -108,13 +108,13 @@ if __name__ == '__main__': required=True, ) parser.add_argument( - "-a", "--ca", type=str, help='OpenVPN CA cerificate', required=True + "-a", "--ca", type=str, help='OpenVPN CA certificate', required=True ) parser.add_argument( - "-c", "--cert", type=str, help='OpenVPN client cerificate', required=True + "-c", "--cert", type=str, help='OpenVPN client certificate', required=True ) parser.add_argument( - "-k", "--key", type=str, help='OpenVPN client cerificate key', action="store" + "-k", "--key", type=str, help='OpenVPN client certificate key', action="store" ) args = parser.parse_args() diff --git a/src/op_mode/generate_tech-support_archive.py b/src/op_mode/generate_tech-support_archive.py index 1304ff04b..d005d78ee 100755 --- a/src/op_mode/generate_tech-support_archive.py +++ b/src/op_mode/generate_tech-support_archive.py @@ -68,7 +68,7 @@ def __save_show_report_files(reports_dir: Path): def __generate_archived_files(location_path: str) -> None: """ - Generate arhives of main directories + Generate archives of main directories :param location_path: path to temporary directory :type location_path: str """ @@ -128,10 +128,10 @@ def __generate_archived_files(location_path: str) -> None: def __generate_main_archive_file(archive_file: str, tmp_dir_path: str) -> None: """ - Generate main arhive file - :param archive_file: name of arhive file + Generate main archive file + :param archive_file: name of archive file :type archive_file: str - :param tmp_dir_path: path to arhive memeber + :param tmp_dir_path: path to archive member :type tmp_dir_path: str """ diff --git a/src/op_mode/image_installer.py b/src/op_mode/image_installer.py index 41a9a89f9..cb3aa7b6c 100755 --- a/src/op_mode/image_installer.py +++ b/src/op_mode/image_installer.py @@ -520,7 +520,7 @@ def get_cli_kernel_options(config_file: str) -> list: k_memory_opts = kernel_options.get('memory', {}) # XXX: This code path and if statements must be kept in sync with the Kernel - # option handling in system_options.py:generate(). This occurance is used + # option handling in system_options.py:generate(). This occurrence is used # for having the appropriate options passed to GRUB after an image upgrade! if 'disable-mitigations' in kernel_options: cmdline_options.append('mitigations=off') @@ -951,7 +951,7 @@ def install_image() -> None: Path(f'{DIR_DST_ROOT}/boot/efi').mkdir(parents=True) disk.partition_mount(install_target.partition['efi'], f'{DIR_DST_ROOT}/boot/efi') - # a config dir. It is the deepest one, so the comand will + # a config dir. It is the deepest one, so the command will # create all the rest in a single step print('Creating a configuration file') target_config_dir: str = f'{DIR_DST_ROOT}/boot/{image_name}/rw{DIR_CONFIG}/' @@ -1031,7 +1031,7 @@ def install_image() -> None: except Exception as err: print(f'Unable to install VyOS: {err}') - # unmount filesystems and clenup + # unmount filesystems and cleanup try: if install_target is not None: if is_raid_install(install_target): @@ -1177,7 +1177,7 @@ def add_image(image_path: str, vrf: str = None, username: str = '', cmdline_options = [] - # a config dir. It is the deepest one, so the comand will + # a config dir. It is the deepest one, so the command will # create all the rest in a single step target_config_dir: str = f'{root_dir}/boot/{image_name}/rw{DIR_CONFIG}/' # copy config @@ -1193,7 +1193,7 @@ def add_image(image_path: str, vrf: str = None, username: str = '', write_file('/opt/vyatta/etc/config/first_boot', dumps(tmp)) sync() - # Copy encrypteed volumes + # Copy encrypted volumes current_name = image.get_running_image() current_config_path = f'{root_dir}/luks/{current_name}' target_config_path = f'{root_dir}/luks/{image_name}' diff --git a/src/op_mode/interfaces_wireless.py b/src/op_mode/interfaces_wireless.py index 58cc9e5db..d1070e95f 100755 --- a/src/op_mode/interfaces_wireless.py +++ b/src/op_mode/interfaces_wireless.py @@ -84,7 +84,7 @@ def _get_raw_scan_data(intf_name): ssid['ssid'] = line.lstrip().split(':')[-1].lstrip() elif line.lstrip().startswith('signal: '): - # Siganl can be " signal: -67.00 dBm", thus strip all leading whitespaces + # Signal can be " signal: -67.00 dBm", thus strip all leading whitespaces ssid['signal'] = line.lstrip().split(':')[-1].split()[0] elif line.lstrip().startswith('DS Parameter set: channel'): diff --git a/src/op_mode/ipoe-control.py b/src/op_mode/ipoe-control.py index f2934458e..632cc93cc 100755 --- a/src/op_mode/ipoe-control.py +++ b/src/op_mode/ipoe-control.py @@ -27,7 +27,7 @@ cmd_dict = { 'actions' : { 'show_sessions' : 'show sessions', 'show_stat' : 'show stat', - 'terminate' : 'teminate' + 'terminate' : 'terminate' } } diff --git a/src/op_mode/ipsec.py b/src/op_mode/ipsec.py index 9e45f3265..3061089ee 100755 --- a/src/op_mode/ipsec.py +++ b/src/op_mode/ipsec.py @@ -504,7 +504,7 @@ def _get_formatted_output_conections(data): def _get_childsa_id_list(ike_sas: list) -> list: """ Generate list of CHILD SA ids based on list of OrderingDict - wich is returned by vici + which is returned by vici :param ike_sas: list of IKE SAs generated by vici :type ike_sas: list :return: list of IKE SAs ids @@ -523,7 +523,7 @@ def _get_con_childsa_name_list( ) -> list: """ Generate list of CHILD SA ids based on list of OrderingDict - wich is returned by vici + which is returned by vici :param ike_sas: list of IKE SAs connections generated by vici :type ike_sas: list :param filter_dict: dict of filter options @@ -790,7 +790,7 @@ def show_sa(raw: bool): def _get_output_sas_detail(ra_output_list: list) -> str: """ - Formate all IKE SAs detail output + Format all IKE SAs detail output :param ra_output_list: IKE SAs list :type ra_output_list: list :return: formatted RA IKE SAs detail output @@ -921,7 +921,7 @@ def _get_formatted_ipsec_proposal(sa: dict) -> str: def _get_output_ra_sas_detail(ra_output_list: list) -> str: """ - Formate RA IKE SAs detail output + Format RA IKE SAs detail output :param ra_output_list: IKE SAs list :type ra_output_list: list :return: formatted RA IKE SAs detail output diff --git a/src/op_mode/maya_date.py b/src/op_mode/maya_date.py index 06f2f22b1..2d5a13ab9 100755 --- a/src/op_mode/maya_date.py +++ b/src/op_mode/maya_date.py @@ -168,7 +168,7 @@ class MayaDate(object): """ The start date is not the beginning of both cycles, it's 4 Ajaw. So we need to add 4 to the 13 days cycle day, - and substract 1 from the 20 day cycle to get correct result. + and subtract 1 from the 20 day cycle to get correct result. """ tzolkin_13 = (days + 4) % 13 tzolkin_20 = (days - 1) % 20 @@ -181,7 +181,7 @@ class MayaDate(object): """ Returns haab date string. The time start on 8 Kumk'u rather than 0 Pop, which is - 17 days before the new haab, so we need to substract 17 + 17 days before the new haab, so we need to subtract 17 from the current date to get correct result. """ days = self.days diff --git a/src/op_mode/nat.py b/src/op_mode/nat.py index 37cabd047..f97d7dc0f 100755 --- a/src/op_mode/nat.py +++ b/src/op_mode/nat.py @@ -148,7 +148,7 @@ def _get_formatted_output_rules(data, direction, family): interface = interface[3:] for index, match in enumerate(jmespath.search('rule.expr[*].match', rule)): if 'payload' in match['left']: - # Handle NAT rule containing comma-seperated list of ports + # Handle NAT rule containing comma-separated list of ports if (isinstance(match['right'], dict) and ('prefix' in match['right'] or 'set' in match['right'] or 'range' in match['right'])): diff --git a/src/op_mode/ping.py b/src/op_mode/ping.py index e9487e03b..f52dfa7de 100755 --- a/src/op_mode/ping.py +++ b/src/op_mode/ping.py @@ -97,7 +97,7 @@ options = { 'no-loopback': { 'ping': '{command} -L', 'type': 'noarg', - 'help': 'Supress loopback of multicast pings' + 'help': 'Suppress loopback of multicast pings' }, 'pattern': { 'ping': '{command} -p {value}', diff --git a/src/op_mode/show_acceleration.py b/src/op_mode/show_acceleration.py index 36e906cb8..05c591356 100755 --- a/src/op_mode/show_acceleration.py +++ b/src/op_mode/show_acceleration.py @@ -71,7 +71,7 @@ def get_qat_proc_path(qat_dev): q_bsf = q_list[1] return "/sys/kernel/debug/qat_"+q_type+"_"+q_bsf+"/" -# Check if QAT service confgured +# Check if QAT service configured def check_qat_if_conf(): if not Config().exists_effective('system acceleration qat'): print("\t system acceleration qat is not configured") @@ -92,7 +92,7 @@ args = parser.parse_args() if args.hw: detect_qat_dev() - # Show availible Intel QAT devices + # Show available Intel QAT devices call('lspci -nn | egrep -e \'8086:37c[8-9]|8086:19e2|8086:0435|8086:6f54\'') elif args.flow and args.dev: check_qat_if_conf() diff --git a/src/op_mode/show_openconnect_otp.py b/src/op_mode/show_openconnect_otp.py index 36aa7bf11..61e52d01e 100755 --- a/src/op_mode/show_openconnect_otp.py +++ b/src/op_mode/show_openconnect_otp.py @@ -97,7 +97,7 @@ def display_otp_ocserv(username, params, info): if __name__ == '__main__': parser = argparse.ArgumentParser(add_help=False, description='Show OTP authentication information for selected user') parser.add_argument('--user', action="store", type=str, default='', help='Username') - parser.add_argument('--info', action="store", type=str, default='full', help='Wich information to display') + parser.add_argument('--info', action="store", type=str, default='full', help='Which information to display') args = parser.parse_args() if check_uname_otp(args.user): diff --git a/src/op_mode/snmp.py b/src/op_mode/snmp.py index ea952aaaa..c7dfb51ef 100755 --- a/src/op_mode/snmp.py +++ b/src/op_mode/snmp.py @@ -22,7 +22,7 @@ from vyos.utils.process import call config_file_daemon = r'/etc/snmp/snmpd.conf' -parser = argparse.ArgumentParser(description='Retrieve infomration from running SNMP daemon') +parser = argparse.ArgumentParser(description='Retrieve information from running SNMP daemon') parser.add_argument('--allowed', action="store_true", help='Show available SNMP communities') parser.add_argument('--community', action="store", help='Show status of given SNMP community', type=str) parser.add_argument('--host', action="store", help='SNMP host to connect to', type=str, default='localhost') diff --git a/src/op_mode/snmp_ifmib.py b/src/op_mode/snmp_ifmib.py index 020865c9d..d733540f5 100755 --- a/src/op_mode/snmp_ifmib.py +++ b/src/op_mode/snmp_ifmib.py @@ -28,7 +28,7 @@ from vyos.utils.process import popen parser = argparse.ArgumentParser(description='Retrieve SNMP interfaces information') parser.add_argument('--ifindex', action='store', nargs='?', const='all', help='Show interface index') -parser.add_argument('--ifalias', action='store', nargs='?', const='all', help='Show interface aliase') +parser.add_argument('--ifalias', action='store', nargs='?', const='all', help='Show interface alias') parser.add_argument('--ifdescr', action='store', nargs='?', const='all', help='Show interface description') def show_ifindex(intf): diff --git a/src/op_mode/stp.py b/src/op_mode/stp.py index ae0954604..c2a897183 100755 --- a/src/op_mode/stp.py +++ b/src/op_mode/stp.py @@ -72,7 +72,7 @@ def _get_stp_data(ifname, brInfo, brStatus): tmpInfo['bridge_id'] = cmd(f"cat /sys/class/net/{brInfo.get('ifname')}/bridge/bridge_id").split('.') tmpInfo['root_id'] = cmd(f"cat /sys/class/net/{brInfo.get('ifname')}/bridge/root_id").split('.') - # The "/sys/class/net" structure stores the IDs without seperators like ':' or '.' + # The "/sys/class/net" structure stores the IDs without separators like ':' or '.' # This adds a ':' after every 2 characters to make it resemble a MAC Address tmpInfo['bridge_id'][1] = ':'.join(tmpInfo['bridge_id'][1][i:i+2] for i in range(0, len(tmpInfo['bridge_id'][1]), 2)) tmpInfo['root_id'][1] = ':'.join(tmpInfo['root_id'][1][i:i+2] for i in range(0, len(tmpInfo['root_id'][1]), 2)) diff --git a/src/op_mode/traceroute.py b/src/op_mode/traceroute.py index cc19464e2..223e6b2b1 100755 --- a/src/op_mode/traceroute.py +++ b/src/op_mode/traceroute.py @@ -85,7 +85,7 @@ options = { 'help': 'Use TCP SYN for tracerouting (default port is 80)' }, 'tos': { - 'traceroute': '{commad} -t {value}', + 'traceroute': '{command} -t {value}', 'type': '<tos>', 'help': 'Mark packets with specified TOS' }, diff --git a/src/op_mode/vpp.py b/src/op_mode/vpp.py index 0cdb94e3a..80697f503 100755 --- a/src/op_mode/vpp.py +++ b/src/op_mode/vpp.py @@ -490,7 +490,7 @@ def show_bond_details(raw: bool): return VPPShow().bond_details(raw) # ----------------------------- -# Bridge op-mode entrie +# Bridge op-mode entry # ----------------------------- @vyos.opmode.verify_cli_exists(['interfaces', 'vpp', 'bridge']) def show_bridge(raw: bool, ifname: typing.Optional[str] = None): diff --git a/src/op_mode/vrrp.py b/src/op_mode/vrrp.py index c8414b03e..92eb12d81 100755 --- a/src/op_mode/vrrp.py +++ b/src/op_mode/vrrp.py @@ -191,7 +191,7 @@ def _get_formatted_statistics_output(data: list) -> str: Prepare formatted statistics output from the given data. Args: - data (list): A list of dictionaries containing vrrp grop information + data (list): A list of dictionaries containing vrrp group information and statistics. Returns: @@ -228,7 +228,7 @@ def _get_formatted_detail_output(data: list) -> str: Prepare formatted detail information output from the given data. Args: - data (list): A list of dictionaries containing vrrp grop information + data (list): A list of dictionaries containing vrrp group information and statistics. Returns: diff --git a/src/op_mode/wireguard_client.py b/src/op_mode/wireguard_client.py index 7638d24a0..04d91cc47 100755 --- a/src/op_mode/wireguard_client.py +++ b/src/op_mode/wireguard_client.py @@ -33,7 +33,7 @@ server_config = """WireGuard client configuration for interface: {{ interface }} To enable this configuration on a VyOS router you can use the following commands: -=== VyOS (server) configurtation === +=== VyOS (server) configuration === {% for addr in address if address is defined %} set interfaces wireguard {{ interface }} peer {{ name }} allowed-ips '{{ addr }}' diff --git a/src/opt/vyatta/share/vyatta-op/functions/interpreter/vyatta-op-run b/src/opt/vyatta/share/vyatta-op/functions/interpreter/vyatta-op-run index 1f233710b..7c183222a 100644 --- a/src/opt/vyatta/share/vyatta-op/functions/interpreter/vyatta-op-run +++ b/src/opt/vyatta/share/vyatta-op/functions/interpreter/vyatta-op-run @@ -100,7 +100,7 @@ _vyatta_op_conv_node_path () _vyatta_op_conv_run_cmd () { - # Substitue bash positional variables + # Substitute bash positional variables # for the same value in the expanded array local restore_shopts=$( shopt -p extglob nullglob | tr \\n \; ) shopt -s extglob diff --git a/src/opt/vyatta/share/vyatta-op/functions/interpreter/vyatta-unpriv b/src/opt/vyatta/share/vyatta-op/functions/interpreter/vyatta-unpriv index 1507f4f0d..cf28641f3 100644 --- a/src/opt/vyatta/share/vyatta-op/functions/interpreter/vyatta-unpriv +++ b/src/opt/vyatta/share/vyatta-op/functions/interpreter/vyatta-unpriv @@ -35,7 +35,7 @@ vyatta_unpriv_ambiguous () vyatta_unpriv_init () { - # empty and default line compeletion + # empty and default line completion complete -E -F _vyatta_op_expand complete -D -F _vyatta_op_default_expand diff --git a/src/services/api/graphql/README.graphql b/src/services/api/graphql/README.graphql index 1133d79ed..0f43ac356 100644 --- a/src/services/api/graphql/README.graphql +++ b/src/services/api/graphql/README.graphql @@ -64,7 +64,7 @@ save to /config/config.boot; to save to an alternative path, specify fileName. Similarly, using an analogous 'endpoint' (meaning the form of the request -and resolver; the actual enpoint for all GraphQL requests is +and resolver; the actual endpoint for all GraphQL requests is https://hostname/graphql), one can load an arbitrary config file from a path. diff --git a/src/services/api/graphql/generate/schema_from_composite.py b/src/services/api/graphql/generate/schema_from_composite.py index e370961dc..9a07f88fe 100755 --- a/src/services/api/graphql/generate/schema_from_composite.py +++ b/src/services/api/graphql/generate/schema_from_composite.py @@ -15,7 +15,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # # -# A utility to generate GraphQL schema defintions from typing information of +# A utility to generate GraphQL schema definitions from typing information of # composite functions comprising several requests. import os diff --git a/src/services/api/graphql/generate/schema_from_config_session.py b/src/services/api/graphql/generate/schema_from_config_session.py index 61ac9bd39..bfa4bc006 100755 --- a/src/services/api/graphql/generate/schema_from_config_session.py +++ b/src/services/api/graphql/generate/schema_from_config_session.py @@ -15,7 +15,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # # -# A utility to generate GraphQL schema defintions from typing information of +# A utility to generate GraphQL schema definitions from typing information of # (wrappers of) native configsession functions. import os diff --git a/src/services/api/graphql/generate/schema_from_op_mode.py b/src/services/api/graphql/generate/schema_from_op_mode.py index 8cfd60769..618ea2e61 100755 --- a/src/services/api/graphql/generate/schema_from_op_mode.py +++ b/src/services/api/graphql/generate/schema_from_op_mode.py @@ -15,7 +15,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # # -# A utility to generate GraphQL schema defintions from standardized op-mode +# A utility to generate GraphQL schema definitions from standardized op-mode # scripts. import os diff --git a/src/services/api/graphql/routers.py b/src/services/api/graphql/routers.py index 5526918d9..c6886ba1c 100644 --- a/src/services/api/graphql/routers.py +++ b/src/services/api/graphql/routers.py @@ -32,7 +32,7 @@ def graphql_init(app: 'FastAPI'): state = SessionState() - # import after initializaion of state + # import after initialization of state from .bindings import generate_schema schema = generate_schema() diff --git a/src/services/api/rest/models.py b/src/services/api/rest/models.py index 70fab03ec..bfea17344 100644 --- a/src/services/api/rest/models.py +++ b/src/services/api/rest/models.py @@ -48,7 +48,7 @@ def success(data): # Pydantic models for validation # Pydantic will cast when possible, so use StrictStr validators added as # needed for additional constraints -# json_schema_extra adds anotations to OpenAPI to add examples +# json_schema_extra adds annotations to OpenAPI to add examples class ApiModel(BaseModel): diff --git a/src/services/api/rest/routers.py b/src/services/api/rest/routers.py index 25c29b4c3..058bcc20d 100644 --- a/src/services/api/rest/routers.py +++ b/src/services/api/rest/routers.py @@ -107,7 +107,7 @@ def auth_required(data: ApiModel): # override Request and APIRoute classes in order to convert form request to json; -# do all explicit validation here, for backwards compatability of error messages; +# do all explicit validation here, for backwards compatibility of error messages; # the explicit validation may be dropped, if desired, in favor of native # validation by FastAPI/Pydantic, as is used for application/json requests class MultipartRequest(Request): @@ -501,7 +501,7 @@ def _execute_configure_op( status = 500 # Don't give the details away to the outer world - error_msg = 'An internal error occured. Check the logs for details.' + error_msg = 'An internal error occurred. Check the logs for details.' finally: if 'IN_COMMIT_CONFIRM' in env: del env['IN_COMMIT_CONFIRM'] @@ -631,7 +631,7 @@ async def retrieve_op(data: RetrieveModel): return error(400, str(e)) except Exception: LOG.critical(traceback.format_exc()) - return error(500, 'An internal error occured. Check the logs for details.') + return error(500, 'An internal error occurred. Check the logs for details.') return success(res) @@ -719,7 +719,7 @@ async def config_file_op(data: ConfigFileModel, background_tasks: BackgroundTask return error(400, str(e)) except Exception: LOG.critical(traceback.format_exc()) - return error(500, 'An internal error occured. Check the logs for details.') + return error(500, 'An internal error occurred. Check the logs for details.') finally: if 'IN_COMMIT_CONFIRM' in env: del env['IN_COMMIT_CONFIRM'] @@ -747,7 +747,7 @@ def image_op(data: ImageModel): return error(400, str(e)) except Exception: LOG.critical(traceback.format_exc()) - return error(500, 'An internal error occured. Check the logs for details.') + return error(500, 'An internal error occurred. Check the logs for details.') return success(res) @@ -780,7 +780,7 @@ def container_image_op(data: ContainerImageModel): return error(400, str(e)) except Exception: LOG.critical(traceback.format_exc()) - return error(500, 'An internal error occured. Check the logs for details.') + return error(500, 'An internal error occurred. Check the logs for details.') return success(res) @@ -803,7 +803,7 @@ def generate_op(data: GenerateModel): return error(400, str(e)) except Exception: LOG.critical(traceback.format_exc()) - return error(500, 'An internal error occured. Check the logs for details.') + return error(500, 'An internal error occurred. Check the logs for details.') return success(res) @@ -825,7 +825,7 @@ def show_op(data: ShowModel): return error(400, str(e)) except Exception: LOG.critical(traceback.format_exc()) - return error(500, 'An internal error occured. Check the logs for details.') + return error(500, 'An internal error occurred. Check the logs for details.') return success(res) @@ -847,7 +847,7 @@ def reboot_op(data: RebootModel): return error(400, str(e)) except Exception: LOG.critical(traceback.format_exc()) - return error(500, 'An internal error occured. Check the logs for details.') + return error(500, 'An internal error occurred. Check the logs for details.') return success(res) @@ -868,7 +868,7 @@ def renew_op(data: RenewModel): return error(400, str(e)) except Exception: LOG.critical(traceback.format_exc()) - return error(500, 'An internal error occured. Check the logs for details.') + return error(500, 'An internal error occurred. Check the logs for details.') return success(res) @@ -889,7 +889,7 @@ def reset_op(data: ResetModel): return error(400, str(e)) except Exception: LOG.critical(traceback.format_exc()) - return error(500, 'An internal error occured. Check the logs for details.') + return error(500, 'An internal error occurred. Check the logs for details.') return success(res) @@ -929,7 +929,7 @@ def import_pki(data: ImportPkiModel): return error(400, str(e)) except Exception: LOG.critical(traceback.format_exc()) - return error(500, 'An internal error occured. Check the logs for details.') + return error(500, 'An internal error occurred. Check the logs for details.') finally: lock.release() @@ -953,7 +953,7 @@ def poweroff_op(data: PoweroffModel): return error(400, str(e)) except Exception: LOG.critical(traceback.format_exc()) - return error(500, 'An internal error occured. Check the logs for details.') + return error(500, 'An internal error occurred. Check the logs for details.') return success(res) diff --git a/src/services/vyos-http-api-server b/src/services/vyos-http-api-server index c9d5f3a1b..94697ed4d 100755 --- a/src/services/vyos-http-api-server +++ b/src/services/vyos-http-api-server @@ -99,7 +99,7 @@ def info(q: Annotated[InfoQueryParams, Query()]): res.update(banner=banner) except Exception: LOG.critical(traceback.format_exc()) - return error(500, 'An internal error occured. Check the logs for details.') + return error(500, 'An internal error occurred. Check the logs for details.') return success(res) |
