From: Adam Israel Date: Thu, 19 Oct 2017 23:26:00 +0000 (-0400) Subject: Add additional configuration check X-Git-Tag: v3.0.0rc13^2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=c1ec57151ba9d0f0a8d6c15f5bc30c8a2330ccf7;p=osm%2Fdevops.git Add additional configuration check This adds a little more verbosity to the workload status, and adds and additional configuration check to verify if the configuration has been received and processed. Signed-off-by: Adam Israel --- diff --git a/juju-charms/layers/pingpong/reactive/pingpong.py b/juju-charms/layers/pingpong/reactive/pingpong.py index 2bcbc143..701d9e21 100755 --- a/juju-charms/layers/pingpong/reactive/pingpong.py +++ b/juju-charms/layers/pingpong/reactive/pingpong.py @@ -23,11 +23,20 @@ import charms.sshproxy cfg = config() +@when_not('pingpong.configured') +def not_configured(): + """Check the current configuration. + Check the current values in config to see if we have enough + information to continue.""" + config_changed() + + @when('config.changed', 'sshproxy.configured') def config_changed(): """Verify the configuration. Verify that the charm has been configured """ + status_set('maintenance', 'Verifying configuration data...') (validated, output) = charms.sshproxy.verify_ssh_credentials() if not validated: status_set('blocked', 'Unable to verify SSH credentials: {}'.format(