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

Commit

Permalink
Merge pull request #5 from juju-solutions/rye/unset-config-remove-ava…
Browse files Browse the repository at this point in the history
…ilable

remove the available state when any of the configuration options are unset
  • Loading branch information
Charles Butler committed Oct 25, 2016
2 parents 18f0103 + 3b9b3e4 commit 54211e7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions provides.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ def joined_or_changed(self):
# made of the .available state
if config['mtu'] and config['subnet'] and config['cidr']:
conv.set_state('{relation_name}.available')
else:
conv.remove_state('{relation_name}.available')

@hook('{provides:sdn-plugin}-relation-{departed}')
def broken_or_departed(self):
Expand Down

0 comments on commit 54211e7

Please sign in to comment.