summaryrefslogtreecommitdiffstats
path: root/robot/resources/so
diff options
context:
space:
mode:
authorBrian Freeman <bf1936@att.com>2018-10-24 12:25:22 -0500
committerBrian Freeman <bf1936@att.com>2018-10-24 12:28:33 -0500
commitadaa2374a3bbfc972605f33238f0ebd14b946f42 (patch)
tree8d738ded1eba0c9bd03964434a7b6f69e94a5a1f /robot/resources/so
parent5aeb30ad203bd5ec2445fb446d040c7d81611dbc (diff)
Updates for cloud_config, SDC health, VID timing
Based on contribution from Steve Smokowski Issue-ID: INT-621 Change-Id: I82828397bc0b9701fb0fa90123ac4cdd3b8d327d Signed-off-by: Brian Freeman <bf1936@att.com>
Diffstat (limited to 'robot/resources/so')
-rw-r--r--robot/resources/so/create_cloud_config.robot42
1 files changed, 42 insertions, 0 deletions
diff --git a/robot/resources/so/create_cloud_config.robot b/robot/resources/so/create_cloud_config.robot
new file mode 100644
index 00000000..be578127
--- /dev/null
+++ b/robot/resources/so/create_cloud_config.robot
@@ -0,0 +1,42 @@
+*** Settings ***
+Documentation Create Cloud Config
+
+Resource ../json_templater.robot
+Resource ../so_interface.robot
+Library OperatingSystem
+Library Collections
+
+
+*** Variables ***
+${CLOUD_CONFIG_PATH} /cloudSite
+
+${SYSTEM USER} robot-ete
+${SO_ADD_CLOUD_CONFIG}= robot/assets/templates/so/create_cloud_config.template
+
+*** 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}
+ ${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}
+ Should Be Equal As Strings ${get_resp.status_code} 200
+
+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}
+ ${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}
+
+Get Cloud Configuration
+ [Documentation] Gets cloud configuration in SO
+ [Arguments] ${site_name}
+ ${get_resp}= Run MSO Catalog Get request ${CLOUD_CONFIG_PATH}/${site_name}
+ Should Be Equal As Strings ${get_resp.status_code} 200
+
+