X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=robot%2Fresources%2Faai%2Fcreate_zone.robot;fp=robot%2Fresources%2Faai%2Fcreate_zone.robot;h=644817c92e757fcf2f4c92a5232991f81409bbe3;hb=3bb6cf4b938d3e725860606d3ddaa8eecd872151;hp=09d6ea6e477291d7a0dec05d90c3f08bfbfd21b5;hpb=3440942ef2c78e1a8eb07c70c1a03b3834beaecf;p=testsuite.git diff --git a/robot/resources/aai/create_zone.robot b/robot/resources/aai/create_zone.robot index 09d6ea6e..644817c9 100644 --- a/robot/resources/aai/create_zone.robot +++ b/robot/resources/aai/create_zone.robot @@ -1,21 +1,17 @@ *** Settings *** Documentation Create A&AI Customer API. -... -... Create A&AI Customer API -Resource ../json_templater.robot Resource aai_interface.robot Library OperatingSystem Library Collections - +Library ONAPLibrary.Templating *** Variables *** ${ZONE_INDEX_PATH} /aai/v11 ${ROOT_ZONE_PATH} /network/zones/zone -${SYSTEM USER} robot-ete -${AAI_ADD_ZONE_BODY}= robot/assets/templates/aai/add_zone_body.template +${AAI_ADD_ZONE_BODY}= aai/add_zone_body.jinja *** Keywords *** Inventory Zone If Not Exists @@ -29,7 +25,8 @@ Inventory Zone [Documentation] Inventorys a Tenant in A&AI [Arguments] ${zone_id} ${zone_name} ${design_type} ${zone_context} ${arguments}= Create Dictionary zone_id=${zone_id} zone_name=${zone_name} design_type=${design_type} zone_context=${zone_context} - ${data}= Fill JSON Template File ${AAI_ADD_ZONE_BODY} ${arguments} + Create Environment aai ${GLOBAL_TEMPLATE_FOLDER} + ${data}= Apply Template aai ${AAI_ADD_ZONE_BODY} ${arguments} ${put_resp}= Run A&AI Put Request ${ZONE_INDEX_PATH}${ROOT_ZONE_PATH}/${zone_id} ${data} ${status_string}= Convert To String ${put_resp.status_code} Should Match Regexp ${status_string} ^(201|200)$ @@ -52,8 +49,3 @@ Get Zone ${resp}= Run A&AI Get Request ${ZONE_INDEX_PATH}${ROOT_ZONE_PATH}/${zone_id} Should Be Equal As Strings ${resp.status_code} 200 [Return] ${resp.json()} - - - - -