Merge "Start ovn-relay service" into main

Zuul 2022-10-11 07:58:47 +00:00 committed by Gerrit Code Review
commit 38f9b79ba1
1 changed files with 14 additions and 0 deletions

View File

@ -31,6 +31,7 @@ from ops.framework import StoredState
from ops.main import main
import ops_sunbeam.config_contexts as sunbeam_ctxts
import ops_sunbeam.core as sunbeam_core
import ops_sunbeam.ovn.container_handlers as ovn_chandlers
import ops_sunbeam.ovn.config_contexts as ovn_ctxts
import ops_sunbeam.ovn.charm as ovn_charm
@ -57,6 +58,19 @@ class OVNRelayPebbleHandler(ovn_chandlers.OVNPebbleHandler):
def service_description(self):
return 'OVN Relay'
def init_service(self, context: sunbeam_core.OPSCharmContexts) -> None:
"""Initialise service ready for use.
Write configuration files to the container and record
that service is ready for us.
NOTE: Override default to services being automatically started
self._state.service_ready = True
class OVNRelayOperatorCharm(ovn_charm.OSBaseOVNOperatorCharm):
"""Charm the service."""