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 /src/op_mode | |
| 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
Diffstat (limited to 'src/op_mode')
| -rwxr-xr-x | src/op_mode/bridge.py | 2 | ||||
| -rwxr-xr-x | src/op_mode/container.py | 2 | ||||
| -rwxr-xr-x | src/op_mode/firewall.py | 2 | ||||
| -rwxr-xr-x | src/op_mode/flow_accounting_op.py | 2 | ||||
| -rwxr-xr-x | src/op_mode/format_disk.py | 4 | ||||
| -rwxr-xr-x | src/op_mode/generate_ovpn_client_file.py | 6 | ||||
| -rwxr-xr-x | src/op_mode/generate_tech-support_archive.py | 8 | ||||
| -rwxr-xr-x | src/op_mode/image_installer.py | 10 | ||||
| -rwxr-xr-x | src/op_mode/interfaces_wireless.py | 2 | ||||
| -rwxr-xr-x | src/op_mode/ipoe-control.py | 2 | ||||
| -rwxr-xr-x | src/op_mode/ipsec.py | 8 | ||||
| -rwxr-xr-x | src/op_mode/maya_date.py | 4 | ||||
| -rwxr-xr-x | src/op_mode/nat.py | 2 | ||||
| -rwxr-xr-x | src/op_mode/ping.py | 2 | ||||
| -rwxr-xr-x | src/op_mode/show_acceleration.py | 4 | ||||
| -rwxr-xr-x | src/op_mode/show_openconnect_otp.py | 2 | ||||
| -rwxr-xr-x | src/op_mode/snmp.py | 2 | ||||
| -rwxr-xr-x | src/op_mode/snmp_ifmib.py | 2 | ||||
| -rwxr-xr-x | src/op_mode/stp.py | 2 | ||||
| -rwxr-xr-x | src/op_mode/traceroute.py | 2 | ||||
| -rwxr-xr-x | src/op_mode/vpp.py | 2 | ||||
| -rwxr-xr-x | src/op_mode/vrrp.py | 4 | ||||
| -rwxr-xr-x | src/op_mode/wireguard_client.py | 2 |
23 files changed, 39 insertions, 39 deletions
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 }}' |
