Skip to content

Commit d869163

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Fix typos"
2 parents 6f0c789 + 2521810 commit d869163

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+113
-112
lines changed

nova/block_device.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ def get_bdm_local_disk_num(block_device_mappings):
612612

613613
def get_bdm_image_metadata(context, image_api, volume_api,
614614
block_device_mapping, legacy_bdm=True):
615-
"""Attempt to retrive image metadata from a given block_device_mapping.
615+
"""Attempt to retrieve image metadata from a given block_device_mapping.
616616
617617
If we are booting from a volume, we need to get the volume details from
618618
Cinder and make sure we pass the metadata back accordingly.

nova/compute/manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8782,7 +8782,7 @@ def _live_migration_cleanup_flags(self, migrate_data, migr_ctxt=None):
87828782
# must be deleted for preparing next block migration
87838783
# must be deleted for preparing next live migration w/o shared
87848784
# storage
8785-
# vpmem must be cleanped
8785+
# vpmem must be cleaned
87868786
do_cleanup = not migrate_data.is_shared_instance_path or has_vpmem
87878787
destroy_disks = not migrate_data.is_shared_block_storage
87888788
elif isinstance(migrate_data, migrate_data_obj.HyperVLiveMigrateData):

nova/conductor/tasks/cross_cell_migrate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1163,7 +1163,7 @@ def _update_source_obj_from_target_cell(source_obj, target_obj):
11631163
setattr(source_obj, field, getattr(target_obj, field))
11641164

11651165
def _update_bdms_in_source_cell(self, source_cell_context):
1166-
"""Update BlockDeviceMapppings in the source cell database.
1166+
"""Update BlockDeviceMappings in the source cell database.
11671167
11681168
It is possible to attach/detach volumes to/from a resized instance,
11691169
which would create/delete BDM records in the target cell, so we have

nova/console/websocketproxy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ def __init__(self, *args, **kwargs):
305305
# ssl_options unset to default to the underlying system defaults.
306306
# We do this to avoid using websockify's behaviour for 'default'
307307
# in select_ssl_version(), which hardcodes the versions to be
308-
# quite relaxed and prevents us from using sytem crypto policies.
308+
# quite relaxed and prevents us from using system crypto policies.
309309
ssl_min_version = kwargs.pop('ssl_minimum_version', None)
310310
if ssl_min_version and ssl_min_version != 'default':
311311
kwargs['ssl_options'] = websockify.websocketproxy. \

nova/objects/service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# NOTE(danms): This is our SERVICE_VERSION history. The idea is that any
3838
# time we bump the version, we will put an entry here to record the change,
39-
# along with any pertinent data. For things that we can programatically
39+
# along with any pertinent data. For things that we can programmatically
4040
# detect that need a bump, we put something in _collect_things() below to
4141
# assemble a dict of things we can check. For example, we pretty much always
4242
# want to consider the compute RPC API version a thing that requires a service

