OSM VCA Integrator

  • Charmed Distribution of OSM
Channel Revision Published Runs on
latest/beta 294 29 Aug 2023
Ubuntu 22.04 Ubuntu 20.04
latest/beta 138 04 Apr 2023
Ubuntu 22.04 Ubuntu 20.04
latest/edge 1 09 Mar 2022
Ubuntu 20.04
14.0/stable 266 20 Jul 2023
Ubuntu 22.04
14.0/candidate 266 12 Jul 2023
Ubuntu 22.04
14.0/beta 266 12 Jul 2023
Ubuntu 22.04
13.0/stable 391 15 Jan 2024
Ubuntu 20.04
13.0/candidate 91 09 Dec 2022
Ubuntu 20.04
13.0/beta 391 05 Dec 2023
Ubuntu 20.04
juju deploy osm-vca-integrator --channel beta
Show information

Platform:

Ubuntu
22.04 20.04

charms.osm_vca_integrator.v0.vca

VCA Library.

VCA stands for VNF Configuration and Abstraction, and is one of the core components of OSM. The Juju Controller is in charged of this role.

This library implements both sides of the vca interface.

The provider side of this interface is implemented by the osm-vca-integrator Charmed Operator.

helps to integrate with the vca-integrator charm, which provides data needed to the OSM components that need to talk to the VCA, and

Any Charmed OSM component that requires to talk to the VCA should implement the requirer side of this interface.

In a nutshell using this library to implement a Charmed Operator requiring VCA data would look like

$ charmcraft fetch-lib charms.osm_vca_integrator.v0.vca

metadata.yaml:

requires:
  vca:
    interface: osm-vca

src/charm.py:

from charms.osm_vca_integrator.v0.vca import VcaData, VcaIntegratorEvents, VcaRequires
from ops.charm import CharmBase


class MyCharm(CharmBase):

    on = VcaIntegratorEvents()

    def __init__(self, *args):
        super().__init__(*args)
        self.vca = VcaRequires(self)
        self.framework.observe(
            self.on.vca_data_changed,
            self._on_vca_data_changed,
        )

    def _on_vca_data_changed(self, event):
        # Get Vca data
        data: VcaData = self.vca.data
        # data.endpoints => "localhost:17070"

You can file bugs here!


class VcaDataChangedEvent

Description

Event emitted whenever there is a change in the vca data. None

Methods

VcaDataChangedEvent. __init__( self , handle )

class VcaIntegratorEvents

VCA Integrator events.

Description

This class defines the events that ZooKeeper can emit.

Events: vca_data_changed (_VcaDataChanged)

class VcaData

Description

Vca data class. None

Methods

VcaData. __init__( self , data )

class VcaDataMissingError

Description

Data missing exception. None

class VcaRequires

Requires part of the vca relation.

Attributes

endpoint_name
Endpoint name of the charm for the vca relation.
data
Vca data from the relation.

Methods

VcaRequires. __init__( self , charm: CharmBase , endpoint_name: str )

VcaRequires. data( self )

Description

Vca data from the relation. None

class VcaProvides

Provides part of the vca relation.

Attributes

endpoint_name
Endpoint name of the charm for the vca relation.

Methods

VcaProvides. __init__( self , charm: CharmBase , endpoint_name: str )

VcaProvides. update_vca_data( self , vca_data: VcaData )

Update vca data in relation.

Arguments

vca_data

VcaData object.