Improvments in Makefile and Amulets

This commit is contained in:
Bilal Baqar
2015-08-24 09:18:48 -07:00
parent 38b99826ad
commit b434cf702f
10 changed files with 74 additions and 34 deletions

View File

@@ -6,11 +6,12 @@
# in this file.
import sys
import time
from charmhelpers.core.hookenv import (
Hooks,
UnregisteredHookError,
log,
config,
)
from charmhelpers.fetch import (
@@ -46,7 +47,6 @@ def install():
apt_install(pkg, options=['--force-yes'], fatal=True)
load_iovisor()
ensure_mtu()
post_pg_license()
add_lcm_key()
@@ -83,6 +83,20 @@ def config_changed():
restart_pg()
@hooks.hook('start')
def start():
'''
This hook is run when the charm is started.
'''
if config('plumgrid-license-key') is not None:
count = 0
while (count < 10):
if post_pg_license():
break
count = count + 1
time.sleep(15)
@hooks.hook('stop')
def stop():
'''