Fix release notes
[ric-plt/e2mgr.git] / Automation / Tests / Scripts / loadscripts.py
1 ##############################################################################
2 #
3 #   Copyright (c) 2019 AT&T Intellectual Property.
4 #
5 #   Licensed under the Apache License, Version 2.0 (the "License");
6 #   you may not use this file except in compliance with the License.
7 #   You may obtain a copy of the License at
8 #
9 #       http://www.apache.org/licenses/LICENSE-2.0
10 #
11 #   Unless required by applicable law or agreed to in writing, software
12 #   distributed under the License is distributed on an "AS IS" BASIS,
13 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 #   See the License for the specific language governing permissions and
15 #   limitations under the License.
16 #
17 ##############################################################################
18 #
19 #   This source code is part of the near-RT RIC (RAN Intelligent Controller)
20 #   platform project (RICP).
21 #
22
23
24 import redis
25 import config
26
27
28 def verify_value():
29
30     c = config.redis_ip_address
31
32     p = config.redis_ip_port
33
34     r = redis.Redis(host=c, port=p, db=0)
35
36     value = "\b\x98\xf7\xdd\xa3\xc7\xb4\x83\xde\x15\x12\x11\n\x0f02f829:0007ab00"
37
38     if r.get("{e2Manager},LOAD:test1") != value:
39         return True
40     else:
41         return False
42
43
44 def add():
45
46     c = config.redis_ip_address
47
48     p = config.redis_ip_port
49
50     r = redis.Redis(host=c, port=p, db=0)
51
52     r.set("{e2Manager},LOAD:test1", "\b\x98\xf7\xdd\xa3\xc7\xb4\x83\xde\x15\x12\x11\n\x0f02f829:0007ab00")
53
54     if r.exists("{e2Manager},LOAD:test1"):
55         return True
56     else:
57         return False
58
59
60 def verify():
61
62     c = config.redis_ip_address
63
64     p = config.redis_ip_port
65
66     r = redis.Redis(host=c, port=p, db=0)
67
68     if r.exists("{e2Manager},LOAD:test1"):
69         return True
70     else:
71         return False