- ${uri}= Set Variable ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/state
- ${headers}= Create Dictionary Authorization=${auth}
- ${response}= GET On Session CPS_URL ${uri} headers=${headers}
- Should Be Equal As Strings ${response.json()['state']['dataSyncState']['operational']['syncState']} SYNCHRONIZED
\ No newline at end of file
+ ${uri}= Set Variable ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/state
+ ${headers}= Create Dictionary Authorization=${auth}
+ Wait Until Keyword Succeeds 10sec 100ms Is CM Handle State SYNCHRONIZED ${uri} ${headers}
+
+*** Keywords ***
+Is CM Handle READY
+ [Arguments] ${uri} ${headers} ${cmHandle}
+ ${response}= GET On Session CPS_URL ${uri} headers=${headers}
+ Should Be Equal As Strings ${response.status_code} 200
+ FOR ${item} IN ${response.json()}
+ IF "${item['cmHandle']}" == "${cmHandle}"
+ Should Be Equal As Strings ${item['state']['cmHandleState']} READY
+ END
+ END
+
+Is CM Handle State SYNCHRONIZED
+ [Arguments] ${uri} ${headers}
+ ${response}= GET On Session CPS_URL ${uri} headers=${headers}
+ Should Be Equal As Strings ${response.json()['state']['dataSyncState']['operational']['syncState']} SYNCHRONIZED