X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=Automation%2FTests%2FScripts%2Fcleanup_db.py;h=5c8db8409227305cbfe7c9880c79282ac539bcd5;hb=refs%2Fchanges%2F32%2F2832%2F1;hp=61aeffa3e8fca44e9c1f9c0b93d28c6796aba520;hpb=2c9d450c93e4f0b312a68d39429efb685ec02022;p=ric-plt%2Fe2mgr.git diff --git a/Automation/Tests/Scripts/cleanup_db.py b/Automation/Tests/Scripts/cleanup_db.py index 61aeffa..5c8db84 100644 --- a/Automation/Tests/Scripts/cleanup_db.py +++ b/Automation/Tests/Scripts/cleanup_db.py @@ -21,6 +21,7 @@ # import config import redis +import time def flush(): @@ -33,5 +34,25 @@ def flush(): r.flushall() + r.set("{rsm},CFG:GENERAL:v1.0.0" , "{\"enableResourceStatus\":true,\"partialSuccessAllowed\":true,\"prbPeriodic\":true,\"tnlLoadIndPeriodic\":true,\"wwLoadIndPeriodic\":true,\"absStatusPeriodic\":true,\"rsrpMeasurementPeriodic\":true,\"csiPeriodic\":true,\"periodicityMs\":1,\"periodicityRsrpMeasurementMs\":3,\"periodicityCsiMs\":3}") + + r.set("{e2Manager},E2TAddresses", "[\"e2t.att.com:38000\"]") + + r.set("{e2Manager},E2TInstance:e2t.att.com:38000", "{\"address\":\"e2t.att.com:38000\",\"associatedRanList\":[],\"keepAliveTimestamp\":" + str(int((time.time()+2) * 1000000000)) + ",\"state\":\"ACTIVE\"}") + + return True + +def flush_and_restore_without_e2t_keys(): + + c = config.redis_ip_address + + p = config.redis_ip_port + + r = redis.Redis(host=c, port=p, db=0) + + r.flushall() + + r.set("{rsm},CFG:GENERAL:v1.0.0" , "{\"enableResourceStatus\":true,\"partialSuccessAllowed\":true,\"prbPeriodic\":true,\"tnlLoadIndPeriodic\":true,\"wwLoadIndPeriodic\":true,\"absStatusPeriodic\":true,\"rsrpMeasurementPeriodic\":true,\"csiPeriodic\":true,\"periodicityMs\":1,\"periodicityRsrpMeasurementMs\":3,\"periodicityCsiMs\":3}") + return True