From 4a1fb72ca935442d837cfb7ba340e5638fa5f961 Mon Sep 17 00:00:00 2001 From: Billy Olsen Date: Tue, 21 May 2024 20:58:36 -0700 Subject: [PATCH] chore!: drop support for nrpe Drop the nrpe relation. Signed-off-by: Billy Olsen --- charmcraft.yaml | 5 ----- src/charm.py | 16 ---------------- 2 files changed, 21 deletions(-) diff --git a/charmcraft.yaml b/charmcraft.yaml index 39a087b..198f0e9 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -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: diff --git a/src/charm.py b/src/charm.py index ebdf53c..5f016a5 100755 --- a/src/charm.py +++ b/src/charm.py @@ -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.""" @@ -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) @@ -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)