From c9456362bd536bd147ae228358913777f27dde0e Mon Sep 17 00:00:00 2001 From: Ciprian Barbu Date: Wed, 1 Mar 2017 15:25:28 +0200 Subject: [deployment_handler] Fix apt-cache to get installed version In case multiple versions of a package exist on the repo, the old method using apt-cache show opendaylight returned everything available rather than what was actually installed. Using apt-cache policy opendaylight is more appropriate. Change-Id: I8068c18ab25ca532988f24277fd48a4c42647891 Signed-off-by: Ciprian Barbu --- opnfv/deployment/fuel/adapter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'opnfv/deployment') diff --git a/opnfv/deployment/fuel/adapter.py b/opnfv/deployment/fuel/adapter.py index a71d6cb..a217767 100644 --- a/opnfv/deployment/fuel/adapter.py +++ b/opnfv/deployment/fuel/adapter.py @@ -176,7 +176,7 @@ class FuelAdapter(manager.DeploymentHandler): return version def get_sdn_version(self): - cmd = "apt-cache show opendaylight|grep Version" + cmd = "apt-cache policy opendaylight|grep Installed" version = None for node in self.nodes: if manager.Role.ODL in node.roles and node.is_active(): -- cgit 1.2.3-korg