[RICPLT-2734] Update automation to set RSM configuration after db flush 67/1667/1
authorAmichai <amichai.sichel@intl.att.com>
Tue, 19 Nov 2019 15:55:20 +0000 (17:55 +0200)
committerAmichai <amichai.sichel@intl.att.com>
Tue, 19 Nov 2019 15:55:47 +0000 (17:55 +0200)
Signed-off-by: Amichai <amichai.sichel@intl.att.com>
Change-Id: Ic03ab7fa2359efdcc14ea41fb6ba8f57eb33ced9

Automation/Tests/Scripts/cleanup_db.py
Automation/Tests/Scripts/getnodes.py
Automation/Tests/Scripts/loadscripts.py

index 49ebca5..e2507c5 100644 (file)
@@ -29,5 +29,7 @@ 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}")
+
     return True
 
index e358fed..9b977fb 100644 (file)
@@ -18,6 +18,7 @@
 
 import config
 import redis
+import cleanup_db
 
 
 def add():
@@ -28,7 +29,7 @@ def add():
 
     r = redis.Redis(host=c, port=p, db=0)
 
-    r.flushall()
+    cleanup_db.flush()
 
     r.set("{e2Manager},ENB:02f829:007a80", "\n\x05test1\x12\t10.0.2.15\x18\xc9+ \x01*\x10\n\x0602f829\x12\x06007a800\x01:3\b\x01\x12/\bc\x12\x0f02f829:0007ab50\x1a\x040102\"\x0602f829*\n\n\b\b\x01\x10\x01\x18\x04 \x040\x01")
 
index 8615384..659806a 100644 (file)
 import redis
 import config
 
-
-def verify_value():
+def getRedisClient():
 
     c = config.redis_ip_address
 
     p = config.redis_ip_port
 
-    r = redis.Redis(host=c, port=p, db=0)
+    return redis.Redis(host=c, port=p, db=0)
+
+
+def verify_value():
+
+    r = getRedisClient()
 
     value = "\b\x98\xf7\xdd\xa3\xc7\xb4\x83\xde\x15\x12\x11\n\x0f02f829:0007ab00"
 
@@ -39,11 +43,7 @@ def verify_value():
 
 def add():
 
-    c = config.redis_ip_address
-
-    p = config.redis_ip_port
-
-    r = redis.Redis(host=c, port=p, db=0)
+    r = getRedisClient()
 
     r.set("{e2Manager},LOAD:test1", "\b\x98\xf7\xdd\xa3\xc7\xb4\x83\xde\x15\x12\x11\n\x0f02f829:0007ab00")
 
@@ -55,13 +55,10 @@ def add():
 
 def verify():
 
-    c = config.redis_ip_address
-
-    p = config.redis_ip_port
-
-    r = redis.Redis(host=c, port=p, db=0)
+    r = getRedisClient()
 
     if r.exists("{e2Manager},LOAD:test1"):
         return True
     else:
         return False
+