Added retry_on_exception to the ODL client call.

This commit is contained in:
Christopher Glass 2015-08-12 11:30:45 +02:00
parent f5baa14920
commit c7e8d41cc0
1 changed files with 2 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import urlparse
from charmhelpers.core.templating import render
from charmhelpers.core.hookenv import config
from charmhelpers.core.decorators import retry_on_exception
PROFILES = {
@ -74,6 +75,7 @@ def write_mvn_config():
"opendaylight", "opendaylight", 0400)
@retry_on_exception(6, base_delay=30, exc_type=subprocess.CalledProcessError)
def run_odl(cmds, host="localhost", port=8101, retries=20):
run_cmd = ["/opt/opendaylight-karaf/bin/client", "-r", str(retries),
"-h", host, "-a", str(port)]