Skip to content

Commit

Permalink
- fix remaining re-wording
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielcocenza committed Feb 5, 2024
1 parent ad0fa0b commit d2cf905
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions cou/apps/auxiliary.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,12 @@ def pre_upgrade_steps(self, target: OpenStackRelease) -> list[PreUpgradeStep]:
return super().pre_upgrade_steps(target) + [self._get_change_require_osd_release_step()]

def _get_change_require_osd_release_step(self) -> PreUpgradeStep:
"""Get the ste to set correct value for require-osd-release option on ceph-mon.
"""Get the step to set correct value for require-osd-release option on ceph-mon.
This step is needed as a workaround for LP#1929254. Reference:
https://docs.openstack.org/charm-guide/latest/project/issues/upgrade-issues.html#ceph-require-osd-release
:return: Plan to check and set correct value for require-osd-release
:return: Step to check and set correct value for require-osd-release
:rtype: PreUpgradeStep
"""
ceph_mon_unit, *_ = self.units
Expand Down
24 changes: 12 additions & 12 deletions cou/apps/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ def pre_upgrade_steps(self, target: OpenStackRelease) -> list[PreUpgradeStep]:
self._get_refresh_charm_step(target),
]

def upgrade_plan_steps(self, target: OpenStackRelease) -> list[UpgradeStep]:
def upgrade_steps(self, target: OpenStackRelease) -> list[UpgradeStep]:
"""Upgrade steps planning.
:param target: OpenStack release as target to upgrade.
Expand Down Expand Up @@ -497,7 +497,7 @@ def generate_upgrade_plan(self, target: OpenStackRelease) -> ApplicationUpgradeP
)
all_steps = (
self.pre_upgrade_steps(target)
+ self.upgrade_plan_steps(target)
+ self.upgrade_steps(target)
+ self.post_upgrade_steps(target)
)
for step in all_steps:
Expand All @@ -506,9 +506,9 @@ def generate_upgrade_plan(self, target: OpenStackRelease) -> ApplicationUpgradeP
return upgrade_steps

def _get_upgrade_current_release_packages_step(self) -> PreUpgradeStep:
"""Get Plan for upgrading software packages to the latest of the current release.
"""Get step for upgrading software packages to the latest of the current release.
:return: Plan for upgrading software packages to the latest of the current release.
:return: Step for upgrading software packages to the latest of the current release.
:rtype: PreUpgradeStep
"""
return PreUpgradeStep(
Expand All @@ -519,14 +519,14 @@ def _get_upgrade_current_release_packages_step(self) -> PreUpgradeStep:
)

def _get_refresh_charm_step(self, target: OpenStackRelease) -> PreUpgradeStep:
"""Get plan for refreshing the current channel.
"""Get step for refreshing the current channel.
This function also identifies if charm comes from charmstore and in that case,
makes the migration.
:param target: OpenStack release as target to upgrade.
:type target: OpenStackRelease
:raises ApplicationError: When application has unexpected channel.
:return: Plan for refreshing the charm.
:return: Step for refreshing the charm.
:rtype: PreUpgradeStep
"""
if not self.can_upgrade_current_channel:
Expand Down Expand Up @@ -573,11 +573,11 @@ def _get_refresh_charm_step(self, target: OpenStackRelease) -> PreUpgradeStep:
)

def _get_upgrade_charm_step(self, target: OpenStackRelease) -> UpgradeStep:
"""Get plan for upgrading the charm.
"""Get step for upgrading the charm.
:param target: OpenStack release as target to upgrade.
:type target: OpenStackRelease
:return: Plan for upgrading the charm.
:return: Step for upgrading the charm.
:rtype: UpgradeStep
"""
if self.channel != self.target_channel(target):
Expand All @@ -590,11 +590,11 @@ def _get_upgrade_charm_step(self, target: OpenStackRelease) -> UpgradeStep:
return UpgradeStep()

def _get_disable_action_managed_step(self) -> UpgradeStep:
"""Get plan to disable action-managed-upgrade.
"""Get step to disable action-managed-upgrade.
This is used to upgrade as "all-in-one" strategy.
:return: Plan to disable action-managed-upgrade
:return: Step to disable action-managed-upgrade
:rtype: UpgradeStep
"""
if self.config.get("action-managed-upgrade", {}).get("value", False):
Expand All @@ -609,11 +609,11 @@ def _get_disable_action_managed_step(self) -> UpgradeStep:
return UpgradeStep()

def _get_workload_upgrade_step(self, target: OpenStackRelease) -> UpgradeStep:
"""Get workload upgrade plan by changing openstack-origin or source.
"""Get workload upgrade step by changing openstack-origin or source.
:param target: OpenStack release as target to upgrade.
:type target: OpenStackRelease
:return: Workload upgrade plan
:return: Workload upgrade step
:rtype: UpgradeStep
"""
if self.os_origin != self.new_origin(target) and self.origin_setting:
Expand Down
3 changes: 2 additions & 1 deletion cou/apps/channel_based.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@ def is_versionless(self) -> bool:
return not all(unit.workload_version for unit in self.status.units.values())

def post_upgrade_steps(self, target: OpenStackRelease) -> list[PostUpgradeStep]:
"""Post Upgrade planning.
"""Post Upgrade steps planning.
Wait until the application reaches the idle state and then check the target workload.
In case the application is versionless, there are no post upgrade steps to run.
:param target: OpenStack release as target to upgrade.
:type target: OpenStackRelease
:return: List of post upgrade steps.
Expand Down
3 changes: 1 addition & 2 deletions cou/apps/subordinate.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,11 @@ def pre_upgrade_steps(self, target: OpenStackRelease) -> list[PreUpgradeStep]:
"""
return [self._get_refresh_charm_step(target)]

def upgrade_plan_steps(self, target: OpenStackRelease) -> list[UpgradeStep]:
def upgrade_steps(self, target: OpenStackRelease) -> list[UpgradeStep]:
"""Upgrade steps planning.
:param target: OpenStack release as target to upgrade.
:type target: OpenStackRelease
:raises HaltUpgradePlanGeneration: When the application halt the upgrade plan generation.
:return: List of upgrade steps.
:rtype: list[UpgradeStep]
"""
Expand Down

0 comments on commit d2cf905

Please sign in to comment.