Skip to content

autonomouse/interface-weebl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Interface weebl

This is a Juju charm interface layer. This interface is used for connecting to a weebl environment unit.

States

{relation_name}.connected - The relationship has been established, but not enough data has been sent to determine if we are ready to use it.

{relation_name}.available - We have the required information, we can now configure our consumer service.

Examples

requires

Most charms will want to implement this interface as a weebl connection. When implementing this interface as a requirer:

metadata.yaml

  requires:
    weebl:
      interface: weebl

layer.yaml

includes:
- interface:weebl

reactive/thing.py

  @when('weebl.available')
  def get_url(weebl):
      return weebl.weebl_url()

  @when('weebl.available')
  def get_username(weebl):
      return weebl.weebl_username()

  @when('weebl.available')
  def get_apikey(weebl):
      return weebl.weebl_apikey()

provides

The weebl charm provides this interface. If you wanted to provide this interface in another layer:

metadata.yaml

  provides:
    weebl:
      interface: weebl

layer.yaml

includes:
- interface:weebl

reactive/code.py

  @when('weebl.connected')
  def send_weebl_info(weebl):
      weebl.provide_weebl_credentials(
          weebl_username=config['username'],
          weebl_apikey=config['apikey'])

Data

Weebl send's the following information, per unit

  • weebl_url
  • weebl_username
  • weebl_apikey

Maintainers

About

interface for weebl

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages