Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

juju-solutions/interface-juju-info

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Juju-Info Interface

The juju info interface is a special and implicit relationship that works with any charm. It is mainly useful for subordinate charms that can add functionality to any exisiting machine without the host charm being aware of it.

Flags

{{endpoint_name}}.connected

Note: This flag keys off of what the charm author names the relationship endpoint, which should not be the name of the interface:

An example of a properly implemented relationship would resemble the following:

requires:
  host-system:
    interface: juju-info

This might then be used in your charm would like:

@when_any('host-system.connected')
def handle_host():
    host = endpoint_from_flag('host-system.connected')
    for address in host.addresses:
        hookenv.log('Connected to: {}'.format(address))

Reference

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages