migrate mr_Interface to jinja 10/90210/1
authorDR695H <dr695h@att.com>
Thu, 20 Jun 2019 00:45:38 +0000 (20:45 -0400)
committerDR695H <dr695h@att.com>
Thu, 20 Jun 2019 00:45:38 +0000 (20:45 -0400)
Issue-ID: TEST-158
Change-Id: I2b9e462f7739283b7f74403a7ff4da0b9934c246
Signed-off-by: DR695H <dr695h@att.com>
robot/assets/templates/mr/mr_publish.jinja [moved from robot/assets/templates/mr_publish.template with 100% similarity]
robot/assets/templates/mr/mr_put_acl.jinja [moved from robot/assets/templates/mr_put_acl.template with 80% similarity]
robot/resources/global_properties.robot
robot/resources/mr_interface.robot
robot/resources/test_templates/pnf_registration_without_SO_template.robot

similarity index 80%
rename from robot/assets/templates/mr_put_acl.template
rename to robot/assets/templates/mr/mr_put_acl.jinja
index 62c96e8..b337fc3 100644 (file)
@@ -1,5 +1,5 @@
 {
-  "topicName":"${TOPIC_NAME}",
+  "topicName":"{{TOPIC_NAME}}",
   "topicDescription":"This is a TestTopic",
   "partitionCount":"1",
   "replicationCount":"3",
index d1232b5..fa07cd2 100644 (file)
@@ -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
index 85c5a61..f8ea9c3 100644 (file)
@@ -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}
index 3f8d5be..ae8ab2b 100644 (file)
@@ -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