aboutsummaryrefslogtreecommitdiffstats
path: root/robot/resources/so
diff options
context:
space:
mode:
authorDR695H <dr695h@att.com>2019-06-19 21:16:58 -0400
committerDR695H <dr695h@att.com>2019-06-19 21:16:58 -0400
commit369e51562f068d5e653211902efc69220508eca1 (patch)
tree7ac9c6eaabcc18a7a687d03e0a807009aa561f3a /robot/resources/so
parent3d12502f70afb8b06fb44065e85630abfdfa7a3e (diff)
move so, clamp, oof to jinja
Issue-ID: TEST-158 Change-Id: I88798326879463103a66a97d4ddbc53e864be01a Signed-off-by: DR695H <dr695h@att.com>
Diffstat (limited to 'robot/resources/so')
-rw-r--r--robot/resources/so/create_cloud_config.robot15
1 files changed, 9 insertions, 6 deletions
diff --git a/robot/resources/so/create_cloud_config.robot b/robot/resources/so/create_cloud_config.robot
index 8762d415..9c310fd0 100644
--- a/robot/resources/so/create_cloud_config.robot
+++ b/robot/resources/so/create_cloud_config.robot
@@ -1,25 +1,26 @@
*** Settings ***
Documentation Create Cloud Config
-Resource ../json_templater.robot
Resource ../so_interface.robot
Library OperatingSystem
Library Collections
+Library ONAPLibrary.Templating
*** Variables ***
${CLOUD_CONFIG_PATH} /cloudSite
${SYSTEM USER} robot-ete
-${SO_ADD_CLOUD_CONFIG}= robot/assets/templates/so/create_cloud_config.template
-${SO_ADD_CLOUD_CONFIG_V3}= robot/assets/templates/so/cloud_config_v3.template
+${SO_ADD_CLOUD_CONFIG}= so/create_cloud_config.jinja
+${SO_ADD_CLOUD_CONFIG_V3}= so/cloud_config_v3.jinja
*** Keywords ***
Create Cloud Configuration
[Documentation] Creates a cloud configuration in SO, so it knows how to talk to an openstack cloud
[Arguments] ${site_name} ${region_id} ${clli} ${identity_id} ${identity_url} ${mso_id} ${mso_pass} ${admin_tenant} ${member_role} ${identity_server_type} ${authentication_type}
${arguments}= Create Dictionary site_name=${site_name} region_id=${region_id} clli=${clli} identity_id=${identity_id} identity_url=${identity_url} mso_id=${mso_id} mso_pass=${mso_pass} admin_tenant=${admin_tenant} member_role=${member_role} identity_server_type=${identity_server_type} authentication_type=${authentication_type}
- ${data}= Fill JSON Template File ${SO_ADD_CLOUD_CONFIG} ${arguments}
+ Create Environment so ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Apply Template so ${SO_ADD_CLOUD_CONFIG} ${arguments}
${get_resp}= Run SO Catalog Post request ${CLOUD_CONFIG_PATH}/${site_name} ${data}
${get_resp}= Run Keyword If '${get_resp.status_code}'=='404' Update Cloud Configuration ${site_name} ${region_id} ${clli} ${identity_id} ${identity_url} ${mso_id} ${mso_pass} ${admin_tenant} ${member_role} ${identity_server_type} ${authentication_type}
@@ -31,7 +32,8 @@ Create Cloud Configuration v3
[Arguments] ${site_name} ${region_id} ${clli} ${identity_id} ${identity_url} ${mso_id} ${mso_pass} ${admin_tenant} ${member_role} ${identity_server_type} ${authentication_type} ${project_domain_name} ${user_domain_Name}
${arguments}= Create Dictionary site_name=${site_name} region_id=${region_id} clli=${clli} identity_id=${identity_id} identity_url=${identity_url} mso_id=${mso_id} mso_pass=${mso_pass} admin_tenant=${admin_tenant} member_role=${member_role} identity_server_type=${identity_server_type} authentication_type=${authentication_type} project_domain_name=${project_domain_name} user_domain_name=${user_domain_name}
Log ${arguments}
- ${data}= Fill JSON Template File ${SO_ADD_CLOUD_CONFIG_V3} ${arguments}
+ Create Environment so ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Apply Template so ${SO_ADD_CLOUD_CONFIG_V3} ${arguments}
${get_resp}= Run SO Catalog Post request ${CLOUD_CONFIG_PATH} ${data}
${status_string}= Convert To String ${get_resp.status_code}
Should Match Regexp ${status_string} ^(201|200)$
@@ -40,7 +42,8 @@ Update Cloud Configuration
[Documentation] Updates a cloud configuration in SO
[Arguments] ${site_name} ${region_id} ${clli} ${identity_id} ${identity_url} ${mso_id} ${mso_pass} ${admin_tenant} ${member_role} ${identity_server_type} ${authentication_type}
${arguments}= Create Dictionary site_name=${site_name} region_id=${region_id} clli=${clli} identity_id=${identity_id} identity_url=${identity_url} mso_id=${mso_id} mso_pass=${mso_pass} admin_tenant=${admin_tenant} member_role=${member_role} identity_server_type=${identity_server_type} authentication_type=${authentication_type}
- ${data}= Fill JSON Template File ${SO_ADD_CLOUD_CONFIG} ${arguments}
+ Create Environment so ${GLOBAL_TEMPLATE_FOLDER}
+ ${data}= Apply Template so ${SO_ADD_CLOUD_CONFIG} ${arguments}
${get_resp}= Run SO Catalog Put request ${CLOUD_CONFIG_PATH}/${site_name} ${data}
Should Be Equal As Strings ${get_resp.status_code} 200
[Return] ${get_resp}