Osm Ro
- Charmed Distribution of OSM
Channel | Revision | Published | Runs on |
---|---|---|---|
latest/stable | 4 | 09 Aug 2022 | |
latest/candidate | 1 | 11 Mar 2022 | |
latest/beta | 358 | 29 Aug 2023 | |
latest/beta | 170 | 04 Apr 2023 | |
latest/edge | 294 | 30 Jun 2023 | |
latest/edge | 4 | 09 Aug 2022 | |
14.0/stable | 308 | 20 Jul 2023 | |
14.0/candidate | 308 | 12 Jul 2023 | |
14.0/beta | 308 | 12 Jul 2023 | |
13.0/stable | 455 | 15 Jan 2024 | |
13.0/candidate | 103 | 09 Dec 2022 | |
13.0/beta | 455 | 05 Dec 2023 | |
12.0/stable | 4 | 13 Dec 2022 | |
10.0/stable | 1 | 09 Dec 2022 |
juju deploy osm-ro
Deploy Kubernetes operators easily with Juju, the Universal Operator Lifecycle Manager. Need a Kubernetes cluster? Install MicroK8s to create a full CNCF-certified Kubernetes system in under 60 seconds.
Platform:
charms.osm_ro.v0.ro
-
- Last updated 28 Jun 2022
- Revision Library version 0.1
Ro library.
This library implements both sides of the
ro
interface.
The provider side of this interface is implemented by the osm-ro Charmed Operator.
Any Charmed Operator that requires RO for providing its service should implement the requirer side of this interface.
In a nutshell using this library to implement a Charmed Operator requiring RO would look like
$ charmcraft fetch-lib charms.osm_ro.v0.ro
metadata.yaml
:
requires:
ro:
interface: ro
limit: 1
src/charm.py
:
from charms.osm_ro.v0.ro import RoRequires
from ops.charm import CharmBase
class MyCharm(CharmBase):
def __init__(self, *args):
super().__init__(*args)
self.ro = RoRequires(self)
self.framework.observe(
self.on["ro"].relation_changed,
self._on_ro_relation_changed,
)
self.framework.observe(
self.on["ro"].relation_broken,
self._on_ro_relation_broken,
)
self.framework.observe(
self.on["ro"].relation_broken,
self._on_ro_broken,
)
def _on_ro_relation_broken(self, event):
# Get RO host and port
host: str = self.ro.host
port: int = self.ro.port
# host => "osm-ro"
# port => 9999
def _on_ro_broken(self, event):
# Stop service
# ...
self.unit.status = BlockedStatus("need ro relation")
You can file bugs
here, selecting the devops
module!
Index
class RoRequires
Description
Requires-side of the Ro relation. None
Methods
RoRequires. __init__( self , charm: CharmBase , endpoint_name: str )
RoRequires. host( self )
Description
Get ro hostname. None
RoRequires. port( self )
Description
Get ro port number. None
class RoProvides
Description
Provides-side of the Ro relation. None
Methods
RoProvides. __init__( self , charm: CharmBase , endpoint_name: str )
RoProvides. set_host_info( self , host: str , port: int , relation )
Set Ro host and port.
Arguments
Ro hostname or IP address.
Ro port.
Relation to update. If not specified, all relations will be updated.
Description
This function writes in the application data of the relation, therefore, only the unit leader can call it.