leader check for posting pg license

This commit is contained in:
Junaid Ali 2016-04-24 02:21:37 -04:00
parent 81a95a52f0
commit b4de3b2f26
1 changed files with 3 additions and 2 deletions

View File

@ -17,7 +17,8 @@ from charmhelpers.core.hookenv import (
config,
relation_set,
relation_ids,
status_set
status_set,
is_leader
)
from charmhelpers.fetch import (
@ -97,7 +98,7 @@ def config_changed():
if add_lcm_key():
log("PLUMgrid LCM Key added")
if charm_config.changed('plumgrid-license-key'):
if post_pg_license():
if is_leader() and post_pg_license():
log("PLUMgrid License Posted")
if charm_config.changed('fabric-interfaces'):
if not fabric_interface_changed():