Skip to content

Commit

Permalink
chore!: drop support for nrpe
Browse files Browse the repository at this point in the history
Drop the nrpe relation.

Signed-off-by: Billy Olsen <billy.olsen@canonical.com>
  • Loading branch information
wolsen committed May 22, 2024
1 parent 8066eeb commit 4a1fb72
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
5 changes: 0 additions & 5 deletions charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ requires:
scope: container
master:
interface: lldp
provides:
nrpe-external-master:
interface: nrpe-external-master
scope: container
subordinate: true

bases:
- build-on:
Expand Down
16 changes: 0 additions & 16 deletions src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,6 @@ def __init__(self, *args):
self.framework.observe(self.on.install, self.on_upgrade_charm)
self.framework.observe(self.on.upgrade_charm, self.on_upgrade_charm)
self.framework.observe(self.on.config_changed, self.on_config_changed)
self.framework.observe(
self.on.nrpe_external_master_relation_changed,
self.on_nrpe_external_master_relation_changed,
)
self.framework.observe(
self.on.nrpe_external_master_relation_joined,
self.on_nrpe_external_master_relation_changed,
)

def on_upgrade_charm(self, event):
"""Install lldpd package."""
Expand All @@ -72,10 +64,6 @@ def on_config_changed(self, event):
self.unit.status = MaintenanceStatus("Updating configuration")
self.configure()

def on_nrpe_external_master_relation_changed(self, event):
self.setup_nrpe()
# TODO get this working for config-changed, but only if relation exists

def install(self):
apt.update()
apt.add_package(PACKAGES)
Expand Down Expand Up @@ -153,10 +141,6 @@ def update_short_name(self):
with open(PATHS["lldpdconf"], "w") as f:
f.write("configure system hostname {}\n".format(str(shortname)))

def setup_nrpe(self):
## FIXME use ops-lib-nrpe
pass


if __name__ == "__main__":
main(LldpdCharm)

0 comments on commit 4a1fb72

Please sign in to comment.