aboutsummaryrefslogtreecommitdiffstats
path: root/csit/tests/cps-model-sync/cps-model-sync.robot
diff options
context:
space:
mode:
authorsourabh_sourabh <sourabh.sourabh@est.tech>2024-01-04 17:01:27 +0000
committersourabh_sourabh <sourabh.sourabh@est.tech>2024-01-11 11:22:34 +0000
commit02d8bf8c8a3469f75ef841c9d8c72349c51f3330 (patch)
treec2334148ec039389f70eb626609a742356114a66 /csit/tests/cps-model-sync/cps-model-sync.robot
parent8092359e5a03ebfd1fe5afaee3e6e64fdba082d3 (diff)
Improve dmi plugin csit stub
- Modified dmi plugin stub to return diff. modules based on cm handle id Issue-ID: CPS-2006 Change-Id: I61a0fd11b8f41ceb69dac296ad3570b91137cdcd Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Diffstat (limited to 'csit/tests/cps-model-sync/cps-model-sync.robot')
-rw-r--r--csit/tests/cps-model-sync/cps-model-sync.robot16
1 files changed, 8 insertions, 8 deletions
diff --git a/csit/tests/cps-model-sync/cps-model-sync.robot b/csit/tests/cps-model-sync/cps-model-sync.robot
index 519c7a727..704d02c4b 100644
--- a/csit/tests/cps-model-sync/cps-model-sync.robot
+++ b/csit/tests/cps-model-sync/cps-model-sync.robot
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START=======================================================
- * Copyright (C) 2021-2022 Nordix Foundation
+ * Copyright (C) 2021-2024 Nordix Foundation
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -34,8 +34,8 @@ ${auth} Basic Y3BzdXNlcjpjcHNyMGNrcyE=
${ncmpInventoryBasePath} /ncmpInventory
${ncmpBasePath} /ncmp
${dmiUrl} http://${DMI_HOST}:${DMI_PORT}
-${jsonDataCreate} {"dmiPlugin":"${dmiUrl}","dmiDataPlugin":"","dmiModelPlugin":"","createdCmHandles":[{"cmHandle":"PNFDemo","cmHandleProperties":{"Book1":"Sci-Fi Book"},"publicCmHandleProperties":{"Contact":"storeemail@bookstore.com", "Contact2":"storeemail2@bookstore.com"}}]}
-${jsonDataUpdate} {"dmiPlugin":"${dmiUrl}","dmiDataPlugin":"","dmiModelPlugin":"","updatedCmHandles":[{"cmHandle":"PNFDemo","cmHandleProperties":{"Book1":"Romance Book"},"publicCmHandleProperties":{"Contact":"newemailforstore@bookstore.com"}}]}
+${jsonDataCreate} {"dmiPlugin":"${dmiUrl}","dmiDataPlugin":"","dmiModelPlugin":"","createdCmHandles":[{"cmHandle":"ietfYang-PNFDemo","cmHandleProperties":{"Book1":"Sci-Fi Book"},"publicCmHandleProperties":{"Contact":"storeemail@bookstore.com", "Contact2":"storeemail2@bookstore.com"}}]}
+${jsonDataUpdate} {"dmiPlugin":"${dmiUrl}","dmiDataPlugin":"","dmiModelPlugin":"","updatedCmHandles":[{"cmHandle":"ietfYang-PNFDemo","cmHandleProperties":{"Book1":"Romance Book"},"publicCmHandleProperties":{"Contact":"newemailforstore@bookstore.com"}}]}
*** Test Cases ***
Register data node and sync modules.
@@ -45,13 +45,13 @@ Register data node and sync modules.
Should Be Equal As Strings ${response.status_code} 200
Get CM Handle details and confirm it has been registered.
- ${uri}= Set Variable ${ncmpBasePath}/v1/ch/PNFDemo
+ ${uri}= Set Variable ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo
${headers}= Create Dictionary Authorization=${auth}
${response}= GET On Session CPS_URL ${uri} headers=${headers}
${responseJson}= Set Variable ${response.json()}
${schemaCount}= Get length ${responseJson}
Should Be Equal As Strings ${response.status_code} 200
- IF "${responseJson['cmHandle']}" == "PNFDemo"
+ IF "${responseJson['cmHandle']}" == "ietfYang-PNFDemo"
FOR ${item} IN @{responseJson['publicCmHandleProperties']}
Should Be Equal As Strings "${item['Contact']}" "storeemail@bookstore.com"
END
@@ -64,20 +64,20 @@ Update data node and sync modules.
Should Be Equal As Strings ${response.status_code} 200
Get CM Handle details and confirm it has been updated.
- ${uri}= Set Variable ${ncmpBasePath}/v1/ch/PNFDemo
+ ${uri}= Set Variable ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo
${headers}= Create Dictionary Authorization=${auth}
${response}= GET On Session CPS_URL ${uri} headers=${headers}
${responseJson}= Set Variable ${response.json()}
${schemaCount}= Get length ${responseJson}
Should Be Equal As Strings ${response.status_code} 200
- IF "${responseJson['cmHandle']}" == "PNFDemo"
+ IF "${responseJson['cmHandle']}" == "ietfYang-PNFDemo"
FOR ${item} IN @{responseJson['publicCmHandleProperties']}
Should Be Equal As Strings "${item['Contact']}" "newemailforstore@bookstore.com"
END
END
Get modules for registered data node
- ${uri}= Set Variable ${ncmpBasePath}/v1/ch/PNFDemo/modules
+ ${uri}= Set Variable ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/modules
${headers}= Create Dictionary Authorization=${auth}
${response}= GET On Session CPS_URL ${uri} headers=${headers}
Should Be Equal As Strings ${response.status_code} 200