nova/tests/fixtures/nova.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1455,7 +1455,7 @@ class AvailabilityZoneFixture(fixtures.Fixture):
14551455
``get_availability_zones``.
14561456
14571457
``get_instance_availability_zone`` will return the availability_zone
1458-
requested when creating a server otherwise the instance.availabilty_zone
1458+
requested when creating a server otherwise the instance.availability_zone
14591459
or default_availability_zone is returned.
14601460
"""
14611461

nova/tests/fixtures/policy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def set_rules(self, rules, overwrite=True):
6565
def add_missing_default_rules(self, rules):
6666
"""Adds default rules and their values to the given rules dict.
6767
68-
The given rulen dict may have an incomplete set of policy rules.
68+
The given rules dict may have an incomplete set of policy rules.
6969
This method will add the default policy rules and their values to
7070
the dict. It will not override the existing rules.
7171
"""
@@ -141,7 +141,7 @@ class OverridePolicyFixture(RealPolicyFixture):
141141
not used. One example is when policy rules are deprecated. In that case
142142
tests can use this fixture and verify if deprecated rules are overridden
143143
then does nova code enforce the overridden rules not only defaults.
144-
As per oslo.policy deprecattion feature, if deprecated rule is overridden
144+
As per oslo.policy deprecation feature, if deprecated rule is overridden
145145
in policy file then, overridden check is used to verify the policy.
146146
Example of usage:
147147

nova/tests/functional/db/test_compute_node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ def test_migrate_none_or_zero_ratio_with_none_ratio_conf(self):
267267
self.assertEqual(res, (1, 1))
268268

269269
# the ratio is refreshed to CONF.initial_xxx_allocation_ratio
270-
# beacause CONF.xxx_allocation_ratio is None
270+
# because CONF.xxx_allocation_ratio is None
271271
cns = db.compute_node_get_all(self.context)
272272
# the ratio is refreshed to CONF.xxx_allocation_ratio
273273
for cn in cns:

nova/tests/functional/libvirt/test_numa_servers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ def test_resize_vcpu_to_pcpu(self):
731731
for host, compute_rp_uuid in self.compute_rp_uuids.items():
732732
if host == original_host:
733733
# the host that had the instance should no longer have
734-
# alocations since the resize has been confirmed
734+
# allocations since the resize has been confirmed
735735
expected_usage = {'VCPU': 0, 'PCPU': 0, 'DISK_GB': 0,
736736
'MEMORY_MB': 0}
737737
else:

nova/tests/functional/libvirt/test_pci_sriov_servers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,7 @@ def test_shelve(self):
994994
def test_suspend(self):
995995
self._test_common(self._suspend_server)
996996

997-
def test_evacute(self):
997+
def test_evacuate(self):
998998
self._test_common(self._evacuate_server)
999999

10001000
def test_resize(self):
@@ -1303,7 +1303,7 @@ def _test_policy(self, pci_numa_node, status, policy):
13031303
num_pci=1, numa_node=pci_numa_node)
13041304
self.start_compute(pci_info=pci_info)
13051305

1306-
# request cpu pinning to create a numa toplogy and allow the test to
1306+
# request cpu pinning to create a numa topology and allow the test to
13071307
# force which numa node the vm would have to be pinned too.
13081308
extra_spec = {
13091309
'hw:cpu_policy': 'dedicated',
@@ -1514,7 +1514,7 @@ def _test_policy(self, pci_numa_node, status, policy):
15141514
num_pfs=1, num_vfs=2, numa_node=pci_numa_node)
15151515
self.start_compute(pci_info=pci_info)
15161516

1517-
# request cpu pinning to create a numa toplogy and allow the test to
1517+
# request cpu pinning to create a numa topology and allow the test to
15181518
# force which numa node the vm would have to be pinned too.
15191519
extra_spec = {
15201520
'hw:cpu_policy': 'dedicated',

nova/tests/functional/notification_sample_tests/test_instance.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def _test_live_migration_abort(self, server):
193193
self.admin_api.delete_migration(server['id'], migrations[0]['id'])
194194
self._wait_for_notification('instance.live_migration_abort.start')
195195
self._wait_for_state_change(server, 'ACTIVE')
196-
# NOTE(gibi): the intance.live_migration_rollback notification emitted
196+
# NOTE(gibi): the instance.live_migration_rollback notification emitted
197197
# after the instance.live_migration_abort notification so we have to
198198
# wait for the rollback to ensure we can assert both notifications
199199
# below
@@ -1500,8 +1500,8 @@ def _detach_volume_from_server(self, server, volume_id):
15001500
self.api.delete_server_volume(server['id'], volume_id)
15011501
self._wait_for_notification('instance.volume_detach.end')
15021502

1503-
def _volume_swap_server(self, server, attachement_id, volume_id):
1504-
self.api.put_server_volume(server['id'], attachement_id, volume_id)
1503+
def _volume_swap_server(self, server, attachment_id, volume_id):
1504+
self.api.put_server_volume(server['id'], attachment_id, volume_id)
15051505

15061506
def test_volume_swap_server(self):
15071507
server = self._boot_a_server(

nova/tests/functional/regressions/test_bug_1893284.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class TestServersPerUserQuota(test.TestCase,
2525
tracking usages in a separate database table. As part of that change,
2626
per-user quota functionality was broken for server creates.
2727
28-
When mulitple users in the same project have per-user quota, they are meant
28+
When multiple users in the same project have per-user quota, they are meant
2929
to be allowed to create resources such that may not exceed their
3030
per-user quota nor their project quota.
3131

nova/tests/functional/test_policy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def _setup_host_status_unknown_only_test(self, networks=None):
6060
overwrite=False)
6161
# Create a server as a normal non-admin user.
6262
# In microversion 2.36 the /images proxy API was deprecated, so
63-
# specifiy the image_uuid directly.
63+
# specify the image_uuid directly.
6464
kwargs = {'image_uuid': self.image_uuid}
6565
if networks:
6666
# Starting with microversion 2.37 the networks field is required.

nova/tests/functional/test_servers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ def test_attach_vol_maximum_disk_devices_exceeded(self):
764764
LOG.info('Attaching volume %s to server %s', volume_id, server_id)
765765

766766
# The fake driver doesn't implement get_device_name_for_instance, so
767-
# we'll just raise the exception directly here, instead of simuluating
767+
# we'll just raise the exception directly here, instead of simulating
768768
# an instance with 26 disk devices already attached.
769769
with mock.patch.object(self.compute.driver,
770770
'get_device_name_for_instance') as mock_get:

nova/tests/unit/accelerator/test_cyborg.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def _get_bound_arqs(self):
190190
},
191191
"attach_handle_type": "PCI",
192192
"state": "Bound",
193-
# Devic eprofile name is common to all bound ARQs
193+
# Device profile name is common to all bound ARQs
194194
"device_profile_name": arqs[0]["device_profile_name"],
195195
**common
196196
}
@@ -367,7 +367,7 @@ def test_get_arqs_for_instance_some_resolved(self, mock_cyborg_get):
367367
# If only some ARQs are resolved, return just the resolved ones
368368
unbound_arqs, _ = self._get_arqs_and_request_groups()
369369
_, bound_arqs = self._get_bound_arqs()
370-
# Create a amixture of unbound and bound ARQs
370+
# Create a mixture of unbound and bound ARQs
371371
arqs = [unbound_arqs[0], bound_arqs[0]]
372372
instance_uuid = bound_arqs[0]['instance_uuid']
373373

@@ -487,7 +487,7 @@ def test_get_arq_uuids_for_instance(self, mock_cyborg_get):
487487
self.assertEqual(bound_arqs, ret_arqs)
488488

489489
def test_get_arq_pci_device_profile(self):
490-
"""Test extractin arq pci device info"""
490+
"""Test extracting arq pci device info"""
491491
arq = {'uuid': uuids.arq_uuid,
492492
'device_profile_name': "smart_nic",
493493
'device_profile_group_id': '5',

nova/tests/unit/api/openstack/compute/test_limits.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def test_admin_can_fetch_used_limits_with_negative_int(self):
254254
req_get = {'tenant_id': -1}
255255
self._test_admin_can_fetch_used_limits_for_own_project(req_get)
256256

257-
def test_admin_can_fetch_used_limits_with_unkown_param(self):
257+
def test_admin_can_fetch_used_limits_with_unknown_param(self):
258258
req_get = {'tenant_id': '123', 'unknown': 'unknown'}
259259
self._test_admin_can_fetch_used_limits_for_own_project(req_get)
260260

@@ -462,7 +462,7 @@ def test_index_additional_query_param_old_version(self):
462462
absolute_limits = {
463463
"metadata_items": 1,
464464
}
465-
req = fakes.HTTPRequest.blank("/?unkown=fake",
465+
req = fakes.HTTPRequest.blank("/?unknown=fake",
466466
version='2.74')
467467

468468
def _get_project_quotas(context, project_id, usages=True):
@@ -475,7 +475,7 @@ def _get_project_quotas(context, project_id, usages=True):
475475
self.controller.index(req)
476476

477477
def test_index_additional_query_param(self):
478-
req = fakes.HTTPRequest.blank("/?unkown=fake",
478+
req = fakes.HTTPRequest.blank("/?unknown=fake",
479479
version='2.75')
480480
self.assertRaises(
481481
exception.ValidationError,

nova/tests/unit/api/openstack/compute/test_lock_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def test_lock_with_reason_in_invalid_format(self):
114114
self.controller._lock, self.req, instance.uuid, body=body)
115115
self.assertIn("256 is not of type 'string'", str(exp))
116116

117-
def test_lock_with_invalid_paramater(self):
117+
def test_lock_with_invalid_parameter(self):
118118
# This will fail from 2.73 since we have a schema check that allows
119119
# only locked_reason
120120
instance = fake_instance.fake_instance_obj(

nova/tests/unit/api/openstack/compute/test_networks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
from nova.tests.unit.api.openstack import fakes
2727

2828

29-
# NOTE(stephenfin): obviously these aren't complete reponses, but this is all
29+
# NOTE(stephenfin): obviously these aren't complete responses, but this is all
3030
# we care about
3131
FAKE_NETWORKS = [
3232
{

nova/tests/unit/api/openstack/compute/test_remote_consoles.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ def test_create_console_unavailable(self):
446446
self.req, fakes.FAKE_UUID, body=body)
447447
self.assertTrue(mock_handler.called)
448448

449-
def test_create_console_not_found(self,):
449+
def test_create_console_not_found(self):
450450
mock_handler = mock.MagicMock()
451451
mock_handler.side_effect = exception.InstanceNotFound(
452452
instance_id='xxx')

nova/tests/unit/api/openstack/compute/test_server_external_events.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def test_create_bad_body(self):
192192
self.api.create, self.req, body=body)
193193

194194
def test_create_unknown_events(self):
195-
self.event_1['name'] = 'unkown_event'
195+
self.event_1['name'] = 'unknown_event'
196196
body = {'events': self.event_1}
197197
self.assertRaises(self.invalid_error,
198198
self.api.create, self.req, body=body)

nova/tests/unit/api/openstack/compute/test_servers.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8023,7 +8023,7 @@ def req(self, url, use_admin_context=False):
80238023
version=self.microversion)
80248024

80258025
def test_get_server_list_detail_with_down_cells(self):
8026-
# Fake out 1 partially constructued instance and one full instance.
8026+
# Fake out 1 partially constructed instance and one full instance.
80278027
self.instances = [
80288028
self.instance,
80298029
objects.Instance(
@@ -8151,7 +8151,7 @@ def test_get_server_list_detail_with_down_cells(self):
81518151
self.assertThat(output, matchers.DictMatches(expected))
81528152

81538153
def test_get_server_list_with_down_cells(self):
8154-
# Fake out 1 partially constructued instance and one full instance.
8154+
# Fake out 1 partially constructed instance and one full instance.
81558155
self.instances = [
81568156
self.instance,
81578157
objects.Instance(
@@ -8203,7 +8203,7 @@ def test_get_server_list_with_down_cells(self):
82038203
self.assertThat(output, matchers.DictMatches(expected))
82048204

82058205
def test_get_server_with_down_cells(self):
8206-
# Fake out 1 partially constructued instance.
8206+
# Fake out 1 partially constructed instance.
82078207
self.instance = objects.Instance(
82088208
context=self.ctxt,
82098209
uuid=self.uuid,
@@ -8266,7 +8266,7 @@ def test_get_server_with_down_cells(self):
82668266
self.assertThat(output, matchers.DictMatches(expected))
82678267

82688268
def test_get_server_without_image_avz_user_id_set_from_down_cells(self):
8269-
# Fake out 1 partially constructued instance.
8269+
# Fake out 1 partially constructed instance.
82708270
self.instance = objects.Instance(
82718271
context=self.ctxt,
82728272
uuid=self.uuid,

nova/tests/unit/cmd/test_status.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
# NOTE(cdent): Additional tests of nova-status may be found in
2020
# nova/tests/functional/test_nova_status.py. Those tests use the external
21-
# PlacementFixture, which is only available in functioanl tests.
21+
# PlacementFixture, which is only available in functional tests.
2222

2323
from io import StringIO
2424

nova/tests/unit/compute/test_api.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,7 +1354,7 @@ def test_delete_fast_if_host_not_set(self, mock_br_get, mock_save,
13541354
hard_delete=False)
13551355

13561356
def _fake_do_delete(context, instance, bdms,
1357-
rservations=None, local=False):
1357+
reservations=None, local=False):
13581358
pass
13591359

13601360
@mock.patch.object(compute_utils, 'notify_about_instance_action')
@@ -3417,7 +3417,7 @@ def fake_quiesce_instance(context, instance):
34173417
raise exception.InstanceQuiesceNotSupported(
34183418
instance_id=instance['uuid'], reason='unsupported')
34193419
if quiesce_fails:
3420-
raise oslo_exceptions.MessagingTimeout('quiece timeout')
3420+
raise oslo_exceptions.MessagingTimeout('quiesce timeout')
34213421
quiesced[0] = True
34223422

34233423
def fake_unquiesce_instance(context, instance, mapping=None):
@@ -3579,7 +3579,7 @@ def test_snapshot_volume_backed_with_quiesce_unsupported(self):
35793579
self._test_snapshot_volume_backed(quiesce_required=True,
35803580
quiesce_unsupported=False)
35813581

3582-
def test_snaphost_volume_backed_with_quiesce_failure(self):
3582+
def test_snapshot_volume_backed_with_quiesce_failure(self):
35833583
self.assertRaises(oslo_exceptions.MessagingTimeout,
35843584
self._test_snapshot_volume_backed,
35853585
quiesce_required=True,
@@ -4815,7 +4815,7 @@ def test_validate_vol_az_for_create_multiple_vols_diff_az(self, cross_az):
48154815
def test_validate_vol_az_for_create_vol_az_matches_default_cpu_az(self):
48164816
"""Tests the scenario that the instance is not being created in a
48174817
specific zone and the volume's zone matches
4818-
CONF.default_availabilty_zone so None is returned indicating the
4818+
CONF.default_availability_zone so None is returned indicating the
48194819
RequestSpec.availability_zone does not need to be updated.
48204820
"""
48214821
self.flags(cross_az_attach=False, group='cinder')
@@ -7155,7 +7155,7 @@ def test__validate_numa_rebuild_no_conflict(self):
71557155
# be no conflict.
71567156
self.compute_api._validate_numa_rebuild(instance, image, flavor)
71577157

7158-
def test__validate_numa_rebuild_add_numa_toplogy(self):
7158+
def test__validate_numa_rebuild_add_numa_topology(self):
71597159
"""Assert that a rebuild of an instance with a new image
71607160
that requests a NUMA topology when the original instance did not
71617161
have a NUMA topology is invalid.
@@ -7178,7 +7178,7 @@ def test__validate_numa_rebuild_add_numa_toplogy(self):
71787178
exception.ImageNUMATopologyRebuildConflict,
71797179
self.compute_api._validate_numa_rebuild, instance, image, flavor)
71807180

