Run codespell on octavia package directory
Result of running: $ codespell -w octavia Change-Id: I85354ddafc61f2ab064330ae4b630366dfed0cbb
This commit is contained in:
1 parent
c91ffe0e49
commit
7ab75bfd95
27 files changed
+32
-32
No files matched your search
@@ -85,6 +85,6 @@ class LvsListenerApiServerBase(object, metaclass=abc.ABCMeta):
|
||||
:param listener_id: The id of the listener
|
||||
|
||||
:returns: HTTP response with status code.
|
||||
:raises Exception: If unsupport initial system of amphora.
|
||||
:raises Exception: If unsupported initial system of amphora.
|
||||
|
||||
"""
|
||||
@@ -227,7 +227,7 @@ class InterfaceController(object):
|
||||
if key in current_addresses:
|
||||
current_addresses.remove(key)
|
||||
elif address.get(consts.OCTAVIA_OWNED, True):
|
||||
# By default all adresses are managed/owned by Octavia
|
||||
# By default all addresses are managed/owned by Octavia
|
||||
address[consts.FAMILY] = self._family(
|
||||
address[consts.ADDRESS])
|
||||
LOG.debug("%s: Adding address %s", interface.name,
|
||||
|
||||
@@ -318,7 +318,7 @@ class HaproxyAmphoraLoadBalancerDriver(
|
||||
# We have other listeners, so just update is fine.
|
||||
# TODO(rm_work): This is a little inefficient since this duplicates
|
||||
# a lot of the detection logic that has already been done, but it
|
||||
# is probably safer to re-use the existing code-path.
|
||||
# is probably safer to reuse the existing code-path.
|
||||
self.update_amphora_listeners(listener.load_balancer, amphora)
|
||||
else:
|
||||
# Deleting the last listener, so really do the delete
|
||||
|
||||
@@ -490,7 +490,7 @@ class UpdateHealthDb:
|
||||
raw_pools = listener['pools']
|
||||
|
||||
# normalize the pool IDs. Single process listener pools
|
||||
# have the listener id appended with an ':' seperator.
|
||||
# have the listener id appended with an ':' separator.
|
||||
# Old multi-process listener pools only have a pool ID.
|
||||
# This makes sure the keys are only pool IDs.
|
||||
pools = {(k + ' ')[:k.rfind(':')]: v for k, v in
|
||||
@@ -511,7 +511,7 @@ class UpdateHealthDb:
|
||||
raw_pools = health['pools']
|
||||
|
||||
# normalize the pool IDs. Single process listener pools
|
||||
# have the listener id appended with an ':' seperator.
|
||||
# have the listener id appended with an ':' separator.
|
||||
# Old multi-process listener pools only have a pool ID.
|
||||
# This makes sure the keys are only pool IDs.
|
||||
pools = {(k + ' ')[:k.rfind(':')]: v for k, v in raw_pools.items()}
|
||||
|
||||
@@ -244,7 +244,7 @@ class PaginationHelper(object):
|
||||
:param query: the query object to which we should add
|
||||
paging/sorting/filtering
|
||||
:param model: the ORM model class
|
||||
:param enforce_valid_params: check for invalid enteries in self.params
|
||||
:param enforce_valid_params: check for invalid entries in self.params
|
||||
|
||||
:rtype: sqlalchemy.orm.query.Query
|
||||
:returns: The query with sorting/pagination/filtering added.
|
||||
@@ -259,7 +259,7 @@ class PaginationHelper(object):
|
||||
secondary_query_filter = filter_params.pop(
|
||||
"project_id", None) if (model == models.Amphora) else None
|
||||
|
||||
# Tranlate arguments from API standard to data model's field name
|
||||
# Translate arguments from API standard to data model's field name
|
||||
filter_params = (
|
||||
model.__v2_wsme__.translate_dict_keys_to_data_model(
|
||||
filter_params)
|
||||
|
||||
@@ -155,7 +155,7 @@ def main():
|
||||
'ignoring and continuing shutdown process.',
|
||||
str(e), proc.name)
|
||||
else:
|
||||
LOG.info('Provider agent "%s" has succesfully shutdown.',
|
||||
LOG.info('Provider agent "%s" has successfully shutdown.',
|
||||
proc.name)
|
||||
|
||||
signal.signal(signal.SIGTERM, process_cleanup)
|
||||
|
||||
@@ -78,7 +78,7 @@ def hm_health_check(exit_event):
|
||||
|
||||
|
||||
def _handle_mutate_config(listener_proc_pid, check_proc_pid, *args, **kwargs):
|
||||
LOG.info("Health Manager recieved HUP signal, mutating config.")
|
||||
LOG.info("Health Manager received HUP signal, mutating config.")
|
||||
_mutate_config()
|
||||
os.kill(listener_proc_pid, signal.SIGHUP)
|
||||
os.kill(check_proc_pid, signal.SIGHUP)
|
||||
|
||||
@@ -72,7 +72,7 @@ def cert_rotation():
|
||||
|
||||
|
||||
def _mutate_config(*args, **kwargs):
|
||||
LOG.info("Housekeeping recieved HUP signal, mutating config.")
|
||||
LOG.info("Housekeeping received HUP signal, mutating config.")
|
||||
CONF.mutate_config_files()
|
||||
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ def _details_filter(obj):
|
||||
|
||||
class FilteredJob(Job):
|
||||
def __str__(self):
|
||||
# Override the detault __str__ method from taskflow.job.base.Job,
|
||||
# Override the default __str__ method from taskflow.job.base.Job,
|
||||
# filter out private information from details
|
||||
cls_name = type(self).__name__
|
||||
details = _details_filter(self.details)
|
||||
|
||||
@@ -935,7 +935,7 @@ def register_cli_opts():
|
||||
def handle_neutron_deprecations():
|
||||
# Apply neutron deprecated options to their new setting if needed
|
||||
|
||||
# Basicaly: if the value of the deprecated option is not the default:
|
||||
# Basically: if the value of the deprecated option is not the default:
|
||||
# * convert it to a valid "new" value if needed
|
||||
# * set it as the default for the new option
|
||||
# Thus [neutron].<new_option> has an higher precedence than
|
||||
|
||||
@@ -132,7 +132,7 @@ def _prepare_x509_cert(cert=None):
|
||||
def _split_x509s(xstr):
|
||||
"""Split the input string into individual x509 text blocks
|
||||
|
||||
:param xstr: A large multi x509 certificate blcok
|
||||
:param xstr: A large multi x509 certificate block
|
||||
:returns: A list of strings where each string represents an
|
||||
X509 pem block surrounded by BEGIN CERTIFICATE,
|
||||
END CERTIFICATE block tags
|
||||
|
||||
@@ -229,7 +229,7 @@ def validate_l7rule_ssl_types(l7rule):
|
||||
# log or raise key and value must be specified.
|
||||
msg = 'L7rule type {0} needs to specify a key and a value.'.format(
|
||||
rule_type)
|
||||
# log or raise the key must be splited by '-'
|
||||
# log or raise the key must be split by '-'
|
||||
elif not dn_regex.match(req_key):
|
||||
msg = 'Invalid L7rule distinguished name field.'
|
||||
|
||||
@@ -246,7 +246,7 @@ def sanitize_l7policy_api_args(l7policy, create=False):
|
||||
redirect_pool_id exists in the database, but will raise an
|
||||
error if a redirect_url doesn't look like a URL.
|
||||
|
||||
:param l7policy: The L7 Policy dictionary we are santizing / validating
|
||||
:param l7policy: The L7 Policy dictionary we are sanitizing / validating
|
||||
"""
|
||||
if 'action' in l7policy.keys():
|
||||
if l7policy['action'] == constants.L7POLICY_ACTION_REJECT:
|
||||
|
||||
@@ -536,7 +536,7 @@ class ControllerWorker(object):
|
||||
self._member_repo.get(
|
||||
session, id=member[constants.MEMBER_ID])
|
||||
for member in new_members]
|
||||
# The API may not have commited all of the new member records yet.
|
||||
# The API may not have committed all of the new member records yet.
|
||||
# Make sure we retry looking them up.
|
||||
if None in db_new_members or len(db_new_members) != len(new_members):
|
||||
LOG.warning('Failed to fetch one of the new members from DB. '
|
||||
@@ -1128,7 +1128,7 @@ class ControllerWorker(object):
|
||||
|
||||
:param load_balancer_id: ID for load balancer to failover
|
||||
:returns: None
|
||||
:raises octavia.commom.exceptions.NotFound: The load balancer was not
|
||||
:raises octavia.common.exceptions.NotFound: The load balancer was not
|
||||
found.
|
||||
"""
|
||||
try:
|
||||
|
||||
@@ -61,7 +61,7 @@ class AmpRetry(retry.Times):
|
||||
max_retry_attempt = CONF.haproxy_amphora.connection_max_retries
|
||||
for task_name, ex_info in last_errors.items():
|
||||
if len(history) <= max_retry_attempt:
|
||||
# When taskflow persistance is enabled and flow/task state is
|
||||
# When taskflow persistence is enabled and flow/task state is
|
||||
# saved in the backend. If flow(task) is restored(restart of
|
||||
# worker,etc) we are getting ex_info as None - we need to RETRY
|
||||
# task to check its real state.
|
||||
|
||||
@@ -59,7 +59,7 @@ class ComputeRetry(retry.Times):
|
||||
max_retry_attempt = CONF.controller_worker.amp_active_retries
|
||||
for task_name, ex_info in last_errors.items():
|
||||
if len(history) <= max_retry_attempt:
|
||||
# When taskflow persistance is enabled and flow/task state is
|
||||
# When taskflow persistence is enabled and flow/task state is
|
||||
# saved in the backend. If flow(task) is restored(restart of
|
||||
# worker,etc) we are getting ex_info as None - we need to RETRY
|
||||
# task to check its real state.
|
||||
|
||||
@@ -19,7 +19,7 @@ from octavia.controller.worker import task_utils as task_utilities
|
||||
|
||||
|
||||
class BaseLifecycleTask(task.Task):
|
||||
"""Base task to instansiate common classes."""
|
||||
"""Base task to instantiate common classes."""
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
self.task_utils = task_utilities.TaskUtils()
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ down_revision = '76aacf2e176c'
|
||||
|
||||
|
||||
def upgrade():
|
||||
# Add collumn redirect_prefix
|
||||
# Add column redirect_prefix
|
||||
op.add_column(
|
||||
u'l7policy',
|
||||
sa.Column(u'redirect_prefix', sa.String(255), nullable=True)
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
"""add cert expiration infor in amphora table
|
||||
"""add cert expiration info in amphora table
|
||||
|
||||
Revision ID: 5a3ee5472c31
|
||||
Revises: 3b199c848b96
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ down_revision = 'a7f187cd221f'
|
||||
|
||||
|
||||
def upgrade():
|
||||
# Add collumn redirect_prefix
|
||||
# Add column redirect_prefix
|
||||
op.add_column(
|
||||
u'l7policy',
|
||||
sa.Column(u'redirect_http_code', sa.Integer(), nullable=True)
|
||||
|
||||
@@ -31,7 +31,7 @@ def create_load_balancer(lb_dict):
|
||||
lb_dict[constants.PROVISIONING_STATUS] = constants.PENDING_CREATE
|
||||
lb_dict[constants.OPERATING_STATUS] = constants.OFFLINE
|
||||
|
||||
# Set defaults later possibly overriden by flavors later
|
||||
# Set defaults later possibly overridden by flavors later
|
||||
lb_dict['topology'] = CONF.controller_worker.loadbalancer_topology
|
||||
|
||||
return lb_dict
|
||||
|
||||
@@ -1371,7 +1371,7 @@ class AmphoraRepository(BaseRepository):
|
||||
|
||||
Puts a lock on the amphora table to check the status of the
|
||||
amphora. The status must be either AMPHORA_READY or ERROR to
|
||||
successfuly update the amphora status.
|
||||
successfully update the amphora status.
|
||||
|
||||
:param lock_session: A Sql Alchemy database session.
|
||||
:param id: id of Load Balancer
|
||||
|
||||
@@ -64,7 +64,7 @@ class DistributorDriver(object, metaclass=abc.ABCMeta):
|
||||
:returns: A TaskFlow Flow that will add a VIP to the distributor
|
||||
|
||||
This method will return a TaskFlow Flow that adds a VIP to the
|
||||
distributor by perfoming the necessary steps to plug the VIP and
|
||||
distributor by performing the necessary steps to plug the VIP and
|
||||
configure the distributor to start receiving requests on this VIP.
|
||||
"""
|
||||
|
||||
|
||||
@@ -491,7 +491,7 @@ class AllowedAddressPairsDriver(neutron_base.BaseNeutronDriver):
|
||||
LOG.info('Port %s already exists. Nothing to be done.',
|
||||
load_balancer.vip.port_id)
|
||||
return self._port_to_vip(port, load_balancer)
|
||||
LOG.error('Neutron VIP mis-match. Expected ip %s on '
|
||||
LOG.error('Neutron VIP mismatch. Expected ip %s on '
|
||||
'subnet %s in network %s. Neutron has fixed_ips %s '
|
||||
'in network %s. Deleting and recreating the VIP '
|
||||
'port.', load_balancer.vip.ip_address,
|
||||
|
||||
@@ -25,7 +25,7 @@ haproxy_process_pool_failures_total 0
|
||||
# HELP haproxy_process_max_fds Maximum number of open file descriptors; 0=unset.
|
||||
# TYPE haproxy_process_max_fds gauge
|
||||
haproxy_process_max_fds 375033
|
||||
# HELP haproxy_process_max_sockets Maximum numer of open sockets.
|
||||
# HELP haproxy_process_max_sockets Maximum number of open sockets.
|
||||
# TYPE haproxy_process_max_sockets gauge
|
||||
haproxy_process_max_sockets 375033
|
||||
# HELP haproxy_process_max_connections Maximum number of concurrent connections.
|
||||
|
||||
@@ -111,7 +111,7 @@ class TestHealthCheck(base_db_test.OctaviaDBTestBase):
|
||||
self.assertEqual(200, response.status_code)
|
||||
self.assertEqual('OK', response.text)
|
||||
|
||||
# Note: For whatever reason, detailed=True text has no additonal info
|
||||
# Note: For whatever reason, detailed=True text has no additional info
|
||||
def test_healthcheck_get_text_detailed(self):
|
||||
self.conf.config(group='healthcheck', detailed=True)
|
||||
response = self._get(self._get_enabled_app(), '/healthcheck')
|
||||
@@ -275,7 +275,7 @@ class TestHealthCheck(base_db_test.OctaviaDBTestBase):
|
||||
self.assertIn('boom', response.text)
|
||||
self.assertIn('Garbage collector', response.text)
|
||||
|
||||
# Note: For whatever reason, detailed=True text has no additonal info
|
||||
# Note: For whatever reason, detailed=True text has no additional info
|
||||
@mock.patch('octavia.db.api.get_session')
|
||||
def test_healthcheck_get_text_detailed_failed(self, mock_get_session):
|
||||
self.conf.config(group='healthcheck', detailed=True)
|
||||
|
||||
@@ -620,7 +620,7 @@ class LvsQueryTestCase(base.TestCase):
|
||||
def test_get_lvs_listener_pool_status_when_not_get_realserver_result(
|
||||
self, mock_get_mapping, mock_os_stat):
|
||||
# This will hit if the kernel lvs file (/proc/net/ip_vs)
|
||||
# lose its content. So at this moment, eventhough we configure the
|
||||
# lose its content. So at this moment, even though we configure the
|
||||
# pool and member into udp keepalived config file, we have to set
|
||||
# ths status of pool and its members to DOWN.
|
||||
mock_os_stat.side_effect = (
|
||||
|
||||
@@ -2036,7 +2036,7 @@ class TestControllerWorker(base.TestCase):
|
||||
mock_member_repo_get, mock_l7rule_repo_get, mock_l7policy_repo_get,
|
||||
mock_listener_repo_get, mock_lb_repo_get, mock_health_mon_repo_get,
|
||||
mock_amp_repo_get):
|
||||
# Case where the amps can't see eachother and somehow end up with
|
||||
# Case where the amps can't see each other and somehow end up with
|
||||
# two amphora with an interface. This is highly unlikely as the
|
||||
# higher priority amphora should get the IP in a net split, but
|
||||
# let's test the code for this odd case.
|
||||
|
||||
Reference in new issue
Block a user