Fix word and statement errors in comments

fix some typos in comments, such as the duplicated word 'the the'.

Change-Id: I28ffde825fd95186bc3a0bd077dea7c20287fc1f
Story: 2004164
Task: 27641
Signed-off-by: zhangkunpeng <zhang.kunpeng@99cloud.net>
This commit is contained in:
zhangkunpeng
2018-10-24 10:22:18 +08:00
parent de45fff26f
commit 48699351c8
7 changed files with 10 additions and 11 deletions

View File

@@ -504,7 +504,7 @@ def _update_vswitch_cpu_counts(host, cpu, counts, capabilities=None):
raise wsme.exc.ClientSideError(_('vSwitch cpus must be non-negative.'))
if host.hyperthreading:
# the data structures track the number of logical cpus and the
# API expects the the requested count to refer to the number
# API expects the requested count to refer to the number
# of physical cores requested therefore if HT is enabled then
# multiply the requested number by 2 so that we always reserve a
# full physical core
@@ -536,7 +536,7 @@ def _update_shared_cpu_counts(host, cpu, counts, capabilities=None):
raise wsme.exc.ClientSideError(_('Shared count cannot be > 1.'))
if host.hyperthreading:
# the data structures track the number of logical cpus and the
# API expects the the requested count to refer to the number
# API expects the requested count to refer to the number
# of physical cores requested therefore if HT is enabled then
# multiply the requested number by 2 so that we always reserve a
# full physical core
@@ -566,7 +566,7 @@ def _update_platform_cpu_counts(host, cpu, counts, capabilities=None):
raise wsme.exc.ClientSideError(_('Platform cpus must be non-negative.'))
if host.hyperthreading:
# the data structures track the number of logical cpus and the
# API expects the the requested count to refer to the number
# API expects the requested count to refer to the number
# of physical cores requested therefore if HT is enabled then
# multiply the requested number by 2 so that we always reserve a
# full physical core

View File

@@ -28,7 +28,7 @@ validated by the driver. Any node with non-empty `properties` is said to be
When the driver has received both `properties` and `driver_info`, it will check
the power status of the node and update the `power_state` accordingly. If the
driver fails to read the the power state from the node, it will reject the
driver fails to read the power state from the node, it will reject the
`driver_info` change, and the state will remain as INIT. If the power status
check succeeds, `power_state` will change to one of POWER_ON or POWER_OFF,
accordingly.

View File

@@ -365,7 +365,7 @@ def is_valid_boolstr(val):
def is_valid_mac(address):
"""Verify the format of a MAC addres."""
"""Verify the format of a MAC address."""
m = "[0-9a-f]{2}([-:])[0-9a-f]{2}(\\1[0-9a-f]{2}){4}$"
if isinstance(address, six.string_types) and re.match(m, address.lower()):
return True
@@ -940,7 +940,7 @@ def is_virtual_compute(ihost):
def is_low_core_system(ihost, dba):
"""
Determine if the hosts core count is less than or equal to a xeon-d cpu
used with get_required_platform_reserved_memory to set the the required
used with get_required_platform_reserved_memory to set the required
platform memory for xeon-d systems
"""
cpu_list = dba.icpu_get_by_ihost(ihost['uuid'])

View File

@@ -36,7 +36,7 @@ class RpcProxy(object):
rpc API.
"""
# The default namespace, which can be overriden in a subclass.
# The default namespace, which can be overridden in a subclass.
RPC_API_NAMESPACE = None
def __init__(self, topic, default_version, version_cap=None,

View File

@@ -124,7 +124,7 @@ tests/api/test_invservers.py
tests/conductor/test_manager.py
test_configure_ihost_new
IOError: [Errno 13] Permission denied: '/tmp/dnsmasq.hosts'
This directory does not exist. I am not sure if this this directory is
This directory does not exist. I am not sure if this directory is
still supposed to exist, if it has moved, or if this entire test is
based on deprecated/replaced functionality.