Skip to content

Commit

Permalink
add blocked status and close usersync port
Browse files Browse the repository at this point in the history
  • Loading branch information
AmberCharitos committed May 30, 2024
1 parent c70e5ed commit 4448be8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,13 +305,12 @@ def update(self, event):

if charm_function == "usersync":
command, context = self._configure_ranger_usersync(container)
self.model.unit.close_port(port=APPLICATION_PORT, protocol="tcp")
elif charm_function == "admin":
self.model.unit.open_port(port=APPLICATION_PORT, protocol="tcp")
command, context = self._configure_ranger_admin(container)
else:
logger.error(
"Programmer error, please add your 'charm_function' to the logic."
)
self.unit.status = BlockedStatus("Missing charm-function.")
return

logger.info("planning ranger %s execution", charm_function)
Expand Down

0 comments on commit 4448be8

Please sign in to comment.