![Frode Nordahl](/assets/img/avatar_default.png)
Commit 6dca7338b2fa8181342a0a6c49bc582a141c3972 added the attribute on the wrong side of the interface. Change-Id: I6d561617805280caebfe6e408d74ceaccefa1f08 Closes-Bug: #1845303
18 lines
496 B
Python
18 lines
496 B
Python
from charms.reactive import hook
|
|
from charms.reactive import RelationBase
|
|
from charms.reactive import scopes
|
|
|
|
|
|
class NeutronPluginRequires(RelationBase):
|
|
scope = scopes.GLOBAL
|
|
|
|
auto_accessors = ['host']
|
|
|
|
@hook('{requires:neutron-plugin}-relation-{joined,changed}')
|
|
def changed(self):
|
|
self.set_state('{relation_name}.connected')
|
|
|
|
@hook('{requires:neutron-plugin}-relation-{broken,departed}')
|
|
def broken(self):
|
|
self.remove_state('{relation_name}.connected')
|