[narindergupta, gnuoy] Added support for Lithium version of ODL where username is Mandatory to enable the feature and odl command

This commit is contained in:
Liam Young 2015-11-18 08:29:44 +00:00
commit f9500c7d7e
2 changed files with 3 additions and 3 deletions

View File

@ -76,9 +76,9 @@ def write_mvn_config():
@retry_on_exception(5, base_delay=10, exc_type=subprocess.CalledProcessError)
def run_odl(cmds, host="localhost", port=8101, retries=20):
def run_odl(cmds, host="localhost", port=8101, retries=20, user="karaf"):
run_cmd = ["/opt/opendaylight-karaf/bin/client", "-r", str(retries),
"-h", host, "-a", str(port)]
"-h", host, "-a", str(port), "-u", str(user)]
run_cmd.extend(cmds)
output = subprocess.check_output(run_cmd)
return output

View File

@ -55,7 +55,7 @@ class ODLControllerUtilsTests(CharmTestCase):
utils.run_odl(["feature:list"])
self.subprocess.check_output.assert_called_with(
["/opt/opendaylight-karaf/bin/client", "-r", '20', "-h",
'localhost', "-a", '8101', 'feature:list']
'localhost', "-a", '8101', "-u", "karaf", 'feature:list']
)
def test_installed_features(self):