Skip to content

Commit

Permalink
spelling corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-pavel committed Apr 8, 2022
1 parent 9869def commit aed5b80
Show file tree
Hide file tree
Showing 22 changed files with 71 additions and 71 deletions.
8 changes: 4 additions & 4 deletions doc/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ source ./venv/bin/activate
```

Also, you may want to install tcpdump for saving captures of every test.
This step is optional and tcpdump usage is controlled via init_all.py
This step is optional and tcpdump usage is controlled via `init_all.py`.

```shell
sudo apt-get install tcpdump
Expand All @@ -43,9 +43,9 @@ Manual Configuration
--------------------

Configuration management is not well-designed yet. The default configuration
is stored in forge/tests/init_all.py_default. Please copy this file
to forge/tests/init_all.py and edit relevant values in this file.
Without init_all.py Forge will not start at all. init_all.py is added
is stored in `init_all.py_default`. Please copy this file
to `init_all.py` and edit relevant values in this file.
Without `init_all.py`, Forge will not start at all. `init_all.py` is added
to gitignore, so any local changes you make to this file will be ignored by git.

Also make sure that your ssh server is configured. Make sure that SSH connection between
Expand Down
4 changes: 2 additions & 2 deletions src/protosupport/multi_protocol_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ def lease_dump(backend, db_name=world.f_cfg.db_name, db_user=world.f_cfg.db_user
db_passwd=world.f_cfg.db_passwd, destination_address=world.f_cfg.mgmt_address,
out="/tmp/lease_dump.csv"):
"""
Function dumps database to CSV file performing kea-admin lese-dump command on server.
Function dumps database to CSV file performing kea-admin lease-dump command on server.
:param backend: Select database backend: mysql, pgsql
:param db_name: specifies a database name to connect to
:param db_user: specifies username when connecting to a database
Expand All @@ -403,7 +403,7 @@ def lease_dump(backend, db_name=world.f_cfg.db_name, db_user=world.f_cfg.db_user
def lease_upload(backend, leases_file, db_name=world.f_cfg.db_name, db_user=world.f_cfg.db_user,
db_passwd=world.f_cfg.db_passwd, destination_address=world.f_cfg.mgmt_address):
"""
Function uploads CSV file to database performing kea-admin lese-upload command on server.
Function uploads CSV file to database performing kea-admin lease-upload command on server.
:param backend: Select database backend: mysql, pgsql
:param leases_file: input file path
:param db_name: specifies a database name to connect to
Expand Down
2 changes: 1 addition & 1 deletion src/protosupport/v6/srv_msg.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def client_sets_value(value_name, new_value):
assert value_name in world.cfg["values"], "Unknown value name : %s" % value_name


def unicast_addres(addr_type):
def unicast_address(addr_type):
"""
Turn off sending on All_DHCP_Relay_Agents_and_Servers, and use UNICAST address.
"""
Expand Down
2 changes: 1 addition & 1 deletion src/softwaresupport/isc_dhcp4_server/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@

def add_siaddr(addr, subnet_number):
"""
Change siaddr value in partucular subnet
Change siaddr value in a particular subnet.
:param addr: string with ip address
:param subnet_number: int with subnet id
:return:
Expand Down
16 changes: 8 additions & 8 deletions src/softwaresupport/isc_dhcp6_server/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,24 +83,24 @@ def switch_prefix6_lengths_to_pool(ip6_addr, length, delegated_length):
:param delegated_length: int prefix delegated length
"""

ip6_addr_splited = ip6_addr.split(":")
if len(ip6_addr_splited) < 3 or len(ip6_addr_splited) > 9:
ip6_addr_split = ip6_addr.split(":")
if len(ip6_addr_split) < 3 or len(ip6_addr_split) > 9:
assert False, "Error! Please enter correct IPv6 address!"
error_flag = False
for i in range(1, len(ip6_addr_splited) - 1):
if not ip6_addr_splited[i]:
for i in range(1, len(ip6_addr_split) - 1):
if not ip6_addr_split[i]:
if error_flag:
assert False, "Error! Please enter correct IPv6 address!"
error_flag = True

for i in range(0, 6):
if ip6_addr_splited[i]:
if ip6_addr_split[i]:
continue
else:
ip6_addr_splited.append("")
ip6_addr_split.append("")