7181-
def test__validate_numa_rebuild_remove_numa_toplogy(self):
7181+
def test__validate_numa_rebuild_remove_numa_topology(self):
71827182
"""Assert that a rebuild of an instance with a new image
71837183
that does not request a NUMA topology when the original image did
71847184
is invalid if it would alter the instances topology as a result.
@@ -7209,7 +7209,7 @@ def test__validate_numa_rebuild_remove_numa_toplogy(self):
72097209
self.compute_api._validate_numa_rebuild, instance,
72107210
image, flavor)
72117211

7212-
def test__validate_numa_rebuild_alter_numa_toplogy(self):
7212+
def test__validate_numa_rebuild_alter_numa_topology(self):
72137213
"""Assert that a rebuild of an instance with a new image
72147214
that requests a different NUMA topology than the original image
72157215
is invalid.
@@ -8031,7 +8031,7 @@ def test_block_accelerators_with_device_profile(self):
80318031
@mock.patch('nova.objects.service.get_minimum_version_all_cells',
80328032
return_value=54)
80338033
def test_block_accelerators_until_service(self, mock_get_min):
8034-
"""Support operating server with acclerators until compute service
8034+
"""Support operating server with accelerators until compute service
80358035
more than the version of 53.
80368036
"""
80378037
extra_specs = {'accel:device_profile': 'mydp'}

nova/tests/unit/compute/test_compute.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7379,7 +7379,7 @@ def test_poll_unconfirmed_resizes(self):
73797379
fake_instance.fake_db_instance(uuid=uuids.migration_instance_5,
73807380
vm_state=vm_states.ACTIVE,
73817381
task_state=None),
7382-
# The expceted migration result will be None instead of error
7382+
# The expected migration result will be None instead of error
73837383
# since _poll_unconfirmed_resizes will not change it
73847384
# when the instance vm state is RESIZED and task state
73857385
# is deleting, see bug 1301696 for more detail
@@ -10493,7 +10493,7 @@ def create_resource_req(context, requested_networks,
1049310493
pci_reqs = mock_claim_pci.mock_calls[0][1][1]
1049410494
self.assertEqual([pci_req], pci_reqs.requests)
1049510495

10496-
# after the pci claim we also need to allocate that pci to the instace
10496+
# after the pci claim we also need to allocate that pci to the instance
1049710497
mock_allocate_pci.assert_called_once_with(self.context, instance)
1049810498
# and as this changes the instance we have to save it.
1049910499
mock_save.assert_called_once_with()

0 commit comments

Comments
 (0)