Skip to content

Commit db3f255

Browse files
Rename upgrade_charm to refresh
To remain consistent with juju nomenclature, the following redirects upgrade_charm to refresh. Once juju 3 is released upgrade_charm can be removed (along with other alias methods), to ensure a clean API. This is a purely mechanical change.
1 parent 73604c8 commit db3f255

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

juju/application.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -550,20 +550,20 @@ def update_allocation(self, allocation):
550550
"""
551551
raise NotImplementedError()
552552

553-
async def upgrade_charm(
553+
async def refresh(
554554
self, channel=None, force=False, force_series=False, force_units=False,
555555
path=None, resources=None, revision=None, switch=None):
556-
"""Upgrade the charm for this application.
556+
"""Refresh the charm for this application.
557557
558558
:param str channel: Channel to use when getting the charm from the
559559
charm store, e.g. 'development'
560-
:param bool force_series: Upgrade even if series of deployed
560+
:param bool force_series: Refresh even if series of deployed
561561
application is not supported by the new charm
562-
:param bool force_units: Upgrade all units immediately, even if in
562+
:param bool force_units: Refresh all units immediately, even if in
563563
error state
564-
:param str path: Uprade to a charm located at path
564+
:param str path: Refresh to a charm located at path
565565
:param dict resources: Dictionary of resource name/filepath pairs
566-
:param int revision: Explicit upgrade revision
566+
:param int revision: Explicit refresh revision
567567
:param str switch: Crossgrade charm url
568568
569569
"""
@@ -671,6 +671,8 @@ async def upgrade_charm(
671671
lambda: self.data['charm-url'] == charm_url
672672
)
673673

674+
upgrade_charm = refresh
675+
674676
async def get_metrics(self):
675677
"""Get metrics for this application's units.
676678

0 commit comments

Comments
 (0)