From 985c974ddab858826b4d9e4039e591732a4c76cf Mon Sep 17 00:00:00 2001 From: James Page Date: Mon, 17 Oct 2022 15:12:15 +0100 Subject: [PATCH] Update ovsdb interface owner Pull ovsdb interface from ovn-central-k8s rather than sunbeam POC charm. Change-Id: I5acb14184caff42c802df62c56278040de05f4a1 --- ops-sunbeam/fetch-libs.sh | 2 +- ops-sunbeam/ops_sunbeam/ovn/relation_handlers.py | 2 +- .../v0/ovsdb.py | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) rename ops-sunbeam/unit_tests/lib/charms/{sunbeam_ovn_central_operator => ovn_central_k8s}/v0/ovsdb.py (99%) diff --git a/ops-sunbeam/fetch-libs.sh b/ops-sunbeam/fetch-libs.sh index 3ca0ec7d..c9909fbd 100755 --- a/ops-sunbeam/fetch-libs.sh +++ b/ops-sunbeam/fetch-libs.sh @@ -9,7 +9,7 @@ charmcraft fetch-lib charms.data_platform_libs.v0.database_requires charmcraft fetch-lib charms.keystone_k8s.v0.identity_service charmcraft fetch-lib charms.keystone_k8s.v0.cloud_credentials charmcraft fetch-lib charms.rabbitmq_k8s.v0.rabbitmq -charmcraft fetch-lib charms.sunbeam_ovn_central_operator.v0.ovsdb +charmcraft fetch-lib charms.ovn_central_k8s.v0.ovsdb charmcraft fetch-lib charms.observability_libs.v0.kubernetes_service_patch charmcraft fetch-lib charms.traefik_k8s.v1.ingress echo "Copying libs to to unit_test dir" diff --git a/ops-sunbeam/ops_sunbeam/ovn/relation_handlers.py b/ops-sunbeam/ops_sunbeam/ovn/relation_handlers.py index c7397c3b..39925ca9 100644 --- a/ops-sunbeam/ops_sunbeam/ovn/relation_handlers.py +++ b/ops-sunbeam/ops_sunbeam/ovn/relation_handlers.py @@ -343,7 +343,7 @@ class OVSDBCMSProvidesHandler(sunbeam_rhandlers.RelationHandler, # Lazy import to ensure this lib is only required if the charm # has this relation. logger.debug("Setting up ovs-cms provides event handler") - import charms.sunbeam_ovn_central_operator.v0.ovsdb as ovsdb + import charms.ovn_central_k8s.v0.ovsdb as ovsdb ovsdb_svc = ovsdb.OVSDBCMSProvides( self.charm, self.relation_name, diff --git a/ops-sunbeam/unit_tests/lib/charms/sunbeam_ovn_central_operator/v0/ovsdb.py b/ops-sunbeam/unit_tests/lib/charms/ovn_central_k8s/v0/ovsdb.py similarity index 99% rename from ops-sunbeam/unit_tests/lib/charms/sunbeam_ovn_central_operator/v0/ovsdb.py rename to ops-sunbeam/unit_tests/lib/charms/ovn_central_k8s/v0/ovsdb.py index 26e9903e..f161c239 100644 --- a/ops-sunbeam/unit_tests/lib/charms/sunbeam_ovn_central_operator/v0/ovsdb.py +++ b/ops-sunbeam/unit_tests/lib/charms/ovn_central_k8s/v0/ovsdb.py @@ -30,14 +30,14 @@ from ops.framework import ( ) # The unique Charmhub library identifier, never change it -LIBID = "19e5a5857acd4a94a4a759d173d18232" +LIBID = "114b7bb1970445daa61650e451f9da62" # Increment this major API version when introducing breaking changes LIBAPI = 0 # Increment this PATCH version before using `charmcraft publish-lib` or reset # to 0 if you are raising the major API version -LIBPATCH = 2 +LIBPATCH = 1 # TODO: add your code here! Happy coding! @@ -202,3 +202,4 @@ class OVSDBCMSProvides(Object): for k, v in settings.items(): relation.data[self.model.unit][k] = v +