diff --git a/watcher/api/controllers/v1/types.py b/watcher/api/controllers/v1/types.py index 46591f4ef..2c27254b8 100644 --- a/watcher/api/controllers/v1/types.py +++ b/watcher/api/controllers/v1/types.py @@ -181,7 +181,7 @@ class JsonPatchType(wtypes.Base): @staticmethod def mandatory_attrs(): - """Retruns a list of mandatory attributes. + """Returns a list of mandatory attributes. Mandatory attributes can't be removed from the document. This method should be overwritten by derived class. diff --git a/watcher/api/controllers/v1/utils.py b/watcher/api/controllers/v1/utils.py index 255c9ac04..2ad5b49bf 100644 --- a/watcher/api/controllers/v1/utils.py +++ b/watcher/api/controllers/v1/utils.py @@ -55,7 +55,7 @@ def validate_sort_dir(sort_dir): def validate_search_filters(filters, allowed_fields): - # Very leightweight validation for now + # Very lightweight validation for now # todo: improve this (e.g. https://www.parse.com/docs/rest/guide/#queries) for filter_name in filters.keys(): if filter_name not in allowed_fields: diff --git a/watcher/applier/actions/base.py b/watcher/applier/actions/base.py index 63e7031da..4286b104b 100644 --- a/watcher/applier/actions/base.py +++ b/watcher/applier/actions/base.py @@ -111,7 +111,7 @@ class BaseAction(loadable.Loadable): def post_condition(self): """Hook: called after the execution of an action - This function is called regardless of whether an action succeded or + This function is called regardless of whether an action succeeded or not. So you can use it to perform cleanup operations. """ raise NotImplementedError() diff --git a/watcher/cmd/decisionengine.py b/watcher/cmd/decisionengine.py index 9b7e7f9a9..ac172ee55 100644 --- a/watcher/cmd/decisionengine.py +++ b/watcher/cmd/decisionengine.py @@ -44,10 +44,10 @@ def main(): syncer.sync() de_service = watcher_service.Service(manager.DecisionEngineManager) - bg_schedulder_service = scheduling.DecisionEngineSchedulingService() + bg_scheduler_service = scheduling.DecisionEngineSchedulingService() # Only 1 process launcher = watcher_service.launch(CONF, de_service) - launcher.launch_service(bg_schedulder_service) + launcher.launch_service(bg_scheduler_service) launcher.wait() diff --git a/watcher/datasource/gnocchi.py b/watcher/datasource/gnocchi.py index 00851125d..539fa34dc 100644 --- a/watcher/datasource/gnocchi.py +++ b/watcher/datasource/gnocchi.py @@ -59,7 +59,7 @@ class GnocchiHelper(object): :param start_time: Start datetime from which metrics will be used :param stop_time: End datetime from which metrics will be used :param granularity: frequency of marking metric point, in seconds - :param aggregation: Should be chosen in accrodance with policy + :param aggregation: Should be chosen in accordance with policy aggregations :return: value of aggregated metric """ diff --git a/watcher/db/api.py b/watcher/db/api.py index b00cf8482..eb0749365 100644 --- a/watcher/db/api.py +++ b/watcher/db/api.py @@ -688,7 +688,7 @@ class BaseConnection(object): def update_efficacy_indicator(self, efficacy_indicator_id, values): """Update properties of an efficacy indicator. - :param efficacy_indicator_uuid: The UUID of an efficacy indicator + :param efficacy_indicator_id: The ID of an efficacy indicator :returns: An efficacy indicator :raises: :py:class:`~.EfficacyIndicatorNotFound` :raises: :py:class:`~.Invalid` diff --git a/watcher/decision_engine/planner/weight.py b/watcher/decision_engine/planner/weight.py index 59bbff895..3af287eed 100755 --- a/watcher/decision_engine/planner/weight.py +++ b/watcher/decision_engine/planner/weight.py @@ -104,7 +104,7 @@ class WeightPlanner(base.BasePlanner): # START --> migrate-1 --> migrate-3 # \ \--> resize-1 --> FINISH # \--> migrate-2 -------------/ - # In the above case migrate-1 will the only memeber of the leaf + # In the above case migrate-1 will be the only member of the leaf # group that migrate-3 will use as parent group, whereas # resize-1 will have both migrate-2 and migrate-3 in its # parent/leaf group diff --git a/watcher/decision_engine/strategy/strategies/base.py b/watcher/decision_engine/strategy/strategies/base.py index 2ac2cf410..fc8721e0c 100644 --- a/watcher/decision_engine/strategy/strategies/base.py +++ b/watcher/decision_engine/strategy/strategies/base.py @@ -297,7 +297,7 @@ class UnclassifiedStrategy(BaseStrategy): The goal defined within this strategy can be used to simplify the documentation explaining how to implement a new strategy plugin by - ommitting the need for the strategy developer to define a goal straight + omitting the need for the strategy developer to define a goal straight away. """ diff --git a/watcher/decision_engine/strategy/strategies/workload_balance.py b/watcher/decision_engine/strategy/strategies/workload_balance.py index 9f37d8fb2..63e638c8c 100644 --- a/watcher/decision_engine/strategy/strategies/workload_balance.py +++ b/watcher/decision_engine/strategy/strategies/workload_balance.py @@ -104,7 +104,7 @@ class WorkloadBalance(base.WorkloadStabilizationBaseStrategy): :param osc: :py:class:`~.OpenStackClients` instance """ super(WorkloadBalance, self).__init__(config, osc) - # the migration plan will be triggered when the CPU utlization % + # the migration plan will be triggered when the CPU utilization % # reaches threshold self._meter = self.METER_NAME self._ceilometer = None diff --git a/watcher/decision_engine/strategy/strategies/workload_stabilization.py b/watcher/decision_engine/strategy/strategies/workload_stabilization.py index 0e751ea38..9621d79a3 100644 --- a/watcher/decision_engine/strategy/strategies/workload_stabilization.py +++ b/watcher/decision_engine/strategy/strategies/workload_stabilization.py @@ -152,7 +152,7 @@ class WorkloadStabilization(base.WorkloadStabilizationBaseStrategy): "metrics. The period is simply a repeating" " interval of time into which the samples" " are grouped for aggregation. Watcher " - "uses only the last period of all recieved" + "uses only the last period of all received" " ones.", "type": "object", "default": {"instance": 720, "node": 600} diff --git a/watcher/tests/db/test_efficacy_indicator.py b/watcher/tests/db/test_efficacy_indicator.py index e09835517..673678c08 100644 --- a/watcher/tests/db/test_efficacy_indicator.py +++ b/watcher/tests/db/test_efficacy_indicator.py @@ -74,15 +74,15 @@ class TestDbEfficacyIndicatorFilters(base.DbTestCase): with freezegun.freeze_time(self.FAKE_TODAY): self.dbapi.update_efficacy_indicator( self.efficacy_indicator1.uuid, - values={"description": "New decription 1"}) + values={"description": "New description 1"}) with freezegun.freeze_time(self.FAKE_OLD_DATE): self.dbapi.update_efficacy_indicator( self.efficacy_indicator2.uuid, - values={"description": "New decription 2"}) + values={"description": "New description 2"}) with freezegun.freeze_time(self.FAKE_OLDER_DATE): self.dbapi.update_efficacy_indicator( self.efficacy_indicator3.uuid, - values={"description": "New decription 3"}) + values={"description": "New description 3"}) def test_get_efficacy_indicator_filter_deleted_true(self): with freezegun.freeze_time(self.FAKE_TODAY): diff --git a/watcher_tempest_plugin/tests/api/admin/base.py b/watcher_tempest_plugin/tests/api/admin/base.py index d1fba680d..d5910352a 100644 --- a/watcher_tempest_plugin/tests/api/admin/base.py +++ b/watcher_tempest_plugin/tests/api/admin/base.py @@ -165,7 +165,7 @@ class BaseInfraOptimTest(test.BaseTestCase): """Wrapper utility for creating a test audit :param audit_template_uuid: Audit Template UUID this audit will use - :param type: Audit type (either ONESHOT or CONTINUOUS) + :param audit_type: Audit type (either ONESHOT or CONTINUOUS) :param state: Audit state (str) :param interval: Audit interval in seconds (int) :return: A tuple with The HTTP response and its body