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
import config
import redis
+import cleanup_db
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")
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"
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")
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
+