X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2Fhoneycomb%2FHcPersistence.py;h=3bbc52fa911cb48e3f1e0d5ab64f772ac12ad83a;hb=21921596d22a72cc4e4f7dee172ff17d1e5853cd;hp=adb55f5477f7625d5e64fe41e897d904d2b6e11a;hpb=ce469c1a7d56c2be639e5cecde961c4ef6354fb5;p=csit.git diff --git a/resources/libraries/python/honeycomb/HcPersistence.py b/resources/libraries/python/honeycomb/HcPersistence.py index adb55f5477..3bbc52fa91 100644 --- a/resources/libraries/python/honeycomb/HcPersistence.py +++ b/resources/libraries/python/honeycomb/HcPersistence.py @@ -40,8 +40,7 @@ class HcPersistence(object): :type nodes: list :raises HoneycombError: If persisted configuration could not be removed. """ - cmd = "rm {0}/etc/opendaylight/honeycomb/*".format( - Const.REMOTE_HC_DIR) + cmd = "rm -rf {}/*".format(Const.REMOTE_HC_PERSIST) for node in nodes: if node['type'] == NodeType.DUT: ssh = SSH() @@ -61,7 +60,7 @@ class HcPersistence(object): @staticmethod def modify_persistence_files(node, find, replace): - """Searches contents of persistence file config.json for the provided + """Searches contents of persistence file data.json for the provided string, and replaces all occurrences with another string. :param node: Honeycomb node. @@ -75,8 +74,7 @@ class HcPersistence(object): """ argument = "\"s/{0}/{1}/g\"".format(find, replace) - path = "{0}/etc/opendaylight/honeycomb/config.json".format( - Const.REMOTE_HC_DIR) + path = "{0}/config/data.json".format(Const.REMOTE_HC_PERSIST) command = "sed -i {0} {1}".format(argument, path) ssh = SSH()