2 Documentation Test suite for Routed RPC.
4 Library ../../../libraries/RequestsLibrary.py
5 Library ../../../libraries/Common.py
6 Library ../../../libraries/CrudLibrary.py
7 Library ../../../libraries/SettingsLibrary.py
8 Library ../../../libraries/UtilLibrary.py
9 Library ../../../libraries/ClusterStateLibrary.py
10 Variables ../../../variables/Variables.py
13 ${REST_CONTEXT} /restconf/config/
16 Add cars and get cars from Leader
17 [Documentation] Add 100 cars and get added cars from Leader
18 ${resp} InitCar ${MEMBER1} ${PORT}
19 ${resp} AddCar ${MEMBER1} ${PORT} ${100}
20 ${resp} Getcars ${MEMBER1} ${PORT} ${0}
21 Should Be Equal As Strings ${resp.status_code} 200
22 Should Contain ${resp.content} manufacturer1
24 Add persons and get persons from Leader
25 [Documentation] Add 100 persons and get persons
26 [Documentation] Note: There should be one person added first to enable rpc
27 ${resp} AddPerson ${MEMBER1} ${PORT} ${0}
28 ${resp} AddPerson ${MEMBER1} ${PORT} ${100}
29 ${resp} GetPersons ${MEMBER1} ${PORT} ${0}
30 Should Be Equal As Strings ${resp.status_code} 200
31 Should Contain ${resp.content} user5
33 Add car-person mapping and get car-person mapping from Follower1
34 [Documentation] Add car-person and get car-person from Follower1
35 [Documentation] Note: This is done to enable working of rpc
36 ${resp} AddCarPerson ${MEMBER2} ${PORT} ${0}
37 ${resp} GetCarPersonMappings ${MEMBER2} ${PORT} ${0}
38 Should Be Equal As Strings ${resp.status_code} 200
39 Should Contain ${resp.content} user0
41 Purchase 100 cars using Follower
42 [Documentation] Purchase 100 cars using Follower
44 ${resp} BuyCar ${MEMBER2} ${PORT} ${100}
45 ${resp} GetCarPersonMappings ${MEMBER2} ${PORT} ${0}
46 Should Be Equal As Strings ${resp.status_code} 200
49 [Documentation] Get 100 using Leader
50 ${resp} Getcars ${MEMBER1} ${PORT} ${0}
51 Should Be Equal As Strings ${resp.status_code} 200
52 Should Contain ${resp.content} manufacturer9
54 Get persons from Leader
55 [Documentation] Get 11 Persons from Leader
56 ${resp} GetPersons ${MEMBER1} ${PORT} ${0}
57 Should Be Equal As Strings ${resp.status_code} 200
58 Should Contain ${resp.content} user100
60 Get car-person mappings using Leader
61 [Documentation] Get car-person mappings using Leader to see 100 entry
62 ${resp} GetCarPersonMappings ${MEMBER1} ${PORT} ${0}
63 Should Be Equal As Strings ${resp.status_code} 200
64 Should Contain ${resp.content} user100
67 [Documentation] Stop Leader controller
68 ${resp} Stopcontroller ${MEMBER1} ${USERNAME} ${PASSWORD} ${KARAF_HOME}
70 ${resp} Killcontroller ${MEMBER1} ${USERNAME} ${PASSWORD} ${KARAF_HOME}
72 Add cars and get cars from Follower1
73 [Documentation] Add 100 cars and get added cars from Follower
74 ${resp InitCar ${MEMBER2} ${PORT}
75 ${resp} AddCar ${MEMBER2} ${PORT} ${100}
76 ${resp} Getcars ${MEMBER2} ${PORT} ${0}
77 Should Be Equal As Strings ${resp.status_code} 200
78 Should Contain ${resp.content} manufacturer1
80 Add persons and get persons from Follower1
81 [Documentation] Add 100 persons and get persons
82 [Documentation] Note: There should be one person added first to enable rpc
83 ${resp} AddPerson ${MEMBER2} ${PORT} ${0}
84 ${resp} AddPerson ${MEMBER2} ${PORT} ${100}
85 ${resp} GetPersons ${MEMBER2} ${PORT} ${0}
86 Should Be Equal As Strings ${resp.status_code} 200
87 Should Contain ${resp.content} user5
90 Purchase 100 cars using Follower2
91 [Documentation] Purchase 100 cars using Follower2
92 ${resp} BuyCar ${MEMBER3} ${PORT} ${100}
94 ${resp} GetCarPersonMappings ${MEMBER3} ${PORT} ${0}
95 Should Be Equal As Strings ${resp.status_code} 200
97 Get Cars from Follower1
98 [Documentation] Get 100 using Follower1
99 ${resp} Getcars ${MEMBER2} ${PORT} ${0}
100 Should Be Equal As Strings ${resp.status_code} 200
101 Should Contain ${resp.content} manufacturer9
103 Get persons from Follower1
104 [Documentation] Get 11 Persons from Follower1
105 ${resp} GetPersons ${MEMBER2} ${PORT} ${0}
106 Should Be Equal As Strings ${resp.status_code} 200
107 Should Contain ${resp.content} user100
109 Get car-person mappings using Follower1
110 [Documentation] Get car-person mappings using Follower1 to see 100 entry
111 ${resp} GetCarPersonMappings ${MEMBER2} ${PORT} ${0}
112 Should Be Equal As Strings ${resp.status_code} 200
113 Should Contain ${resp.content} user100
116 [Documentation] Start Leader controller
117 ${resp} Startcontroller ${MEMBER1} ${USERNAME} ${PASSWORD} ${KARAF_HOME}