bin_addr = []
for each in ip6_addr_splited:
for each in ip6_addr_split:
if not each:
bin_addr.append('')
continue
Expand Down Expand Up @@ -457,7 +457,7 @@ def host_reservation_extension(reservation_number, subnet, reservation_type, res

def cfg_write():
"""
Build config file from all previously added options, subntes and parameters
Build config file from all previously added options, subnets and parameters.
"""
cfg_file = open(world.cfg["cfg_file"], 'w')
cfg_file.write(world.cfg["conf_time"])
Expand Down
4 changes: 2 additions & 2 deletions src/srv_msg.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def relay_agent_does_include(opt_type):


@step(r'Client chooses (GLOBAL)|(LINK_LOCAL) UNICAST address.')
def unicast_addres(addr_type, addr_type2):
def unicast_address(addr_type, addr_type2):
"""
Message can be send on 3 different addresses:
- multicast for DHCPv6
Expand All @@ -141,7 +141,7 @@ def unicast_addres(addr_type, addr_type2):
Proper configuration in init_all.py required.
"""
# send true when GLOBAL and False when LINK_LOCAL
dhcpmsg.unicast_addres(True if addr_type else False)
dhcpmsg.unicast_address(True if addr_type else False)


@step(r'Generate new (\S+).')
Expand Down
6 changes: 3 additions & 3 deletions tests/dhcp/hooks/leases_cmds/test_lease_get_by.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def _get_address(mac, address, cli_id=None, fqdn=None):
srv_msg.response_check_content('yiaddr', address)


# lease4-get-by-client-id, lease4-get-by-hostname, lease4-get-by-hw-adderss
# lease4-get-by-client-id, lease4-get-by-hostname, lease4-get-by-hw-address
@pytest.mark.v4
@pytest.mark.controlchannel
@pytest.mark.parametrize('backend', ['memfile', 'mysql', 'postgresql'])
Expand Down Expand Up @@ -195,13 +195,13 @@ def test_control_channel_lease4_get_by_positive(backend):
_send_cmd("lease4-get-by-client-id", exp_result=1)


# lease4-get-by-client-id, lease4-get-by-hostname, lease4-get-by-hw-adderss
# lease4-get-by-client-id, lease4-get-by-hostname, lease4-get-by-hw-address
@pytest.mark.v4
@pytest.mark.controlchannel
def test_control_channel_lease4_get_by_negative():
"""
Check various options of incorrectly build
lease4-get-by-client-id, lease4-get-by-hostname, lease4-get-by-hw-adderss, commands.
lease4-get-by-client-id, lease4-get-by-hostname, lease4-get-by-hw-address, commands.
"""
misc.test_setup()
srv_control.add_hooks('libdhcp_lease_cmds.so')
Expand Down
2 changes: 1 addition & 1 deletion tests/dhcp/hooks/leases_cmds/test_lease_get_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def test_control_channel_lease4_get_page_positive(backend):
del all_leases[lease_nbr]["cltt"] # this value is dynamic so we delete it
# add lease to buffer
all_pages.append(all_leases[lease_nbr])
# remeber last ip to ask for next page
# remember last ip to ask for next page
last_ip = all_leases[lease_nbr]["ip-address"]
counter += len(all_leases)
# get next page
Expand Down
2 changes: 1 addition & 1 deletion tests/dhcp/hooks/test_hosts_cmds.py
Original file line number Diff line number Diff line change
Expand Up @@ -2339,7 +2339,7 @@ def test_v6_hosts_cmds_add_reservation_flex_id_NoAddressAvail(channel, host_data
# Get the first lease from subnet
srv_msg.SARR('2001:db8:1::50', duid='00:03:00:01:f6:f5:f4:f3:f2:01', relay_information=False)

# add host reservationa
# add host reservation
response = srv_msg.send_ctrl_cmd({
"arguments": {
"reservation": {
Expand Down
4 changes: 2 additions & 2 deletions tests/dhcp/hooks/test_leasequery.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def test_v4_leasequery_mac(backend):
srv_msg.client_sets_value('Client', 'giaddr', '$(CIADDR)')
srv_msg.client_sets_value('Client', 'ciaddr', 0)
srv_msg.client_sets_value('Client', 'chaddr', "1a:1b:1c:1d:1e:1f")
srv_msg.client_requests_option(82) # Recomended by RFC, not required by Kea
srv_msg.client_requests_option(82) # Recommended by RFC, not required by Kea
srv_msg.client_send_msg('LEASEQUERY')

# sending and testing the response
Expand Down Expand Up @@ -267,7 +267,7 @@ def test_v4_leasequery_client(backend):
srv_msg.client_sets_value('Client', 'chaddr', "00")
srv_msg.client_sets_value('Client', 'hlen', 0)
srv_msg.client_does_include_with_value('client_id', '00010203040506')
srv_msg.client_requests_option(82) # Recomended by RFC, not required by Kea
srv_msg.client_requests_option(82) # Recommended by RFC, not required by Kea
srv_msg.client_send_msg('LEASEQUERY')

# sending and testing the response
Expand Down
2 changes: 1 addition & 1 deletion tests/dhcp/hooks/test_legal_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@ def test_v6_legal_log_parser_format_dual_ip():
@pytest.mark.legal_logging
def test_v6_legal_log_dual_ip():
"""
Test checks standart formatting of "legal_log" hook with multiple ip addresses in one lease.
Test checks standard formatting of legal_log hook with multiple IP addresses in one lease.
SARR exchange is used to acquire leases.
Log file is checked for proper content.
"""
Expand Down
4 changes: 2 additions & 2 deletions tests/dhcp/hooks/test_radius.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def test_radius_framed_pool(dhcp_version: str, attribute_cardinality: str):
srv_control.start_srv('DHCP', 'started')

if attribute_cardinality == 'double-attributes':
# Wether Kea takes only the first pool into consideration, as it happens at
# Whether Kea takes only the first pool into consideration, as it happens at
# the time of writing, or if the allocation explicitly fails, expect the
# client to not get the gold lease.
radius.send_message_and_expect_no_more_leases(mac='08:00:27:b0:c1:41')
Expand Down Expand Up @@ -174,7 +174,7 @@ def test_radius_giaddr(dhcp_version: str,
reselect: str):
"""
Check RADIUS functionality with a client that has a giaddr either belonging
to a configured subnet inisde Kea, or not.
to a configured subnet inside Kea, or not.
:param dhcp_version: the DHCP version being tested
:param config_type: whether usual subnets are used or shared network
Expand Down
28 changes: 14 additions & 14 deletions tests/dhcp/protocol/test_v6_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def test_v6_basic_message_unicast_global_solicit():

misc.test_procedure()
srv_msg.client_requests_option(7)
srv_msg.unicast_addres('GLOBAL', None)
srv_msg.unicast_address('GLOBAL', None)
srv_msg.client_does_include('Client', 'client-id')
srv_msg.client_does_include('Client', 'IA-NA')
srv_msg.client_send_msg('SOLICIT')
Expand Down Expand Up @@ -107,7 +107,7 @@ def test_v6_basic_message_unicast_global_confirm():
misc.test_procedure()
srv_msg.client_save_option('IA_NA')
srv_msg.client_add_saved_option()
srv_msg.unicast_addres('GLOBAL', None)
srv_msg.unicast_address('GLOBAL', None)
srv_msg.client_does_include('Client', 'client-id')
srv_msg.client_send_msg('CONFIRM')

Expand Down Expand Up @@ -178,7 +178,7 @@ def test_v6_basic_message_unicast_global_rebind():
srv_msg.send_wait_for_message('MUST', 'REPLY')

misc.test_procedure()
srv_msg.unicast_addres('GLOBAL', None)
srv_msg.unicast_address('GLOBAL', None)
srv_msg.client_save_option('IA_NA')
srv_msg.client_add_saved_option()
srv_msg.client_does_include('Client', 'client-id')
Expand Down Expand Up @@ -228,7 +228,7 @@ def test_v6_basic_message_unicast_global_inforequest():

misc.test_procedure()
srv_msg.client_requests_option(7)
srv_msg.unicast_addres('GLOBAL', None)
srv_msg.unicast_address('GLOBAL', None)
# message wont contain client-id option
srv_msg.client_send_msg('INFOREQUEST')

Expand Down Expand Up @@ -305,7 +305,7 @@ def test_v6_basic_message_unicast_global_request():
srv_msg.client_save_option('server-id')
srv_msg.client_save_option('IA_NA')
srv_msg.client_add_saved_option()
srv_msg.unicast_addres('GLOBAL', None)
srv_msg.unicast_address('GLOBAL', None)
srv_msg.client_does_include('Client', 'client-id')
srv_msg.client_send_msg('REQUEST')

Expand Down Expand Up @@ -384,7 +384,7 @@ def test_v6_basic_message_unicast_global_renew():
srv_msg.send_wait_for_message('MUST', 'REPLY')

misc.test_procedure()
srv_msg.unicast_addres('GLOBAL', None)
srv_msg.unicast_address('GLOBAL', None)
srv_msg.client_save_option('IA_NA')
srv_msg.client_save_option('server-id')
srv_msg.client_add_saved_option()
Expand Down Expand Up @@ -468,7 +468,7 @@ def test_v6_basic_message_unicast_global_release():
srv_msg.send_wait_for_message('MUST', 'REPLY')

misc.test_procedure()
srv_msg.unicast_addres('GLOBAL', None)
srv_msg.unicast_address('GLOBAL', None)
srv_msg.client_save_option('IA_NA')
srv_msg.client_save_option('server-id')
srv_msg.client_add_saved_option()
Expand Down Expand Up @@ -512,7 +512,7 @@ def test_v6_basic_message_unicast_local_solicit():

misc.test_procedure()
srv_msg.client_requests_option(7)
srv_msg.unicast_addres(None, 'LINK_LOCAL')
srv_msg.unicast_address(None, 'LINK_LOCAL')
srv_msg.client_does_include('Client', 'client-id')
srv_msg.client_does_include('Client', 'IA-NA')
srv_msg.client_send_msg('SOLICIT')
Expand Down Expand Up @@ -583,7 +583,7 @@ def test_v6_basic_message_unicast_local_confirm():
misc.test_procedure()
srv_msg.client_save_option('IA_NA')
srv_msg.client_add_saved_option()
srv_msg.unicast_addres(None, 'LINK_LOCAL')
srv_msg.unicast_address(None, 'LINK_LOCAL')
srv_msg.client_does_include('Client', 'client-id')
srv_msg.client_send_msg('CONFIRM')

Expand Down Expand Up @@ -652,7 +652,7 @@ def test_v6_basic_message_unicast_local_rebind():
srv_msg.send_wait_for_message('MUST', 'REPLY')

misc.test_procedure()
srv_msg.unicast_addres(None, 'LINK_LOCAL')
srv_msg.unicast_address(None, 'LINK_LOCAL')
srv_msg.client_save_option('IA_NA')
srv_msg.client_add_saved_option()
srv_msg.client_does_include('Client', 'client-id')
Expand Down Expand Up @@ -700,7 +700,7 @@ def test_v6_basic_message_unicast_local_inforequest():

misc.test_procedure()
srv_msg.client_requests_option(7)
srv_msg.unicast_addres(None, 'LINK_LOCAL')
srv_msg.unicast_address(None, 'LINK_LOCAL')
# message wont contain client-id option
srv_msg.client_send_msg('INFOREQUEST')

Expand Down Expand Up @@ -775,7 +775,7 @@ def test_v6_basic_message_unicast_local_request():
srv_msg.client_save_option('server-id')
srv_msg.client_save_option('IA_NA')
srv_msg.client_add_saved_option()
srv_msg.unicast_addres(None, 'LINK_LOCAL')
srv_msg.unicast_address(None, 'LINK_LOCAL')
srv_msg.client_does_include('Client', 'client-id')
srv_msg.client_send_msg('REQUEST')

Expand Down Expand Up @@ -852,7 +852,7 @@ def test_v6_basic_message_unicast_local_renew():
srv_msg.send_wait_for_message('MUST', 'REPLY')

misc.test_procedure()
srv_msg.unicast_addres(None, 'LINK_LOCAL')
srv_msg.unicast_address(None, 'LINK_LOCAL')
srv_msg.client_save_option('IA_NA')
srv_msg.client_save_option('server-id')
srv_msg.client_add_saved_option()
Expand Down Expand Up @@ -933,7 +933,7 @@ def test_v6_basic_message_unicast_local_release():
srv_msg.send_wait_for_message('MUST', 'REPLY')

misc.test_procedure()
srv_msg.unicast_addres(None, 'LINK_LOCAL')
srv_msg.unicast_address(None, 'LINK_LOCAL')
srv_msg.client_save_option('IA_NA')
srv_msg.client_save_option('server-id')
srv_msg.client_add_saved_option()
Expand Down
4 changes: 2 additions & 2 deletions tests/dhcp/protocol/test_v6_relay.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def test_v6_relay_message_unicast_global():
srv_msg.client_does_include('Client', 'IA-NA')
srv_msg.client_send_msg('SOLICIT')

srv_msg.unicast_addres('GLOBAL', None)
srv_msg.unicast_address('GLOBAL', None)
srv_msg.client_does_include('RelayAgent', 'interface-id')
srv_msg.create_relay_forward()

Expand Down Expand Up @@ -89,7 +89,7 @@ def test_v6_relay_message_unicast_local():
srv_msg.client_does_include('Client', 'IA-NA')
srv_msg.client_send_msg('SOLICIT')

srv_msg.unicast_addres(None, 'LINK_LOCAL')
srv_msg.unicast_address(None, 'LINK_LOCAL')
srv_msg.client_does_include('RelayAgent', 'interface-id')
srv_msg.create_relay_forward()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_v6_host_reservation_duplicate_reservation_duid():
@pytest.mark.disabled
def test_v6_host_reservation_duplicate_reservation_address():
"""
Since address uniqueness is now configurable fom kea config level
Since address uniqueness is now configurable from Kea config level,
it's normal we can input reservations directly to database no matter
kea configuration, reservation uniqueness is checked while using "reservation-add"
command. Disabling test.
Expand Down
Loading

0 comments on commit aed5b80

Please sign in to comment.