From: Philip Joseph Date: Fri, 13 Jan 2017 18:37:30 +0000 (+0530) Subject: Bug 143 Update based on review comments X-Git-Tag: v2.0.2~7^2~5 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=0efe584c9593966d0570e3508a8a5a31a28f5dd6;p=osm%2Fdevops.git Bug 143 Update based on review comments Signed-off-by: Philip Joseph --- diff --git a/layers/pingpong/reactive/pingpong.py b/layers/pingpong/reactive/pingpong.py index 73b5fd91..21b31eac 100644 --- a/layers/pingpong/reactive/pingpong.py +++ b/layers/pingpong/reactive/pingpong.py @@ -12,13 +12,11 @@ from charms.reactive import ( when, ) import charms.sshproxy -import json from subprocess import ( Popen, CalledProcessError, PIPE, ) -import time cfg = config() @@ -50,6 +48,7 @@ def get_port(): port = 18889 return port + def run(cmd): """ Run a command on the local machine. """ if isinstance(cmd, str): @@ -65,6 +64,7 @@ def run(cmd): output=stderr.decode("utf-8").strip()) return (stdout.decode('utf-8').strip(), stderr.decode('utf-8').strip()) + @when('pingpong.configured') @when('actions.start') def start():