From 98475e114facc2210190458ef12ae1c14281a418 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Wed, 2 Apr 2008 08:57:20 +0000 Subject: [PATCH] get the right hostname for cleaning the known_hosts file scan the public keys from the right hostname and not from *nodename --- system/TestSlice.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/system/TestSlice.py b/system/TestSlice.py index 205c6ea..3448028 100644 --- a/system/TestSlice.py +++ b/system/TestSlice.py @@ -59,11 +59,14 @@ class TestSlice: def clear_known_hosts (self): utils.header("Messing with known_hosts for slice %s"%self.name()) + hostnames=[] # scan nodenames for nodename in self.slice_spec['nodenames']: - self.test_plc.run_in_guest("sed -i -e /^%s/d /root/.ssh/known_hosts"%nodename) + (site_spec,node_spec) = self.test_plc.locate_node(nodename) + hostnames.append(node_spec['node_fields']['hostname']) + self.test_plc.run_in_guest("sed -i -e /^%s/d /root/.ssh/known_hosts"%node_spec['node_fields']['hostname']) #scan public key and update the known_host file in the root image - self.test_plc.scan_publicKeys(self.slice_spec['nodenames']) + self.test_plc.scan_publicKeys(hostnames) def locate_key(self,slice_spec): # locate the first avail. key -- 2.43.0