Newer
Older
BASE_URL = 'http://10.1.7.197/camara/qod/v0'
def test_create_profile():
response = requests.post(f'{BASE_URL}/profiles', json={
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
"qos_profile_id": "f00406f5-8e36-4abc-a0ec-b871c7f062b7",
"name": "QCI_1_voice",
"description": "QoS profile for video streaming",
"status": "ACTIVE",
"targetMinUpstreamRate": {
"value": 10,
"unit": "bps"
},
"maxUpstreamRate": {
"value": 10,
"unit": "bps"
},
"maxUpstreamBurstRate": {
"value": 10,
"unit": "bps"
},
"targetMinDownstreamRate": {
"value": 10,
"unit": "bps"
},
"maxDownstreamRate": {
"value": 10,
"unit": "bps"
},
"maxDownstreamBurstRate": {
"value": 10,
"unit": "bps"
},
"minDuration": {
"value": 12,
"unit": "Minutes"
},
"maxDuration": {
"value": 12,
"unit": "Minutes"
},
"priority": 20,
"packetDelayBudget": {
"value": 12,
"unit": "Minutes"
},
"jitter": {
"value": 12,
"unit": "Minutes"
},
"packetErrorLossRate": 3
}
)
def get_profile():
response=requests.get(f'{BASE_URL}/profile/ProfileDetail')
#def test_delete_profile_by_name():
# response = requests.delete(f'{BASE_URL}/profiles/delete_by_name/Test Profile')
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#def test_update_profile():
# response = requests.put(f'{BASE_URL}/profiles/270a9c75-6a4e-452e-9dc5-804fc0204dcb', json={
# "description": "AM UPDATING THIS ",
# "name":"test2"
# })
#
#
#
#def test_create_session():
# response = requests.post(f'{BASE_URL}/sessions', json={
# "device": {
# "phoneNumber": "1234567890",
# "networkAccessIdentifier": "nai",
# "ipv4Address": {"publicAddress": "84.125.93.10", "publicPort": 59765},
# "ipv6Address": "2001:db8:85a3:8d3:1319:8a2e:370:7344"
# },
# "applicationServer": {
# "ipv4Address": "192.168.0.1/24",
# "ipv6Address": "2001:db8:85a3:8d3:1319:8a2e:370:7344"
# },
# "devicePorts": {
# "ranges": [{"from": 5010, "to": 5020}],
# "ports": [5060, 5070]
# },
# "applicationServerPorts": {
# "ranges": [{"from": 6010, "to": 6020}],
# "ports": [6060, 6070]
# },
# "qosProfile": "Test Profile",
# "webhook": {
# "notificationUrl": "https://application-server.com",
# "notificationAuthToken": "c8974e592c2fa383d4a3960714"
# },
# "duration": {"value": 1, "unit": "hours"}
# })
#
#
#def test_update_session():
# response = requests.put(f'{BASE_URL}/sessions/88c51c03-13bf-4542-b3f2-43a9edccfc95', json={
# "duration": {"value": 32, "unit": "hours"}
# })
#
#def test_delete_session():
# response = requests.delete(f'{BASE_URL}/sessions/e1b53005-ffba-4e66-b7fe-0c5e022d8d7d')
#
##def test_delete_all_sessions():
# #BASE_URL = 'http://10.1.7.197/camara/qod/v0'
# #DELETE_ALL_URL = f"{BASE_URL}/sessions/delete_all"
# #response = requests.delete(DELETE_ALL_URL)
##def test_delete_all_profiles():
# #BASE_URL = 'http://10.1.7.197/camara/qod/v0'
# #DELETE_ALL_URL_Profile = f"{BASE_URL}/profiles/delete_all"
# #response = requests.delete(DELETE_ALL_URL_Profile)