diff options
Diffstat (limited to 'test')
25 files changed, 273 insertions, 170 deletions
diff --git a/test/csit/plans/modeling/javatoscachecker/APIs/setup.sh b/test/csit/plans/modeling-toscaparsers-javatoscachecker/APIs/setup.sh index 19fc5ed79..03d07defb 100644 --- a/test/csit/plans/modeling/javatoscachecker/APIs/setup.sh +++ b/test/csit/plans/modeling-toscaparsers-javatoscachecker/APIs/setup.sh @@ -18,5 +18,5 @@ # # Place the scripts in run order: -source ${WORKSPACE}/test/csit/scripts/modeling/javatoscachecker/setup_containers.sh +source ${WORKSPACE}/test/csit/scripts/modeling-toscaparsers-javatoscachecker/setup_containers.sh diff --git a/test/csit/plans/modeling/javatoscachecker/APIs/teardown.sh b/test/csit/plans/modeling-toscaparsers-javatoscachecker/APIs/teardown.sh index 0e149c028..1ecaad4d2 100644 --- a/test/csit/plans/modeling/javatoscachecker/APIs/teardown.sh +++ b/test/csit/plans/modeling-toscaparsers-javatoscachecker/APIs/teardown.sh @@ -17,5 +17,5 @@ # Modifications copyright (c) 2017 AT&T Intellectual Property # -source ${WORKSPACE}/test/csit/scripts/modeling/javatoscachecker/teardown_containers.sh +source ${WORKSPACE}/test/csit/scripts/modeling-toscaparsers-javatoscachecker/teardown_containers.sh diff --git a/test/csit/plans/modeling-toscaparsers-javatoscachecker/APIs/testplan.txt b/test/csit/plans/modeling-toscaparsers-javatoscachecker/APIs/testplan.txt new file mode 100644 index 000000000..f59237bd4 --- /dev/null +++ b/test/csit/plans/modeling-toscaparsers-javatoscachecker/APIs/testplan.txt @@ -0,0 +1,3 @@ +# Test suites are relative paths under [integration.git]/test/csit/tests/. +# Place the suites in run order. +modeling-toscaparsers-javatoscachecker/APIs diff --git a/test/csit/plans/vid/healthCheck/setup.sh b/test/csit/plans/vid/healthCheck/setup.sh index afe9ea7ba..a117a6c78 100644 --- a/test/csit/plans/vid/healthCheck/setup.sh +++ b/test/csit/plans/vid/healthCheck/setup.sh @@ -18,6 +18,8 @@ # # Place the scripts in run order: +/usr/bin/Xvfb :0 -screen 0 1024x768x24& +export DISPLAY=:0 source ${WORKSPACE}/test/csit/scripts/vid/clone_and_setup_vid_data.sh diff --git a/test/csit/plans/vid/healthCheck/testplan.txt b/test/csit/plans/vid/healthCheck/testplan.txt index ffbb593ca..92d8b0584 100644 --- a/test/csit/plans/vid/healthCheck/testplan.txt +++ b/test/csit/plans/vid/healthCheck/testplan.txt @@ -1,3 +1,4 @@ # Test suites are relative paths under [integration.git]/test/csit/tests/. # Place the suites in run order. vid/healthCheck +vid/login diff --git a/test/csit/scripts/modeling/javatoscachecker/setup_containers.sh b/test/csit/scripts/modeling-toscaparsers-javatoscachecker/setup_containers.sh index 0b22f6197..3521ff1cb 100644 --- a/test/csit/scripts/modeling/javatoscachecker/setup_containers.sh +++ b/test/csit/scripts/modeling-toscaparsers-javatoscachecker/setup_containers.sh @@ -20,7 +20,7 @@ # ECOMP is a trademark and service mark of AT&T Intellectual Property. # -echo "This is ${WORKSPACE}/test/csit/modeling/javatoscachecker/setup_containers.sh" +echo "This is ${WORKSPACE}/test/csit/scripts/modeling-toscaparsers-javatoscachecker/setup_containers.sh" #start docker image run-instance.sh nexus3.onap.org:10001/onap/modeling/javatoscachecker:latest modeling_javatoscachecker_1 "-p 8080:8080" diff --git a/test/csit/scripts/modeling/javatoscachecker/teardown_containers.sh b/test/csit/scripts/modeling-toscaparsers-javatoscachecker/teardown_containers.sh index c3292fb30..cca4fe193 100644 --- a/test/csit/scripts/modeling/javatoscachecker/teardown_containers.sh +++ b/test/csit/scripts/modeling-toscaparsers-javatoscachecker/teardown_containers.sh @@ -20,7 +20,7 @@ # ECOMP is a trademark and service mark of AT&T Intellectual Property. # -echo "This is ${WORKSPACE}/test/csit/modeling/javatoscachecker/teardown_containers.sh" +echo "This is ${WORKSPACE}/test/csit/scripts/modeling-toscaparsers-javatoscachecker/teardown_containers.sh" kill-instance.sh modeling_javatoscachecker_1 diff --git a/test/csit/tests/modeling/javatoscachecker/APIs/__init__.robot b/test/csit/tests/modeling-toscaparsers-javatoscachecker/APIs/__init__.robot index 8064d6b0c..8064d6b0c 100644 --- a/test/csit/tests/modeling/javatoscachecker/APIs/__init__.robot +++ b/test/csit/tests/modeling-toscaparsers-javatoscachecker/APIs/__init__.robot diff --git a/test/csit/tests/modeling-toscaparsers-javatoscachecker/APIs/basics.robot b/test/csit/tests/modeling-toscaparsers-javatoscachecker/APIs/basics.robot new file mode 100644 index 000000000..053b2824d --- /dev/null +++ b/test/csit/tests/modeling-toscaparsers-javatoscachecker/APIs/basics.robot @@ -0,0 +1,62 @@ +*** Settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json + + +*** Test Cases *** +Check service up/non existent namespace + CreateSession checkerservice http://localhost:8080 + &{headers}= Create Dictionary Accept=application/json + ${resp}= Get Request checkerservice /check_template/nosuchcatalog headers=${headers} + Should Be Equal As Strings ${resp.status_code} 404 + +Check standalone template + CreateSession checkerservice http://localhost:8080 + ${data}= Get Binary File ${CURDIR}${/}data${/}standalone.yaml + &{headers}= Create Dictionary Accept=application/json + ${resp}= Post Request checkerservice /check_template/ data=${data} headers=${headers} + Log Response received from checker ${resp.text} + Should Be Equal As Strings ${resp.status_code} 200 + Should Be Equal As Strings ${resp.text} [] + +Check standalone template with errors + CreateSession checkerservice http://localhost:8080 + ${data}= Get Binary File ${CURDIR}${/}data${/}standalone_with_errors.yaml + &{headers}= Create Dictionary Accept=application/json + ${resp}= Post Request checkerservice /check_template/ data=${data} headers=${headers} + Log Response received from checker ${resp.text} + Should Be Equal As Strings ${resp.status_code} 200 + Should Not Be Equal As Strings ${resp.text} [] + +Check schema new namespace + CreateSession checkerservice http://localhost:8080 + ${data}= Get Binary File ${CURDIR}${/}data${/}test_schema.yaml + &{headers}= Create Dictionary Accept=application/json + ${resp}= Post Request checkerservice /check_template/test/schema.yaml data=${data} headers=${headers} + Log Response received from checker ${resp.text} + Should Be Equal As Strings ${resp.status_code} 200 + Should Be Equal As Strings ${resp.text} [] + +Check template in namespace + CreateSession checkerservice http://localhost:8080 + ${data}= Get Binary File ${CURDIR}${/}data${/}test_template.yaml + &{headers}= Create Dictionary Accept=application/json + ${resp}= Post Request checkerservice /check_template/test/ data=${data} headers=${headers} + Log Response received from checker ${resp.text} + Should Be Equal As Strings ${resp.status_code} 200 + Should Be Equal As Strings ${resp.text} [] + +Check named template does not exist + CreateSession checkerservice http://localhost:8080 + &{headers}= Create Dictionary Accept=application/json + ${resp}= Get Request checkerservice /check_template/test/nosuchtemplate.yaml headers=${headers} + Should Be Equal As Strings ${resp.status_code} 404 + +Check delete existing namespace + CreateSession checkerservice http://localhost:8080 + &{headers}= Create Dictionary Accept=application/json + ${resp}= Delete Request checkerservice /check_template/test/ headers=${headers} + Log Response received from checker ${resp.text} + Should Be Equal As Strings ${resp.status_code} 200 diff --git a/test/csit/tests/modeling/javatoscachecker/APIs/data/standalone.yaml b/test/csit/tests/modeling-toscaparsers-javatoscachecker/APIs/data/standalone.yaml index 26797aba3..26797aba3 100644 --- a/test/csit/tests/modeling/javatoscachecker/APIs/data/standalone.yaml +++ b/test/csit/tests/modeling-toscaparsers-javatoscachecker/APIs/data/standalone.yaml diff --git a/test/csit/tests/modeling/javatoscachecker/APIs/data/standalone_with_errors.yaml b/test/csit/tests/modeling-toscaparsers-javatoscachecker/APIs/data/standalone_with_errors.yaml index d5c1a1586..d5c1a1586 100644 --- a/test/csit/tests/modeling/javatoscachecker/APIs/data/standalone_with_errors.yaml +++ b/test/csit/tests/modeling-toscaparsers-javatoscachecker/APIs/data/standalone_with_errors.yaml diff --git a/test/csit/tests/modeling/javatoscachecker/APIs/data/test_schema.yaml b/test/csit/tests/modeling-toscaparsers-javatoscachecker/APIs/data/test_schema.yaml index 9575e27c9..9575e27c9 100644 --- a/test/csit/tests/modeling/javatoscachecker/APIs/data/test_schema.yaml +++ b/test/csit/tests/modeling-toscaparsers-javatoscachecker/APIs/data/test_schema.yaml diff --git a/test/csit/tests/modeling/javatoscachecker/APIs/data/test_template.yaml b/test/csit/tests/modeling-toscaparsers-javatoscachecker/APIs/data/test_template.yaml index 478aec05e..478aec05e 100644 --- a/test/csit/tests/modeling/javatoscachecker/APIs/data/test_template.yaml +++ b/test/csit/tests/modeling-toscaparsers-javatoscachecker/APIs/data/test_template.yaml diff --git a/test/csit/tests/modeling/javatoscachecker/APIs/basics.robot b/test/csit/tests/modeling/javatoscachecker/APIs/basics.robot deleted file mode 100644 index b9407088a..000000000 --- a/test/csit/tests/modeling/javatoscachecker/APIs/basics.robot +++ /dev/null @@ -1,40 +0,0 @@ -*** Settings *** -Library Collections -Library RequestsLibrary -Library OperatingSystem -Library json - - -*** Test Cases *** -Check service up - CreateSession checkerservice http://localhost:8080 - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json - ${resp}= Get Request checkerservice /check_template/nosuchcatalog headers=${headers} - Should Be Equal As Strings ${resp.status_code} 404 - -Check standalone template - CreateSession checkerservice http://localhost:8080 - ${data}= Get Binary File ${CURDIR}${/}data${/}standalone.yaml - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json - ${resp}= Post Request checkerservice /check_template data=${data} headers=${headers} - Should Be Equal As Strings ${resp.status_code} 200 - -Check schema new namespace - CreateSession checkerservice http://localhost:8080 - ${data}= Get Binary File ${CURDIR}${/}data${/}test_schema.yaml - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json - ${resp}= Post Request checkerservice /check_template/test/schema.yaml data=${data} headers=${headers} - Should Be Equal As Strings ${resp.status_code} 200 - -Check template in namespace - CreateSession checkerservice http://localhost:8080 - ${data}= Get Binary File ${CURDIR}${/}data${/}test_template.yaml - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json - ${resp}= Post Request checkerservice /check_template/test/ data=${data} headers=${headers} - Should Be Equal As Strings ${resp.status_code} 200 - -Check delete existing namespace - CreateSession checkerservice http://localhost:8080 - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json - ${resp}= Delete Request checkerservice /check_template/test/ headers=${headers} - Should Be Equal As Strings ${resp.status_code} 200 diff --git a/test/csit/tests/vfc/nfvo-driver-svnfm/huawei.robot b/test/csit/tests/vfc/nfvo-driver-svnfm/huawei.robot index e0679fbd8..a2aa63949 100644 --- a/test/csit/tests/vfc/nfvo-driver-svnfm/huawei.robot +++ b/test/csit/tests/vfc/nfvo-driver-svnfm/huawei.robot @@ -9,7 +9,7 @@ Library HttpLibrary.HTTP *** Variables *** @{return_ok_list}= 200 201 202 204 -${queryswagger_url} /api/hwvnfm/v1/swagger.json +${queryswagger_url} /api/huaweivnfmdriver/v1/swagger.json ${createauthtoken_url} /rest/plat/smapp/v1/oauth/token #json files diff --git a/test/csit/tests/vid/login/__init__.robot b/test/csit/tests/vid/login/__init__.robot new file mode 100644 index 000000000..10faf380f --- /dev/null +++ b/test/csit/tests/vid/login/__init__.robot @@ -0,0 +1,2 @@ +*** Settings *** +Documentation VID - Login diff --git a/test/csit/tests/vid/login/test1.robot b/test/csit/tests/vid/login/test1.robot new file mode 100644 index 000000000..12b23b725 --- /dev/null +++ b/test/csit/tests/vid/login/test1.robot @@ -0,0 +1,78 @@ +*** Settings *** +Documentation Logins to VID +Library ExtendedSelenium2Library +Library Collections +Library String +Library RequestsLibrary +#Library OSUtils +Library OperatingSystem + +*** Variables *** +${GLOBAL_APPLICATION_ID} robot-ete +${GLOBAL_SELENIUM_BROWSER} chrome +${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} Create Dictionary +${GLOBAL_SELENIUM_DELAY} 0 +${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} 5 +${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} 15 +${VID_ENV} /vid +${VID_ENDPOINT} http://localhost:8080 +${VID_LOGIN_URL} ${VID_ENDPOINT}${VID_ENV}/login.htm +${VID_HEALTHCHECK_PATH} ${VID_ENV}/api/v2/users +${VID_HOME_URL} ${VID_ENDPOINT}${VID_ENV}/welcome.htm +${GLOBAL_VID_USERNAME} demo +${GLOBAL_VID_PASSWORD} Kp8bJ4SXszM0WX + + +*** Test Cases *** +Login To VID GUI + [Documentation] Logs in to VID GUI + # Setup Browser Now being managed by test case + Setup Browser + Go To ${VID_LOGIN_URL} + #Maximize Browser Window + Set Selenium Speed ${GLOBAL_SELENIUM_DELAY} + Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} + Log Logging in to ${VID_ENDPOINT}${VID_ENV} + #Handle Proxy Warning + Title Should Be Login + Input Text xpath=//input[@id='loginId'] ${GLOBAL_VID_USERNAME} + Input Password xpath=//input[@id='password'] ${GLOBAL_VID_PASSWORD} + Click Button xpath=//input[@id='loginBtn'] + Wait Until Page Contains Welcome to VID ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Log Logged in to ${VID_ENDPOINT}${VID_ENV} + + +*** Keywords *** +Setup Browser + [Documentation] Sets up browser based upon the value of ${GLOBAL_SELENIUM_BROWSER} + Run Keyword If '${GLOBAL_SELENIUM_BROWSER}' == 'firefox' Setup Browser Firefox + Run Keyword If '${GLOBAL_SELENIUM_BROWSER}' == 'chrome' Setup Browser Chrome + Log Running with ${GLOBAL_SELENIUM_BROWSER} + +Setup Browser Firefox + ${dc} Evaluate sys.modules['selenium.webdriver'].DesiredCapabilities.FIREFOX sys, selenium.webdriver + Set To Dictionary ${dc} elementScrollBehavior 1 + Create Webdriver Firefox desired_capabilities=${dc} + Set Global Variable ${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} ${dc} + +Setup Browser Chrome + #${os}= Get Normalized Os + #Log Normalized OS=${os} + ${chrome options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys + Call Method ${chrome options} add_argument no-sandbox + ${dc} Evaluate sys.modules['selenium.webdriver'].DesiredCapabilities.CHROME sys, selenium.webdriver + Set To Dictionary ${dc} elementScrollBehavior 1 + Create Webdriver Chrome chrome_options=${chrome_options} desired_capabilities=${dc} + Set Global Variable ${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} ${dc} + +Handle Proxy Warning + [Documentation] Handle Intermediate Warnings from Proxies + ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist \${GLOBAL_PROXY_WARNING_TITLE} + Return From Keyword if '${status}' != 'PASS' + ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist \${GLOBAL_PROXY_WARNING_CONTINUE_XPATH} + Return From Keyword if '${status}' != 'PASS' + Return From Keyword if "${GLOBAL_PROXY_WARNING_TITLE}" == '' + Return From Keyword if "${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}" == '' + ${test} ${value}= Run keyword and ignore error Title Should Be ${GLOBAL_PROXY_WARNING_TITLE} + Run keyword If '${test}' == 'PASS' Click Element xpath=${GLOBAL_PROXY_WARNING_CONTINUE_XPATH} +
\ No newline at end of file diff --git a/test/ete/labs/windriver/Integration-Jenkins-openrc.sh b/test/ete/labs/windriver/Integration-Jenkins-openrc.sh index 0b1801253..ef2aa9a25 100644 --- a/test/ete/labs/windriver/Integration-Jenkins-openrc.sh +++ b/test/ete/labs/windriver/Integration-Jenkins-openrc.sh @@ -28,18 +28,10 @@ unset OS_TENANT_NAME # performing the action as the **user**. export OS_USERNAME="gary_wu" -# Remote Openstack clients will need to set this environment if -# connecting to an HTTPS enabled endpoint -CERT_MSG="Please enter a path for your CA certificate pem file, \ -or press enter if you are not using HTTPS " -read -p "$CERT_MSG" OS_CACERT_INPUT -if [ ! -z "$OS_CACERT_INPUT" ] -then - export OS_CACERT=$(readlink -f $OS_CACERT_INPUT) -fi - # With Keystone you pass the keystone password. -read -sp "Please enter your OpenStack Password for project $OS_PROJECT_NAME as user $OS_USERNAME: " OS_PASSWORD_INPUT +if [ -z ${OS_PASSWORD_INPUT+x} ]; then + read -sp "Please enter your OpenStack Password for project $OS_PROJECT_NAME as user $OS_USERNAME: " OS_PASSWORD_INPUT +fi export OS_PASSWORD=$OS_PASSWORD_INPUT # If your configuration has multiple regions, we set that information here. diff --git a/test/ete/labs/windriver/Integration-Stable-openrc.sh b/test/ete/labs/windriver/Integration-Stable-openrc.sh deleted file mode 100644 index 1d68adc25..000000000 --- a/test/ete/labs/windriver/Integration-Stable-openrc.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env bash - -# To use an OpenStack cloud you need to authenticate against the Identity -# service named keystone, which returns a **Token** and **Service Catalog**. -# The catalog contains the endpoints for all services the user/tenant has -# access to - such as Compute, Image Service, Identity, Object Storage, Block -# Storage, and Networking (code-named nova, glance, keystone, swift, -# cinder, and neutron). -# -# *NOTE*: Using the 3 *Identity API* does not necessarily mean any other -# OpenStack API is version 3. For example, your cloud provider may implement -# Image API v1.1, Block Storage API v2, and Compute API v2.0. OS_AUTH_URL is -# only for the Identity API served through keystone. -export OS_AUTH_URL=http://10.12.25.2:5000/v3 - -# With the addition of Keystone we have standardized on the term **project** -# as the entity that owns the resources. -export OS_PROJECT_ID=3583253e932845a09cd4c8ca2f31d095 -export OS_PROJECT_NAME="Integration-Stable" -export OS_USER_DOMAIN_NAME="Default" -if [ -z "$OS_USER_DOMAIN_NAME" ]; then unset OS_USER_DOMAIN_NAME; fi - -# unset v2.0 items in case set -unset OS_TENANT_ID -unset OS_TENANT_NAME - -# In addition to the owning entity (tenant), OpenStack stores the entity -# performing the action as the **user**. -export OS_USERNAME="gary_wu" - -# Remote Openstack clients will need to set this environment if -# connecting to an HTTPS enabled endpoint -CERT_MSG="Please enter a path for your CA certificate pem file, \ -or press enter if you are not using HTTPS " -read -p "$CERT_MSG" OS_CACERT_INPUT -if [ ! -z "$OS_CACERT_INPUT" ] -then - export OS_CACERT=$(readlink -f $OS_CACERT_INPUT) -fi - -# With Keystone you pass the keystone password. -read -sp "Please enter your OpenStack Password for project $OS_PROJECT_NAME as user $OS_USERNAME: " OS_PASSWORD_INPUT -export OS_PASSWORD=$OS_PASSWORD_INPUT - -# If your configuration has multiple regions, we set that information here. -# OS_REGION_NAME is optional and only valid in certain environments. -export OS_REGION_NAME="RegionOne" -# Don't leave a blank variable, unset it if it was empty -if [ -z "$OS_REGION_NAME" ]; then unset OS_REGION_NAME; fi - -export OS_INTERFACE=public -export OS_IDENTITY_API_VERSION=3 diff --git a/test/ete/labs/windriver/onap.env b/test/ete/labs/windriver/onap-openstack.env index 5eb5d367f..b0380a17a 100644 --- a/test/ete/labs/windriver/onap.env +++ b/test/ete/labs/windriver/onap-openstack.env @@ -12,8 +12,6 @@ parameters: ubuntu_1604_image: ubuntu-16-04-cloud-amd64 - centos_7_image: CentOS-7 - flavor_small: m1.small flavor_medium: m1.medium @@ -24,18 +22,12 @@ parameters: flavor_xxlarge: m1.xxlarge - security_group: default - vm_base_name: onap key_name: onap_key - dcae_key_name: dcae_key - pub_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKXDgoo3+WOqcUG8/5uUbk81+yczgwC4Y8ywTmuQqbNxlY1oQ0YxdMUqUnhitSXs5S/yRuAVOYHwGg2mCs20oAINrP+mxBI544AMIb9itPjCtgqtE2EWo6MmnFGbHB4Sx3XioE7F4VPsh7japsIwzOjbrQe+Mua1TGQ5d4nfEOQaaglXLLPFfuc7WbhbJbK6Q7rHqZfRcOwAMXgDoBqlyqKeiKwnumddo2RyNT8ljYmvB6buz7KnMinzo7qB0uktVT05FH9Rg0CTWH5norlG5qXgP2aukL0gk1ph8iAt7uYLf1ktp+LJI2gaF6L0/qli9EmVCSLr1uJ38Q8CBflhkh - dcae_pub_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC94pcIva90rzXumORjMCf16qjVrn5+ykfW6uMcn+DPlifU+ihtqx4Up26v1gVZyCuY8BFmbhm4YGxnRykNfi71kYbWOasUFzY86dtptCuLVMRLsMYWwOA3sHQ5IcUYNbWmChh4LyOIfhy4p2atCmB1UUkQf7Icg8LokCIcdI3IohlNko50t9KOIhBvqC7Bnegnl6zpoYdtYQppdgp5xesdhYRrdIGmT86cH2QbImpcR3tMTty7SLsw5WdTSfUFwfm76s07ivUDfCRMCJoWcxQeh6my7P7BkfDYMVIYRyfWmoIf2iv3UrqahHTcCiL79SRiD0iCt0K2SEgGsVyCX2jf - nexus_repo: https://nexus.onap.org/content/sites/raw nexus_docker_repo: nexus3.onap.org:10001 @@ -98,11 +90,11 @@ parameters: clamp_ip_addr: 10.0.12.1 openo_ip_addr: 10.0.14.1 - dcae_coll_float_ip: 10.12.0.32 - dcae_db_float_ip: 10.12.0.24 - dcae_hdp1_float_ip: 10.12.0.30 - dcae_hdp2_float_ip: 10.12.0.33 - dcae_hdp3_float_ip: 10.12.0.15 +# dcae_coll_float_ip: PUT DCAE COLLECTOR FLOATING IP HERE +# dcae_db_float_ip: PUT DCAE DATABASE FLOATING IP HERE +# dcae_hdp1_float_ip: PUT DCAE HADOOP VM1 FLOATING IP HERE +# dcae_hdp2_float_ip: PUT DCAE HADOOP VM2 FLOATING IP HERE +# dcae_hdp3_float_ip: PUT DCAE HADOOP VM3 FLOATING IP HERE ########################### # # @@ -110,19 +102,35 @@ parameters: # # ########################### - dcae_base_environment: 1-NIC-FLOATING-IPS +# dcae_base_environment: 1-NIC-FLOATING-IPS dcae_zone: ZONE - dcae_state: STATE +# dcae_state: STATE + +# nexus_repo_root: https://nexus.onap.org - nexus_repo_root: https://nexus.onap.org +# nexus_url_snapshot: https://nexus.onap.org/content/repositories/snapshots - nexus_url_snapshot: https://nexus.onap.org/content/repositories/snapshots +# gitlab_branch: master - gitlab_branch: master +# dcae_code_version: 1.1.0 - dcae_code_version: 1.1.0 + dcaeos_cloud_env: PUT DACE TARGET DEPLOYMENT STACK'S FLAVOR (e.g. OpenStack) HERE + dcaeos_keystone_url: PUT DACE TARGET DEPLOYMENT STACK'S KEYSTONE URL HERE + dcaeos_openstack_region: PUT DACE TARGET DEPLOYMENT STACK'S REGION HERE + dcaeos_openstack_tenant_id: PUT DACE TARGET DEPLOYMENT STACK'S TENANT ID HERE + dcaeos_openstack_username: PUT DACE TARGET DEPLOYMENT STACK'S USERNAME HERE + dcaeos_openstack_password: PUT DACE TARGET DEPLOYMENT STACK'S PASSWORD HERE + dcaeos_dcae_key_name: PUT DACE TARGET DEPLOYMENT STACK'S UPLOADED KEY-PAIR NAME HERE + dcaeos_dcae_pub_key: PUT DACE TARGET DEPLOYMENT STACK'S PUBLIC KEY HERE + dcaeos_private_key: PUT DACE TARGET DEPLOYMENT STACK'S PRIVATE KEY HERE + dcaeos_openstack_private_network_name: PUT DACE TARGET DEPLOYMENT STACK'S INTERNAL NETWOKR ID HERE + dcaeos_public_net_id: PUT DACE TARGET DEPLOYMENT STACK'S PUBLIC NETWORK ID HERE + dcaeos_ubuntu_1604_image: PUT DACE TARGET DEPLOYMENT STACK'S UBUNTU1604 IMAGE ID (TO BE USED BY DCAE VMS) HERE + dcaeos_centos_7_image: PUT DACE TARGET DEPLOYMENT STACK'S CENTOS7 IMAGE ID (TO BE USED BY DCAE VMS) HERE + dcaeos_security_group: PUT DACE TARGET DEPLOYMENT STACK'S SECURITY GROUP ID (TO BE USED BY DCAE VMS) HERE + dcaeos_flavor_id: PUT DACE TARGET DEPLOYMENT STACK'S VM FLAVOR ID (TO BE USED BY DCAE VMS) HERE ################################ diff --git a/test/ete/scripts/deploy-onap.sh b/test/ete/scripts/deploy-onap.sh index 3c69e15e8..02943935d 100755 --- a/test/ete/scripts/deploy-onap.sh +++ b/test/ete/scripts/deploy-onap.sh @@ -1,53 +1,17 @@ #!/bin/bash -if [ -z "$OS_AUTH_URL" ] || [ -z "$OS_USERNAME" ] -then - echo "ERROR: OpenStack environment variables not set. Please source your OpenStack RC script first." - exit 1 -fi - - if [ -z "$WORKSPACE" ]; then export WORKSPACE=`git rev-parse --show-toplevel` fi +source $WORKSPACE/test/ete/scripts/install_openstack_cli.sh - -# Assume that if ROBOT_VENV is set, we don't need to reinstall robot -if [ -f ${WORKSPACE}/env.properties ]; then - source ${WORKSPACE}/env.properties -fi - -if [ ! -z "$ONAP_VENV" ] && [ -f "$ONAP_VENV/bin/activate" ]; then - source ${ONAP_VENV}/bin/activate -else - ONAP_VENV=$(mktemp -d --suffix=_onap_venv) - virtualenv ${ONAP_VENV} - source ${ONAP_VENV}/bin/activate - - pip install --upgrade pip - pip install --upgrade python-openstackclient python-heatclient - - echo "ONAP_VENV=${ONAP_VENV}" >> $WORKSPACE/env.properties -fi -echo "ONAP_VENV=${ONAP_VENV}" - -if [ -z "$ONAP_WORKDIR" ]; then - ONAP_WORKDIR=$(mktemp -d --suffix=_onap_workdir) - echo "ONAP_WORKDIR=${ONAP_WORKDIR}" >> $WORKSPACE/env.properties -fi -echo "ONAP_WORKDIR=${ONAP_WORKDIR}" -if [ ! -d ${ONAP_WORKDIR}/demo ]; then - git clone http://gerrit.onap.org/r/demo ${ONAP_WORKDIR}/demo -else - pushd ${ONAP_WORKDIR}/demo - git pull - popd -fi - - +# Delete all existing stacks +STACKS=$(openstack stack list -c "Stack Name" -f value) +echo "Deleting Stacks ${STACKS}" +openstack stack delete -y $STACKS STACK="ete-$(uuidgen | cut -c-8)" -echo "Stack Name: ${STACK}" -openstack stack create -t ${ONAP_WORKDIR}/demo/heat/ONAP/onap_openstack.yaml -e ${WORKSPACE}/test/ete/labs/windriver/onap.env $STACK +echo "New Stack Name: ${STACK}" +openstack stack create -t ${ONAP_WORKDIR}/demo/heat/ONAP/onap_openstack.yaml -e ${WORKSPACE}/test/ete/labs/windriver/onap-openstack.env $STACK diff --git a/test/ete/scripts/get-floating-ip.sh b/test/ete/scripts/get-floating-ip.sh index 55854e73f..55854e73f 100644..100755 --- a/test/ete/scripts/get-floating-ip.sh +++ b/test/ete/scripts/get-floating-ip.sh diff --git a/test/ete/scripts/install_openstack_cli.sh b/test/ete/scripts/install_openstack_cli.sh new file mode 100755 index 000000000..ec5ad1f76 --- /dev/null +++ b/test/ete/scripts/install_openstack_cli.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +if [ -z "$OS_AUTH_URL" ] || [ -z "$OS_USERNAME" ] +then + echo "ERROR: OpenStack environment variables not set. Please source your OpenStack RC script first." + exit 1 +fi + + +if [ -z "$WORKSPACE" ]; then + export WORKSPACE=`git rev-parse --show-toplevel` +fi + + + +# Assume that if ROBOT_VENV is set, we don't need to reinstall robot +if [ -f ${WORKSPACE}/env.properties ]; then + source ${WORKSPACE}/env.properties +fi + +if [ ! -z "$ONAP_VENV" ] && [ -f "$ONAP_VENV/bin/activate" ]; then + source ${ONAP_VENV}/bin/activate +else + ONAP_VENV=$(mktemp -d --suffix=_onap_venv) + virtualenv ${ONAP_VENV} + source ${ONAP_VENV}/bin/activate + + pip install --upgrade pip + pip install --upgrade python-openstackclient python-heatclient + + echo "ONAP_VENV=${ONAP_VENV}" >> $WORKSPACE/env.properties +fi +echo "ONAP_VENV=${ONAP_VENV}" + +if [ -z "$ONAP_WORKDIR" ]; then + ONAP_WORKDIR=$(mktemp -d --suffix=_onap_workdir) + echo "ONAP_WORKDIR=${ONAP_WORKDIR}" >> $WORKSPACE/env.properties +fi +echo "ONAP_WORKDIR=${ONAP_WORKDIR}" +if [ ! -d ${ONAP_WORKDIR}/demo ]; then + git clone http://gerrit.onap.org/r/demo ${ONAP_WORKDIR}/demo +else + pushd ${ONAP_WORKDIR}/demo + git pull + popd +fi + diff --git a/test/ete/scripts/remote/run-robot.sh b/test/ete/scripts/remote/run-robot.sh new file mode 100755 index 000000000..ff7223a17 --- /dev/null +++ b/test/ete/scripts/remote/run-robot.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +cd /opt + +if [ ! -x /opt/demo.sh ]; then + echo "Robot VM not initialized" + exit 2 +fi + +if [ ! -d eteshare/logs/demo ]; then + echo "09d8566ea45e43aa974cf447ed591d77" > /opt/config/openstack_tenant_id.txt + echo "gary_wu" > /opt/config/openstack_username.txt + echo $OS_PASSWORD_INPUT > /opt/config/openstack_password.txt + /bin/bash /opt/eteshare/config/vm_config2robot.sh + echo "test" | /opt/demo.sh init_robot +fi + +/opt/ete.sh health diff --git a/test/ete/scripts/run-healthcheck.sh b/test/ete/scripts/run-healthcheck.sh new file mode 100755 index 000000000..45142b006 --- /dev/null +++ b/test/ete/scripts/run-healthcheck.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +SSH_KEY=~/.ssh/onap_key + +if [ -z "$WORKSPACE" ]; then + export WORKSPACE=`git rev-parse --show-toplevel` +fi + +source $WORKSPACE/test/ete/scripts/install_openstack_cli.sh + +cd $WORKSPACE/test/ete/scripts + +ROBOT_IP=$(./get-floating-ip.sh onap-robot) +echo "ROBOT_IP=${ROBOT_IP}" + +ssh -o StrictHostKeychecking=no -i ${SSH_KEY} root@${ROBOT_IP} "OS_PASSWORD_INPUT=$OS_PASSWORD_INPUT bash -s" < ./remote/run-robot.sh +LOG_DIR=$(ssh -o StrictHostKeychecking=no -i ${SSH_KEY} root@${ROBOT_IP} "ls -1t /opt/eteshare/logs | head -1") +rsync -e "ssh -i ${SSH_KEY}" -avPz root@${ROBOT_IP}:/opt/eteshare/logs/${LOG_DIR}/ $WORKSPACE/archives/ |