diff options
author | DR695H <dr695h@att.com> | 2019-06-19 20:45:38 -0400 |
---|---|---|
committer | DR695H <dr695h@att.com> | 2019-06-19 20:45:38 -0400 |
commit | 3d12502f70afb8b06fb44065e85630abfdfa7a3e (patch) | |
tree | f10a0b2992ba6f6b59d2c97daf96fd58f7e57cc3 /robot | |
parent | 74515e6a9045f0db0bd83053c6c3d567cc148f4c (diff) |
migrate mr_Interface to jinja
Issue-ID: TEST-158
Change-Id: I2b9e462f7739283b7f74403a7ff4da0b9934c246
Signed-off-by: DR695H <dr695h@att.com>
Diffstat (limited to 'robot')
-rw-r--r-- | robot/assets/templates/mr/mr_publish.jinja (renamed from robot/assets/templates/mr_publish.template) | 0 | ||||
-rw-r--r-- | robot/assets/templates/mr/mr_put_acl.jinja (renamed from robot/assets/templates/mr_put_acl.template) | 2 | ||||
-rw-r--r-- | robot/resources/global_properties.robot | 3 | ||||
-rw-r--r-- | robot/resources/mr_interface.robot | 13 | ||||
-rw-r--r-- | robot/resources/test_templates/pnf_registration_without_SO_template.robot | 2 |
5 files changed, 10 insertions, 10 deletions
diff --git a/robot/assets/templates/mr_publish.template b/robot/assets/templates/mr/mr_publish.jinja index acb10328..acb10328 100644 --- a/robot/assets/templates/mr_publish.template +++ b/robot/assets/templates/mr/mr_publish.jinja diff --git a/robot/assets/templates/mr_put_acl.template b/robot/assets/templates/mr/mr_put_acl.jinja index 62c96e8c..b337fc3e 100644 --- a/robot/assets/templates/mr_put_acl.template +++ b/robot/assets/templates/mr/mr_put_acl.jinja @@ -1,5 +1,5 @@ { - "topicName":"${TOPIC_NAME}", + "topicName":"{{TOPIC_NAME}}", "topicDescription":"This is a TestTopic", "partitionCount":"1", "replicationCount":"3", diff --git a/robot/resources/global_properties.robot b/robot/resources/global_properties.robot index d1232b5a..fa07cd25 100644 --- a/robot/resources/global_properties.robot +++ b/robot/resources/global_properties.robot @@ -35,5 +35,4 @@ ${GLOBAL_AAI_ZONE_ID} nova1 ${GLOBAL_AAI_ZONE_NAME} nova ${GLOBAL_AAI_DESIGN_TYPE} integration ${GLOBAL_AAI_ZONE_CONTEXT} labs -${GLOBAL_DNS_VES_NAME} dcae-ves-collector -${GLOBAL_VES_SERVER_PORT} 8080 +${GLOBAL_TEMPLATE_FOLDER} robot/assets/templates diff --git a/robot/resources/mr_interface.robot b/robot/resources/mr_interface.robot index 85c5a614..f8ea9c3c 100644 --- a/robot/resources/mr_interface.robot +++ b/robot/resources/mr_interface.robot @@ -5,9 +5,9 @@ Library DateTime Library Process Library ONAPLibrary.JSON Library ONAPLibrary.Utilities +Library ONAPLibrary.Templating Resource global_properties.robot -Resource ../resources/json_templater.robot *** Variables *** ${MR_HEALTH_CHECK_PATH} /topics @@ -16,8 +16,8 @@ ${MR_SUB_HEALTH_CHECK_PATH} /events/TEST_TOPIC/g1/c4?timeout=5000 ${MR_CREATE_TOPIC_PATH} /topics/create ${MR_UPDATE_ACL_TOPIC_PATH} /topics/TEST_TOPIC_ACL/producers ${MR_ENDPOINT} ${GLOBAL_MR_SERVER_PROTOCOL}://${GLOBAL_INJECTED_MR_IP_ADDR}:${GLOBAL_MR_SERVER_PORT} -${MR_PUBLISH_TEMPLATE} robot/assets/templates/mr_publish.template -${MR_PUT_ACL_TEMPLATE} robot/assets/templates/mr_put_acl.template +${MR_PUBLISH_TEMPLATE} mr/mr_publish.jinja +${MR_PUT_ACL_TEMPLATE} mr/mr_put_acl.jinja *** Keywords *** @@ -54,8 +54,8 @@ Run MR Update Topic Acl # Appears to not care if topic already exists with the POST / PUT method # ${dict}= Create Dictionary TOPIC_NAME=TEST_TOPIC_ACL - ${data}= Fill JSON Template File ${MR_PUT_ACL_TEMPLATE} ${dict} - #Log To Console ${\n}Create TEST_TOPIC_ACL + Create Environment mr ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Apply Template mr ${MR_PUT_ACL_TEMPLATE} ${dict} ${resp}= Run MR Auth Post Request ${MR_CREATE_TOPIC_PATH} iPIxkpAMI8qTcQj8 Ehq3WyT4bkif4zwgEbvshGal ${data} #Log To Console Update Owner for TEST_TOPIC_ACL ${resp}= Run MR Auth Put Request ${MR_UPDATE_ACL_TOPIC_PATH}/iPIxkpAMI8qTcQj8 iPIxkpAMI8qTcQj8 Ehq3WyT4bkif4zwgEbvshGal ${data} @@ -111,7 +111,8 @@ Run MR Post Request ${session}= Create Session mr ${MR_ENDPOINT} ${timestamp}= Get Current Date ${dict}= Create Dictionary timestamp=${timestamp} - ${data}= Fill JSON Template File ${MR_PUBLISH_TEMPLATE} ${dict} + Create Environment mr ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Apply Template mr ${MR_PUBLISH_TEMPLATE} ${dict} ${uuid}= Generate UUID4 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} ${resp}= Post Request mr ${data_path} data=${data} headers=${headers} diff --git a/robot/resources/test_templates/pnf_registration_without_SO_template.robot b/robot/resources/test_templates/pnf_registration_without_SO_template.robot index 3f8d5bec..ae8ab2b9 100644 --- a/robot/resources/test_templates/pnf_registration_without_SO_template.robot +++ b/robot/resources/test_templates/pnf_registration_without_SO_template.robot @@ -15,7 +15,7 @@ Library ONAPLibrary.Utilities ${aai_so_registration_entry_template}= robot/assets/templates/aai/add_pnf_registration_info.template ${pnf_ves_integration_request}= robot/assets/templates/ves/pnf_registration_request.template ${DMAAP_MESSAGE_ROUTER_UNAUTHENTICATED_PNF_PATH} /events/unauthenticated.PNF_READY/2/1 -${VES_ENDPOINT} http://${GLOBAL_DNS_VES_NAME}:${GLOBAL_VES_SERVER_PORT} +${VES_ENDPOINT} ${GLOBAL_DCAE_VES_PROTOCOL}://${GLOBAL_INJECTED_DCAE_VES_HOST}:${GLOBAL_DCAE_VES_SERVER_PORT} ${VES_data_path} /eventListener/v7 |