aboutsummaryrefslogtreecommitdiffstats
path: root/robot/resources/stack_validation
diff options
context:
space:
mode:
Diffstat (limited to 'robot/resources/stack_validation')
-rw-r--r--robot/resources/stack_validation/darkstat_interface.robot82
-rw-r--r--robot/resources/stack_validation/packet_generator_interface.robot2
-rw-r--r--robot/resources/stack_validation/policy_check_vfw.robot18
-rw-r--r--robot/resources/stack_validation/validate_common.robot6
4 files changed, 13 insertions, 95 deletions
diff --git a/robot/resources/stack_validation/darkstat_interface.robot b/robot/resources/stack_validation/darkstat_interface.robot
deleted file mode 100644
index 3537408a..00000000
--- a/robot/resources/stack_validation/darkstat_interface.robot
+++ /dev/null
@@ -1,82 +0,0 @@
-*** Settings ***
-Documentation The main interface for interacting with A&AI. It handles low level stuff like managing the http request library and A&AI required fields
-Library ExtendedSelenium2Library
-Library StringTemplater
-Library UUID
-Library OperatingSystem
-Resource ../global_properties.robot
-Resource ../browser_setup.robot
-
-*** Variables ***
-${SNK_HOSTS_TEMPLATE} http://\${host}:\${port}/hosts/
-${SNK_HOME_TEMPLATE} http://\${host}:\${port}/
-${SNK_PATH}
-${SNK_PORT} 667
-${BYTES_PER_PACKET} 29
-${PACKETS_PER_SECOND_PER_STREAM} 11
-${MONITOR_INTERVAL_IN_SECONDS} 4
-
-*** Keywords ***
-Get Darkstat Bytes In
- [Documentation] Get bytes received on the passed interface for the given interval
- [Arguments] ${host} ${interface} ${interval}=${MONITOR_INTERVAL_IN_SECONDS}
- ${map}= Create Dictionary host=${host} port=${SNK_PORT} path=${SNK_PATH}
- ${url}= Template String ${SNK_HOSTS_TEMPLATE} ${map}
- Connect to Darkstat ${host} ${url}
- Title Should Be Hosts (darkstat3 eth1)
- ${initial_bytes}= Get Current Bytes In ${interface}
- Sleep ${interval}
- Go To ${url}
- ${new_bytes}= Get Current Bytes In ${interface}
- ${return_bytes}= Evaluate int(${new_bytes}) - int(${initial_bytes})
- [Return] ${return_bytes}
-
-Get Darkstat Packets In
- [Documentation] Get bytes received on the passed interface for the given interval
- [Arguments] ${host} ${interval}=${MONITOR_INTERVAL_IN_SECONDS}
- ${map}= Create Dictionary host=${host} port=${SNK_PORT} path=${SNK_PATH}
- ${url}= Template String ${SNK_HOME_TEMPLATE} ${map}
- Connect to Darkstat ${host} ${url}
- Title Should Be Graphs (darkstat3 eth1)
- ${initial_pkts}= Get Current Packets In
- Sleep ${interval}
- Go To ${url}
- ${new_pkts}= Get Current Packets In
- ${return_pkts}= Evaluate int(${new_pkts}) - int(${initial_pkts})
- [Return] ${return_pkts}
-
-
-Connect to Darkstat
- [Documentation] COnnects to the Darkstat port on passed host
- [Arguments] ${host} ${url}
- ## Being managed by the test case
- ##Setup Browser
- Go To ${url}
- Maximize Browser Window
- Set Selenium Speed ${GLOBAL_SELENIUM_DELAY}
- Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
- Log Logging in to ${url}
- Handle Proxy Warning
-
-
-Get Current Bytes In
- [Documentation] Retrieves packets input from given host from current Darkstats hosts page
- [Arguments] ${interface}
- ${bytes}= Get Text xpath=//tr[td/a[text() = '${interface}']]/td[4]
- ${bytes}= Evaluate ${bytes.replace(',', '')}
- [Return] ${bytes}
-
-Get Current Packets In
- [Documentation] Retrieves packets input from given host from current Darkstats hosts page
- ${bytes}= Get Text xpath=//span[@id = 'tp']
- ${bytes}= Evaluate ${bytes.replace(',', '')}
- [Return] ${bytes}
-
-
-Get Expected Range For Number Of Streams
- [Documentation] Calculates the expected range of bytes for an interval for the given number of streams
- [Arguments] ${number_of_streams}
- ${bytes_per_second}= Evaluate ${BYTES_PER_PACKET}*(${PACKETS_PER_SECOND_PER_STREAM}*${number_of_streams})
- ${low_bytes}= Evaluate (${MONITOR_INTERVAL_IN_SECONDS}-1)*${bytes_per_second}
- ${high_bytes}= Evaluate (${MONITOR_INTERVAL_IN_SECONDS}+1)*${bytes_per_second}
- [Return] ${low_bytes} ${high_bytes} \ No newline at end of file
diff --git a/robot/resources/stack_validation/packet_generator_interface.robot b/robot/resources/stack_validation/packet_generator_interface.robot
index cc9ba04f..c75e61b5 100644
--- a/robot/resources/stack_validation/packet_generator_interface.robot
+++ b/robot/resources/stack_validation/packet_generator_interface.robot
@@ -47,7 +47,7 @@ Enable Streams
${streams}= Set Variable
${comma}= Set Variable
${stream_count}= Evaluate ${stream_count}+1
- :for ${i} in Range 1 ${stream_count}
+ :FOR ${i} IN RANGE 1 ${stream_count}
\ ${name}= Catenate ${prefix}${i}
\ ${map}= Create Dictionary stream=${name}
\ ${one}= Fill JSON Template File ${PGN_ENABLE_STREAM_TEMPLATE} ${map}
diff --git a/robot/resources/stack_validation/policy_check_vfw.robot b/robot/resources/stack_validation/policy_check_vfw.robot
index 6876748c..35f7dea3 100644
--- a/robot/resources/stack_validation/policy_check_vfw.robot
+++ b/robot/resources/stack_validation/policy_check_vfw.robot
@@ -8,16 +8,16 @@ Library JSONUtils
Library OpenstackLibrary
Library HEATUtils
Library Collections
-LIbrary String
-Resource ../../resources/openstack/keystone_interface.robot
-Resource ../../resources/openstack/nova_interface.robot
-Resource ../../resources/openstack/heat_interface.robot
-Resource ../../resources/ssh/files.robot
-Resource ../../resources/ssh/processes.robot
+Library String
+Resource ../openstack/keystone_interface.robot
+Resource ../openstack/nova_interface.robot
+Resource ../openstack/heat_interface.robot
+Resource ../ssh/files.robot
+Resource ../ssh/processes.robot
+Resource ../demo_preload.robot
Resource packet_generator_interface.robot
-Resource darkstat_interface.robot
Resource validate_common.robot
-Resource ../../resources/test_templates/vnf_orchestration_test_template.robot
+Resource ../test_templates/vnf_orchestration_test_template.robot
*** Variables ***
@@ -92,7 +92,7 @@ Policy Check vLB Stack
Get DNSScaling Prefix
${mapping}= Get From Dictionary ${GLOBAL_SERVICE_TEMPLATE_MAPPING} vLB
- :for ${dict} in @{mapping}
+ :FOR ${dict} IN @{mapping}
\ Return From Keyword If '${dict['isBase']}' == 'false' ${dict['prefix']}
[Return] None
diff --git a/robot/resources/stack_validation/validate_common.robot b/robot/resources/stack_validation/validate_common.robot
index 8b292131..d189258e 100644
--- a/robot/resources/stack_validation/validate_common.robot
+++ b/robot/resources/stack_validation/validate_common.robot
@@ -79,7 +79,7 @@ Find Openstack 2
Get V4 IP
[Arguments] ${ipmaps}
- :for ${ipmap} in @{ipmaps}
+ :FOR ${ipmap} IN @{ipmaps}
\ ${ip} Get From Dictionary ${ipmap} addr
\ ${version} Get From Dictionary ${ipmap} version
\ Return from Keyword if '${version}' == '4' ${ip}
@@ -88,7 +88,7 @@ Get V4 IP
Get V4 IP Openstack
[Arguments] ${addresses} ${testtype}
${ipmaps}= Get From Dictionary ${addresses} ${testtype}
- :for ${ipmap} in @{ipmaps}
+ :FOR ${ipmap} IN @{ipmaps}
\ ${ip} Get From Dictionary ${ipmap} addr
\ ${version} Get From Dictionary ${ipmap} version
\ Return from Keyword if '${version}'=='4' ${ip}
@@ -96,7 +96,7 @@ Get V4 IP Openstack
Get V4 IP Openstack 2
[Arguments] ${ipmaps} ${testtype}
- :for ${ipmap} in @{ipmaps}
+ :FOR ${ipmap} IN @{ipmaps}
\ ${type} Get From Dictionary ${ipmap} OS-EXT-IPS:type
\ ${ip} Get From Dictionary ${ipmap} addr
\ ${version} Get From Dictionary ${ipmap} version