Leader check for posting plumgrid license

This commit is contained in:
Junaid Ali 2016-04-10 17:05:36 +05:00
parent ae20f87d8c
commit de0241ab0f
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():