diff options
157 files changed, 4748 insertions, 186 deletions
diff --git a/bootstrap/jenkins/vagrant/jjb/java-jobs.yaml b/bootstrap/jenkins/vagrant/jjb/java-jobs.yaml index ab887d903..9662e83d3 100644 --- a/bootstrap/jenkins/vagrant/jjb/java-jobs.yaml +++ b/bootstrap/jenkins/vagrant/jjb/java-jobs.yaml @@ -3,15 +3,39 @@ jobs: - 'java-{project}' project: + - 'aaf_authz': + repo: 'aaf/authz' + pom: 'pom.xml' + - 'aaf_cadi': + repo: 'aaf/cadi' + pom: 'pom.xml' + - 'aaf_inno': + repo: 'aaf/inno' + pom: 'pom.xml' + - 'aaf_luaplugin': + repo: 'aaf/luaplugin' + pom: 'pom.xml' - 'aai_aai-common': repo: 'aai/aai-common' pom: 'pom.xml' - 'aai_aai-service': repo: 'aai/aai-service' pom: 'pom.xml' + - 'aai_champ': + repo: 'aai/champ' + pom: 'pom.xml' - 'aai_data-router': repo: 'aai/data-router' pom: 'pom.xml' + - 'aai_esr-gui': + repo: 'aai/esr-gui' + pom: 'pom.xml' + - 'aai_esr-server': + repo: 'aai/esr-server' + pom: 'pom.xml' + - 'aai_gizmo': + repo: 'aai/gizmo' + pom: 'pom.xml' - 'aai_logging-service': repo: 'aai/logging-service' pom: 'pom.xml' @@ -45,12 +69,45 @@ - 'appc_deployment': repo: 'appc/deployment' pom: 'pom.xml' + - 'ccsdk_dashboard': + repo: 'ccsdk/dashboard' + pom: 'pom.xml' + - 'ccsdk_distribution': + repo: 'ccsdk/distribution' + pom: 'pom.xml' - 'ccsdk_parent': repo: 'ccsdk/parent' pom: 'pom.xml' + - 'ccsdk_platform_blueprints': + repo: 'ccsdk/platform/blueprints' + pom: 'pom.xml' + - 'ccsdk_platform_nbapi': + repo: 'ccsdk/platform/nbapi' + pom: 'pom.xml' + - 'ccsdk_platform_plugins': + repo: 'ccsdk/platform/plugins' + pom: 'pom.xml' + - 'ccsdk_sli_adaptors': + repo: 'ccsdk/sli/adaptors' + pom: 'pom.xml' - 'ccsdk_sli_core': repo: 'ccsdk/sli/core' pom: 'pom.xml' + - 'ccsdk_sli_northbound': + repo: 'ccsdk/sli/northbound' + pom: 'pom.xml' + - 'ccsdk_sli_plugins': + repo: 'ccsdk/sli/plugins' + pom: 'pom.xml' + - 'ccsdk_storage_esaas': + repo: 'ccsdk/storage/esaas' + pom: 'pom.xml' + - 'ccsdk_storage_pgaas': + repo: 'ccsdk/storage/pgaas' + pom: 'pom.xml' + - 'ccsdk_utils': + repo: 'ccsdk/utils' + pom: 'pom.xml' - 'clamp': repo: 'clamp' pom: 'pom.xml' @@ -87,24 +144,135 @@ - 'dcae_pgaas_cdf_src_cdf-prop-value_cdf-util': repo: 'dcae/pgaas' pom: 'cdf/src/cdf-prop-value/cdf-util/pom.xml' + - 'dcaegen2': + repo: 'dcaegen2' + pom: 'pom.xml' + - 'dcaegen2_analytics': + repo: 'dcaegen2/analytics' + pom: 'pom.xml' + - 'dcaegen2_analytics_tca': + repo: 'dcaegen2/analytics/tca' + pom: 'pom.xml' + - 'dcaegen2_collectors': + repo: 'dcaegen2/collectors' + pom: 'pom.xml' + - 'dcaegen2_collectors_snmptrap': + repo: 'dcaegen2/collectors/snmptrap' + pom: 'pom.xml' + - 'dcaegen2_collectors_ves': + repo: 'dcaegen2/collectors/ves' + pom: 'pom.xml' + - 'dcaegen2_deployments': + repo: 'dcaegen2/deployments' + pom: 'pom.xml' + - 'dcaegen2_platform': + repo: 'dcaegen2/platform' + pom: 'pom.xml' + - 'dcaegen2_platform_blueprints': + repo: 'dcaegen2/platform/blueprints' + pom: 'pom.xml' + - 'dcaegen2_platform_cdapbroker': + repo: 'dcaegen2/platform/cdapbroker' + pom: 'pom.xml' + - 'dcaegen2_platform_cli': + repo: 'dcaegen2/platform/cli' + pom: 'pom.xml' + - 'dcaegen2_platform_configbinding': + repo: 'dcaegen2/platform/configbinding' + pom: 'pom.xml' + - 'dcaegen2_platform_deployment-handler': + repo: 'dcaegen2/platform/deployment-handler' + pom: 'pom.xml' + - 'dcaegen2_platform_inventory-api': + repo: 'dcaegen2/platform/inventory-api' + pom: 'pom.xml' + - 'dcaegen2_platform_plugins': + repo: 'dcaegen2/platform/plugins' + pom: 'pom.xml' + - 'dcaegen2_platform_policy-handler': + repo: 'dcaegen2/platform/policy-handler' + pom: 'pom.xml' + - 'dcaegen2_platform_servicechange-handler': + repo: 'dcaegen2/platform/servicechange-handler' + pom: 'pom.xml' + - 'dcaegen2_utils': + repo: 'dcaegen2/utils' + pom: 'pom.xml' - 'demo': repo: 'demo' pom: 'pom.xml' + - 'dmaap_buscontroller': + repo: 'dmaap/buscontroller' + pom: 'pom.xml' + - 'dmaap_datarouter': + repo: 'dmaap/datarouter' + pom: 'pom.xml' + - 'dmaap_dbcapi': + repo: 'dmaap/dbcapi' + pom: 'pom.xml' + - 'dmaap_messagerouter_dmaapclient': + repo: 'dmaap/messagerouter/dmaapclient' + pom: 'pom.xml' + - 'dmaap_messagerouter_messageservice': + repo: 'dmaap/messagerouter/messageservice' + pom: 'pom.xml' + - 'dmaap_messagerouter_mirroragent': + repo: 'dmaap/messagerouter/mirroragent' + pom: 'pom.xml' + - 'dmaap_messagerouter_msgrtr': + repo: 'dmaap/messagerouter/msgrtr' + pom: 'pom.xml' - 'ecompsdkos_ecomp-sdk': repo: 'ecompsdkos' pom: 'ecomp-sdk/pom.xml' + - 'holmes_common': + repo: 'holmes/common' + pom: 'pom.xml' + - 'holmes_dsa': + repo: 'holmes/dsa' + pom: 'pom.xml' + - 'holmes_engine-management': + repo: 'holmes/engine-management' + pom: 'pom.xml' + - 'holmes_rule-management': + repo: 'holmes/rule-management' + pom: 'pom.xml' + - 'integration': + repo: 'integration' + pom: 'pom.xml' + - 'modeling_toscaparsers_javatoscachecker': + repo: 'modeling/toscaparsers' + pom: 'javatoscachecker/pom.xml' + - 'modeling_toscaparsers_nfvparser': + repo: 'modeling/toscaparsers' + pom: 'nfvparser/pom.xml' - 'msb_apigateway': repo: 'msb/apigateway' pom: 'pom.xml' - 'msb_discovery': repo: 'msb/discovery' pom: 'pom.xml' + - 'msb_java-sdk': + repo: 'msb/java-sdk' + pom: 'pom.xml' + - 'msb_swagger-sdk': + repo: 'msb/swagger-sdk' + pom: 'pom.xml' - 'mso': repo: 'mso' pom: 'pom.xml' - 'mso_libs': repo: 'mso/libs' pom: 'pom.xml' + - 'multicloud_framework': + repo: 'multicloud/framework' + pom: 'pom.xml' + - 'multicloud_openstack': + repo: 'multicloud/openstack' + pom: 'pom.xml' + - 'multicloud_openstack_vmware': + repo: 'multicloud/openstack/vmware' + pom: 'pom.xml' - 'ncomp_cdap': repo: 'ncomp/cdap' pom: 'pom.xml' @@ -126,9 +294,18 @@ - 'ncomp_utils': repo: 'ncomp/utils' pom: 'pom.xml' + - 'oom_registrator': + repo: 'oom' + pom: 'registrator/pom.xml' + - 'oom_registrator': + repo: 'oom/registrator' + pom: 'pom.xml' - 'oparent': repo: 'oparent' pom: 'pom.xml' + - 'policy_api': + repo: 'policy/api' + pom: 'pom.xml' - 'policy_common': repo: 'policy/common' pom: 'pom.xml' @@ -144,9 +321,21 @@ - 'policy_engine': repo: 'policy/engine' pom: 'pom.xml' + - 'policy_gui': + repo: 'policy/gui' + pom: 'pom.xml' + - 'policy_pap': + repo: 'policy/pap' + pom: 'pom.xml' + - 'policy_pdp': + repo: 'policy/pdp' + pom: 'pom.xml' - 'portal': repo: 'portal' pom: 'pom.xml' + - 'portal_sdk_ecomp-sdk': + repo: 'portal/sdk' + pom: 'ecomp-sdk/pom.xml' - 'sdc': repo: 'sdc' pom: 'pom.xml' @@ -156,12 +345,18 @@ - 'sdc_sdc-distribution-client': repo: 'sdc/sdc-distribution-client' pom: 'pom.xml' + - 'sdc_sdc-docker-base': + repo: 'sdc/sdc-docker-base' + pom: 'pom.xml' - 'sdc_sdc-titan-cassandra': repo: 'sdc/sdc-titan-cassandra' pom: 'pom.xml' - 'sdc_sdc-tosca': repo: 'sdc/sdc-tosca' pom: 'pom.xml' + - 'sdc_sdc-workflow-designer': + repo: 'sdc/sdc-workflow-designer' + pom: 'pom.xml' - 'sdc_sdc_common': repo: 'sdc/sdc_common' pom: 'pom.xml' @@ -186,45 +381,75 @@ - 'so_libs': repo: 'so/libs' pom: 'pom.xml' + - 'testsuite_heatbridge': + repo: 'testsuite' + pom: 'heatbridge/pom.xml' + - 'testsuite_heatbridge': + repo: 'testsuite/heatbridge' + pom: 'pom.xml' - 'ui_dmaapbc': repo: 'ui/dmaapbc' pom: 'pom.xml' - - 'vfc_gvnfm_vnflcm_lcm': + - 'usecase-ui': + repo: 'usecase-ui' + pom: 'pom.xml' + - 'vfc_gvnfm_vnflcm': repo: 'vfc/gvnfm/vnflcm' - pom: 'lcm/pom.xml' - - 'vfc_gvnfm_vnfmgr_mgr': + pom: 'pom.xml' + - 'vfc_gvnfm_vnfmgr': repo: 'vfc/gvnfm/vnfmgr' - pom: 'mgr/pom.xml' - - 'vfc_gvnfm_vnfres_res': + pom: 'pom.xml' + - 'vfc_gvnfm_vnfres': repo: 'vfc/gvnfm/vnfres' - pom: 'res/pom.xml' - - 'vfc_nfvo_driver_ems_ems_sems_boco_ems-driver': + pom: 'pom.xml' + - 'vfc_nfvo_catalog': + repo: 'vfc/nfvo/catalog' + pom: 'pom.xml' + - 'vfc_nfvo_driver_ems': repo: 'vfc/nfvo/driver/ems' - pom: 'ems/sems/boco/ems-driver/pom.xml' - - 'vfc_nfvo_driver_sfc_zte_sfc-driver': + pom: 'pom.xml' + - 'vfc_nfvo_driver_sfc': repo: 'vfc/nfvo/driver/sfc' - pom: 'zte/sfc-driver/pom.xml' - - 'vfc_nfvo_driver_vnfm_gvnfm_gvnfmadapter': - repo: 'vfc/nfvo/driver/vnfm/gvnfm' - pom: 'gvnfmadapter/pom.xml' - - 'vfc_nfvo_driver_vnfm_gvnfm_juju_juju-vnfmadapter': + pom: 'pom.xml' + - 'vfc_nfvo_driver_vnfm_gvnfm': repo: 'vfc/nfvo/driver/vnfm/gvnfm' - pom: 'juju/juju-vnfmadapter/pom.xml' - - 'vfc_nfvo_driver_vnfm_svnfm_huawei_vnfmadapter': - repo: 'vfc/nfvo/driver/vnfm/svnfm' - pom: 'huawei/vnfmadapter/pom.xml' - - 'vfc_nfvo_driver_vnfm_svnfm_zte_vmanager': + pom: 'pom.xml' + - 'vfc_nfvo_driver_vnfm_svnfm': repo: 'vfc/nfvo/driver/vnfm/svnfm' - pom: 'zte/vmanager/pom.xml' + pom: 'pom.xml' - 'vfc_nfvo_lcm': repo: 'vfc/nfvo/lcm' pom: 'pom.xml' - 'vfc_nfvo_resmanagement': repo: 'vfc/nfvo/resmanagement' pom: 'pom.xml' + - 'vfc_nfvo_wfengine_activiti-extension': + repo: 'vfc/nfvo/wfengine' + pom: 'activiti-extension/pom.xml' + - 'vfc_nfvo_wfengine_wfenginemgrservice': + repo: 'vfc/nfvo/wfengine' + pom: 'wfenginemgrservice/pom.xml' + - 'vfc_nfvo_wfengine_wso2': + repo: 'vfc/nfvo/wfengine' + pom: 'wso2/pom.xml' - 'vid': repo: 'vid' pom: 'pom.xml' - 'vid_asdcclient': repo: 'vid/asdcclient' pom: 'pom.xml' + - 'vnfsdk_functest': + repo: 'vnfsdk/functest' + pom: 'pom.xml' + - 'vnfsdk_lctest': + repo: 'vnfsdk/lctest' + pom: 'pom.xml' + - 'vnfsdk_pkgtools': + repo: 'vnfsdk/pkgtools' + pom: 'pom.xml' + - 'vnfsdk_refrepo': + repo: 'vnfsdk/refrepo' + pom: 'pom.xml' + - 'vnfsdk_validation': + repo: 'vnfsdk/validation' + pom: 'pom.xml' diff --git a/bootstrap/jenkins/vagrant/settings.xml b/bootstrap/jenkins/vagrant/settings.xml index 41da9bec3..60fd7e8c9 100644 --- a/bootstrap/jenkins/vagrant/settings.xml +++ b/bootstrap/jenkins/vagrant/settings.xml @@ -33,6 +33,17 @@ <enabled>true</enabled> </snapshots> </repository> + <repository> + <id>open-o-thirdparty</id> + <name>open-o-thirdparty</name> + <url>https://nexus.open-o.org/content/repositories/thirdparty/</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> </repositories> <pluginRepositories> <pluginRepository> diff --git a/bootstrap/vagrant-onap/README.md b/bootstrap/vagrant-onap/README.md index 08c5a5756..c48190ad1 100644 --- a/bootstrap/vagrant-onap/README.md +++ b/bootstrap/vagrant-onap/README.md @@ -56,6 +56,7 @@ current options include: | vid | Virtual Infrastructure Development | | vfc | Virtual Function Controller | | multicloud | Multi Cloud | +| ccsdk | Common Controller SDK | | all_in_one | All ONAP services in a VM | | testing | Unit Test VM | diff --git a/bootstrap/vagrant-onap/Vagrantfile b/bootstrap/vagrant-onap/Vagrantfile index ff3590882..8417cc953 100644 --- a/bootstrap/vagrant-onap/Vagrantfile +++ b/bootstrap/vagrant-onap/Vagrantfile @@ -160,7 +160,7 @@ Vagrant.configure("2") do |config| end all_in_one.vm.provision 'shell' do |s| s.path = 'vagrant_utils/postinstall.sh' - s.args = ['mr', 'sdc', 'aai', 'mso', 'robot', 'vid', 'sdnc', 'portal', 'dcae', 'policy', 'appc', 'vfc'] + s.args = ['mr', 'sdc', 'aai', 'mso', 'robot', 'vid', 'sdnc', 'portal', 'dcae', 'policy', 'appc', 'vfc', 'ccsdk'] s.env = conf end end @@ -345,6 +345,7 @@ Vagrant.configure("2") do |config| vfc.vm.provider "openstack" do |v| v.server_name = 'vfc' end + vfc.vm.provision 'docker' vfc.vm.provision 'shell' do |s| s.path = 'vagrant_utils/postinstall.sh' s.args = ['vfc'] @@ -365,6 +366,19 @@ Vagrant.configure("2") do |config| end end + config.vm.define :ccsdk do |ccsdk| + ccsdk.vm.hostname = 'ccsdk' + ccsdk.vm.network :private_network, ip: '192.168.50.17' + ccsdk.vm.provider "openstack" do |v| + v.server_name = 'ccsdk' + end + ccsdk.vm.provision 'shell' do |s| + s.path = 'vagrant_utils/postinstall.sh' + s.args = ['ccsdk'] + s.env = conf + end + end + when 'testing' config.vm.define :testing do |testing| diff --git a/bootstrap/vagrant-onap/lib/_onap_functions b/bootstrap/vagrant-onap/lib/_onap_functions index 9e06010ed..18a465948 100755 --- a/bootstrap/vagrant-onap/lib/_onap_functions +++ b/bootstrap/vagrant-onap/lib/_onap_functions @@ -28,6 +28,15 @@ function pull_openecomp_image { docker logout } +# pull_onap_image() - Pull Docker container image from a Docker Registry Hub +function pull_onap_image { + local image=$1 + local tag=$2 + docker_openecomp_login + pull_docker_image $nexus_docker_repo/onap/${image}:$docker_version $tag + docker logout +} + # configure_bind()- Configure bind utils function configure_bind { _install_bind diff --git a/bootstrap/vagrant-onap/lib/ccsdk b/bootstrap/vagrant-onap/lib/ccsdk new file mode 100755 index 000000000..6ea829fb5 --- /dev/null +++ b/bootstrap/vagrant-onap/lib/ccsdk @@ -0,0 +1,64 @@ +#!/bin/bash + +set -o xtrace + +source /var/onap/functions + +ccsdk_src_folder=$git_src_folder/ccsdk +ccsdk_repos=("dashboard" "distribution" "parent" "platform/blueprints" "platform/nbapi" "platform/plugins" "sli" "sli/adaptors" "sli/core" "sli/northbound" "sli/plugins" "storage" "storage/esaas" "storage/pgaas" "utils") + +# clone_ccsdk_repos() - Function that clones the CCSDK repositories +function clone_ccsdk_repos { + clone_repo ccsdk $ccsdk_src_folder + + for dirc in ${ccsdk_repos[@]}; do + clone_repo ccsdk/$dirc $ccsdk_src_folder/$dirc + done +} + +# compile_ccsdk_repos() - +function compile_ccsdk_repos { + compile_src ccsdk $ccsdk_src_folder + + for dirc in ${ccsdk_repos[@]}; do + compile_src $ccsdk_src_folder/$dirc + done +} + +# _build_ccsdk_images() - Build CCSDK Docker images from source code +function _build_ccsdk_images { + install_package unzip + clone_repo ccsdk/distribution $ccsdk_src_folder/distribution + compile_src $ccsdk_src_folder/distribution + for image in ubuntu opendaylight odlsli dgbuilder-docker; do + build_docker_image $ccsdk_src_folder/distribution/$image docker + done +} + +# get_ccsdk_images() - Get CCSDK Docker images +function get_ccsdk_images { + if [[ "$build_image" == "True" ]]; then + _build_ccsdk_images + else + for image in ubuntu odl dgbuilder; do + pull_onap_image ccsdk-$image-image + done + fi + +} + +# install_ccsdk() - +function install_ccsdk { + echo "pass" +} + +# init_ccsdk() - Function that initialize Multi Cloud services +function init_ccsdk { + if [[ "$clone_repo" == "True" ]]; then + clone_ccsdk_repos + if [[ "$compile_repo" == "True" ]]; then + compile_ccsdk_repos + fi + fi + install_ccsdk +} diff --git a/bootstrap/vagrant-onap/lib/robot b/bootstrap/vagrant-onap/lib/robot index 4102680ef..34b431a54 100755 --- a/bootstrap/vagrant-onap/lib/robot +++ b/bootstrap/vagrant-onap/lib/robot @@ -2,12 +2,34 @@ set -o xtrace -# install_testsuite_properties() - Download and install testsuite properties -function install_testsuite_properties { +source /var/onap/functions + +robot_src_folder=$git_src_folder/testsuite +robot_repos=("heatbridge" "properties" "python-testing-utils") + +# clone_robot_repos() - Function that clones Robot source repo. +function clone_robot_repos { + clone_repo testsuite $robot_src_folder + + for dirc in ${robot_repos[@]}; do + clone_repo testsuite/$dirc $robot_src_folder/$dirc + done +} + +# compile_robot_repos() - Function that compile Robot source repo. +function compile_robot_repos { + install_python_package tox + compile_src $robot_src_folder + + for dirc in ${robot_repos[@]}; do + compile_src $robot_src_folder/$dirc + done +} + +# _setup_ete_folder() - Create and copy ete folder structure +function _setup_ete_folder { mkdir -p /opt/eteshare/config - local src_folder=/opt/testsuite/properties - clone_repo testsuite/properties $src_folder cp $src_folder/integration_* /opt/eteshare/config cp $src_folder/vm_config2robot.sh /opt/eteshare/config cp $src_folder/ete.sh /opt @@ -17,15 +39,26 @@ function install_testsuite_properties { chmod +x /opt/demo.sh } -# run_testsuite_image() - Pull and run testsuite docker image -function run_testsuite_image { +# get_robot_images() - Pull or build the Robot Docker images +function get_robot_images { pull_openecomp_image testsuite +} + +# install_robot() - Run Robot services +function install_robot { docker rm -f openecompete_container docker run -d --name openecompete_container -v /opt/eteshare:/share -p 88:88 $nexus_docker_repo/openecomp/testsuite:$docker_version } # init_robot() - Function that initialize Robot services function init_robot { - install_testsuite_properties - run_testsuite_image + if [[ "$clone_repo" == "True" ]]; then + clone_robot_repos + _setup_ete_folder + if [[ "$compile_repo" == "True" ]]; then + compile_robot_repos + fi + fi + get_robot_images + install_robot } diff --git a/bootstrap/vagrant-onap/lib/sdnc b/bootstrap/vagrant-onap/lib/sdnc index c7c2745d8..770f6be9f 100755 --- a/bootstrap/vagrant-onap/lib/sdnc +++ b/bootstrap/vagrant-onap/lib/sdnc @@ -3,6 +3,7 @@ set -o xtrace source /var/onap/functions +source /var/onap/ccsdk sdnc_src_folder=$git_src_folder/openecomp/sdnc sdnc_repos=("core" "adaptors" "northbound" "plugins" "oam") @@ -28,6 +29,7 @@ function compile_all_sdnc_repos { function _build_sdnc_images { local folder=$sdnc_src_folder/oam + get_ccsdk_images install_package unzip clone_repo sdnc/oam $folder # The OAM code depends on all the SDNC repos which should be downloaded and compiled first diff --git a/bootstrap/vagrant-onap/lib/vfc b/bootstrap/vagrant-onap/lib/vfc index 9c232be28..2d1418258 100755 --- a/bootstrap/vagrant-onap/lib/vfc +++ b/bootstrap/vagrant-onap/lib/vfc @@ -19,18 +19,15 @@ function clone_all_vfc_repos { function compile_all_vfc_repos { install_python_package tox - pushd $src_folder/gvnfm/vnflcm/lcm - tox -e py27 - popd + tox_repos=("gvnfm/vnflcm/lcm" "gvnfm/vnfmgr/mgr" "gvnfm/vnfres/res" "nfvo/lcm" + "nfvo/driver/vnfm/gvnfm/gvnfmadapter" "nfvo/driver/vnfm/svnfm/zte/vmanager") + for dirc in ${tox_repos[@]}; do + pushd $src_folder/$dirc + tox -e py27 + popd + done - # TODO(sshank): Add compile for other vfc_repos. (Both Java and Python based.) - # Python based: - # gvnfm/vnflcm/lcm - # gvnfm/vnfmgr/mgr - # gvnfm/vnfres/res - # nfvo/driver/vnfm/gvnfm/gvnfmadapter - # nfvo/driver/vnfm/svnfm/zte/vmanager - # nfvo/lcm + # TODO(sshank): Add compile for other vfc_repos. (Java based.) # Java based: # nfvo/catalog @@ -42,10 +39,81 @@ function compile_all_vfc_repos { # nfvo/wfengine } +# build_gvnfm_lcm_image() - Build VFC GVNFM VNF LCM docker image +function build_gvnfm_lcm_image { + pushd $src_folder/gvnfm/vnflcm/lcm/docker + sed -i '$ {s/^/#/}' build_image.sh + ./build_image.sh + popd +} + +# build_gvnfm_vnfmgr_image() - Build VFC GVNFM VNF Manager docker image +function build_gvnfm_vnfmgr_image { + pushd $src_folder/gvnfm/vnfmgr/mgr/docker + sed -i '$ {s/^/#/}' build_image.sh + ./build_image.sh + popd +} + +# build_gvnfm_vnfres_image() - Build VFC GVNFM VNF Resource Management docker image +function build_gvnfm_vnfres_image { + pushd $src_folder/gvnfm/vnfres/res/docker + sed -i '$ {s/^/#/}' build_image.sh + ./build_image.sh + popd +} + +# build_nfvo_lcm_image() - Build VFC NFVO LCM docker image +function build_nfvo_lcm_image { + pushd $src_folder/nfvo/lcm/docker + sed -i '$ {s/^/#/}' build_image.sh + ./build_image.sh + popd +} + +# build_nfvo_vnfm_gvnfmadapter_image() - Build VFC NFVO General VNF Adapter docker image +function build_nfvo_vnfm_gvnfmadapter_image { + pushd $src_folder/nfvo/driver/vnfm/gvnfm/gvnfmadapter/docker + sed -i '$ {s/^/#/}' build_image.sh + ./build_image.sh + popd +} + +# get_vfc_images() - Build VFC docker images +function get_vfc_images { + if [[ "$build_image" == "True" ]]; then + install_docker + # Separate methods are required since the image build process will change. + build_gvnfm_lcm_image + build_gvnfm_vnfmgr_image + build_gvnfm_vnfres_image + build_nfvo_lcm_image + build_nfvo_vnfm_gvnfmadapter_image + # TODO(sshank): Add other VFC component docker image builds. + else + pull_onap_image vfc/gvnfm/vnflcm/lcm + pull_onap_image vfc/gvnfm/vnfmgr/mgr + pull_onap_image vfc/gvnfm/vnfres/res + pull_onap_image vfc/nfvo/lcm + pull_onap_image vfc/nfvo/driver/vnfm/gvnfm/gvnfmadapter + fi +} + # install_vfc() - Download and install vfc service from source code function install_vfc { - # TODO(sshank): Add further installation steps if necessary. - echo "" + nslcm_image=`docker images | grep nslcm | grep latest| awk '{print $1 ":" $2}'` + vnflcm_image=`docker images | grep vnflcm | grep latest| awk '{print $1 ":" $2}'` + vnfmgr_image=`docker images | grep vnfmgr | grep latest| awk '{print $1 ":" $2}'` + vnfres_image=`docker images | grep vnfres | grep latest| awk '{print $1 ":" $2}'` + gvnfmdriver_image=`docker images | grep gvnfmdriver | grep latest| awk '{print $1 ":" $2}'` + + docker run -d --name vfc-nslcm -p 8403:8403 -e MSB_ADDR=127.0.0.1 $nslcm_image + docker run -d --name vfc-vnflcm -p 8801:8801 -e MSB_ADDR=127.0.0.1 $vnflcm_image + docker run -d --name vfc-vnfmgr -p 8803:8803 -e MSB_ADDR=127.0.0.1 $vnfmgr_image + docker run -d --name vfc-vnfres -p 8802:8802 -e MSB_ADDR=127.0.0.1 $vnfres_image + docker run -d --name vfc-gvnfmdriver -p 8484:8484 -e MSB_ADDR=127.0.0.1 $gvnfmdriver_image + + # TODO(sshank): Run other VFC component docker images. } # init_vfc() - Function that initialize VF-C services @@ -54,10 +122,11 @@ function init_vfc { if [[ "$clone_repo" == "True" ]]; then clone_all_vfc_repos - if [[ "$compile_repo" == "False" ]]; then + if [[ "$compile_repo" == "True" ]]; then compile_all_vfc_repos fi fi + get_vfc_images install_vfc } diff --git a/bootstrap/vagrant-onap/tests/test_aai b/bootstrap/vagrant-onap/tests/test_aai index 0fa82d531..5ff62c156 100644 --- a/bootstrap/vagrant-onap/tests/test_aai +++ b/bootstrap/vagrant-onap/tests/test_aai @@ -4,7 +4,8 @@ source /var/onap_tests/_test_base source /var/onap/aai covered_functions=( -"install_hadoop" "install_haproxy" "clone_all_aai_repos" "compile_aai_repos" "setup_titan" "start_aai_microservices" "install_hbase" "install_ajsc_aai" "install_model_loader" +#"install_hadoop" "install_haproxy" "clone_all_aai_repos" "compile_aai_repos" "setup_titan" "start_aai_microservices" "install_hbase" "install_ajsc_aai" "install_model_loader" +"install_hadoop" "install_haproxy" "clone_all_aai_repos" "compile_aai_repos" "setup_titan" "install_hbase" "install_ajsc_aai" "install_model_loader" ) # TODO(electrocucaracha): Remove/Modify functions that doesn't support proxy settings @@ -61,23 +62,11 @@ function test_compile_aai_repos { asserts_file_exist $aai_src_folder/aai-common/aai-core/target/aai-core-1.1.0-SNAPSHOT.jar asserts_file_exist $aai_src_folder/aai-common/aai-schema/target/aai-schema-1.1.0-SNAPSHOT.jar - asserts_file_exist $aai_src_folder/aai-service/aai-schema/target/aai-schema-1.1.0-SNAPSHOT.jar - asserts_file_exist $aai_src_folder/aai-service/ajsc-aai/target/aai.jar - asserts_file_exist $aai_src_folder/aai-service/annotations/target/annotations-1.1.0-SNAPSHOT.jar - - asserts_file_exist $aai_src_folder/data-router/target/data-router-1.1.0-SNAPSHOT.jar - asserts_file_exist $aai_src_folder/logging-service/common-logging/target/common-logging-1.1.0-SNAPSHOT.jar asserts_file_exist $aai_src_folder/logging-service/eelf-logging/target/eelf-logging-1.1.0-SNAPSHOT.jar asserts_file_exist $aai_src_folder/logging-service/logging-api/target/logging-api-1.1.0-SNAPSHOT.jar - asserts_file_exist $aai_src_folder/model-loader/target/model-loader-1.1.0-SNAPSHOT.jar asserts_file_exist $aai_src_folder/resources/aai-resources/target/aai-resources.jar - asserts_file_exist $aai_src_folder/rest-client/target/rest-client-1.1.0-SNAPSHOT.jar - asserts_file_exist $aai_src_folder/router-core/target/router-core-1.1.0-SNAPSHOT.jar - asserts_file_exist $aai_src_folder/search-data-service/target/search-data-service-1.1.0-SNAPSHOT.jar - asserts_file_exist $aai_src_folder/sparky-be/target/sparky-be-1.0-SNAPSHOT.jar - asserts_file_exist $aai_src_folder/sparky-fe/target/sparky-fe-1.0.0-SNAPSHOT.war asserts_file_exist $aai_src_folder/traversal/aai-traversal/target/traversal.jar } diff --git a/bootstrap/vagrant-onap/tests/test_appc b/bootstrap/vagrant-onap/tests/test_appc index 0d46ef47d..2290f16a2 100644 --- a/bootstrap/vagrant-onap/tests/test_appc +++ b/bootstrap/vagrant-onap/tests/test_appc @@ -36,7 +36,7 @@ function test_compile_all_appc_repos { asserts_file_exist $appc_src_folder/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-sshd/target/appc-ssh-adapter-sshd-1.1.0-SNAPSHOT.jar asserts_file_exist $appc_src_folder/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-tests/target/appc-ssh-adapter-tests-1.1.0-SNAPSHOT.jar - for component in appc-asdc-listener appc-event-listener appc-oam appc-provider; do + for component in appc-event-listener appc-oam appc-provider; do asserts_file_exist $appc_src_folder/$component/$component-bundle/target/$component-bundle-1.1.0-SNAPSHOT.jar asserts_file_exist $appc_src_folder/$component/$component-features/target/$component-features-1.1.0-SNAPSHOT.jar asserts_file_exist $appc_src_folder/$component/$component-installer/target/$component-1.1.0-SNAPSHOT.zip @@ -45,8 +45,6 @@ function test_compile_all_appc_repos { asserts_file_exist $appc_src_folder/$component/$component-model/target/$component-model-1.1.0-SNAPSHOT.jar done - asserts_file_exist $appc_src_folder/appc-asdc-listener/appc-yang-generator/target/appc-yang-generator-1.1.0-SNAPSHOT.jar - asserts_file_exist $appc_src_folder/appc-common/target/appc-common-1.1.0-SNAPSHOT.jar asserts_file_exist $appc_src_folder/appc-dg/appc-dg-shared/appc-dg-dependency-model/target/appc-dg-dependency-model-1.1.0-SNAPSHOT.jar @@ -85,9 +83,7 @@ function test_install_appc { get_appc_images install_appc - asserts_image_running openecomp/dgbuilder-sdnc-image asserts_image_running openecomp/appc-image - asserts_image_running mysql/mysql-server:5.6 } if [ "$1" != '*' ]; then diff --git a/bootstrap/vagrant-onap/tests/test_ccsdk b/bootstrap/vagrant-onap/tests/test_ccsdk new file mode 100644 index 000000000..2d2b87a54 --- /dev/null +++ b/bootstrap/vagrant-onap/tests/test_ccsdk @@ -0,0 +1,89 @@ +#!/bin/bash + +source /var/onap_tests/_test_base +source /var/onap/ccsdk + +covered_functions=( +"clone_ccsdk_repos" "compile_ccsdk_repos" "get_ccsdk_images" +) + +# test_clone_ccsdk_repos() - Verify that CCSDL repositories are retrieved properly +function test_clone_ccsdk_repos { + clone_ccsdk_repos + + asserts_file_exist $ccsdk_src_folder/dashboard/pom.xml + asserts_file_exist $ccsdk_src_folder/distribution/pom.xml + asserts_file_exist $ccsdk_src_folder/parent/pom.xml + asserts_file_exist $ccsdk_src_folder/platform/blueprints/pom.xml + asserts_file_exist $ccsdk_src_folder/platform/nbapi/pom.xml + asserts_file_exist $ccsdk_src_folder/platform/plugins/pom.xml + asserts_file_exist $ccsdk_src_folder/sli/adaptors/pom.xml + asserts_file_exist $ccsdk_src_folder/sli/core/pom.xml + asserts_file_exist $ccsdk_src_folder/sli/northbound/pom.xml + asserts_file_exist $ccsdk_src_folder/sli/plugins/pom.xml + asserts_file_exist $ccsdk_src_folder/storage/esaas/pom.xml + asserts_file_exist $ccsdk_src_folder/storage/pgaas/pom.xml + asserts_file_exist $ccsdk_src_folder/utils/pom.xml +} + +# test_compile_ccsdk_repos() - Verify the compilation of CCSDK repositories +function compile_ccsdk_repos { + clone_ccsdk_repos + compile_ccsdk_repos + + asserts_file_exist $ccsdk_src_folder/dashboard/oom-app-common/target/oom-app-common-1.1.0-SNAPSHOT.jar + asserts_file_exist $ccsdk_src_folder/dashboard/oom-app-os/target/oom-app-os-1.1.0-SNAPSHOT.war + asserts_file_exist $ccsdk_src_folder/dashboard/oom-app-overlay/target/oom-app-overlay-1.1.0-SNAPSHOT.war + asserts_file_exist $ccsdk_src_folder/distribution/dgbuilder/target/dgbuilder.0.1.0-SNAPSHOT.zip + asserts_file_exist $ccsdk_src_folder/distribution/platform-logic/installer/target/platform-logic-installer-0.1.0-SNAPSHOT.zip + asserts_file_exist $ccsdk_src_folder/platform/nbapi/target/commonnbapi-0.0.3.war + + for adaptor in aai-service mdsal-resource resource-assignment sql-resource; do + for component in features provider; do + asserts_file_exist $ccsdk_src_folder/sli/adaptors/$adaptor/$component/target/$adaptor-$component-0.1.0-SNAPSHOT.jar + done + asserts_file_exist $ccsdk_src_folder/sli/adaptors/$adaptor/installer/target/sdnc-$adaptor-0.1.0-SNAPSHOT-installer.zip + done + + for core in dblib filters sli sliapi sliPluginUtils; do + for component in features provider; do + asserts_file_exist $ccsdk_src_folder/sli/core/$core/$component/target/$core-$component-0.1.2-SNAPSHOT.jar + done + asserts_file_exist $ccsdk_src_folder/sli/core/$core/installer/target/sdnc-$core-0.1.2-SNAPSHOT-installer.zip + done + asserts_file_exist $ccsdk_src_folder/sli/core/sli/common/target/sli-common-0.1.2-SNAPSHOT.jar + asserts_file_exist $ccsdk_src_folder/sli/core/sli/recording/target/sli-recording-0.1.2-SNAPSHOT.jar + asserts_file_exist $ccsdk_src_folder/sli/core/sliapi/model/target/sliapi-model-0.1.2-SNAPSHOT.jar + + for northbound in asdcApi dataChange; do + for component in features model provider; do + asserts_file_exist $ccsdk_src_folder/sli/northbound/$northbound/$component/target/$northbound-$component-0.1.0-SNAPSHOT.jar + done + asserts_file_exist $ccsdk_src_folder/sli/northbound/$northbound/installer/target/sdnc-$northbound-0.1.0-SNAPSHOT-installer.zip + done + asserts_file_exist $ccsdk_src_folder/sli/northbound/dmaap-listener/target/dmaap-listener-0.1.0-SNAPSHOT.jar + asserts_file_exist $ccsdk_src_folder/sli/northbound/ueb-listener/target/ueb-listener-0.1.0-SNAPSHOT.jar + + for plugin in properties-node restapi-call-node; do + for component in features provider; do + asserts_file_exist $ccsdk_src_folder/sli/plugins/$plugin/$component/target/$plugin-$component-0.1.0-SNAPSHOT.jar + done + asserts_file_exist $ccsdk_src_folder/sli/plugins/$plugin/installer/target/sdnc-$plugin-0.1.0-SNAPSHOT-installer.zip + done +} + +# test_get_ccsdk_images() - Verify that CCSDK images are retrieved or built properly +function test_get_ccsdk_images { + clone_ccsdk_repos + get_ccsdk_images + + for image in dgbuilder odlsli odl ubuntu; do + asserts_image onap/ccsdk-$image-image + done +} + +if [ "$1" != '*' ]; then + unset covered_functions + covered_functions=$1 +fi +main "${covered_functions[@]}" diff --git a/bootstrap/vagrant-onap/tests/test_functions b/bootstrap/vagrant-onap/tests/test_functions index ea268923b..17a66313a 100644 --- a/bootstrap/vagrant-onap/tests/test_functions +++ b/bootstrap/vagrant-onap/tests/test_functions @@ -102,7 +102,6 @@ function test_install_python { install_python asserts_installed_package python2.7 asserts_installed_package python-dev - asserts_file_exist /usr/local/bin/tox } # test_install_docker() - Verify the correct installation of Docker @@ -158,13 +157,12 @@ function test_compile_src { # test_build_docker_image() - Verify that a docker image is created from source code function test_build_docker_image { - clone_repo portal - compile_src $git_src_folder/portal/ecomp-portal-widget-ms - build_docker_image $git_src_folder/portal/ecomp-portal-widget-ms + clone_repo ccsdk/distribution + build_docker_image $git_src_folder/ccsdk/distribution/ubuntu docker - asserts_image widget-ms + asserts_image onap/ccsdk-ubuntu-image - docker rmi -f widget-ms + docker rmi -f onap/ccsdk-ubuntu-image } if [ "$1" != '*' ]; then diff --git a/bootstrap/vagrant-onap/tests/test_multicloud b/bootstrap/vagrant-onap/tests/test_multicloud index 4767152e9..3d60533f7 100644 --- a/bootstrap/vagrant-onap/tests/test_multicloud +++ b/bootstrap/vagrant-onap/tests/test_multicloud @@ -22,7 +22,6 @@ function test_compile_multicloud_repos { compile_multicloud_repos asserts_file_exist $multicloud_src_folder/openstack/newton/target/multicloud-openstack-newton-1.0.0-SNAPSHOT.zip - asserts_file_exist $multicloud_src_folder/openstack/vmware/vio/target/multivimdriver-vio-1.1.0-SNAPSHOT.zip } # test_install_multicloud() - Verify the built and start of Multi Cloud services diff --git a/bootstrap/vagrant-onap/tests/test_robot b/bootstrap/vagrant-onap/tests/test_robot new file mode 100644 index 000000000..702401e2a --- /dev/null +++ b/bootstrap/vagrant-onap/tests/test_robot @@ -0,0 +1,48 @@ +#!/bin/bash + +source /var/onap_tests/_test_base +source /var/onap/robot + +covered_functions=( +"clone_robot_repos" "compile_robot_repos" "get_robot_images" "install_robot" +) + +# test_clone_robot_repos() - Verify that Robot repositories are cloned properly +function test_clone_robot_repos { + clone_robot_repos + + asserts_file_exist $robot_src_folder/LICENSE.TXT + asserts_file_exist $robot_src_folder/heatbridge/pom.xml + asserts_file_exist $robot_src_folder/properties/LICENSE.TXT + asserts_file_exist $robot_src_folder/python-testing-utils/LICENSE.TXT +} + +# test_compile_robot_repos() - Verify that Robot source code can be compiled properly +function test_compile_robot_repos { + clone_robot_repos + compile_robot_repos + + asserts_file_exist $robot_src_folder/heatbridge/target/maven-python/dist/heatbridge-0.3.0.dev0-py2-none-any.whl +} + +# test_get_robot_images() - Verify that Robot Docker images are retrieved +function test_get_mr_images { + get_robot_images + + asserts_image testsuite +} + +# test_install_robot() - Verify the built and start of Robot services +function test_install_message_router { + clone_robot_repos + get_robot_images + install_robot + + asserts_image_running testsuite +} + +if [ "$1" != '*' ]; then + unset covered_functions + covered_functions=$1 +fi +main "${covered_functions[@]}" diff --git a/bootstrap/vagrant-onap/tests/test_sdnc b/bootstrap/vagrant-onap/tests/test_sdnc index a60145fbf..bc742fad2 100644 --- a/bootstrap/vagrant-onap/tests/test_sdnc +++ b/bootstrap/vagrant-onap/tests/test_sdnc @@ -60,9 +60,9 @@ function test_get_sdnc_images { clone_all_sdnc_repos get_sdnc_images - asserts_image openecomp/sdnc-image - asserts_image openecomp/admportal-sdnc-image - asserts_image openecomp/dgbuilder-sdnc-image + asserts_image onap/sdnc-image + asserts_image onap/admportal-sdnc-image + asserts_image onap/dgbuilder-sdnc-image asserts_image mysql/mysql-server:5.6 } @@ -72,9 +72,9 @@ function test_install_sdnc { get_sdnc_images install_sdnc - asserts_image_running openecomp/dgbuilder-sdnc-image - asserts_image_running openecomp/admportal-sdnc-image - asserts_image_running openecomp/sdnc-image + asserts_image_running onap/ccsdk-dgbuilder-image + asserts_image_running onap/admportal-sdnc-image + asserts_image_running onap/sdnc-image asserts_image_running mysql/mysql-server:5.6 } diff --git a/bootstrap/vagrant-onap/tests/test_vfc b/bootstrap/vagrant-onap/tests/test_vfc index 338280948..8392e701f 100644 --- a/bootstrap/vagrant-onap/tests/test_vfc +++ b/bootstrap/vagrant-onap/tests/test_vfc @@ -5,12 +5,17 @@ source /var/onap/vfc covered_functions=( "clone_all_vfc_repos" "compile_all_vfc_repos" "install_vfc" +"get_vfc_images" "run_vfc_images" "build_nfvo_lcm_image" +"build_gvnfm_lcm_image" "build_gvnfm_vnfmgr_image" "build_gvnfm_vnfres_image" +"build_nfvo_lcm_image" "build_nfvo_vnfm_gvnfmadapter_image" ) # test_clone_all_vfc_repos() - Verify cloning and pulling source code from repositories function test_clone_all_vfc_repos { - # TODO(sshank) - echo "" + + # TODO(sshank): Add other asserts + asserts_file_exist $src_folder/nfvo/lcm/run.sh + } # test_compile_all_vfc_repos() - Verify that all the VFC modules are compiled properly @@ -21,11 +26,30 @@ function test_compile_all_vfc_repos { # TODO(electrocucaracha): Add asserts_file_exist } +# test_get_vfc_images() - Verify all VFC images are built correctly. +function test_get_vfc_images { + get_vfc_images + + asserts_image nexus3.onap.org:10003/onap/vfc/nslcm + asserts_image nexus3.onap.org:10003/onap/vfc/gvnfmdriver + asserts_image nexus3.onap.org:10003/onap/vfc/vnfres + asserts_image nexus3.onap.org:10003/onap/vfc/vnfmgr + asserts_image nexus3.onap.org:10003/onap/vfc/vnflcm + + # TODO(sshank): Add asserts for other VFC component docker image builds. +} + # test_install_vfc() - Verify that the VFC are up and running function test_install_vfc { install_vfc - # TODO(electrocucaracha): Add whatever asserts are needed + asserts_image_running nexus3.onap.org:10003/onap/vfc/nslcm:latest + asserts_image_running nexus3.onap.org:10003/onap/vfc/gvnfmdriver:latest + asserts_image_running nexus3.onap.org:10003/onap/vfc/vnfres:latest + asserts_image_running nexus3.onap.org:10003/onap/vfc/vnfmgr:latest + asserts_image_running nexus3.onap.org:10003/onap/vfc/vnflcm:latest + + # TODO(sshank): Add asserts for other running VFC component docker images. } if [ "$1" != '*' ]; then diff --git a/bootstrap/vagrant-onap/tools/Run.ps1 b/bootstrap/vagrant-onap/tools/Run.ps1 index 103dfeee1..8e6c94fa7 100644 --- a/bootstrap/vagrant-onap/tools/Run.ps1 +++ b/bootstrap/vagrant-onap/tools/Run.ps1 @@ -25,7 +25,7 @@ https://wiki.onap.org/display/DW/ONAP+on+Vagrant #> Param( - [ValidateSet("all_in_one","dns", "mr", "sdc", "aai", "mso", "robot", "vid", "sdnc", "portal", "dcae", "policy", "appc", "vfc", "multicloud", "testing")] + [ValidateSet("all_in_one","dns", "mr", "sdc", "aai", "mso", "robot", "vid", "sdnc", "portal", "dcae", "policy", "appc", "vfc", "multicloud", "ccsdk", "testing")] [Parameter(Mandatory=$True,Position=0)] [ValidateNotNullOrEmpty()] [String] diff --git a/bootstrap/vagrant-onap/tools/run.sh b/bootstrap/vagrant-onap/tools/run.sh index 094577fb1..08eae01e3 100755 --- a/bootstrap/vagrant-onap/tools/run.sh +++ b/bootstrap/vagrant-onap/tools/run.sh @@ -12,7 +12,7 @@ Optional arguments: Test case to use in testing mode. Commands: all_in_one Deploy in all-in-one mode. - dns|mr|sdc|aai|mso|robot|vid|sdnc|portal|dcae|policy|appc|vfc|multicloud Deploy chosen service. + dns|mr|sdc|aai|mso|robot|vid|sdnc|portal|dcae|policy|appc|vfc|multicloud|ccsdk Deploy chosen service. testing Deploy in testing mode. EOF } @@ -55,7 +55,7 @@ case $COMMAND in "all_in_one" ) export DEPLOY_MODE='all-in-one' ;; - "dns" | "mr" | "sdc" | "aai" | "mso" | "robot" | "vid" | "sdnc" | "portal" | "dcae" | "policy" | "appc" | "vfc" | "multicloud" ) + "dns" | "mr" | "sdc" | "aai" | "mso" | "robot" | "vid" | "sdnc" | "portal" | "dcae" | "policy" | "appc" | "vfc" | "multicloud" | "ccsdk" ) export DEPLOY_MODE='individual' ;; "testing" ) diff --git a/bootstrap/vagrant-onap/vagrant_utils/postinstall.sh b/bootstrap/vagrant-onap/vagrant_utils/postinstall.sh index b0e64ad32..89a69dd9a 100755 --- a/bootstrap/vagrant-onap/vagrant_utils/postinstall.sh +++ b/bootstrap/vagrant-onap/vagrant_utils/postinstall.sh @@ -6,7 +6,6 @@ source /var/onap/functions create_configuration_files install_dev_tools -install_java configure_bind for serv in $@; do diff --git a/documentation/api-dependencies/onapapidependencies.dot b/documentation/api-dependencies/onapapidependencies.dot index 99efa941e..aa66b3c01 100644 --- a/documentation/api-dependencies/onapapidependencies.dot +++ b/documentation/api-dependencies/onapapidependencies.dot @@ -15,7 +15,7 @@ */ /* -Usage: dot -T png -O onapapidependecies.dot This cmd will generate a png graph dependency file. +Usage: dot -T png -O onapapidependencies.dot This cmd will generate a png graph dependency file. Graphiz is the open source tool used to generate the graph. Graphiz is available and documented at http://www.graphviz.org This text file represents the API dependencies between ONAP projects @@ -61,6 +61,8 @@ aai -> msb; appc -> aai; //https://wiki.onap.org/pages/viewpage.action?pageId=6593279#APPCM1ReleasePlanning(AmsterdamRelease)-APIIncomingDependencies appc -> multicloud; appc -> sdc; +appc -> ccsdk; +appc -> dmaap; ccsdk -> aai; //https://wiki.onap.org/display/DW/Release+Planning+Template+%3A+CCSDK+Amsterdam+Release#ReleasePlanningTemplate:CCSDKAmsterdamRelease-APIIncomingDependencies ccsdk -> sdc; clamp -> dcaegen2; //https://wiki.onap.org/display/DW/CLAMP+Release+Planning+M1#CLAMPReleasePlanningM1-APIIncomingDependencies @@ -72,7 +74,8 @@ cli -> msb; dcaegen2 -> dmaap; //https://wiki.onap.org/display/DW/DCAE+R1+Release+Planning#DCAER1ReleasePlanning-APIIncomingDependencies dcaegen2 -> multicloud; dcaegen2 -> policy; -dcaegen2 -> sdc; +dcaegen2 -> sdc; +dmaap -> aaf; //https://wiki.onap.org/display/DW/DMaaP+Amsterdam+M1+Release#DMaaPAmsterdamM1Release-APIIncomingDependencies extapi -> so; //https://wiki.onap.org/pages/viewpage.action?pageId=8227006#ExternalAPIFrameworkM1ReleasePlanning(AmsterdamRelease)-APIIncomingDependencies extapi -> sdc; holmes -> aai; //https://wiki.onap.org/pages/viewpage.action?pageId=6593583#HolmesReleasePlanningforAmsterdam-APIIncomingDependencies @@ -85,11 +88,13 @@ oom -> msb; //https://wiki.onap.org/display/DW/OOM+M1+Release+Planning+Templa policy -> aai; //https://wiki.onap.org/display/DW/Policy+Framework+R1+-+M1+Release+Planning+Template#PolicyFrameworkR1-M1ReleasePlanningTemplate-APIIncomingDependencies policy -> appc; policy -> dcaegen2; +policy -> dmaap; policy -> vfc; policy -> so; portal -> aaf; //https://wiki.onap.org/pages/viewpage.action?pageId=8227559#PortalPlatformM1ReleasePlanning(AmsterdamRelease)-APIIncomingDependencies sdnc -> aai; //https://wiki.onap.org/display/DW/Release+Planning+Template+%3A+SDNC+Amsterdam+Release#ReleasePlanningTemplate:SDNCAmsterdamRelease-APIIncomingDependencies sdnc -> sdc; +sdnc -> dmaap; so -> aai; //https://wiki.onap.org/display/DW/Service+Orchestrator+Release+Planning#ServiceOrchestratorReleasePlanning-APIIncomingDependencies so -> appc; so -> multicloud; @@ -20,7 +20,7 @@ <parent> <groupId>org.onap.oparent</groupId> <artifactId>oparent</artifactId> - <version>0.1.0</version> + <version>0.1.1</version> </parent> <name>integration</name> <groupId>org.onap.integration</groupId> diff --git a/test/csit/plans/aai/resources/docker-compose.yml b/test/csit/plans/aai/resources/docker-compose.yml new file mode 100644 index 000000000..ab7823630 --- /dev/null +++ b/test/csit/plans/aai/resources/docker-compose.yml @@ -0,0 +1,70 @@ +version: '2' +services: + aai-resources.api.simpledemo.openecomp.org: + image: ${DOCKER_REGISTRY}/openecomp/aai-resources + hostname: aai-resources.api.simpledemo.openecomp.org + environment: + - AAI_CHEF_ENV=simpledemo + - AAI_CHEF_LOC=/var/chef/aai-data/environments + - CHEF_BRANCH=master + - CHEF_GIT_URL=http://gerrit.onap.org/r/aai + - AAI_CORE_VERSION=1.1.0-SNAPSHOT + ports: + - 8447:8447 + logging: + driver: "json-file" + options: + max-size: "30m" + max-file: "5" + aai-traversal.api.simpledemo.openecomp.org: + image: ${DOCKER_REGISTRY}/openecomp/aai-traversal + hostname: aai-traversal.api.simpledemo.openecomp.org + environment: + - AAI_CHEF_ENV=simpledemo + - AAI_CHEF_LOC=/var/chef/aai-data/environments + - CHEF_BRANCH=master + - CHEF_GIT_URL=http://gerrit.onap.org/r/aai + - AAI_CORE_VERSION=1.1.0-SNAPSHOT + ports: + - 8446:8446 + logging: + driver: "json-file" + options: + max-size: "30m" + max-file: "5" + aai.api.simpledemo.openecomp.org: + image: ${AAI_HAPROXY_IMAGE} + hostname: aai.api.simpledemo.openecomp.org + ports: + - 8443:8443 + links: + - aai-resources.api.simpledemo.openecomp.org + - aai-traversal.api.simpledemo.openecomp.org + volumes: + - /dev/log:/dev/log + logging: + driver: "json-file" + options: + max-size: "30m" + max-file: "5" + aai.hbase.simpledemo.openecomp.org: + image: ${HBASE_IMAGE} + hostname: aai.hbase.simpledemo.openecomp.org + ports: + - 2181:2181 + - 8080:8080 + - 8085:8085 + - 9090:9090 + - 16000:16000 + - 16010:16010 + - 16201:16201 + logging: + driver: "json-file" + options: + max-size: "30m" + max-file: "5" +networks: + default: + driver: bridge + driver_opts: + com.docker.network.driver.mtu: ${MTU} diff --git a/test/csit/plans/aai/resources/setup.sh b/test/csit/plans/aai/resources/setup.sh new file mode 100644 index 000000000..30b4b29b8 --- /dev/null +++ b/test/csit/plans/aai/resources/setup.sh @@ -0,0 +1,95 @@ +#!/bin/bash +# +# Copyright © 2017 AT&T Intellectual Property. +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ECOMP is a trademark and service mark of AT&T Intellectual Property. + +source ${SCRIPTS}/common_functions.sh + +NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt) +NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt) +NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt) +DOCKER_IMAGE_VERSION=$(cat /opt/config/docker_version.txt) +DOCKER_REGISTRY=${NEXUS_DOCKER_REPO} +DOCKER_IMAGE_VERSION=1.1-STAGING-latest + +function wait_for_container() { + + CONTAINER_NAME="$1"; + START_TEXT="$2"; + + TIMEOUT=240 + + # wait for the real startup + AMOUNT_STARTUP=$(docker logs ${CONTAINER_NAME} 2>&1 | grep "$START_TEXT" | wc -l) + while [[ ${AMOUNT_STARTUP} -ne 1 ]]; + do + echo "Waiting for '$CONTAINER_NAME' deployment to finish ..." + AMOUNT_STARTUP=$(docker logs ${CONTAINER_NAME} 2>&1 | grep "$START_TEXT" | wc -l) + if [ "$TIMEOUT" = "0" ]; + then + docker logs ${CONTAINER_NAME}; + echo "ERROR: $CONTAINER_NAME deployment failed." + exit 1 + fi + let TIMEOUT-=1 + sleep 1 + done +} + +DOCKER_COMPOSE_CMD="docker-compose"; +export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1); +export DOCKER_REGISTRY="nexus3.onap.org:10001"; +export AAI_HAPROXY_IMAGE="${AAI_HAPROXY_IMAGE:-aaionap/haproxy}"; +export HBASE_IMAGE="${HBASE_IMAGE:-harisekhon/hbase}"; + +docker pull ${DOCKER_REGISTRY}/openecomp/aai-resources:${DOCKER_IMAGE_VERSION}; +docker tag ${DOCKER_REGISTRY}/openecomp/aai-resources:${DOCKER_IMAGE_VERSION} ${DOCKER_REGISTRY}/openecomp/aai-resources:latest; + +docker pull ${DOCKER_REGISTRY}/openecomp/aai-traversal:${DOCKER_IMAGE_VERSION}; +docker tag ${DOCKER_REGISTRY}/openecomp/aai-traversal:${DOCKER_IMAGE_VERSION} ${DOCKER_REGISTRY}/openecomp/aai-traversal:latest; + +${DOCKER_COMPOSE_CMD} stop +${DOCKER_COMPOSE_CMD} rm -f -v + +# Start the hbase where the data will be stored +HBASE_CONTAINER_NAME=$(${DOCKER_COMPOSE_CMD} up -d aai.hbase.simpledemo.openecomp.org 2>&1 | grep 'Creating' | grep -v 'volume' | grep -v 'network' | awk '{ print $2; }' | head -1); +wait_for_container ${HBASE_CONTAINER_NAME} ' Started SelectChannelConnector@0.0.0.0:8085'; +wait_for_container ${HBASE_CONTAINER_NAME} ' Started SelectChannelConnector@0.0.0.0:8080'; +wait_for_container ${HBASE_CONTAINER_NAME} ' Started SelectChannelConnector@0.0.0.0:9095'; + +# Start the resources microservice +RESOURCES_CONTAINER_NAME=$(${DOCKER_COMPOSE_CMD} up -d aai-resources.api.simpledemo.openecomp.org 2>&1 | grep 'Creating' | grep -v 'volume' | grep -v 'network' | awk '{ print $2; }' | head -1); +wait_for_container ${RESOURCES_CONTAINER_NAME} '0.0.0.0:8447'; +docker logs ${CONTAINER_NAME}; + +# Start the traversal microservice +GRAPH_CONTAINER_NAME=$(${DOCKER_COMPOSE_CMD} up -d aai-traversal.api.simpledemo.openecomp.org 2>&1 | grep 'Creating' | awk '{ print $2; }' | head -1); +wait_for_container ${GRAPH_CONTAINER_NAME} '0.0.0.0:8446'; + +# Start the haproxy to route requests between resources and traversal +HAPROXY_CONTAINER_NAME=$(${DOCKER_COMPOSE_CMD} up -d aai.api.simpledemo.openecomp.org 2>&1 |grep 'Creating' | grep -v 'volume' | grep -v 'network' | awk '{ print $2; }' | head -1); + +echo "A&AI Microservices, resources and traversal, are up and running along with HAProxy"; + +docker exec $GRAPH_CONTAINER_NAME "/opt/app/aai-traversal/scripts/install/updateQueryData.sh" && { + echo "Successfully loaded the widget related data into db"; +} || { + echo "Unable to load widget related data into db"; +} + +# Set the host ip for robot from the haproxy +ROBOT_VARIABLES="-v HOST_IP:`ip addr show docker0 | head -3 | tail -1 | cut -d' ' -f6 | cut -d'/' -f1`" diff --git a/test/csit/plans/aai/resources/teardown.sh b/test/csit/plans/aai/resources/teardown.sh new file mode 100644 index 000000000..8dd6358d8 --- /dev/null +++ b/test/csit/plans/aai/resources/teardown.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# +# Copyright © 2017 AT&T Intellectual Property. +# Copyright © 2017 Amdocs +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ECOMP is a trademark and service mark of AT&T Intellectual Property. + +DOCKER_COMPOSE_CMD="docker-compose"; +export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1); +export DOCKER_REGISTRY="nexus3.onap.org:10001"; + +$DOCKER_COMPOSE_CMD stop +$DOCKER_COMPOSE_CMD rm -f -v + diff --git a/test/csit/plans/aai/resources/testplan.txt b/test/csit/plans/aai/resources/testplan.txt new file mode 100644 index 000000000..7f6727d59 --- /dev/null +++ b/test/csit/plans/aai/resources/testplan.txt @@ -0,0 +1,4 @@ +# Test suites are relative paths under [integration.git]/test/csit/tests/. +# Place the suites in run order. +aai/resources/suite1 +aai/resources/suite2 diff --git a/test/csit/plans/appc/healthcheck/db_query.sh b/test/csit/plans/appc/healthcheck/db_query.sh new file mode 100755 index 000000000..87e0ac397 --- /dev/null +++ b/test/csit/plans/appc/healthcheck/db_query.sh @@ -0,0 +1,66 @@ +#!/usr/bin/env bash +############################################################################### +# Copyright 2017 Huawei Technologies Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +############################################################################### +SCRIPTS="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +echo $SCRIPTS + +sdnctl_num_tables=$(docker exec -i sdnc_db_container mysql -s -D sdnctl -u sdnctl -pgamma <<<'show tables;' 2>/dev/null | grep -v ERROR | wc -l) + +appcctl_num_tables=$(docker exec -i sdnc_db_container mysql -s -D appcctl -u appcctl -pappcctl <<<'show tables;' 2>/dev/null | grep -v ERROR | wc -l) + + + +docker exec -i sdnc_db_container mysql -s -D sdnctl -u sdnctl -pgamma <<<"show tables" 2>/dev/null | ( while read table_name; do +export $table_name="$(docker exec -i sdnc_db_container mysql -s -D sdnctl -u sdnctl -pgamma <<<"select count(*) from $table_name" 2>/dev/null)" +done + +if [ "$sdnctl_num_tables" -ge "1" ]; then + echo "There are $sdnctl_num_tables tables in the sdnctl database. " +else + echo "Database sdnctl is not available." + exit 1; +fi + +if [ "$appcctl_num_tables" -ge "1" ]; then + echo "There is $appcctl_num_tables table in the appcctl database. " +else + echo "Database appcctl is not available." + exit 1; +fi + +if [ "$NODE_TYPES" -eq "0" ]; then + echo "There is no data in table NODE_TYPES. " + exit 1; +fi + +if [ "$SVC_LOGIC" -eq "0" ] ; then + echo "There is no data in table SVC_LOGIC. " + exit 1; +fi + +if [ "$VNF_DG_MAPPING" -eq "0" ]; then + echo "There is no data in table VNF_DG_MAPPING. " + exit 1; +fi + +echo "Expected table data is present." +exit 0 ) + +if [ "$?" -eq "1" ]; then + exit 1; +fi + +exit 0 diff --git a/test/csit/plans/appc/healthcheck/setup.sh b/test/csit/plans/appc/healthcheck/setup.sh index b91baa3a9..3c57cefac 100755 --- a/test/csit/plans/appc/healthcheck/setup.sh +++ b/test/csit/plans/appc/healthcheck/setup.sh @@ -22,6 +22,10 @@ source ${WORKSPACE}/test/csit/scripts/appc/script1.sh export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1) +if [ "$MTU" == "" ]; then + export MTU="1450" +fi + # Clone APPC repo to get docker-compose for APPC mkdir -p $WORKSPACE/archives/appc @@ -42,7 +46,7 @@ docker pull nexus3.onap.org:10001/openecomp/dgbuilder-sdnc-image:1.1-STAGING-lat docker tag nexus3.onap.org:10001/openecomp/dgbuilder-sdnc-image:1.1-STAGING-latest openecomp/dgbuilder-sdnc-image:latest # start APPC containers with docker compose and configuration from docker-compose.yml -/opt/docker/docker-compose up -d +docker-compose up -d # WAIT 5 minutes maximum and test every 5 seconds if APPC is up using HealthCheck API TIME_OUT=500 diff --git a/test/csit/plans/cli/sanity-check/setup.sh b/test/csit/plans/cli/sanity-check/setup.sh new file mode 100644 index 000000000..ca18f5176 --- /dev/null +++ b/test/csit/plans/cli/sanity-check/setup.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# +# Copyright 2017 Huawei Technologies Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Place the scripts in run order: +source ${SCRIPTS}/common_functions.sh + +# Start auth +docker run -d --name cli -e CLI_MODE=daemon nexus3.onap.org:10001/onap/cli:1.1-STAGING-latest + +# Wait for cli initialization +echo Wait for CLI initialization +for i in {1..40}; do + sleep 1 +done + +CLI_IP=`get-instance-ip.sh cli` + +# Pass any variables required by Robot test suites in ROBOT_VARIABLES +ROBOT_VARIABLES="-v CLI_IP:${CLI_IP}" diff --git a/test/csit/plans/cli/sanity-check/teardown.sh b/test/csit/plans/cli/sanity-check/teardown.sh new file mode 100644 index 000000000..70fb6ff18 --- /dev/null +++ b/test/csit/plans/cli/sanity-check/teardown.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# +# Copyright 2017 Huawei Technologies Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +kill-instance.sh cli
\ No newline at end of file diff --git a/test/csit/plans/cli/sanity-check/testplan.txt b/test/csit/plans/cli/sanity-check/testplan.txt new file mode 100644 index 000000000..477ddab17 --- /dev/null +++ b/test/csit/plans/cli/sanity-check/testplan.txt @@ -0,0 +1,18 @@ +# +# Copyright 2017 Huawei Technologies Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Test suites are relative paths under [integration.git]/test/csit/tests/. +# Place the suites in run order. +cli/startup/startup_check.robot diff --git a/test/csit/plans/integration/vCPE/setup.sh b/test/csit/plans/integration/vCPE/setup.sh new file mode 100755 index 000000000..1b9cc343d --- /dev/null +++ b/test/csit/plans/integration/vCPE/setup.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# +# Copyright 2016-2017 Huawei Technologies Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Place the scripts in run order: + +# Pass any variables required by Robot test suites in ROBOT_VARIABLES +ROBOT_VARIABLES="" + diff --git a/test/csit/plans/integration/vCPE/teardown.sh b/test/csit/plans/integration/vCPE/teardown.sh new file mode 100755 index 000000000..8beb6e1f9 --- /dev/null +++ b/test/csit/plans/integration/vCPE/teardown.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# +# Copyright 2016-2017 Huawei Technologies Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + + diff --git a/test/csit/plans/integration/vCPE/testplan.txt b/test/csit/plans/integration/vCPE/testplan.txt new file mode 100644 index 000000000..2b3d4ad5d --- /dev/null +++ b/test/csit/plans/integration/vCPE/testplan.txt @@ -0,0 +1,3 @@ +# Test suites are relative paths under [integration.git]/test/csit/tests/. +# Place the suites in run order. +integration/vCPE diff --git a/test/csit/plans/msb/iag-redirect-discovery/setup.sh b/test/csit/plans/msb/iag-redirect-discovery/setup.sh new file mode 100644 index 000000000..e14c28fe6 --- /dev/null +++ b/test/csit/plans/msb/iag-redirect-discovery/setup.sh @@ -0,0 +1,55 @@ +#!/bin/bash +# +# Copyright 2017 ZTE, Inc. and others. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +source ${SCRIPTS}/common_functions.sh + +#start msb +docker run -d -p 8500:8500 --name msb_consul consul +MSB_CONSUL_IP=`get-instance-ip.sh msb_consul` +echo MSB_CONSUL_IP=${MSB_CONSUL_IP} + +docker run -d -p 10081:10081 -e CONSUL_IP=$MSB_CONSUL_IP --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery +MSB_DISCOVERY_IP=`get-instance-ip.sh msb_discovery` +echo DISCOVERY_IP=${MSB_DISCOVERY_IP} + +docker run -d -p 80:80 -e CONSUL_IP=$MSB_CONSUL_IP -e SDCLIENT_IP=$MSB_DISCOVERY_IP -e "ROUTE_LABELS=visualRange:1" --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway +MSB_IAG_IP=`get-instance-ip.sh msb_internal_apigateway` +echo MSB_IAG_IP=${MSB_IAG_IP} + +# Start rest example service +docker run -d -p 9090:9090 --name i-rest-example zhaohuabing/rest-example +REST_EXAMPLE_IP=`get-instance-ip.sh i-rest-example` +echo REST_EXAMPLE_IP=${REST_EXAMPLE_IP} + + +# Wait for initialization(8500 Consul, 10081 Service Registration & Discovery, 80 api gateway) +for i in {1..10}; do + curl -sS -m 1 ${MSB_CONSUL_IP}:8500 && curl -sS -m 1 ${MSB_DISCOVERY_IP}:10081 && curl -sS -m 1 ${MSB_IAG_IP}:80 && break + echo sleep $i + sleep $i +done + +#Need some time for the initialization of MSB services +sleep 60 + +curl -X POST \ + -H "Content-Type: application/json" \ + -d '{"serviceName": "test", "version": "v1", "url": "/","protocol": "REST", "lb_policy":"round-robin","nodes": [ {"ip": "'${REST_EXAMPLE_IP}'","port": "9090"}]}' \ + "http://${MSB_IAG_IP}:80/api/microservices/v1/services" + +# Pass any variables required by Robot suites in ROBOT_VARIABLES +ROBOT_VARIABLES="-v MSB_IAG_IP:${MSB_IAG_IP} -v MSB_DISCOVERY_IP:${MSB_DISCOVERY_IP} -v REST_EXAMPLE_IP:${REST_EXAMPLE_IP}"
\ No newline at end of file diff --git a/test/csit/plans/msb/iag-redirect-discovery/teardown.sh b/test/csit/plans/msb/iag-redirect-discovery/teardown.sh new file mode 100644 index 000000000..b79456731 --- /dev/null +++ b/test/csit/plans/msb/iag-redirect-discovery/teardown.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# +# Copyright 2017 ZTE, Inc. and others. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +kill-instance.sh msb_consul +kill-instance.sh msb_discovery +kill-instance.sh msb_internal_apigateway +kill-instance.sh i-rest-example diff --git a/test/csit/plans/msb/iag-redirect-discovery/testplan.txt b/test/csit/plans/msb/iag-redirect-discovery/testplan.txt new file mode 100644 index 000000000..54bb307bf --- /dev/null +++ b/test/csit/plans/msb/iag-redirect-discovery/testplan.txt @@ -0,0 +1,4 @@ +# Test suites are relative paths under [integration.git]/test/csit/tests/. +# Place the suites in run order. +msb/rest-service-discovery +msb/rest-service-api-gateway
\ No newline at end of file diff --git a/test/csit/plans/msb/rest-service/setup.sh b/test/csit/plans/msb/rest-service/setup.sh new file mode 100644 index 000000000..9682cde74 --- /dev/null +++ b/test/csit/plans/msb/rest-service/setup.sh @@ -0,0 +1,55 @@ +#!/bin/bash +# +# Copyright 2017 ZTE, Inc. and others. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +source ${SCRIPTS}/common_functions.sh + +#start msb +docker run -d -p 8500:8500 --name msb_consul consul +MSB_CONSUL_IP=`get-instance-ip.sh msb_consul` +echo MSB_CONSUL_IP=${MSB_CONSUL_IP} + +docker run -d -p 10081:10081 -e CONSUL_IP=$MSB_CONSUL_IP --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery +MSB_DISCOVERY_IP=`get-instance-ip.sh msb_discovery` +echo DISCOVERY_IP=${MSB_DISCOVERY_IP} + +docker run -d -p 80:80 -e CONSUL_IP=$MSB_CONSUL_IP -e SDCLIENT_IP=$MSB_DISCOVERY_IP -e "ROUTE_LABELS=visualRange:1" --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway +MSB_IAG_IP=`get-instance-ip.sh msb_internal_apigateway` +echo MSB_IAG_IP=${MSB_IAG_IP} + +# Start rest example service +docker run -d -p 9090:9090 --name i-rest-example zhaohuabing/rest-example +REST_EXAMPLE_IP=`get-instance-ip.sh i-rest-example` +echo REST_EXAMPLE_IP=${REST_EXAMPLE_IP} + + +# Wait for initialization(8500 Consul, 10081 Service Registration & Discovery, 80 api gateway) +for i in {1..10}; do + curl -sS -m 1 ${MSB_CONSUL_IP}:8500 && curl -sS -m 1 ${MSB_DISCOVERY_IP}:10081 && curl -sS -m 1 ${MSB_IAG_IP}:80 && break + echo sleep $i + sleep $i +done + +#Need some time for the initialization of MSB services +sleep 60 + +curl -X POST \ + -H "Content-Type: application/json" \ + -d '{"serviceName": "test", "version": "v1", "url": "/","protocol": "REST", "lb_policy":"round-robin","nodes": [ {"ip": "'${REST_EXAMPLE_IP}'","port": "9090"}]}' \ + "http://${MSB_DISCOVERY_IP}:10081/api/microservices/v1/services" + +# Pass any variables required by Robot suites in ROBOT_VARIABLES +ROBOT_VARIABLES="-v MSB_IAG_IP:${MSB_IAG_IP} -v MSB_DISCOVERY_IP:${MSB_DISCOVERY_IP} -v REST_EXAMPLE_IP:${REST_EXAMPLE_IP}"
\ No newline at end of file diff --git a/test/csit/plans/msb/rest-service/teardown.sh b/test/csit/plans/msb/rest-service/teardown.sh new file mode 100644 index 000000000..b79456731 --- /dev/null +++ b/test/csit/plans/msb/rest-service/teardown.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# +# Copyright 2017 ZTE, Inc. and others. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +kill-instance.sh msb_consul +kill-instance.sh msb_discovery +kill-instance.sh msb_internal_apigateway +kill-instance.sh i-rest-example diff --git a/test/csit/plans/msb/rest-service/testplan.txt b/test/csit/plans/msb/rest-service/testplan.txt new file mode 100644 index 000000000..54bb307bf --- /dev/null +++ b/test/csit/plans/msb/rest-service/testplan.txt @@ -0,0 +1,4 @@ +# Test suites are relative paths under [integration.git]/test/csit/tests/. +# Place the suites in run order. +msb/rest-service-discovery +msb/rest-service-api-gateway
\ No newline at end of file diff --git a/test/csit/plans/msb/sanity-check/setup.sh b/test/csit/plans/msb/sanity-check/setup.sh new file mode 100644 index 000000000..21bb18f7d --- /dev/null +++ b/test/csit/plans/msb/sanity-check/setup.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# +# Copyright 2017 ZTE, Inc. and others. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +source ${SCRIPTS}/common_functions.sh + +#start msb +docker run -d -p 8500:8500 --name msb_consul consul +MSB_CONSUL_IP=`get-instance-ip.sh msb_consul` +echo MSB_CONSUL_IP=${MSB_CONSUL_IP} + +docker run -d -p 10081:10081 -e CONSUL_IP=$MSB_CONSUL_IP --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery +MSB_DISCOVERY_IP=`get-instance-ip.sh msb_discovery` +echo DISCOVERY_IP=${MSB_DISCOVERY_IP} + +docker run -d -p 80:80 -e CONSUL_IP=$MSB_CONSUL_IP -e SDCLIENT_IP=$MSB_DISCOVERY_IP --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway +MSB_IAG_IP=`get-instance-ip.sh msb_internal_apigateway` +echo MSB_IAG_IP=${MSB_IAG_IP} + +# Wait for initialization(8500 Consul, 10081 Service Registration & Discovery, 80 api gateway) +for i in {1..10}; do + curl -sS -m 1 ${MSB_CONSUL_IP}:8500 && curl -sS -m 1 ${MSB_DISCOVERY_IP}:10081 && curl -sS -m 1 ${MSB_IAG_IP}:80 && break + echo sleep $i + sleep $i +done + +#wait for container initalization +sleep 30 + +#Pass any variables required by Robot test suites in ROBOT_VARIABLES +ROBOT_VARIABLES="-v MSB_IAG_IP:${MSB_IAG_IP}" diff --git a/test/csit/plans/msb/sanity-check/teardown.sh b/test/csit/plans/msb/sanity-check/teardown.sh new file mode 100644 index 000000000..609eaf664 --- /dev/null +++ b/test/csit/plans/msb/sanity-check/teardown.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# +# Copyright 2017 ZTE, Inc. and others. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +kill-instance.sh msb_consul +kill-instance.sh msb_discovery +kill-instance.sh msb_internal_apigateway
\ No newline at end of file diff --git a/test/csit/plans/msb/sanity-check/testplan.txt b/test/csit/plans/msb/sanity-check/testplan.txt new file mode 100644 index 000000000..0ef750718 --- /dev/null +++ b/test/csit/plans/msb/sanity-check/testplan.txt @@ -0,0 +1,3 @@ +# Test suites are relative paths under [integration.git]/test/csit/tests/. +# Place the suites in run order. +msb/startup diff --git a/test/csit/plans/msb/tcp-service/setup.sh b/test/csit/plans/msb/tcp-service/setup.sh new file mode 100644 index 000000000..1a315e516 --- /dev/null +++ b/test/csit/plans/msb/tcp-service/setup.sh @@ -0,0 +1,53 @@ +#!/bin/bash +# +# Copyright 2017 ZTE, Inc. and others. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +source ${SCRIPTS}/common_functions.sh + +#start msb +docker run -d -p 8500:8500 --name msb_consul consul +MSB_CONSUL_IP=`get-instance-ip.sh msb_consul` +echo MSB_CONSUL_IP=${MSB_CONSUL_IP} + +docker run -d -p 10081:10081 -e CONSUL_IP=$MSB_CONSUL_IP --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery +MSB_DISCOVERY_IP=`get-instance-ip.sh msb_discovery` +echo DISCOVERY_IP=${MSB_DISCOVERY_IP} + +docker run -d -p 80:80 -e CONSUL_IP=$MSB_CONSUL_IP -e SDCLIENT_IP=$MSB_DISCOVERY_IP --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway +MSB_IAG_IP=`get-instance-ip.sh msb_internal_apigateway` +echo MSB_IAG_IP=${MSB_IAG_IP} + +# Start Message Broker +docker run -d -p 61616:61616 --name i-activemq webcenter/activemq + +ACTIVEMQ_IP=`get-instance-ip.sh i-activemq` +echo ACTIVEMQ_IP=${ACTIVEMQ_IP} + +# Wait for initialization(8500 Consul, 10081 Service Registration & Discovery, 80 api gateway) +for i in {1..10}; do + curl -sS -m 1 ${MSB_CONSUL_IP}:8500 && curl -sS -m 1 ${MSB_DISCOVERY_IP}:10081 && curl -sS -m 1 ${MSB_IAG_IP}:80 && break + echo sleep $i + sleep $i +done + +#wait for container initalization +sleep 30 + +curl -H "Content-Type: application/json" -X POST -d '{"serviceName": "ActiveMQ","protocol": "TCP","nodes": [{"ip": "'${ACTIVEMQ_IP}'","port": "61616"}]}' http://${MSB_DISCOVERY_IP}:10081/api/microservices/v1/services + + +# Pass any variables required by Robot test suites in ROBOT_VARIABLES +ROBOT_VARIABLES="-v MSB_IAG_IP:${MSB_IAG_IP} -v MSB_DISCOVERY_IP:${MSB_DISCOVERY_IP} -v ACTIVEMQ_IP:${ACTIVEMQ_IP}"
\ No newline at end of file diff --git a/test/csit/plans/msb/tcp-service/teardown.sh b/test/csit/plans/msb/tcp-service/teardown.sh new file mode 100644 index 000000000..36ee889f3 --- /dev/null +++ b/test/csit/plans/msb/tcp-service/teardown.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# +# Copyright 2017 ZTE, Inc. and others. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +kill-instance.sh msb_consul +kill-instance.sh msb_discovery +kill-instance.sh msb_internal_apigateway +kill-instance.sh i-activemq diff --git a/test/csit/plans/msb/tcp-service/testplan.txt b/test/csit/plans/msb/tcp-service/testplan.txt new file mode 100644 index 000000000..ba8f6f282 --- /dev/null +++ b/test/csit/plans/msb/tcp-service/testplan.txt @@ -0,0 +1,4 @@ +# Test suites are relative paths under [integration.git]/test/csit/tests/. +# Place the suites in run order. +msb/tcp-service-discovery +msb/tcp-service-access
\ No newline at end of file diff --git a/test/csit/plans/multicloud-ocata/functionality1/setup.sh b/test/csit/plans/multicloud-ocata/functionality1/setup.sh new file mode 100644 index 000000000..5630849cf --- /dev/null +++ b/test/csit/plans/multicloud-ocata/functionality1/setup.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# +# Copyright (c) 2017 Wind River Systems, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +# +# Place the scripts in run order: +# Start all process required for executing test case + +source ${SCRIPTS}/common_functions.sh + +# start multicloud-ocata +docker run -d --name multicloud-ocata nexus3.onap.org:10001/onap/multicloud/openstack-ocata +SERVICE_IP=`get-instance-ip.sh multicloud-ocata` +SERVICE_PORT=9004 + +for i in {1..50}; do + curl -sS ${SERVICE_IP}:${SERVICE_PORT} && break + echo sleep $i + sleep $i +done + +echo SCRIPTS +# Pass any variables required by Robot test suites in ROBOT_VARIABLES +ROBOT_VARIABLES+="-v SERVICE_IP:${SERVICE_IP} " +ROBOT_VARIABLES+="-v SERVICE_PORT:${SERVICE_PORT} " diff --git a/test/csit/plans/multicloud-ocata/functionality1/teardown.sh b/test/csit/plans/multicloud-ocata/functionality1/teardown.sh new file mode 100644 index 000000000..6ecb74ebd --- /dev/null +++ b/test/csit/plans/multicloud-ocata/functionality1/teardown.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# +# Copyright (c) 2017 Wind River Systems, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +# This script is sourced by run-csit.sh after Robot test completion. +kill-instance.sh multicloud-ocata diff --git a/test/csit/plans/multicloud-ocata/functionality1/testplan.txt b/test/csit/plans/multicloud-ocata/functionality1/testplan.txt new file mode 100644 index 000000000..fcd795da3 --- /dev/null +++ b/test/csit/plans/multicloud-ocata/functionality1/testplan.txt @@ -0,0 +1,3 @@ +# Test suites are relative paths under [integration.git]/test/csit/tests/. +# Place the suites in run order. +multicloud-ocata/provision/sanity_test_multicloud.robot diff --git a/test/csit/plans/multicloud/functionality1/setup.sh b/test/csit/plans/multicloud/functionality1/setup.sh index b43f4b856..993a39f68 100755 --- a/test/csit/plans/multicloud/functionality1/setup.sh +++ b/test/csit/plans/multicloud/functionality1/setup.sh @@ -17,17 +17,10 @@ # Place the scripts in run order: # Start all process required for executing test case -# start msb -# Replace this when msb is ready for onap -docker run -d --name i-msb -p 80:80 openoint/common-services-msb -MSB_IP=`get-instance-ip.sh i-msb` - -# start esr -# docker run -d --name i-esr -e MSB_ADDR=${MSB_IP}:80 openoint/common-services-extsys +source ${SCRIPTS}/common_functions.sh # start multivim-broker -# Replace this when multivim-broker container is ready -docker run -d --name multivim-broker -e MSB_ADDR=${MSB_IP}:80 openoint/multivim-broker +docker run -d --name multivim-broker nexus3.onap.org:10001/onap/multicloud/framework BROKER_IP=`get-instance-ip.sh multivim-broker` for i in {1..50}; do curl -sS ${BROKER_IP}:9001 && break @@ -37,4 +30,4 @@ done echo SCRIPTS # Pass any variables required by Robot test suites in ROBOT_VARIABLES -ROBOT_VARIABLES="-v MSB_IP:${MSB_IP}" +ROBOT_VARIABLES="-v BROKER_IP:${BROKER_IP}" diff --git a/test/csit/plans/multicloud/functionality1/teardown.sh b/test/csit/plans/multicloud/functionality1/teardown.sh index 4ca6dbc99..1732649af 100755 --- a/test/csit/plans/multicloud/functionality1/teardown.sh +++ b/test/csit/plans/multicloud/functionality1/teardown.sh @@ -16,5 +16,4 @@ # # This script is sourced by run-csit.sh after Robot test completion. -kill-instance.sh i-msb kill-instance.sh multivim-broker diff --git a/test/csit/plans/portal/testsuite/.env b/test/csit/plans/portal/testsuite/.env new file mode 100644 index 000000000..fa3076859 --- /dev/null +++ b/test/csit/plans/portal/testsuite/.env @@ -0,0 +1,17 @@ +# Environment settings +# used by docker-compose AND by other shell scripts + +# Host directory with config files +PROJECT_DIR=/PROJECT/OpenSource/UbuntuEP + +# Directory within containers +WEBAPPS_DIR=/opt/apache-tomcat-8.0.37/webapps + +# Following are ALSO used in demo/boot/portal_vm_init.sh +EP_IMG_NAME=portal-apps +DB_IMG_NAME=portal-db +WMS_IMG_NAME=portal-wms +# Tag all images with this +PORTAL_TAG=1.1.0 + +NEXUS_REPO=nexus3.onap.org:10003 diff --git a/test/csit/plans/portal/testsuite/portal b/test/csit/plans/portal/testsuite/portal new file mode 160000 +Subproject e65a5d4a4852cbd0056fb3b881613f0a4dba4ec diff --git a/test/csit/plans/portal/testsuite/setup.sh b/test/csit/plans/portal/testsuite/setup.sh new file mode 100644 index 000000000..a6c1ba483 --- /dev/null +++ b/test/csit/plans/portal/testsuite/setup.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# Starts docker containers for ONAP Portal in Rackspace. +# Version for Amsterdam/R1 uses docker-compose. + +# be verbose +set -x + +# Establish environment variables +NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt) +NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt) +NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt) +DOCKER_IMAGE_VERSION=$(cat /opt/config/docker_version.txt) + +# Refresh configuration and scripts +cd /opt/portal +git pull +cd deliveries + +# Get image names used below from docker-compose environment file +source .env + +# Copy property files +ETC=/PROJECT/OpenSource/UbuntuEP/etc +mkdir -p $ETC +cp -r properties_rackspace/* $ETC + +# Refresh images +docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO +docker pull $NEXUS_DOCKER_REPO/openecomp/${DB_IMG_NAME}:$DOCKER_IMAGE_VERSION +docker pull $NEXUS_DOCKER_REPO/openecomp/${EP_IMG_NAME}:$DOCKER_IMAGE_VERSION +docker pull $NEXUS_DOCKER_REPO/openecomp/${WMS_IMG_NAME}:$DOCKER_IMAGE_VERSION + +# Tag them as expected by docker-compose file +docker tag $NEXUS_DOCKER_REPO/openecomp/${DB_IMG_NAME}:$DOCKER_IMAGE_VERSION $DB_IMG_NAME:$PORTAL_TAG +docker tag $NEXUS_DOCKER_REPO/openecomp/${EP_IMG_NAME}:$DOCKER_IMAGE_VERSION $EP_IMG_NAME:$PORTAL_TAG +docker tag $NEXUS_DOCKER_REPO/openecomp/${WMS_IMG_NAME}:$DOCKER_IMAGE_VERSION $WMS_IMG_NAME:$PORTAL_TAG + +# docker-compose is not in /usr/bin +/opt/docker/docker-compose down +/opt/docker/docker-compose up -d diff --git a/test/csit/plans/portal/testsuite/teardown.sh b/test/csit/plans/portal/testsuite/teardown.sh new file mode 100644 index 000000000..4214c8279 --- /dev/null +++ b/test/csit/plans/portal/testsuite/teardown.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# +# Copyright 2017 AT&T Intellectual Property. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +kill-instance.sh i-mock + + diff --git a/test/csit/plans/portal/testsuite/testplan.txt b/test/csit/plans/portal/testsuite/testplan.txt new file mode 100644 index 000000000..5aba3164c --- /dev/null +++ b/test/csit/plans/portal/testsuite/testplan.txt @@ -0,0 +1,3 @@ +# Test suites are relative paths under [integration.git]/test/csit/tests/. +# Place the suites in run order. +portal/Healthcheck diff --git a/test/csit/plans/so/sanity-check/setup.sh b/test/csit/plans/so/sanity-check/setup.sh index a9c42fb4a..77a33bf65 100644 --- a/test/csit/plans/so/sanity-check/setup.sh +++ b/test/csit/plans/so/sanity-check/setup.sh @@ -17,21 +17,18 @@ # Place the scripts in run order: # Start all process required for executing test case -source ${SCRIPTS}/common_functions.sh +#start so +docker run -d -i -t --name=so -p 8080:8080 nexus3.onap.org:10001/openecomp/mso -#Start gso -run-instance.sh openoint/gso-service-manager gso " -i -t -e MSB_ADDR=${MSB_IP}:80 -e MYSQL_ADDR=${INV_ADDR}:3306" -sleep_msg="Waiting_for_so" -curl_path='http://'${MSB_IP}':80/api/so/v1/services' -wait_curl_driver CURL_COMMAND=$curl_path WAIT_MESSAGE='"$sleep_msg"' REPEAT_NUMBER=25 GREP_STRING="\[" +SO_IP=`get-instance-ip.sh so` +# Wait for initialization +for i in {1..10}; do + curl -sS ${SO_IP}:1080 && break + echo sleep $i + sleep $i +done -#run simulator -docker run -d -i -t --name gso_csit_simulator -e SIMULATOR_JSON=Stubs/testcase/so/main.json -p 18009:18009 -p 18008:18008 openoint/simulate-test-docker -SIMULATOR_IP=`get-instance-ip.sh gso_csit_simulator` -sleep_msg="Waiting_for_simulator" -curl_path='http://'${SIMULATOR_IP}':18009/api/extsys/v1/vims' -wait_curl_driver CURL_COMMAND=$curl_path WAIT_MESSAGE='"$sleep_msg"' REPEAT_NUMBER=16 GREP_STRING="\[" - - -ROBOT_VARIABLES="-v MSB_IP:${MSB_IP} -v SCRIPTS:${SCRIPTS} -v SIMULATOR_IP:${SIMULATOR_IP}" -robot ${ROBOT_VARIABLES} ${SCRIPTS}/../tests/so/sanity-check/register_simulator_to_msb.robot +#REPO_IP=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' so` +REPO_IP='127.0.0.1' +# Pass any variables required by Robot test suites in ROBOT_VARIABLES +ROBOT_VARIABLES="-v REPO_IP:${REPO_IP}" diff --git a/test/csit/plans/so/sanity-check/teardown.sh b/test/csit/plans/so/sanity-check/teardown.sh index 5cd82b7e2..a924a074f 100644 --- a/test/csit/plans/so/sanity-check/teardown.sh +++ b/test/csit/plans/so/sanity-check/teardown.sh @@ -15,10 +15,4 @@ # limitations under the License. # -#copy the logs files -docker cp so:/service/logs/lifecyclemgr.log ${SCRIPTS}/../../../archives -# kill micro service -kill-instance.sh i-msb kill-instance.sh so - - diff --git a/test/csit/plans/vfc-gvnfm-vnflcm/sanity-check/setup.sh b/test/csit/plans/vfc-gvnfm-vnflcm/sanity-check/setup.sh new file mode 100755 index 000000000..634c32722 --- /dev/null +++ b/test/csit/plans/vfc-gvnfm-vnflcm/sanity-check/setup.sh @@ -0,0 +1,61 @@ +#!/bin/bash +# +# Copyright 2017 ZTE Corporation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Place the scripts in run order: +# Start all process required for executing test case + +source ${SCRIPTS}/common_functions.sh + +#start msb +docker run -d -p 8500:8500 --name msb_consul consul +MSB_CONSUL_IP=`get-instance-ip.sh msb_consul` +echo MSB_CONSUL_IP=${MSB_CONSUL_IP} + +docker run -d -p 10081:10081 -e CONSUL_IP=$MSB_CONSUL_IP --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery +MSB_DISCOVERY_IP=`get-instance-ip.sh msb_discovery` +echo DISCOVERY_IP=${MSB_DISCOVERY_IP} + +docker run -d -p 80:80 -e CONSUL_IP=$MSB_CONSUL_IP -e SDCLIENT_IP=$MSB_DISCOVERY_IP --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway +MSB_IAG_IP=`get-instance-ip.sh msb_internal_apigateway` +echo MSB_IAG_IP=${MSB_IAG_IP} + +# Wait for initialization(8500 Consul, 10081 Service Registration & Discovery, 80 api gateway) +for i in {1..10}; do + curl -sS -m 1 ${MSB_CONSUL_IP}:8500 && curl -sS -m 1 ${MSB_DISCOVERY_IP}:10081 && curl -sS -m 1 ${MSB_IAG_IP}:80 && break + echo sleep $i + sleep $i +done + +# wait for container initalization +echo sleep 30 +sleep 30 + +# start vfc-vnflcm +docker run -d --name vfc-vnflcm -v /var/lib/mysql -e MSB_ADDR=${MSB_IAG_IP}:80 nexus3.onap.org:10001/onap/vfc/vnflcm +VNFLCM_IP=`get-instance-ip.sh vfc-vnflcm` + +# Wait for initialization +for i in {1..10}; do + curl -sS -m 1 ${VNFLCM_IP}:8801 && break + echo sleep $i + sleep $i +done + +docker cp vfc-vnflcm:/service/vfc/gvnfm/vnflcm/lcm/logs/runtime_lcm.log ./ +cat runtime_lcm.log + +# Pass any variables required by Robot test suites in ROBOT_VARIABLES +ROBOT_VARIABLES="-v MSB_IAG_IP:${MSB_IAG_IP} -v VNFLCM_IP:${VNFLCM_IP}" diff --git a/test/csit/plans/vfc-gvnfm-vnflcm/sanity-check/teardown.sh b/test/csit/plans/vfc-gvnfm-vnflcm/sanity-check/teardown.sh new file mode 100755 index 000000000..f78acd37c --- /dev/null +++ b/test/csit/plans/vfc-gvnfm-vnflcm/sanity-check/teardown.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# Copyright 2017 ZTE Corporation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# This script is sourced by run-csit.sh after Robot test completion. +kill-instance.sh msb_internal_apigateway +kill-instance.sh msb_discovery +kill-instance.sh msb_consul +kill-instance.sh vfc-vnflcm diff --git a/test/csit/plans/vfc-gvnfm-vnflcm/sanity-check/testplan.txt b/test/csit/plans/vfc-gvnfm-vnflcm/sanity-check/testplan.txt new file mode 100644 index 000000000..0aa2e3e21 --- /dev/null +++ b/test/csit/plans/vfc-gvnfm-vnflcm/sanity-check/testplan.txt @@ -0,0 +1,3 @@ +# Test suites are relative paths under [integration.git]/test/csit/tests/. +# Place the suites in run order. +vfc/gvnfm-vnflcm/test.robot diff --git a/test/csit/plans/vfc-gvnfm-vnfmgr/sanity-check/setup.sh b/test/csit/plans/vfc-gvnfm-vnfmgr/sanity-check/setup.sh new file mode 100755 index 000000000..ec315a24b --- /dev/null +++ b/test/csit/plans/vfc-gvnfm-vnfmgr/sanity-check/setup.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# +# Copyright 2017 ZTE Corporation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Place the scripts in run order: +# Start all process required for executing test case + +#login to the onap nexus docker repo +docker login -u docker -p docker nexus3.onap.org:10001 + +# Start MSB +docker run -d -p 8500:8500 --name msb_consul nexus3.onap.org:10001/onap/msb/msb_base +CONSUL_IP=`get-instance-ip.sh msb_consul` +echo CONSUL_IP=${CONSUL_IP} +docker run -d -p 10081:10081 -e CONSUL_IP=$CONSUL_IP --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery +DISCOVERY_IP=`get-instance-ip.sh msb_discovery` +echo DISCOVERY_IP=${DISCOVERY_IP} +docker run -d -p 80:80 -e CONSUL_IP=$CONSUL_IP -e SDCLIENT_IP=$DISCOVERY_IP --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway +MSB_IP==`get-instance-ip.sh msb_internal_apigateway` +echo MSB_IP=${MSB_IP} + +# start vfc-vnfmgr +docker run -d --name vfc-vnfmgr -e MSB_ADDR=${MSB_IP}:80 nexus3.onap.org:10001/onap/vfc/vnfmgr +VNFMGR_IP=`get-instance-ip.sh vfc-vnfmgr` +for i in {1..10}; do + curl -sS ${VNFMGR_IP}:8803 && break + echo sleep $i + sleep $i +done + +# Pass any variables required by Robot test suites in ROBOT_VARIABLES +ROBOT_VARIABLES="-v MSB_IP:${MSB_IP} -v VNFMGR_IP:${VNFMGR_IP}" diff --git a/test/csit/plans/vfc-gvnfm-vnfmgr/sanity-check/teardown.sh b/test/csit/plans/vfc-gvnfm-vnfmgr/sanity-check/teardown.sh new file mode 100755 index 000000000..572c2f336 --- /dev/null +++ b/test/csit/plans/vfc-gvnfm-vnfmgr/sanity-check/teardown.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# Copyright 2017 ZTE Corporation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# This script is sourced by run-csit.sh after Robot test completion. +kill-instance.sh msb_internal_apigateway +kill-instance.sh msb_discovery +kill-instance.sh msb_consul +kill-instance.sh vfc-vnfmgr diff --git a/test/csit/plans/vfc-gvnfm-vnfmgr/sanity-check/testplan.txt b/test/csit/plans/vfc-gvnfm-vnfmgr/sanity-check/testplan.txt new file mode 100644 index 000000000..960f7325a --- /dev/null +++ b/test/csit/plans/vfc-gvnfm-vnfmgr/sanity-check/testplan.txt @@ -0,0 +1,3 @@ +# Test suites are relative paths under [integration.git]/test/csit/tests/. +# Place the suites in run order. +vfc/gvnfm-vnfmgr/test.robot diff --git a/test/csit/plans/vfc-gvnfm-vnfres/sanity-check/setup.sh b/test/csit/plans/vfc-gvnfm-vnfres/sanity-check/setup.sh new file mode 100755 index 000000000..0139bcdcc --- /dev/null +++ b/test/csit/plans/vfc-gvnfm-vnfres/sanity-check/setup.sh @@ -0,0 +1,56 @@ +#!/bin/bash +# +# Copyright 2017 ZTE Corporation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Place the scripts in run order: +# Start all process required for executing test case + +source ${SCRIPTS}/common_functions.sh + + +#start msb +docker run -d -p 8500:8500 --name msb_consul consul +MSB_CONSUL_IP=`get-instance-ip.sh msb_consul` +echo MSB_CONSUL_IP=${MSB_CONSUL_IP} +docker run -d -p 10081:10081 -e CONSUL_IP=$MSB_CONSUL_IP --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery +MSB_DISCOVERY_IP=`get-instance-ip.sh msb_discovery` +echo MSB_DISCOVERY_IP=${MSB_DISCOVERY_IP} +docker run -d -p 80:80 -e CONSUL_IP=$MSB_CONSUL_IP -e SDCLIENT_IP=$MSB_DISCOVERY_IP -e "ROUTE_LABELS=visualRange:1" --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway +MSB_IAG_IP=`get-instance-ip.sh msb_internal_apigateway` +echo MSB_IAG_IP=${MSB_IAG_IP} + +# Wait for initialization(8500 Consul, 10081 Service Registration & Discovery, 80 api gateway) +for i in {1..10}; do + curl -sS -m 1 ${MSB_CONSUL_IP}:8500 && curl -sS -m 1 ${MSB_DISCOVERY_IP}:10081 && curl -sS -m 1 ${MSB_IAG_IP}:80 && break + echo sleep $i + sleep $i +done + +# wait for container initalization +echo sleep 60 +sleep 60 +# start vfc-vnfres +docker run -d --name vfc-vnfres -v /var/lib/mysql -e MSB_ADDR=${MSB_IAG_IP}:80 nexus3.onap.org:10001/onap/vfc/vnfres +VNFRES_IP=`get-instance-ip.sh vfc-vnfres` + +# Wait for initialization +for i in {1..10}; do + curl -sS ${VNFRES_IP}:8802 && break + echo sleep $i + sleep $i +done + +# Pass any variables required by Robot test suites in ROBOT_VARIABLES +ROBOT_VARIABLES="-v MSB_IAG_IP:${MSB_IAG_IP} -v VNFRES_IP:${VNFRES_IP}" diff --git a/test/csit/plans/vfc-gvnfm-vnfres/sanity-check/teardown.sh b/test/csit/plans/vfc-gvnfm-vnfres/sanity-check/teardown.sh new file mode 100755 index 000000000..edd857da6 --- /dev/null +++ b/test/csit/plans/vfc-gvnfm-vnfres/sanity-check/teardown.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# Copyright 2017 ZTE Corporation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# This script is sourced by run-csit.sh after Robot test completion. +kill-instance.sh msb_internal_apigateway +kill-instance.sh msb_discovery +kill-instance.sh msb_consul +kill-instance.sh vfc-vnfres diff --git a/test/csit/plans/vfc-gvnfm-vnfres/sanity-check/testplan.txt b/test/csit/plans/vfc-gvnfm-vnfres/sanity-check/testplan.txt new file mode 100644 index 000000000..e94e29460 --- /dev/null +++ b/test/csit/plans/vfc-gvnfm-vnfres/sanity-check/testplan.txt @@ -0,0 +1,3 @@ +# Test suites are relative paths under [integration.git]/test/csit/tests/. +# Place the suites in run order. +vfc/gvnfm-vnfres/test.robot diff --git a/test/csit/plans/vfc-nfvo-catalog/sanity-check/setup.sh b/test/csit/plans/vfc-nfvo-catalog/sanity-check/setup.sh new file mode 100644 index 000000000..6374b88ba --- /dev/null +++ b/test/csit/plans/vfc-nfvo-catalog/sanity-check/setup.sh @@ -0,0 +1,57 @@ +#!/bin/bash +# +# Copyright 2017 ZTE Corporation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Place the scripts in run order: +# Start all process required for executing test case + +#login to the onap nexus docker repo +docker login -u docker -p docker nexus3.onap.org:10001 + +# start msb +docker run -d -p 8500:8500 --name msb_consul consul +CONSUL_IP=`get-instance-ip.sh msb_consul` +echo CONSUL_IP=${CONSUL_IP} + +docker run -d -p 10081:10081 -e CONSUL_IP=$CONSUL_IP --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery +DISCOVERY_IP=`get-instance-ip.sh msb_discovery` +echo DISCOVERY_IP=${DISCOVERY_IP} + +docker run -d -p 80:80 -e CONSUL_IP=$CONSUL_IP -e SDCLIENT_IP=$DISCOVERY_IP -e "ROUTE_LABELS=visualRange:1" --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway +MSB_IP==`get-instance-ip.sh msb_internal_apigateway` +echo MSB_IP=${MSB_IP} + +# Wait for initialization(8500 Consul, 10081 Service Registration & Discovery, 80 api gateway) +for i in {1..10}; do + curl -sS -m 1 ${CONSUL_IP}:8500 && curl -sS -m 1 ${DISCOVERY_IP}:10081 && curl -sS -m 1 ${MSB_IP}:80 && break + echo sleep $i + sleep $i +done + +# Need some time so service info can be synced from discovery to api gateway +echo sleep 60 +sleep 60 + +# start vfc-catalog +docker run -d --name vfc-catalog -v /var/lib/mysql -e MSB_ADDR=${DISCOVERY_IP}:10081 nexus3.onap.org:10001/onap/vfc/catalog +CATALOG_IP=`get-instance-ip.sh vfc-catalog` +for i in {1..10}; do + curl -sS ${CATALOG_IP}:8806 && break + echo sleep $i + sleep $i +done + +# Pass any variables required by Robot test suites in ROBOT_VARIABLES +ROBOT_VARIABLES="-v MSB_IP:${MSB_IP} -v CATALOG_IP:${CATALOG_IP} -v MSB_DISCOVERY_IP:${DISCOVERY_IP}" diff --git a/test/csit/plans/vfc-nfvo-catalog/sanity-check/teardown.sh b/test/csit/plans/vfc-nfvo-catalog/sanity-check/teardown.sh new file mode 100644 index 000000000..68d5b60e4 --- /dev/null +++ b/test/csit/plans/vfc-nfvo-catalog/sanity-check/teardown.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# Copyright 2017 ZTE Corporation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# This script is sourced by run-csit.sh after Robot test completion. +kill-instance.sh msb_internal_apigateway +kill-instance.sh msb_discovery +kill-instance.sh msb_consul +kill-instance.sh vfc-catalog diff --git a/test/csit/plans/vfc-nfvo-catalog/sanity-check/testplan.txt b/test/csit/plans/vfc-nfvo-catalog/sanity-check/testplan.txt new file mode 100644 index 000000000..6c8c54a94 --- /dev/null +++ b/test/csit/plans/vfc-nfvo-catalog/sanity-check/testplan.txt @@ -0,0 +1,3 @@ +# Test suites are relative paths under [integration.git]/test/csit/tests/. +# Place the suites in run order. +vfc/nfvo-catalog/test.robot diff --git a/test/csit/plans/vfc-nfvo-driver-ems/sanity-check/setup.sh b/test/csit/plans/vfc-nfvo-driver-ems/sanity-check/setup.sh new file mode 100755 index 000000000..09978ca6d --- /dev/null +++ b/test/csit/plans/vfc-nfvo-driver-ems/sanity-check/setup.sh @@ -0,0 +1,62 @@ +#!/bin/bash +# +# Copyright 2017 ZTE Corporation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Place the scripts in run order: +# Start all process required for executing test case + +source ${SCRIPTS}/common_functions.sh + +#start msb +docker run -d -p 8500:8500 --name msb_consul consul +MSB_CONSUL_IP=`get-instance-ip.sh msb_consul` +echo MSB_CONSUL_IP=${MSB_CONSUL_IP} + +docker run -d -p 10081:10081 -e CONSUL_IP=$MSB_CONSUL_IP --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery +MSB_DISCOVERY_IP=`get-instance-ip.sh msb_discovery` +echo DISCOVERY_IP=${MSB_DISCOVERY_IP} + +docker run -d -p 80:80 -e CONSUL_IP=$MSB_CONSUL_IP -e SDCLIENT_IP=$MSB_DISCOVERY_IP -e "ROUTE_LABELS=visualRange:1" --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway +MSB_IAG_IP=`get-instance-ip.sh msb_internal_apigateway` +echo MSB_IAG_IP=${MSB_IAG_IP} + +# Wait for initialization(8500 Consul, 10081 Service Registration & Discovery, 80 api gateway) +for i in {1..10}; do + curl -sS -m 1 ${MSB_CONSUL_IP}:8500 && curl -sS -m 1 ${MSB_DISCOVERY_IP}:10081 && curl -sS -m 1 ${MSB_IAG_IP}:80 && break + echo sleep $i + sleep $i +done + +# Need some time so service info can be synced from discovery to api gateway +echo sleep 60 +sleep 60 + +# start vfc-emsdriver +docker run -d --name vfc-emsdriver -e MSB_ADDR=${MSB_IAG_IP}:80 nexus3.onap.org:10001/onap/vfc/emsdriver +EMS_DRV_IP=`get-instance-ip.sh vfc-emsdriver` +docker logs -f vfc-emsdriver > emsdriver.log & + +# Wait for initialization +for i in {1..10}; do + curl -sS -m 1 ${EMS_DRV_IP}:8206 && break + echo sleep $i + sleep $i +done + +echo "===============" +cat emsdriver.log + +# Pass any variables required by Robot test suites in ROBOT_VARIABLES +ROBOT_VARIABLES="-v MSB_IAG_IP:${MSB_IAG_IP} -v EMS_DRV_IP:${EMS_DRV_IP}" diff --git a/test/csit/plans/vfc-nfvo-driver-ems/sanity-check/teardown.sh b/test/csit/plans/vfc-nfvo-driver-ems/sanity-check/teardown.sh new file mode 100755 index 000000000..aa676b2f2 --- /dev/null +++ b/test/csit/plans/vfc-nfvo-driver-ems/sanity-check/teardown.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# Copyright 2017 ZTE Corporation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# This script is sourced by run-csit.sh after Robot test completion. +kill-instance.sh msb_internal_apigateway +kill-instance.sh msb_discovery +kill-instance.sh msb_consul +kill-instance.sh vfc-emsdriver diff --git a/test/csit/plans/vfc-nfvo-driver-ems/sanity-check/testplan.txt b/test/csit/plans/vfc-nfvo-driver-ems/sanity-check/testplan.txt new file mode 100644 index 000000000..747f8683e --- /dev/null +++ b/test/csit/plans/vfc-nfvo-driver-ems/sanity-check/testplan.txt @@ -0,0 +1,3 @@ +# Test suites are relative paths under [integration.git]/test/csit/tests/. +# Place the suites in run order. +vfc/nfvo-driver-ems/test.robot diff --git a/test/csit/plans/vfc-nfvo-driver-sfc/sanity-check/setup.sh b/test/csit/plans/vfc-nfvo-driver-sfc/sanity-check/setup.sh new file mode 100755 index 000000000..45ad0cbb1 --- /dev/null +++ b/test/csit/plans/vfc-nfvo-driver-sfc/sanity-check/setup.sh @@ -0,0 +1,62 @@ +#!/bin/bash +# +# Copyright 2017 ZTE Corporation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Place the scripts in run order: +# Start all process required for executing test case + +source ${SCRIPTS}/common_functions.sh + +#start msb +docker run -d -p 8500:8500 --name msb_consul consul +MSB_CONSUL_IP=`get-instance-ip.sh msb_consul` +echo MSB_CONSUL_IP=${MSB_CONSUL_IP} + +docker run -d -p 10081:10081 -e CONSUL_IP=$MSB_CONSUL_IP --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery +MSB_DISCOVERY_IP=`get-instance-ip.sh msb_discovery` +echo DISCOVERY_IP=${MSB_DISCOVERY_IP} + +docker run -d -p 80:80 -e CONSUL_IP=$MSB_CONSUL_IP -e SDCLIENT_IP=$MSB_DISCOVERY_IP -e "ROUTE_LABELS=visualRange:1" --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway +MSB_IAG_IP=`get-instance-ip.sh msb_internal_apigateway` +echo MSB_IAG_IP=${MSB_IAG_IP} + +# Wait for initialization(8500 Consul, 10081 Service Registration & Discovery, 80 api gateway) +for i in {1..10}; do + curl -sS -m 1 ${MSB_CONSUL_IP}:8500 && curl -sS -m 1 ${MSB_DISCOVERY_IP}:10081 && curl -sS -m 1 ${MSB_IAG_IP}:80 && break + echo sleep $i + sleep $i +done + +# Need some time so service info can be synced from discovery to api gateway +echo sleep 60 +sleep 60 + +# start vfc-ztesdncdriver +docker run -d --name vfc-ztesdncdriver -e MSB_ADDR=${MSB_IAG_IP}:80 nexus3.onap.org:10001/onap/vfc/ztesdncdriver +SFC_DRV_IP=`get-instance-ip.sh vfc-ztesdncdriver` +docker logs -f vfc-ztesdncdriver > ztesdncdriver.log & + +# Wait for initialization +for i in {1..10}; do + curl -sS -m 1 ${SFC_DRV_IP}:8411 && break + echo sleep $i + sleep $i +done + +echo "===============================" +cat ztesdncdriver.log + +# Pass any variables required by Robot test suites in ROBOT_VARIABLES +ROBOT_VARIABLES="-v MSB_IAG_IP:${MSB_IAG_IP} -v SFC_DRV_IP:${SFC_DRV_IP}" diff --git a/test/csit/plans/vfc-nfvo-driver-sfc/sanity-check/teardown.sh b/test/csit/plans/vfc-nfvo-driver-sfc/sanity-check/teardown.sh new file mode 100755 index 000000000..ce5402efe --- /dev/null +++ b/test/csit/plans/vfc-nfvo-driver-sfc/sanity-check/teardown.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# Copyright 2017 ZTE Corporation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# This script is sourced by run-csit.sh after Robot test completion. +kill-instance.sh msb_internal_apigateway +kill-instance.sh msb_discovery +kill-instance.sh msb_consul +kill-instance.sh vfc-ztesdncdriver diff --git a/test/csit/plans/vfc-nfvo-driver-sfc/sanity-check/testplan.txt b/test/csit/plans/vfc-nfvo-driver-sfc/sanity-check/testplan.txt new file mode 100644 index 000000000..9de2accee --- /dev/null +++ b/test/csit/plans/vfc-nfvo-driver-sfc/sanity-check/testplan.txt @@ -0,0 +1,3 @@ +# Test suites are relative paths under [integration.git]/test/csit/tests/. +# Place the suites in run order. +vfc/nfvo-driver-sfc/test.robot diff --git a/test/csit/plans/vfc-nfvo-driver-vnfm-gvnfm/sanity-check/setup.sh b/test/csit/plans/vfc-nfvo-driver-vnfm-gvnfm/sanity-check/setup.sh new file mode 100644 index 000000000..283cb0d41 --- /dev/null +++ b/test/csit/plans/vfc-nfvo-driver-vnfm-gvnfm/sanity-check/setup.sh @@ -0,0 +1,67 @@ +#!/bin/bash +# +# Copyright 2017 ZTE Corporation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Place the scripts in run order: +# Start all process required for executing test case + +source ${SCRIPTS}/common_functions.sh + + +#start msb +docker run -d -p 8500:8500 --name msb_consul consul +MSB_CONSUL_IP=`get-instance-ip.sh msb_consul` +echo MSB_CONSUL_IP=${MSB_CONSUL_IP} +docker run -d -p 10081:10081 -e CONSUL_IP=$MSB_CONSUL_IP --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery +MSB_DISCOVERY_IP=`get-instance-ip.sh msb_discovery` +echo MSB_DISCOVERY_IP=${MSB_DISCOVERY_IP} +docker run -d -p 80:80 -e CONSUL_IP=$MSB_CONSUL_IP -e SDCLIENT_IP=$MSB_DISCOVERY_IP -e "ROUTE_LABELS=visualRange:1" --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway +MSB_IAG_IP=`get-instance-ip.sh msb_internal_apigateway` +echo MSB_IAG_IP=${MSB_IAG_IP} + +# Wait for initialization(8500 Consul, 10081 Service Registration & Discovery, 80 api gateway) +for i in {1..10}; do + curl -sS -m 1 ${MSB_CONSUL_IP}:8500 && curl -sS -m 1 ${MSB_DISCOVERY_IP}:10081 && curl -sS -m 1 ${MSB_IAG_IP}:80 && break + echo sleep $i + sleep $i +done + +# wait for container initalization +echo sleep 60 +sleep 60 +# start vfc-gvnfmdriver +docker run -d --name vfc-gvnfmdriver -e MSB_ADDR=${MSB_IAG_IP}:80 nexus3.onap.org:10001/onap/vfc/gvnfmdriver +GVNFMDRIVER_IP=`get-instance-ip.sh vfc-gvnfmdriver` + +# Wait for initialization +for i in {1..10}; do + curl -sS ${GVNFMDRIVER_IP}:8484 && break + echo sleep $i + sleep $i +done + +# start vfc-jujudriver +docker run -d --name vfc-jujudriver -e MSB_ADDR=${MSB_IAG_IP}:80 nexus3.onap.org:10001/onap/vfc/jujudriver +JUJUDRIVER_IP=`get-instance-ip.sh vfc-jujudriver` + +# Wait for initialization +for i in {1..10}; do + curl -sS ${JUJUDRIVER_IP}:8483 && break + echo sleep $i + sleep $i +done + +# Pass any variables required by Robot test suites in ROBOT_VARIABLES +ROBOT_VARIABLES="-v MSB_IAG_IP:${MSB_IAG_IP} -v GVNFMDRIVER_IP:${GVNFMDRIVER_IP} -v JUJUDRIVER_IP:${JUJUDRIVER_IP}" diff --git a/test/csit/plans/vfc-nfvo-driver-vnfm-gvnfm/sanity-check/teardown.sh b/test/csit/plans/vfc-nfvo-driver-vnfm-gvnfm/sanity-check/teardown.sh new file mode 100644 index 000000000..78d7c5ad9 --- /dev/null +++ b/test/csit/plans/vfc-nfvo-driver-vnfm-gvnfm/sanity-check/teardown.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# +# Copyright 2017 Huawei Technologies Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# This script is sourced by run-csit.sh after Robot test completion. +kill-instance.sh msb_internal_apigateway +kill-instance.sh msb_discovery +kill-instance.sh msb_consul +kill-instance.sh vfc-gvnfmdriver + +kill-instance.sh vfc-jujudriver diff --git a/test/csit/plans/vfc-nfvo-driver-vnfm-gvnfm/sanity-check/testplan.txt b/test/csit/plans/vfc-nfvo-driver-vnfm-gvnfm/sanity-check/testplan.txt new file mode 100644 index 000000000..e7bee519b --- /dev/null +++ b/test/csit/plans/vfc-nfvo-driver-vnfm-gvnfm/sanity-check/testplan.txt @@ -0,0 +1,6 @@ +# Test suites are relative paths under [integration.git]/test/csit/tests/. +# Place the suites in run order. + +vfc/nfvo-driver-gvnfm/gvnfmdriver.robot + +vfc/nfvo-driver-gvnfm/jujudriver.robot diff --git a/test/csit/plans/vfc-nfvo-driver-vnfm-svnfm/sanity-check/setup.sh b/test/csit/plans/vfc-nfvo-driver-vnfm-svnfm/sanity-check/setup.sh new file mode 100644 index 000000000..382cb7a8d --- /dev/null +++ b/test/csit/plans/vfc-nfvo-driver-vnfm-svnfm/sanity-check/setup.sh @@ -0,0 +1,67 @@ +#!/bin/bash +# +# Copyright 2017 ZTE Corporation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Place the scripts in run order: +# Start all process required for executing test case + +source ${SCRIPTS}/common_functions.sh + + +#start msb +docker run -d -p 8500:8500 --name msb_consul consul +MSB_CONSUL_IP=`get-instance-ip.sh msb_consul` +echo MSB_CONSUL_IP=${MSB_CONSUL_IP} +docker run -d -p 10081:10081 -e CONSUL_IP=$MSB_CONSUL_IP --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery +MSB_DISCOVERY_IP=`get-instance-ip.sh msb_discovery` +echo MSB_DISCOVERY_IP=${MSB_DISCOVERY_IP} +docker run -d -p 80:80 -e CONSUL_IP=$MSB_CONSUL_IP -e SDCLIENT_IP=$MSB_DISCOVERY_IP -e "ROUTE_LABELS=visualRange:1" --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway +MSB_IAG_IP=`get-instance-ip.sh msb_internal_apigateway` +echo MSB_IAG_IP=${MSB_IAG_IP} + +# Wait for initialization(8500 Consul, 10081 Service Registration & Discovery, 80 api gateway) +for i in {1..10}; do + curl -sS -m 1 ${MSB_CONSUL_IP}:8500 && curl -sS -m 1 ${MSB_DISCOVERY_IP}:10081 && curl -sS -m 1 ${MSB_IAG_IP}:80 && break + echo sleep $i + sleep $i +done + +# wait for container initalization +echo sleep 60 +sleep 60 + +# start vfc-ztevmanagerdriver +docker run -d --name vfc-ztevmanagerdriver -e MSB_ADDR=${MSB_IAG_IP}:80 nexus3.onap.org:10001/onap/vfc/ztevmanagerdriver +ZTEVMANAGERDRIVER_IP=`get-instance-ip.sh vfc-ztevmanagerdriver` + +# Wait for initialization +for i in {1..10}; do + curl -sS ${ZTEVMANAGERDRIVER_IP}:8410 && break + echo sleep $i + sleep $i +done + + +# Start svnfm-huawei +docker run -d --name vfc-svnfm-huawei -e MSB_ADDR=${MSB_IAG_IP}:80 nexus3.onap.org:10001/onap/vfc/nfvo/svnfm/huawei +SERVICE_IP=`get-instance-ip.sh vfc-svnfm-huawei` +for i in {1..10}; do + curl -sS ${SERVICE_IP}:8482 && break + echo sleep $i + sleep $i +done + +# Pass any variables required by Robot test suites in ROBOT_VARIABLES +ROBOT_VARIABLES="-v MSB_IAG_IP:${MSB_IAG_IP} -v ZTEVMANAGERDRIVER_IP:${ZTEVMANAGERDRIVER_IP} -v MSB_IP:${MSB_IAG_IP} -v SERVICE_IP:${SERVICE_IP}" diff --git a/test/csit/plans/vfc-nfvo-driver-vnfm-svnfm/sanity-check/teardown.sh b/test/csit/plans/vfc-nfvo-driver-vnfm-svnfm/sanity-check/teardown.sh new file mode 100644 index 000000000..e440068fb --- /dev/null +++ b/test/csit/plans/vfc-nfvo-driver-vnfm-svnfm/sanity-check/teardown.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# +# Copyright 2017 Huawei Technologies Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# This script is sourced by run-csit.sh after Robot test completion. +kill-instance.sh msb_internal_apigateway +kill-instance.sh msb_discovery +kill-instance.sh msb_consul +kill-instance.sh vfc-ztevmanagerdriver + +kill-instance.sh vfc-svnfm-huawei diff --git a/test/csit/plans/vfc-nfvo-driver-vnfm-svnfm/sanity-check/testplan.txt b/test/csit/plans/vfc-nfvo-driver-vnfm-svnfm/sanity-check/testplan.txt new file mode 100644 index 000000000..7eb861eda --- /dev/null +++ b/test/csit/plans/vfc-nfvo-driver-vnfm-svnfm/sanity-check/testplan.txt @@ -0,0 +1,6 @@ +# Test suites are relative paths under [integration.git]/test/csit/tests/. +# Place the suites in run order. + +vfc/nfvo-driver-svnfm/ztevmanager.robot + +vfc/nfvo-driver-svnfm/huawei.robot diff --git a/test/csit/plans/vfc-nfvo-lcm/sanity-check/setup.sh b/test/csit/plans/vfc-nfvo-lcm/sanity-check/setup.sh new file mode 100755 index 000000000..3cc53988c --- /dev/null +++ b/test/csit/plans/vfc-nfvo-lcm/sanity-check/setup.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# +# Copyright 2017 ZTE Corporation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Place the scripts in run order: +# Start all process required for executing test case + +source ${SCRIPTS}/common_functions.sh + +#start msb +docker run -d -p 8500:8500 --name msb_consul consul +MSB_CONSUL_IP=`get-instance-ip.sh msb_consul` +echo MSB_CONSUL_IP=${MSB_CONSUL_IP} + +docker run -d -p 10081:10081 -e CONSUL_IP=$MSB_CONSUL_IP --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery +MSB_DISCOVERY_IP=`get-instance-ip.sh msb_discovery` +echo DISCOVERY_IP=${MSB_DISCOVERY_IP} + +docker run -d -p 80:80 -e CONSUL_IP=$MSB_CONSUL_IP -e SDCLIENT_IP=$MSB_DISCOVERY_IP -e "ROUTE_LABELS=visualRange:1" --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway +MSB_IAG_IP=`get-instance-ip.sh msb_internal_apigateway` +echo MSB_IAG_IP=${MSB_IAG_IP} + +# Wait for initialization(8500 Consul, 10081 Service Registration & Discovery, 80 api gateway) +for i in {1..10}; do + curl -sS -m 1 ${MSB_CONSUL_IP}:8500 && curl -sS -m 1 ${MSB_DISCOVERY_IP}:10081 && curl -sS -m 1 ${MSB_IAG_IP}:80 && break + echo sleep $i + sleep $i +done + +# Need some time so service info can be synced from discovery to api gateway +echo sleep 60 +sleep 60 + +# start vfc-nslcm +docker run -d --name vfc-nslcm -v /var/lib/mysql -e MSB_ADDR=${MSB_IAG_IP}:80 nexus3.onap.org:10001/onap/vfc/nslcm +NSLCM_IP=`get-instance-ip.sh vfc-nslcm` + +# Wait for initialization +for i in {1..10}; do + curl -sS -m 1 ${NSLCM_IP}:8403 && break + echo sleep $i + sleep $i +done + +# Pass any variables required by Robot test suites in ROBOT_VARIABLES +ROBOT_VARIABLES="-v MSB_IAG_IP:${MSB_IAG_IP} -v NSLCM_IP:${NSLCM_IP} -v SCRIPTS:${SCRIPTS}" diff --git a/test/csit/plans/vfc-nfvo-lcm/sanity-check/teardown.sh b/test/csit/plans/vfc-nfvo-lcm/sanity-check/teardown.sh new file mode 100755 index 000000000..c74850d36 --- /dev/null +++ b/test/csit/plans/vfc-nfvo-lcm/sanity-check/teardown.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# Copyright 2017 ZTE Corporation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# This script is sourced by run-csit.sh after Robot test completion. +kill-instance.sh msb_internal_apigateway +kill-instance.sh msb_discovery +kill-instance.sh msb_consul +kill-instance.sh vfc-nslcm diff --git a/test/csit/plans/vfc-nfvo-lcm/sanity-check/testplan.txt b/test/csit/plans/vfc-nfvo-lcm/sanity-check/testplan.txt new file mode 100644 index 000000000..fc261e13c --- /dev/null +++ b/test/csit/plans/vfc-nfvo-lcm/sanity-check/testplan.txt @@ -0,0 +1,3 @@ +# Test suites are relative paths under [integration.git]/test/csit/tests/. +# Place the suites in run order. +vfc/nfvo-lcm/test.robot diff --git a/test/csit/plans/vfc-nfvo-resmanagement/sanity-check/setup.sh b/test/csit/plans/vfc-nfvo-resmanagement/sanity-check/setup.sh new file mode 100644 index 000000000..a18562eb7 --- /dev/null +++ b/test/csit/plans/vfc-nfvo-resmanagement/sanity-check/setup.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# +# Copyright 2017 Huawei Technologies Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Place the scripts in run order: +# Start all process required for executing test case + +#login to the onap nexus docker repo +docker login -u docker -p docker nexus3.onap.org:10001 + +# Start MSB +docker run -d -p 8500:8500 --name msb_consul nexus3.onap.org:10001/onap/msb/msb_base +CONSUL_IP=`get-instance-ip.sh msb_consul` +echo CONSUL_IP=${CONSUL_IP} +docker run -d -p 10081:10081 -e CONSUL_IP=$CONSUL_IP --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery +DISCOVERY_IP=`get-instance-ip.sh msb_discovery` +echo DISCOVERY_IP=${DISCOVERY_IP} +docker run -d -p 80:80 -e CONSUL_IP=$CONSUL_IP -e SDCLIENT_IP=$DISCOVERY_IP --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway +MSB_IP==`get-instance-ip.sh msb_internal_apigateway` +echo MSB_IP=${MSB_IP} + +# Start resmgr +docker run -d --name vfc-resmanagement -e MSB_ADDR=${MSB_IP}:80 nexus3.onap.org:10001/onap/vfc/resmanagement +RESMGR_IP=`get-instance-ip.sh vfc-resmanagement` +for i in {1..10}; do + curl -sS ${RESMGR_IP}:8480 && break + echo sleep $i + sleep $i +done + +# Pass any variables required by Robot test suites in ROBOT_VARIABLES +ROBOT_VARIABLES="-v MSB_IP:${MSB_IP} -v RESMGR_IP:${RESMGR_IP}" diff --git a/test/csit/plans/vfc-nfvo-resmanagement/sanity-check/teardown.sh b/test/csit/plans/vfc-nfvo-resmanagement/sanity-check/teardown.sh new file mode 100644 index 000000000..2ad95c6bf --- /dev/null +++ b/test/csit/plans/vfc-nfvo-resmanagement/sanity-check/teardown.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# Copyright 2017 Huawei Technologies Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# This script is sourced by run-csit.sh after Robot test completion. +kill-instance.sh msb_internal_apigateway +kill-instance.sh msb_discovery +kill-instance.sh msb_consul +kill-instance.sh vfc-resmanagement diff --git a/test/csit/plans/vfc-nfvo-resmanagement/sanity-check/testplan.txt b/test/csit/plans/vfc-nfvo-resmanagement/sanity-check/testplan.txt new file mode 100644 index 000000000..98dac63b6 --- /dev/null +++ b/test/csit/plans/vfc-nfvo-resmanagement/sanity-check/testplan.txt @@ -0,0 +1,3 @@ +# Test suites are relative paths under [integration.git]/test/csit/tests/. +# Place the suites in run order. +vfc/nfvo-resmanagement/test.robot
\ No newline at end of file diff --git a/test/csit/plans/vnfsdk-refrepo/sanity-check/setup.sh b/test/csit/plans/vnfsdk-refrepo/sanity-check/setup.sh index b54ea56ad..91e931e91 100644 --- a/test/csit/plans/vnfsdk-refrepo/sanity-check/setup.sh +++ b/test/csit/plans/vnfsdk-refrepo/sanity-check/setup.sh @@ -21,10 +21,16 @@ #Start market place docker run -d -i -t --name=refrepo -p 8702:8702 nexus3.onap.org:10001/onap/refrepo:1.0-STAGING-latest +# Wait for Market place initialization +echo Wait for VNF Repository initialization +for i in {1..30}; do + sleep 1 +done + REPO_IP=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' refrepo` # Pass any variables required by Robot test suites in ROBOT_VARIABLES -ROBOT_VARIABLES="-v SCRIPTS:{SCRIPTS} -v REPO_IP:${REPO_IP}" +ROBOT_VARIABLES="-v SCRIPTS:${SCRIPTS} -v REPO_IP:${REPO_IP}" echo ${ROBOT_VARIABLES} diff --git a/test/csit/run-csit.sh b/test/csit/run-csit.sh index 8033f308a..5c094f834 100755 --- a/test/csit/run-csit.sh +++ b/test/csit/run-csit.sh @@ -93,6 +93,12 @@ if ! type pybot > /dev/null; then source ${ROBOT_VENV}/bin/activate fi +# install eteutils +mkdir -p ${ROBOT_VENV}/src/onap +rm -rf ${ROBOT_VENV}/src/onap/testsuite +git clone https://gerrit.onap.org/r/testsuite/python-testing-utils.git ${ROBOT_VENV}/src/onap/testsuite/python-testing-utils +pip install --upgrade ${ROBOT_VENV}/src/onap/testsuite/python-testing-utils + WORKDIR=`mktemp -d --suffix=-robot-workdir` cd ${WORKDIR} diff --git a/test/csit/scripts/clamp/start_clamp_containers.sh b/test/csit/scripts/clamp/start_clamp_containers.sh index 23d3c566d..02abe264c 100755 --- a/test/csit/scripts/clamp/start_clamp_containers.sh +++ b/test/csit/scripts/clamp/start_clamp_containers.sh @@ -28,7 +28,7 @@ echo "This is ${WORKSPACE}/test/csit/scripts/clamp/start_clamp_containers.sh" docker-compose up -d # WAIT 5 minutes maximum and test every 5 seconds if Clamp up using HealthCheck API -TIME_OUT=600 +TIME_OUT=1200 INTERVAL=5 TIME=0 while [ "$TIME" -lt "$TIME_OUT" ]; do diff --git a/test/csit/scripts/cli/startup.sh b/test/csit/scripts/cli/startup.sh new file mode 100644 index 000000000..6e29a0e8e --- /dev/null +++ b/test/csit/scripts/cli/startup.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# +# Copyright 2017 Huawei Technologies Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# $1 nickname for the MSB instance +echo "This is ${WORKSPACE}/test/csit/scripts/cli/startup.sh" diff --git a/test/csit/tests/aai/resources/suite1/__init__.robot b/test/csit/tests/aai/resources/suite1/__init__.robot new file mode 100644 index 000000000..538def841 --- /dev/null +++ b/test/csit/tests/aai/resources/suite1/__init__.robot @@ -0,0 +1,2 @@ +*** Settings *** +Documentation Resources - Pserver Suite diff --git a/test/csit/tests/aai/resources/suite1/aai.crt b/test/csit/tests/aai/resources/suite1/aai.crt new file mode 100644 index 000000000..6a28bbb8c --- /dev/null +++ b/test/csit/tests/aai/resources/suite1/aai.crt @@ -0,0 +1,70 @@ +Bag Attributes + friendlyName: aaiopenecomp + localKeyID: 54 69 6D 65 20 31 35 30 34 38 33 32 34 34 33 32 39 32 +subject=/C=US/ST=NJ/L=Bedminster/O=OpenECOMP/OU=SimpleDemo/CN=aai.api.simpledemo.openecomp.org/emailAddress=aai-host@api.simpledemo.openecomp.org +issuer=/C=US/ST=NJ/L=Bedminster/O=OpenECOMP/OU=simpledemo/CN=OpenECOMP simpledemo Server CA X1/emailAddress=simpledemo@openecomp.org +-----BEGIN CERTIFICATE----- +MIIEiTCCA3GgAwIBAgIJAIPKfDLcn3MpMA0GCSqGSIb3DQEBCwUAMIGtMQswCQYD +VQQGEwJVUzELMAkGA1UECAwCTkoxEzARBgNVBAcMCkJlZG1pbnN0ZXIxEjAQBgNV +BAoMCU9wZW5FQ09NUDETMBEGA1UECwwKc2ltcGxlZGVtbzEqMCgGA1UEAwwhT3Bl +bkVDT01QIHNpbXBsZWRlbW8gU2VydmVyIENBIFgxMScwJQYJKoZIhvcNAQkBFhhz +aW1wbGVkZW1vQG9wZW5lY29tcC5vcmcwHhcNMTYxMTMwMTUzODM5WhcNMTcxMTMw +MTUzODM5WjCBuTELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAk5KMRMwEQYDVQQHDApC +ZWRtaW5zdGVyMRIwEAYDVQQKDAlPcGVuRUNPTVAxEzARBgNVBAsMClNpbXBsZURl +bW8xKTAnBgNVBAMMIGFhaS5hcGkuc2ltcGxlZGVtby5vcGVuZWNvbXAub3JnMTQw +MgYJKoZIhvcNAQkBFiVhYWktaG9zdEBhcGkuc2ltcGxlZGVtby5vcGVuZWNvbXAu +b3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwQrQl8A0rT0Jjlos +Mr/7LEhT5UOif4GGPOk+3NCIxT3lOqAbUf+d9ZXyT2jWFRiKWua03vQ+Dxc8c2h2 +RRuH8LwEiOiWqPjWRxNqsARzZMI3ryHFCFBZh0FcpjH9kEeKVlLDYuV68k+ZucKd +NiqUNn61lD7kbmEGwvzKwf91FrJ09+CBMx1OnWKm3gCNKDqAEFMZCOdn2MgesJYB +/03lzPBS1jDfBXImXRcTBzpgA+wdCLn0cIQ1eLWUwS5tUqUJNh36nHdVyJ0P2Yjd +JLuxhFcmBKOz1ShyyO+BBtKBO8EGbU6qKflOiwOw0Fsn8LjKcrHQ58NPui5y04BU +Rypf3QIDAQABo4GdMIGaMAwGA1UdEwEB/wQCMAAwDgYDVR0PAQH/BAQDAgO4MB0G +A1UdDgQWBBQyMUOsE2J+CKzK0qd8KFBD2gaWyjBbBgNVHSAEVDBSMFAGBFUdIAAw +SDBGBggrBgEFBQcCAjA6GjhLZWVwIGF3YXkgZnJvbSBjaGlsZHJlbi4gIFRoaXMg +Y2VydGlmaWNhdGUgaXMgbm90IGEgdG95LjANBgkqhkiG9w0BAQsFAAOCAQEAnkoy +2tWJOyyyIQwtVojUxv1GWQPnw3WCUcKpuX4CJhHXLxNErW1fBg7bmo08BNmBPPpq +WrJsy5lbBgUo9kgpViux5Stfy1rRIRsRLfl/icgCvJmUAxkmRCZL7yUvwG4K7s+8 +DwT+nW/XuWNP6Hd/qHccexB6COJ8KwvTdVoxAkCdX8qw4MCb/f7Kb1yle/vwBM5Q +UUONCJ4bEns1vnb9DGlNDUJNwCfwORAaVJpVS38Mv4UnSTmb2KMePtCWcx/dNsYR +2XrSGqLDnTvHwOpyhbfFTmackysGoSuDytORXy8YbwEiF13BwEK8i3rgNN0Z2ojf +cpmE2xxmaa+A2uuN6g== +-----END CERTIFICATE----- +Bag Attributes + friendlyName: root + 2.16.840.1.113894.746875.1.1: <Unsupported tag 6> +subject=/C=US/ST=NJ/L=Bedminster/O=OpenECOMP/OU=simpledemo/CN=OpenECOMP simpledemo Server CA X1/emailAddress=simpledemo@openecomp.org +issuer=/C=US/ST=NJ/L=Bedminster/O=OpenECOMP/OU=simpledemo/CN=OpenECOMP simpledemo Root Certification Authority/emailAddress=simpledemo@openecomp.org +-----BEGIN CERTIFICATE----- +MIIFpTCCA42gAwIBAgIJAJqx8dKnCZZoMA0GCSqGSIb3DQEBCwUAMIG9MQswCQYD +VQQGEwJVUzELMAkGA1UECAwCTkoxEzARBgNVBAcMCkJlZG1pbnN0ZXIxEjAQBgNV +BAoMCU9wZW5FQ09NUDETMBEGA1UECwwKc2ltcGxlZGVtbzE6MDgGA1UEAwwxT3Bl +bkVDT01QIHNpbXBsZWRlbW8gUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEn +MCUGCSqGSIb3DQEJARYYc2ltcGxlZGVtb0BvcGVuZWNvbXAub3JnMB4XDTE2MTEy +ODIxMTQyNloXDTIxMTEyNzIxMTQyNlowga0xCzAJBgNVBAYTAlVTMQswCQYDVQQI +DAJOSjETMBEGA1UEBwwKQmVkbWluc3RlcjESMBAGA1UECgwJT3BlbkVDT01QMRMw +EQYDVQQLDApzaW1wbGVkZW1vMSowKAYDVQQDDCFPcGVuRUNPTVAgc2ltcGxlZGVt +byBTZXJ2ZXIgQ0EgWDExJzAlBgkqhkiG9w0BCQEWGHNpbXBsZWRlbW9Ab3BlbmVj +b21wLm9yZzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALr4rivKQuRk +YNf5Ig40e1nqj6s6LB1vgMOYbKfRziOFpPcUpsHPOhusHowiUsrU1vdFSzPz6Ej7 +PjlmNSg2Qka8YCn9kd6QgM7U0KcPJvIucBp+qjifH3EvP0jgDPhDeVRYxzV454dv +5kQ9uCpswJP7YAnX51dkWeH8nwPUoagt31bOl9LXENSrgxEThxdLYMJnQJWk2CmV +otXM4tT1dxyJxFUrZ6uJCEAYw5VtlplqihHf8lHy+sWQavtsLz/4dc+sGeXSTfoI +voKvoh3uZ5gEhGV8yfJxk1veX5y5/AxP80vQ+smWYjTnQL5QQ57y4bciez4XVBmQ +SWimWtOi4e8CAwEAAaOBtTCBsjAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQE +AwIBhjAdBgNVHQ4EFgQUTqdsYgGNGubdJHq9tsaJhM9HE5wwcAYDVR0gBGkwZzBl +BgRVHSAAMF0wWwYIKwYBBQUHAgIwTxpNSWYgeW91IHRydXN0IHRoaXMgY2VydCB0 +aGVuIHdlIGhhdmUgYSBicmlkZ2UgdGhhdCB5b3UgbWlnaHQgYmUgaW50ZXJlc3Rl +ZCBpbi4wDQYJKoZIhvcNAQELBQADggIBAKNNlRqFuE/JgV1BHyYK0xoSXH4aZP/7 +IoHtDVcSaZAOOuFOUrwVMUbzRBebbb6RpFwt/X+NLFUGysd+XNLF7W7lzxKtmFNX +n4OpNkBe0y5O7yurus8rERHzu3jiOSgVo+WzDlGpYSRnG3hI2qPWqD+Puzx/WwI8 +XUTuzEQQ3gUSyVFfXHpay3VpYmLZiLJ9WKY5SDw7Ie6Sxrju4Qm1HwnFY8wHZGcs +2KMQzorJ1ZNQf523yUTghbT0rKaSFaD8zugPtI2ONfFG/QgrkQXo78opzPsHnHwa +SxGSiAgeLbwAUCvPNl27zr6k6+7TcNjV0VUivAs0OG3VEAdgi7UWYB+30KfWwHwE +zGmvd4IAGqIqlqLcSVArN5z8JK1B5nfjQn5UrclU1vK+dnuiKE2X4rKuBTRYRFR/ +km+mj4koYFPKFHndmJl1uv2OCJK9l5CSIuKWeI1qv8BASKqgNdoT/SKBXqxgYlCb +o+j4IDjxrxChRO+e5vl9lA7INfRrbljCkUjfLRa+v2q9tWQ3+EQUwwnSrSfihh2T +j0Tksr6b8dDsvMlCdOKG1B+JPcEXORSFKNXVTEfjqpJG8s16kFAocWt3S6xO0k1t +qbQp+3tWQgW2TGnX0rMZzB6NGRNfWhlYmq2zHgXkiCIZ26Ztgt/LNbwEvN3+VlLo +z/Rd+SKtlrfb +-----END CERTIFICATE----- diff --git a/test/csit/tests/aai/resources/suite1/aai.key b/test/csit/tests/aai/resources/suite1/aai.key new file mode 100644 index 000000000..02724df46 --- /dev/null +++ b/test/csit/tests/aai/resources/suite1/aai.key @@ -0,0 +1,32 @@ +Bag Attributes + friendlyName: aaiopenecomp + localKeyID: 54 69 6D 65 20 31 35 30 34 38 33 32 34 34 33 32 39 32 +Key Attributes: <No Attributes> +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDBCtCXwDStPQmO +Wiwyv/ssSFPlQ6J/gYY86T7c0IjFPeU6oBtR/531lfJPaNYVGIpa5rTe9D4PFzxz +aHZFG4fwvASI6Jao+NZHE2qwBHNkwjevIcUIUFmHQVymMf2QR4pWUsNi5XryT5m5 +wp02KpQ2frWUPuRuYQbC/MrB/3UWsnT34IEzHU6dYqbeAI0oOoAQUxkI52fYyB6w +lgH/TeXM8FLWMN8FciZdFxMHOmAD7B0IufRwhDV4tZTBLm1SpQk2Hfqcd1XInQ/Z +iN0ku7GEVyYEo7PVKHLI74EG0oE7wQZtTqop+U6LA7DQWyfwuMpysdDnw0+6LnLT +gFRHKl/dAgMBAAECggEBAJko2HkeIW01mUhdWOXnFgR7WjzzXZEmlffr41lVBr7f +rejGsQZs9cms73R7rCdOsi8PDoA6bqaQfADg571K659fvYVWbHqh+3im+iWvUlKm +GYIVG/vNrEq43CZsUU7Qw/xba/QiOFraNxCATTV1sORPwgddouXEi5XW9ZPX9/FJ +wORx4L/K0DfHX1rr+rtOoHCJdZYhn3Ij87kmR8Mwg0fNeWhHqtxUEyM/itRjCvOe +mgt2V8DORhmq12L4+5QJctBrkBVRp9Rh6YSZZBGnKbTSgf4q648BdkJDLSK4cguT +D6BAw3gxj5V4wt5W0wn2JpjadFwnixrTzvMP/yAqfK0CgYEA93nBAoUPw8nzQkwk +8iWBjfJ999Rw92hnnvk3xbcQcGfgUYuB4dxwe6FQTmFIVylt81er1YUvMb3ao7fo +5ZcGnI5p1idjsd27kbZJLxb5Oh919hKu5IfkfYsVgnC0UdKCTgH5CaH0U4ATuXwt +RL6qm0XcLALs5y2OO6z3s+mYhisCgYEAx7EQ8MA45bkXnRQiHBhGcIIcr2sRDfVJ +OhHmGxx3EcYgtsIYKTqtQOyIt/nQxo6iyNL9bzfzBTybFJLuj63ZG1Ef4LosJedl +eAU2NsKv5MlKYDSdNbLAJ0Op9I2Xu/pXQecPwY/3MkIQArdQCLevMLEGywCsuJTn +BjkJNDkb9hcCgYAhoFiaiAwJVYKJSqFmibQd3opBR4uGApi54DE021gPff3b9rHS +R8q88cFgtRVISqfW/d2qaKtt/dcckdvCfo/2a99zqux/+ZoIBZXSITQCMs4rfoRn +JxPj/ycQD1JhH9J22QvGxEvXoLqNZJMeGS5DZO2yyT75dpYyA6Gwv5fq+wKBgQC5 +AhV917lfLELyZurLOLpaFlHZO8rLMcusH1UfHRo7v2IjsGOOHyzRD9QDD1IcA55R +jRj8Z8uhuGq9fvvC5gBVTK3KGPI6E85wifOWfH1V7CAaTeSxEXDxb8EQL/a6U89v +4VE5tdYCHC6VNZzS1staw0hV38QmJt57Z3Bdj+OV9QKBgE/b9fxpo+SVQ37BzNNY +SEKTTijaddz8fdomApg6a2eFJL93Ej/op7N7gnHtPWMivPnRRza9ZjfnG+aZ7n2J +sWyBiZK9xliS2TsF3l3q9Z0Vaq3i1nOlV7Bd20ZS8KjQjDtKnIRfLkQDkvmXbU5L +emwkdsQZbpPFJch3mCGtI7JW +-----END PRIVATE KEY----- diff --git a/test/csit/tests/aai/resources/suite1/pserver.robot b/test/csit/tests/aai/resources/suite1/pserver.robot new file mode 100644 index 000000000..55e57bccb --- /dev/null +++ b/test/csit/tests/aai/resources/suite1/pserver.robot @@ -0,0 +1,65 @@ +*** Settings *** +Library OperatingSystem +Library RequestsLibrary +Library requests +Library Collections + +*** Variables *** +${TARGETURL} https://${HOST_IP}:8443/aai/v11/cloud-infrastructure/pservers/pserver/pserver-test1 +${PSERVERDATA} {"hostname": "pserver-test1"} + +*** Test Cases *** + +Run AAI Put Pserver + [Documentation] Create an pserver object + ${resp}= PutWithCert ${TARGETURL} ${PSERVERDATA} + log ${TARGETURL} + log ${resp.text} + Should Be Equal As Strings ${resp.status_code} 201 + +Run AAI Get Pserver + [Documentation] Get the pserver object just created + ${resp} GetWithCert ${TARGETURL} + log ${resp} + log ${resp.json()} + Should Be Equal As Strings ${resp.status_code} 200 + ${resource_version}= Evaluate $resp.json().get('resource-version') + Set Global Variable ${resource_version} + +Run AAI Delete Pserver + [Documentation] Delete the pserver just created + ${resp}= DeleteWithCert ${TARGETURL}?resource-version=${resource_version} + log ${resp.text} + Should Be Equal As Strings ${resp.status_code} 204 + +*** Keywords *** +PutWithCert + [Arguments] ${url} ${data} + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=integration-aai X-FromAppId=integration-aai Authorization=Basic QUFJOkFBSQ== + ${certinfo}= Evaluate ('${CURDIR}/aai.crt', '${CURDIR}/aai.key') + ${resp}= Evaluate requests.put('${url}', data='${data}', headers=${headers}, cert=${certinfo}, verify=False) requests + [return] ${resp} + +PostWithCert + [Arguments] ${url} ${data} + ${auth}= Create List AAI AAI + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=integration-aai X-FromAppId=integration-aai Authorization=Basic QUFJOkFBSQ== + ${certinfo}= Evaluate ('${CURDIR}/aai.crt', '${CURDIR}/aai.key') + ${resp}= Evaluate requests.post('${url}', data='${data}', headers=${headers}, cert=${certinfo}, verify=False) requests + [return] ${resp} + +GetWithCert + [Arguments] ${url} + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=integration-aai X-FromAppId=integration-aai Authorization=Basic QUFJOkFBSQ== + ${certinfo}= Evaluate ('${CURDIR}/aai.crt', '${CURDIR}/aai.key') + ${resp}= Evaluate requests.get('${url}', headers=${headers}, cert=${certinfo}, verify=False) requests + [return] ${resp} + +DeleteWithCert + [Arguments] ${url} + ${auth}= Create List AAI AAI + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=integration-aai X-FromAppId=integration-aai Authorization=Basic QUFJOkFBSQ== + ${certinfo}= Evaluate ('${CURDIR}/aai.crt', '${CURDIR}/aai.key') + ${resp}= Evaluate requests.delete('${url}', headers=${headers}, cert=${certinfo}, verify=False) requests + [return] ${resp} + diff --git a/test/csit/tests/aai/resources/suite2/__init__.robot b/test/csit/tests/aai/resources/suite2/__init__.robot new file mode 100644 index 000000000..de8f659d7 --- /dev/null +++ b/test/csit/tests/aai/resources/suite2/__init__.robot @@ -0,0 +1,2 @@ +*** Settings *** +Documentation Resources - complex Suite diff --git a/test/csit/tests/aai/resources/suite2/aai.crt b/test/csit/tests/aai/resources/suite2/aai.crt new file mode 100644 index 000000000..6a28bbb8c --- /dev/null +++ b/test/csit/tests/aai/resources/suite2/aai.crt @@ -0,0 +1,70 @@ +Bag Attributes + friendlyName: aaiopenecomp + localKeyID: 54 69 6D 65 20 31 35 30 34 38 33 32 34 34 33 32 39 32 +subject=/C=US/ST=NJ/L=Bedminster/O=OpenECOMP/OU=SimpleDemo/CN=aai.api.simpledemo.openecomp.org/emailAddress=aai-host@api.simpledemo.openecomp.org +issuer=/C=US/ST=NJ/L=Bedminster/O=OpenECOMP/OU=simpledemo/CN=OpenECOMP simpledemo Server CA X1/emailAddress=simpledemo@openecomp.org +-----BEGIN CERTIFICATE----- +MIIEiTCCA3GgAwIBAgIJAIPKfDLcn3MpMA0GCSqGSIb3DQEBCwUAMIGtMQswCQYD +VQQGEwJVUzELMAkGA1UECAwCTkoxEzARBgNVBAcMCkJlZG1pbnN0ZXIxEjAQBgNV +BAoMCU9wZW5FQ09NUDETMBEGA1UECwwKc2ltcGxlZGVtbzEqMCgGA1UEAwwhT3Bl +bkVDT01QIHNpbXBsZWRlbW8gU2VydmVyIENBIFgxMScwJQYJKoZIhvcNAQkBFhhz +aW1wbGVkZW1vQG9wZW5lY29tcC5vcmcwHhcNMTYxMTMwMTUzODM5WhcNMTcxMTMw +MTUzODM5WjCBuTELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAk5KMRMwEQYDVQQHDApC +ZWRtaW5zdGVyMRIwEAYDVQQKDAlPcGVuRUNPTVAxEzARBgNVBAsMClNpbXBsZURl +bW8xKTAnBgNVBAMMIGFhaS5hcGkuc2ltcGxlZGVtby5vcGVuZWNvbXAub3JnMTQw +MgYJKoZIhvcNAQkBFiVhYWktaG9zdEBhcGkuc2ltcGxlZGVtby5vcGVuZWNvbXAu +b3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwQrQl8A0rT0Jjlos +Mr/7LEhT5UOif4GGPOk+3NCIxT3lOqAbUf+d9ZXyT2jWFRiKWua03vQ+Dxc8c2h2 +RRuH8LwEiOiWqPjWRxNqsARzZMI3ryHFCFBZh0FcpjH9kEeKVlLDYuV68k+ZucKd +NiqUNn61lD7kbmEGwvzKwf91FrJ09+CBMx1OnWKm3gCNKDqAEFMZCOdn2MgesJYB +/03lzPBS1jDfBXImXRcTBzpgA+wdCLn0cIQ1eLWUwS5tUqUJNh36nHdVyJ0P2Yjd +JLuxhFcmBKOz1ShyyO+BBtKBO8EGbU6qKflOiwOw0Fsn8LjKcrHQ58NPui5y04BU +Rypf3QIDAQABo4GdMIGaMAwGA1UdEwEB/wQCMAAwDgYDVR0PAQH/BAQDAgO4MB0G +A1UdDgQWBBQyMUOsE2J+CKzK0qd8KFBD2gaWyjBbBgNVHSAEVDBSMFAGBFUdIAAw +SDBGBggrBgEFBQcCAjA6GjhLZWVwIGF3YXkgZnJvbSBjaGlsZHJlbi4gIFRoaXMg +Y2VydGlmaWNhdGUgaXMgbm90IGEgdG95LjANBgkqhkiG9w0BAQsFAAOCAQEAnkoy +2tWJOyyyIQwtVojUxv1GWQPnw3WCUcKpuX4CJhHXLxNErW1fBg7bmo08BNmBPPpq +WrJsy5lbBgUo9kgpViux5Stfy1rRIRsRLfl/icgCvJmUAxkmRCZL7yUvwG4K7s+8 +DwT+nW/XuWNP6Hd/qHccexB6COJ8KwvTdVoxAkCdX8qw4MCb/f7Kb1yle/vwBM5Q +UUONCJ4bEns1vnb9DGlNDUJNwCfwORAaVJpVS38Mv4UnSTmb2KMePtCWcx/dNsYR +2XrSGqLDnTvHwOpyhbfFTmackysGoSuDytORXy8YbwEiF13BwEK8i3rgNN0Z2ojf +cpmE2xxmaa+A2uuN6g== +-----END CERTIFICATE----- +Bag Attributes + friendlyName: root + 2.16.840.1.113894.746875.1.1: <Unsupported tag 6> +subject=/C=US/ST=NJ/L=Bedminster/O=OpenECOMP/OU=simpledemo/CN=OpenECOMP simpledemo Server CA X1/emailAddress=simpledemo@openecomp.org +issuer=/C=US/ST=NJ/L=Bedminster/O=OpenECOMP/OU=simpledemo/CN=OpenECOMP simpledemo Root Certification Authority/emailAddress=simpledemo@openecomp.org +-----BEGIN CERTIFICATE----- +MIIFpTCCA42gAwIBAgIJAJqx8dKnCZZoMA0GCSqGSIb3DQEBCwUAMIG9MQswCQYD +VQQGEwJVUzELMAkGA1UECAwCTkoxEzARBgNVBAcMCkJlZG1pbnN0ZXIxEjAQBgNV +BAoMCU9wZW5FQ09NUDETMBEGA1UECwwKc2ltcGxlZGVtbzE6MDgGA1UEAwwxT3Bl +bkVDT01QIHNpbXBsZWRlbW8gUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEn +MCUGCSqGSIb3DQEJARYYc2ltcGxlZGVtb0BvcGVuZWNvbXAub3JnMB4XDTE2MTEy +ODIxMTQyNloXDTIxMTEyNzIxMTQyNlowga0xCzAJBgNVBAYTAlVTMQswCQYDVQQI +DAJOSjETMBEGA1UEBwwKQmVkbWluc3RlcjESMBAGA1UECgwJT3BlbkVDT01QMRMw +EQYDVQQLDApzaW1wbGVkZW1vMSowKAYDVQQDDCFPcGVuRUNPTVAgc2ltcGxlZGVt +byBTZXJ2ZXIgQ0EgWDExJzAlBgkqhkiG9w0BCQEWGHNpbXBsZWRlbW9Ab3BlbmVj +b21wLm9yZzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALr4rivKQuRk +YNf5Ig40e1nqj6s6LB1vgMOYbKfRziOFpPcUpsHPOhusHowiUsrU1vdFSzPz6Ej7 +PjlmNSg2Qka8YCn9kd6QgM7U0KcPJvIucBp+qjifH3EvP0jgDPhDeVRYxzV454dv +5kQ9uCpswJP7YAnX51dkWeH8nwPUoagt31bOl9LXENSrgxEThxdLYMJnQJWk2CmV +otXM4tT1dxyJxFUrZ6uJCEAYw5VtlplqihHf8lHy+sWQavtsLz/4dc+sGeXSTfoI +voKvoh3uZ5gEhGV8yfJxk1veX5y5/AxP80vQ+smWYjTnQL5QQ57y4bciez4XVBmQ +SWimWtOi4e8CAwEAAaOBtTCBsjAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQE +AwIBhjAdBgNVHQ4EFgQUTqdsYgGNGubdJHq9tsaJhM9HE5wwcAYDVR0gBGkwZzBl +BgRVHSAAMF0wWwYIKwYBBQUHAgIwTxpNSWYgeW91IHRydXN0IHRoaXMgY2VydCB0 +aGVuIHdlIGhhdmUgYSBicmlkZ2UgdGhhdCB5b3UgbWlnaHQgYmUgaW50ZXJlc3Rl +ZCBpbi4wDQYJKoZIhvcNAQELBQADggIBAKNNlRqFuE/JgV1BHyYK0xoSXH4aZP/7 +IoHtDVcSaZAOOuFOUrwVMUbzRBebbb6RpFwt/X+NLFUGysd+XNLF7W7lzxKtmFNX +n4OpNkBe0y5O7yurus8rERHzu3jiOSgVo+WzDlGpYSRnG3hI2qPWqD+Puzx/WwI8 +XUTuzEQQ3gUSyVFfXHpay3VpYmLZiLJ9WKY5SDw7Ie6Sxrju4Qm1HwnFY8wHZGcs +2KMQzorJ1ZNQf523yUTghbT0rKaSFaD8zugPtI2ONfFG/QgrkQXo78opzPsHnHwa +SxGSiAgeLbwAUCvPNl27zr6k6+7TcNjV0VUivAs0OG3VEAdgi7UWYB+30KfWwHwE +zGmvd4IAGqIqlqLcSVArN5z8JK1B5nfjQn5UrclU1vK+dnuiKE2X4rKuBTRYRFR/ +km+mj4koYFPKFHndmJl1uv2OCJK9l5CSIuKWeI1qv8BASKqgNdoT/SKBXqxgYlCb +o+j4IDjxrxChRO+e5vl9lA7INfRrbljCkUjfLRa+v2q9tWQ3+EQUwwnSrSfihh2T +j0Tksr6b8dDsvMlCdOKG1B+JPcEXORSFKNXVTEfjqpJG8s16kFAocWt3S6xO0k1t +qbQp+3tWQgW2TGnX0rMZzB6NGRNfWhlYmq2zHgXkiCIZ26Ztgt/LNbwEvN3+VlLo +z/Rd+SKtlrfb +-----END CERTIFICATE----- diff --git a/test/csit/tests/aai/resources/suite2/aai.key b/test/csit/tests/aai/resources/suite2/aai.key new file mode 100644 index 000000000..02724df46 --- /dev/null +++ b/test/csit/tests/aai/resources/suite2/aai.key @@ -0,0 +1,32 @@ +Bag Attributes + friendlyName: aaiopenecomp + localKeyID: 54 69 6D 65 20 31 35 30 34 38 33 32 34 34 33 32 39 32 +Key Attributes: <No Attributes> +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDBCtCXwDStPQmO +Wiwyv/ssSFPlQ6J/gYY86T7c0IjFPeU6oBtR/531lfJPaNYVGIpa5rTe9D4PFzxz +aHZFG4fwvASI6Jao+NZHE2qwBHNkwjevIcUIUFmHQVymMf2QR4pWUsNi5XryT5m5 +wp02KpQ2frWUPuRuYQbC/MrB/3UWsnT34IEzHU6dYqbeAI0oOoAQUxkI52fYyB6w +lgH/TeXM8FLWMN8FciZdFxMHOmAD7B0IufRwhDV4tZTBLm1SpQk2Hfqcd1XInQ/Z +iN0ku7GEVyYEo7PVKHLI74EG0oE7wQZtTqop+U6LA7DQWyfwuMpysdDnw0+6LnLT +gFRHKl/dAgMBAAECggEBAJko2HkeIW01mUhdWOXnFgR7WjzzXZEmlffr41lVBr7f +rejGsQZs9cms73R7rCdOsi8PDoA6bqaQfADg571K659fvYVWbHqh+3im+iWvUlKm +GYIVG/vNrEq43CZsUU7Qw/xba/QiOFraNxCATTV1sORPwgddouXEi5XW9ZPX9/FJ +wORx4L/K0DfHX1rr+rtOoHCJdZYhn3Ij87kmR8Mwg0fNeWhHqtxUEyM/itRjCvOe +mgt2V8DORhmq12L4+5QJctBrkBVRp9Rh6YSZZBGnKbTSgf4q648BdkJDLSK4cguT +D6BAw3gxj5V4wt5W0wn2JpjadFwnixrTzvMP/yAqfK0CgYEA93nBAoUPw8nzQkwk +8iWBjfJ999Rw92hnnvk3xbcQcGfgUYuB4dxwe6FQTmFIVylt81er1YUvMb3ao7fo +5ZcGnI5p1idjsd27kbZJLxb5Oh919hKu5IfkfYsVgnC0UdKCTgH5CaH0U4ATuXwt +RL6qm0XcLALs5y2OO6z3s+mYhisCgYEAx7EQ8MA45bkXnRQiHBhGcIIcr2sRDfVJ +OhHmGxx3EcYgtsIYKTqtQOyIt/nQxo6iyNL9bzfzBTybFJLuj63ZG1Ef4LosJedl +eAU2NsKv5MlKYDSdNbLAJ0Op9I2Xu/pXQecPwY/3MkIQArdQCLevMLEGywCsuJTn +BjkJNDkb9hcCgYAhoFiaiAwJVYKJSqFmibQd3opBR4uGApi54DE021gPff3b9rHS +R8q88cFgtRVISqfW/d2qaKtt/dcckdvCfo/2a99zqux/+ZoIBZXSITQCMs4rfoRn +JxPj/ycQD1JhH9J22QvGxEvXoLqNZJMeGS5DZO2yyT75dpYyA6Gwv5fq+wKBgQC5 +AhV917lfLELyZurLOLpaFlHZO8rLMcusH1UfHRo7v2IjsGOOHyzRD9QDD1IcA55R +jRj8Z8uhuGq9fvvC5gBVTK3KGPI6E85wifOWfH1V7CAaTeSxEXDxb8EQL/a6U89v +4VE5tdYCHC6VNZzS1staw0hV38QmJt57Z3Bdj+OV9QKBgE/b9fxpo+SVQ37BzNNY +SEKTTijaddz8fdomApg6a2eFJL93Ej/op7N7gnHtPWMivPnRRza9ZjfnG+aZ7n2J +sWyBiZK9xliS2TsF3l3q9Z0Vaq3i1nOlV7Bd20ZS8KjQjDtKnIRfLkQDkvmXbU5L +emwkdsQZbpPFJch3mCGtI7JW +-----END PRIVATE KEY----- diff --git a/test/csit/tests/aai/resources/suite2/complex.robot b/test/csit/tests/aai/resources/suite2/complex.robot new file mode 100644 index 000000000..3602f731a --- /dev/null +++ b/test/csit/tests/aai/resources/suite2/complex.robot @@ -0,0 +1,72 @@ +*** Settings *** +Library OperatingSystem +Library RequestsLibrary +Library requests +Library Collections + +*** Variables *** +${COMPLEXKEYVALUE} complex-integration-test1 +${COMPLEXURL} https://${HOST_IP}:8443/aai/v11/cloud-infrastructure/complexes/complex/${COMPLEXKEYVALUE} +${COMPLEXDATA} {"physical-location-id":"${COMPLEXKEYVALUE}","data-center-code":"example-data-center-code-val-77883","complex-name":"example-complex-name-val-12992","identity-url":"example-identity-url-val-74366","physical-location-type":"example-physical-location-type-val-32854","street1":"example-street1-val-26496","street2":"example-street2-val-6629","city":"example-city-val-30262","state":"example-state-val-9058","postal-code":"example-postal-code-val-44893","country":"example-country-val-98673","region":"example-region-val-10014","latitude":"example-latitude-val-47555","longitude":"example-longitude-val-76903","elevation":"example-elevation-val-63385","lata":"example-lata-val-90935"} + +*** Test Cases *** + +Run AAI Put complex + [Documentation] Create an complex object + ${resp}= PutWithCert ${COMPLEXURL} ${COMPLEXDATA} + log ${COMPLEXURL} + log ${resp.text} + Should Be Equal As Strings ${resp.status_code} 201 + +Run AAI Get complex + [Documentation] Get the complex object just created + ${resp} GetWithCert ${COMPLEXURL} + log ${resp} + log ${resp.json()} + Should Be Equal As Strings ${resp.status_code} 200 + ${resource_version}= Evaluate $resp.json().get('resource-version') + Set Global Variable ${resource_version} + +Run AAI Delete complex + [Documentation] Delete the complex just created + ${resp}= DeleteWithCert ${COMPLEXURL}?resource-version=${resource_version} + log ${resp.text} + Should Be Equal As Strings ${resp.status_code} 204 + +*** Keywords *** +PutWithCert + [Arguments] ${url} ${data} + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=integration-aai X-FromAppId=integration-aai Authorization=Basic QUFJOkFBSQ== + ${certinfo}= Evaluate ('${CURDIR}/aai.crt', '${CURDIR}/aai.key') + ${resp}= Evaluate requests.put('${url}', data='${data}', headers=${headers}, cert=${certinfo}, verify=False) requests + [return] ${resp} + +PatchWithCert + [Arguments] ${url} ${data} + ${headers}= Create Dictionary Accept=application/json Content-Type=application/merge-patch+json X-TransactionId=integration-aai X-FromAppId=integration-aai Authorization=Basic QUFJOkFBSQ== + ${certinfo}= Evaluate ('${CURDIR}/aai.crt', '${CURDIR}/aai.key') + ${resp}= Evaluate requests.patch('${url}', data='${data}', headers=${headers}, cert=${certinfo}, verify=False) requests + [return] ${resp} + +PostWithCert + [Arguments] ${url} ${data} + ${auth}= Create List AAI AAI + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=integration-aai X-FromAppId=integration-aai Authorization=Basic QUFJOkFBSQ== + ${certinfo}= Evaluate ('${CURDIR}/aai.crt', '${CURDIR}/aai.key') + ${resp}= Evaluate requests.post('${url}', data='${data}', headers=${headers}, cert=${certinfo}, verify=False) requests + [return] ${resp} + +GetWithCert + [Arguments] ${url} + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=integration-aai X-FromAppId=integration-aai Authorization=Basic QUFJOkFBSQ== + ${certinfo}= Evaluate ('${CURDIR}/aai.crt', '${CURDIR}/aai.key') + ${resp}= Evaluate requests.get('${url}', headers=${headers}, cert=${certinfo}, verify=False) requests + [return] ${resp} + +DeleteWithCert + [Arguments] ${url} + ${auth}= Create List AAI AAI + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=integration-aai X-FromAppId=integration-aai Authorization=Basic QUFJOkFBSQ== + ${certinfo}= Evaluate ('${CURDIR}/aai.crt', '${CURDIR}/aai.key') + ${resp}= Evaluate requests.delete('${url}', headers=${headers}, cert=${certinfo}, verify=False) requests + [return] ${resp}
\ No newline at end of file diff --git a/test/csit/tests/appc/healthcheck/test1.robot b/test/csit/tests/appc/healthcheck/test1.robot index 05eee5b84..8bd49860b 100644 --- a/test/csit/tests/appc/healthcheck/test1.robot +++ b/test/csit/tests/appc/healthcheck/test1.robot @@ -6,6 +6,7 @@ Library Process ${bundle_query} ${SCRIPTS}/bundle_query.sh ${health_check} ${SCRIPTS}/health_check.sh +${db_query} ${SCRIPTS}/db_query.sh *** Test Cases *** @@ -19,4 +20,8 @@ Query bundle test case for APPC ${result_bq}= Run Process bash ${bundle_query} > log_bq.txt shell=yes Should Be Equal As Integers ${result_bq.rc} 0 +Query database test case for APPC + [Documentation] Query database + ${result_db}= Run Process bash ${db_query} > log_db.txt shell=yes + Should Be Equal As Integers ${result_db.rc} 0 diff --git a/test/csit/tests/appc/testsuite/APPC_Netstat.robot b/test/csit/tests/appc/testsuite/APPC_Netstat.robot new file mode 100644 index 000000000..5544fb565 --- /dev/null +++ b/test/csit/tests/appc/testsuite/APPC_Netstat.robot @@ -0,0 +1,19 @@ +*** Settings *** +Library SSHLibrary +Library OperatingSystem +*** Variables *** +${HOST} 104.130.138.49 +${USERNAME} test +${private_key} H:\\TestSuite\\testsuite\\robot\\testsuites +*** Test Cases *** +APPC Netstat + Open Connection ${HOST} + ${password}= Get File ${private_key} + Login ${USERNAME} ${password} + log to console \nConnected Successfully + ${cmd} = set variable netstat -a | grep -E '8443 | grep LISTEN + execute command ${cmd} + +Tear Down + [Documentation] Close all connections + Close All connections
\ No newline at end of file diff --git a/test/csit/tests/appc/testsuite/LCM_HEALTHCHECK.robot b/test/csit/tests/appc/testsuite/LCM_HEALTHCHECK.robot new file mode 100644 index 000000000..c3594ef2e --- /dev/null +++ b/test/csit/tests/appc/testsuite/LCM_HEALTHCHECK.robot @@ -0,0 +1,33 @@ +*** Settings *** +Library Selenium2Library +Library OperatingSystem + +*** Variable *** +${ResponseCode} +${var} +${RequestJSON} C:\\RobotSampleForLearning\\LearningSamples\\Resources\\Healthchk.json + + +*** Test Cases *** + +APPC LCM Health check + [Documentation] APPC HealthCheck + Open Browser http://admin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U@104.130.138.49:8282/apidoc/explorer/index.html chrome + Click Element xpath=.//p[contains(text(),'If you have reason to expect the website is safe, select the I Accept the Risk button to continue.')]//following::img + + Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a + Click Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a + + wait until page contains element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')] + Click Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')] + + ${HealthChk}= Get File ${RequestJSON} + wait until page contains element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')]//following::table + Input Text xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')]//following::table//tbody/tr/td[2]/textarea ${HealthChk} + + wait until page contains element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')]//following::form/div[2]/input[1] + Click Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')]//following::form/div[2]/input[1] + +Tear Down + [Documentation] Close all browsers + Close All Browsers
\ No newline at end of file diff --git a/test/csit/tests/appc/testsuite/LCM_VM_RESTART.robot b/test/csit/tests/appc/testsuite/LCM_VM_RESTART.robot new file mode 100644 index 000000000..997ba17a0 --- /dev/null +++ b/test/csit/tests/appc/testsuite/LCM_VM_RESTART.robot @@ -0,0 +1,31 @@ +*** Settings *** +Library Selenium2Library +Library OperatingSystem + +*** Variable *** +${ResponseCode} +${var} +${RequestJSON} /LearningSamples/Resources/VMRestart.json + + +*** Test Cases *** + +APPC API VM RESTART + [Documentation] APPC VM LCM Restart + Open Browser http://admin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U@104.130.138.49:8282/apidoc/explorer/index.html chrome + Click Element xpath=.//p[contains(text(),'If you have reason to expect the website is safe, select the I Accept the Risk button to continue.')]//following::img + Click Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a + Click Element xpath=//*[@id="appc-provider-lcm(2016-01-08)_restart_post_23"]/div[1]/h3/span[2]/a + ${VM_LCM_RESTART} Get File ${RequestJSON} + Input Text xpath=//*[@id="appc-provider-lcm(2016-01-08)_restart_post_23_content"]/form/table/tbody/tr/td[2]/textarea ${VM_LCM_RESTART} + Click Element xpath=//*[@id="appc-provider-lcm(2016-01-08)_restart_post_23_content"]/form/div[2]/input + # Get Text locator + ${ResponseCode} Get Text xpath=//*[@id="appc-provider-lcm(2016-01-08)_restart_post_23_content"]/div[2]/h4[contains(text(),'Response Code')]//following::div//pre + ${var} Get Value xpath=//*[@id="appc-provider-lcm(2016-01-08)_restart_post_23_content"]/div[2]/h4[contains(text(),'Response Code')]//following::div//pre + Log Value--> ${ResponseCode} + Log var--> ${var} + Element Text Should Be xpath=//*[@id="appc-provider-lcm(2016-01-08)_restart_post_23_content"]/div[2]/h4[contains(text(),'Response Code')]//following::div//pre 400 expected + +Tear Down + [Documentation] Close all browsers + Close All Browsers
\ No newline at end of file diff --git a/test/csit/tests/appc/testsuite/LCM_VNF_RESTART.robot b/test/csit/tests/appc/testsuite/LCM_VNF_RESTART.robot new file mode 100644 index 000000000..1bb2c13eb --- /dev/null +++ b/test/csit/tests/appc/testsuite/LCM_VNF_RESTART.robot @@ -0,0 +1,45 @@ +*** Settings *** +Library Selenium2Library +Library OperatingSystem + +*** Variable *** +${ResponseCode} +${var} +${RequestJSON} C:\\RobotSampleForLearning\\LearningSamples\\Resources\\VNFRestart.json + + +*** Test Cases *** + +APPC API VM RESTART + [Documentation] APPC VM LCM Restart + Open Browser http://admin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U@104.130.138.49:8282/apidoc/explorer/index.html chrome + Click Element xpath=.//p[contains(text(),'If you have reason to expect the website is safe, select the I Accept the Risk button to continue.')]//following::img + + Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a + Click Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a + + + Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')] + Click Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')] + + + ${VNF_LCM_RESTART}= Get File ${RequestJSON} + Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::table + + Input Text xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::table//tbody/tr/td[2]/textarea ${VNF_LCM_RESTART} + + # Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]/form/div[2]/input + Click Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::form/div[2]/input[1] + + # Get Text locator + ${ResponseCode} Get Text xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[contains(text(),'Response Code')][1]//following-sibling::div//pre + + # //*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[contains(text(),'Response Code')]//following-sibling::div//pre + ${var} Get Value xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[contains(text(),'Response Code')][1]//following-sibling::div//pre + Log Value--> ${ResponseCode} + Log var--> ${var} + Element Text Should Be xpath=//*[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[text()='Response Code'][1]//following-sibling::div//pre[1] 200 expected + +Tear Down + [Documentation] Close all browsers + Close All Browsers
\ No newline at end of file diff --git a/test/csit/tests/clamp/TCA/test1.robot b/test/csit/tests/clamp/TCA/01__TCA.robot index b1fb0f440..45f20f248 100644 --- a/test/csit/tests/clamp/TCA/test1.robot +++ b/test/csit/tests/clamp/TCA/01__TCA.robot @@ -3,7 +3,6 @@ Library Collections Library RequestsLibrary Library OperatingSystem Library json -Library HttpLibrary.HTTP *** Test Cases *** diff --git a/test/csit/tests/clamp/TCA/data/createTemplate1.json b/test/csit/tests/clamp/TCA/data/createTemplate1.json index 0b08d5881..b6363ef9e 100644 --- a/test/csit/tests/clamp/TCA/data/createTemplate1.json +++ b/test/csit/tests/clamp/TCA/data/createTemplate1.json @@ -2,6 +2,6 @@ "name": "template1", "controlNamePrefix": "ClosedLoop-", "bpmnText": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><bpmn:definitions xmlns:bpmn=\"http://www.omg.org/spec/BPMN/20100524/MODEL\" xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\" xmlns:di=\"http://www.omg.org/spec/DD/20100524/DI\" xmlns:dc=\"http://www.omg.org/spec/DD/20100524/DC\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" id=\"Definitions_1\" targetNamespace=\"http://bpmn.io/schema/bpmn\"> <bpmn:process id=\"Process_1\" isExecutable=\"false\"> <bpmn:startEvent id=\"StartEvent_1\"> <bpmn:outgoing>SequenceFlow_0wokvsg</bpmn:outgoing> </bpmn:startEvent> <bpmn:collector id=\"Collector_04kan6k\"> <bpmn:incoming>SequenceFlow_0wokvsg</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0w8129u</bpmn:outgoing> </bpmn:collector> <bpmn:tCA id=\"TCA_0laok3g\"> <bpmn:incoming>SequenceFlow_0w8129u</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0bdkahu</bpmn:outgoing> </bpmn:tCA> <bpmn:policy id=\"Policy_1u1q61z\"> <bpmn:incoming>SequenceFlow_0bdkahu</bpmn:incoming> <bpmn:outgoing>SequenceFlow_039geog</bpmn:outgoing> </bpmn:policy> <bpmn:endEvent id=\"EndEvent_1jhpt6o\"> <bpmn:incoming>SequenceFlow_039geog</bpmn:incoming> </bpmn:endEvent> <bpmn:sequenceFlow id=\"SequenceFlow_0wokvsg\" sourceRef=\"StartEvent_1\" targetRef=\"Collector_04kan6k\" /> <bpmn:sequenceFlow id=\"SequenceFlow_0w8129u\" sourceRef=\"Collector_04kan6k\" targetRef=\"TCA_0laok3g\" /> <bpmn:sequenceFlow id=\"SequenceFlow_0bdkahu\" sourceRef=\"TCA_0laok3g\" targetRef=\"Policy_1u1q61z\" /> <bpmn:sequenceFlow id=\"SequenceFlow_039geog\" sourceRef=\"Policy_1u1q61z\" targetRef=\"EndEvent_1jhpt6o\" /> </bpmn:process> <bpmndi:BPMNDiagram id=\"BPMNDiagram_1\"> <bpmndi:BPMNPlane id=\"BPMNPlane_1\" bpmnElement=\"Process_1\"> <bpmndi:BPMNShape id=\"_BPMNShape_StartEvent_2\" bpmnElement=\"StartEvent_1\"> <dc:Bounds x=\"50\" y=\"162\" width=\"36\" height=\"36\" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id=\"Collector_04kan6k_di\" bpmnElement=\"Collector_04kan6k\"> <dc:Bounds x=\"156\" y=\"140\" width=\"120\" height=\"80\" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id=\"TCA_0laok3g_di\" bpmnElement=\"TCA_0laok3g\"> <dc:Bounds x=\"372\" y=\"140\" width=\"120\" height=\"80\" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id=\"Policy_1u1q61z_di\" bpmnElement=\"Policy_1u1q61z\"> <dc:Bounds x=\"603\" y=\"140\" width=\"120\" height=\"80\" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id=\"EndEvent_1jhpt6o_di\" bpmnElement=\"EndEvent_1jhpt6o\"> <dc:Bounds x=\"874\" y=\"162\" width=\"36\" height=\"36\" /> <bpmndi:BPMNLabel> <dc:Bounds x=\"847\" y=\"198\" width=\"90\" height=\"20\" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id=\"SequenceFlow_0wokvsg_di\" bpmnElement=\"SequenceFlow_0wokvsg\"> <di:waypoint xsi:type=\"dc:Point\" x=\"86\" y=\"180\" /> <di:waypoint xsi:type=\"dc:Point\" x=\"156\" y=\"180\" /> <bpmndi:BPMNLabel> <dc:Bounds x=\"76\" y=\"170\" width=\"90\" height=\"20\" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id=\"SequenceFlow_0w8129u_di\" bpmnElement=\"SequenceFlow_0w8129u\"> <di:waypoint xsi:type=\"dc:Point\" x=\"276\" y=\"180\" /> <di:waypoint xsi:type=\"dc:Point\" x=\"372\" y=\"180\" /> <bpmndi:BPMNLabel> <dc:Bounds x=\"279\" y=\"170\" width=\"90\" height=\"20\" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id=\"SequenceFlow_0bdkahu_di\" bpmnElement=\"SequenceFlow_0bdkahu\"> <di:waypoint xsi:type=\"dc:Point\" x=\"492\" y=\"180\" /> <di:waypoint xsi:type=\"dc:Point\" x=\"603\" y=\"180\" /> <bpmndi:BPMNLabel> <dc:Bounds x=\"502.5\" y=\"170\" width=\"90\" height=\"20\" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id=\"SequenceFlow_039geog_di\" bpmnElement=\"SequenceFlow_039geog\"> <di:waypoint xsi:type=\"dc:Point\" x=\"723\" y=\"180\" /> <di:waypoint xsi:type=\"dc:Point\" x=\"874\" y=\"180\" /> <bpmndi:BPMNLabel> <dc:Bounds x=\"753.5\" y=\"170\" width=\"90\" height=\"20\" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram></bpmn:definitions>", - "propText": "{\"global\":[{\"name\":\"service\",\"value\":[\"tosca_definitions_version: cloudify_dsl_1_2\\r\\n\\r\\nimports:\\r\\n- http://www.getcloudify.org/spec/cloudify/3.3.1/types.yaml\\r\\n- http://135.207.127.211/1607_prod/type_files/cdap_app.yaml\\r\\n\\r\\nnode_templates:\\r\\n MTCA:\\r\\n type: dcae.nodes.cdap_app\\r\\n properties:\\r\\n service_name: \\\"cdap-mtca-central\\\"\\r\\n deployment_JSON: |-\\r\\n {\\r\\n \\\"clusterService\\\": {\\\"$ref\\\": \\\"/services/vm-cdap-cluster-central/instances/rdm2c\\\"},\\r\\n \\\"namespace\\\": \\\"MTCA\\\",\\r\\n \\\"appNames\\\": [ \\\"cdap-mtca\\\" ],\\r\\n \\\"flowNames\\\": [ \\\"cdap-mtca.TCAVESCollectorFlow\\\" ],\\r\\n \\\"workerNames\\\": [\\\"cdap-mtca.TCADMaaPMRSubscriberWorker\\\", \\\"cdap-mtca.TCADMaaPMRPublisherWorker\\\"],\\r\\n \\\"serviceNames\\\" : [],\\r\\n \\\"apps\\\": {\\r\\n \\\"cdap-mtca\\\": {\\r\\n \\\"jarFile\\\": \\\"/opt/app/cdap-apps/dcae-analytics-mtca-1.0.0.jar\\\",\\r\\n \\\"artifactName\\\": \\\"dcae-analytics-mtca\\\",\\r\\n \\\"version\\\": \\\"1.0.0\\\",\\r\\n \\\"appConfigFileContent\\\": \\\"{config:{ \\\\\\\"appName\\\\\\\":\\\\\\\"cdap-mtca\\\\\\\", \\\\\\\"appDescription\\\\\\\":\\\\\\\"DCAE Analytics Threshold Crossing Alert Application\\\\\\\", \\\\\\\"tcaSubscriberOutputStreamName\\\\\\\":\\\\\\\"TCASubscriberOutputStream\\\\\\\", \\\\\\\"thresholdCalculatorFlowletInstances\\\\\\\":2, \\\\\\\"tcaVESMessageStatusTableName\\\\\\\":\\\\\\\"TCAVESMessageStatusTable\\\\\\\", \\\\\\\"tcaVESMessageStatusTableTTLSeconds\\\\\\\":864000, \\\\\\\"tcaVESAlertsTableName\\\\\\\":\\\\\\\"TCAVESAlertsTable\\\\\\\", \\\\\\\"tcaVESAlertsTableTTLSeconds\\\\\\\":1728000 }}\\\"\\r\\n }\\r\\n },\\r\\n \\r\\n \\\"configuration\\\": {\\r\\n \\\"$class\\\": \\\"com.att.ecomp.dcae.clamp.common.MThresholdCrossingConfiguration\\\",\\r\\n \\\"subscriberContentType\\\": \\\"\\\",\\r\\n \\\"subscriberConsumerId\\\": \\\"c12\\\",\\r\\n \\\"subscriberConsumerGroup\\\": \\\"OpenDCAE-c12\\\",\\r\\n \\\"subscriberTimeoutMS\\\": \\\"-1\\\",\\r\\n \\\"subscriberMessageLimit\\\": \\\"-1\\\",\\r\\n \\\"subscriberPollingInterval\\\": \\\"20000\\\",\\r\\n \\\"publisherContentType\\\": \\\"application/json\\\",\\r\\n \\\"publisherMaxBatchSize\\\": \\\"10\\\",\\r\\n \\\"publisherMaxRecoveryQueueSize\\\": \\\"100000\\\",\\r\\n \\\"publisherPollingInterval\\\": \\\"20000\\\",\\r\\n \\\"publisherAlertWindowingTime\\\": \\\"86400\\\",\\r\\n \\\"policyName\\\": \\\"policy.dcae.configuration\\\",\\r\\n \\\"policyScope\\\": \\\"pnf=eNodeB;type=configuration\\\",\\r\\n \\\"policyVersion\\\": \\\"1.0.0\\\",\\r\\n \\\"domain\\\" : \\\"measurementsForVfScaling\\\",\\r\\n \\r\\n \\\"signatures\\\" : {\\r\\n \\t }\\r\\n\\r\\n }\\r\\n }\"]}]}", + "propText": "{\"global\":[{\"name\":\"service\",\"value\":[\"tosca_definitions_version: cloudify_dsl_1_2\\r\\n\\r\\nimports:\\r\\n- http://www.getcloudify.org/spec/cloudify/3.3.1/types.yaml\\r\\n- http://127.0.0.1/1607_prod/type_files/cdap_app.yaml\\r\\n\\r\\nnode_templates:\\r\\n MTCA:\\r\\n type: dcae.nodes.cdap_app\\r\\n properties:\\r\\n service_name: \\\"cdap-mtca-central\\\"\\r\\n deployment_JSON: |-\\r\\n {\\r\\n \\\"clusterService\\\": {\\\"$ref\\\": \\\"/services/vm-cdap-cluster-central/instances/rdm2c\\\"},\\r\\n \\\"namespace\\\": \\\"MTCA\\\",\\r\\n \\\"appNames\\\": [ \\\"cdap-mtca\\\" ],\\r\\n \\\"flowNames\\\": [ \\\"cdap-mtca.TCAVESCollectorFlow\\\" ],\\r\\n \\\"workerNames\\\": [\\\"cdap-mtca.TCADMaaPMRSubscriberWorker\\\", \\\"cdap-mtca.TCADMaaPMRPublisherWorker\\\"],\\r\\n \\\"serviceNames\\\" : [],\\r\\n \\\"apps\\\": {\\r\\n \\\"cdap-mtca\\\": {\\r\\n \\\"jarFile\\\": \\\"/opt/app/cdap-apps/dcae-analytics-mtca-1.0.0.jar\\\",\\r\\n \\\"artifactName\\\": \\\"dcae-analytics-mtca\\\",\\r\\n \\\"version\\\": \\\"1.0.0\\\",\\r\\n \\\"appConfigFileContent\\\": \\\"{config:{ \\\\\\\"appName\\\\\\\":\\\\\\\"cdap-mtca\\\\\\\", \\\\\\\"appDescription\\\\\\\":\\\\\\\"DCAE Analytics Threshold Crossing Alert Application\\\\\\\", \\\\\\\"tcaSubscriberOutputStreamName\\\\\\\":\\\\\\\"TCASubscriberOutputStream\\\\\\\", \\\\\\\"thresholdCalculatorFlowletInstances\\\\\\\":2, \\\\\\\"tcaVESMessageStatusTableName\\\\\\\":\\\\\\\"TCAVESMessageStatusTable\\\\\\\", \\\\\\\"tcaVESMessageStatusTableTTLSeconds\\\\\\\":864000, \\\\\\\"tcaVESAlertsTableName\\\\\\\":\\\\\\\"TCAVESAlertsTable\\\\\\\", \\\\\\\"tcaVESAlertsTableTTLSeconds\\\\\\\":1728000 }}\\\"\\r\\n }\\r\\n },\\r\\n \\r\\n \\\"configuration\\\": {\\r\\n \\\"$class\\\": \\\"com.att.ecomp.dcae.clamp.common.MThresholdCrossingConfiguration\\\",\\r\\n \\\"subscriberContentType\\\": \\\"\\\",\\r\\n \\\"subscriberConsumerId\\\": \\\"c12\\\",\\r\\n \\\"subscriberConsumerGroup\\\": \\\"OpenDCAE-c12\\\",\\r\\n \\\"subscriberTimeoutMS\\\": \\\"-1\\\",\\r\\n \\\"subscriberMessageLimit\\\": \\\"-1\\\",\\r\\n \\\"subscriberPollingInterval\\\": \\\"20000\\\",\\r\\n \\\"publisherContentType\\\": \\\"application/json\\\",\\r\\n \\\"publisherMaxBatchSize\\\": \\\"10\\\",\\r\\n \\\"publisherMaxRecoveryQueueSize\\\": \\\"100000\\\",\\r\\n \\\"publisherPollingInterval\\\": \\\"20000\\\",\\r\\n \\\"publisherAlertWindowingTime\\\": \\\"86400\\\",\\r\\n \\\"policyName\\\": \\\"policy.dcae.configuration\\\",\\r\\n \\\"policyScope\\\": \\\"pnf=eNodeB;type=configuration\\\",\\r\\n \\\"policyVersion\\\": \\\"1.0.0\\\",\\r\\n \\\"domain\\\" : \\\"measurementsForVfScaling\\\",\\r\\n \\r\\n \\\"signatures\\\" : {\\r\\n \\t }\\r\\n\\r\\n }\\r\\n }\"]}]}", "imageText":"<?xml version=\"1.0\" encoding=\"utf-8\"?><!-- created with bpmn-js / http://bpmn.io --><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"873\" height=\"92\" viewBox=\"44 134 873 92\" version=\"1.1\"><defs><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"11\" refY=\"10\" id=\"markerSj6f0mkekx\"><path d=\"M 1 5 L 11 10 L 1 15 Z\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#000000\"/></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"20\" markerHeight=\"20\" orient=\"auto\" refX=\"6\" refY=\"6\" id=\"markerSj6f0mkekz\"><circle cx=\"6\" cy=\"6\" r=\"3.5\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"/></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"20\" markerHeight=\"20\" orient=\"auto\" refX=\"8.5\" refY=\"5\" id=\"markerSj6f0mkek11\"><path d=\"m 1 5 l 0 -3 l 7 3 l -7 3 z\" style=\"stroke-width: 1; stroke-linecap: butt; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"/></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"11\" refY=\"10\" id=\"markerSj6f0mkek13\"><path d=\"M 1 5 L 11 10 L 1 15\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"/></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"-1\" refY=\"10\" id=\"markerSj6f0mkek15\"><path d=\"M 0 10 L 8 6 L 16 10 L 8 14 Z\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"/></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"-5\" refY=\"10\" id=\"markerSj6f0mkek17\"><path d=\"M 1 4 L 5 16\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#000000\" stroke=\"#000000\"/></marker></defs><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"StartEvent_1\" transform=\"matrix(1,0,0,1,50,162)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"48\" height=\"48\"></rect><g class=\"djs-visual\"><circle cx=\"18\" cy=\"18\" r=\"18\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></circle></g><rect x=\"0\" y=\"0\" width=\"36\" height=\"36\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"StartEvent_1_label\" transform=\"matrix(1,0,0,1,23,198)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"Collector_04kan6k\" transform=\"matrix(1,0,0,1,156,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><polyline points=\"120,80 120,20 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><polyline points=\"20,0 20,80 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"35.5\" y=\"43.5\">Collector</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"TCA_0laok3g\" transform=\"matrix(1,0,0,1,372,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><polyline points=\"0,60 120,60 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"48\" y=\"43.5\">TCA</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"Policy_1u1q61z\" transform=\"matrix(1,0,0,1,603,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><polyline points=\"0,40 60,0 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"43.5\" y=\"43.5\">Policy</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape selected\" data-element-id=\"EndEvent_1jhpt6o\" transform=\"matrix(1,0,0,1,874,162)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"48\" height=\"48\"></rect><g class=\"djs-visual\"><circle cx=\"18\" cy=\"18\" r=\"18\" style=\"stroke-width: 4;\" stroke=\"#000000\" fill=\"#ffffff\"></circle></g><rect x=\"0\" y=\"0\" width=\"36\" height=\"36\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect><g class=\" djs-resizer djs-resizer-nw\" transform=\"matrix(1,0,0,1,0,0)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-ne\" transform=\"matrix(0,1,-1,0,36,0)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-se\" transform=\"matrix(-1,0,0,-1,36,36)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-sw\" transform=\"matrix(0,-1,1,0,0,36)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"EndEvent_1jhpt6o_label\" transform=\"matrix(1,0,0,1,847,198)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_0wokvsg\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"80\" y=\"174\" width=\"82\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 86,180L156,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSj6f0mkekx");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"86,180 156,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_0wokvsg_label\" transform=\"matrix(1,0,0,1,76,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_0w8129u\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"270\" y=\"174\" width=\"108\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 276,180L372,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSj6f0mkekx");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"276,180 372,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_0w8129u_label\" transform=\"matrix(1,0,0,1,279,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_0bdkahu\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"486\" y=\"174\" width=\"123\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 492,180L603,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSj6f0mkekx");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"492,180 603,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_0bdkahu_label\" transform=\"matrix(1,0,0,1,502.5,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_039geog\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"717\" y=\"174\" width=\"163\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 723,180L874,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSj6f0mkekx");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"723,180 874,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_039geog_label\" transform=\"matrix(1,0,0,1,753.5,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g></svg>" }
\ No newline at end of file diff --git a/test/csit/tests/clamp/TCA/data/createTemplate2.json b/test/csit/tests/clamp/TCA/data/createTemplate2.json index 84f7c06e9..b246fdc26 100644 --- a/test/csit/tests/clamp/TCA/data/createTemplate2.json +++ b/test/csit/tests/clamp/TCA/data/createTemplate2.json @@ -2,6 +2,6 @@ "name": "template2", "controlNamePrefix": "ClosedLoop-", "bpmnText": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><bpmn:definitions xmlns:bpmn=\"http://www.omg.org/spec/BPMN/20100524/MODEL\" xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\" xmlns:di=\"http://www.omg.org/spec/DD/20100524/DI\" xmlns:dc=\"http://www.omg.org/spec/DD/20100524/DC\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" id=\"Definitions_1\" targetNamespace=\"http://bpmn.io/schema/bpmn\"> <bpmn:process id=\"Process_1\" isExecutable=\"false\"> <bpmn:startEvent id=\"StartEvent_1\"> <bpmn:outgoing>SequenceFlow_0wokvsg</bpmn:outgoing> </bpmn:startEvent> <bpmn:collector id=\"Collector_04kan6k\"> <bpmn:incoming>SequenceFlow_0wokvsg</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0w8129u</bpmn:outgoing> </bpmn:collector> <bpmn:tCA id=\"TCA_0laok3g\"> <bpmn:incoming>SequenceFlow_0w8129u</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0bdkahu</bpmn:outgoing> </bpmn:tCA> <bpmn:policy id=\"Policy_1u1q61z\"> <bpmn:incoming>SequenceFlow_0bdkahu</bpmn:incoming> <bpmn:outgoing>SequenceFlow_039geog</bpmn:outgoing> </bpmn:policy> <bpmn:endEvent id=\"EndEvent_1jhpt6o\"> <bpmn:incoming>SequenceFlow_039geog</bpmn:incoming> </bpmn:endEvent> <bpmn:sequenceFlow id=\"SequenceFlow_0wokvsg\" sourceRef=\"StartEvent_1\" targetRef=\"Collector_04kan6k\" /> <bpmn:sequenceFlow id=\"SequenceFlow_0w8129u\" sourceRef=\"Collector_04kan6k\" targetRef=\"TCA_0laok3g\" /> <bpmn:sequenceFlow id=\"SequenceFlow_0bdkahu\" sourceRef=\"TCA_0laok3g\" targetRef=\"Policy_1u1q61z\" /> <bpmn:sequenceFlow id=\"SequenceFlow_039geog\" sourceRef=\"Policy_1u1q61z\" targetRef=\"EndEvent_1jhpt6o\" /> </bpmn:process> <bpmndi:BPMNDiagram id=\"BPMNDiagram_1\"> <bpmndi:BPMNPlane id=\"BPMNPlane_1\" bpmnElement=\"Process_1\"> <bpmndi:BPMNShape id=\"_BPMNShape_StartEvent_2\" bpmnElement=\"StartEvent_1\"> <dc:Bounds x=\"50\" y=\"162\" width=\"36\" height=\"36\" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id=\"Collector_04kan6k_di\" bpmnElement=\"Collector_04kan6k\"> <dc:Bounds x=\"156\" y=\"140\" width=\"120\" height=\"80\" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id=\"TCA_0laok3g_di\" bpmnElement=\"TCA_0laok3g\"> <dc:Bounds x=\"372\" y=\"140\" width=\"120\" height=\"80\" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id=\"Policy_1u1q61z_di\" bpmnElement=\"Policy_1u1q61z\"> <dc:Bounds x=\"603\" y=\"140\" width=\"120\" height=\"80\" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id=\"EndEvent_1jhpt6o_di\" bpmnElement=\"EndEvent_1jhpt6o\"> <dc:Bounds x=\"874\" y=\"162\" width=\"36\" height=\"36\" /> <bpmndi:BPMNLabel> <dc:Bounds x=\"847\" y=\"198\" width=\"90\" height=\"20\" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id=\"SequenceFlow_0wokvsg_di\" bpmnElement=\"SequenceFlow_0wokvsg\"> <di:waypoint xsi:type=\"dc:Point\" x=\"86\" y=\"180\" /> <di:waypoint xsi:type=\"dc:Point\" x=\"156\" y=\"180\" /> <bpmndi:BPMNLabel> <dc:Bounds x=\"76\" y=\"170\" width=\"90\" height=\"20\" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id=\"SequenceFlow_0w8129u_di\" bpmnElement=\"SequenceFlow_0w8129u\"> <di:waypoint xsi:type=\"dc:Point\" x=\"276\" y=\"180\" /> <di:waypoint xsi:type=\"dc:Point\" x=\"372\" y=\"180\" /> <bpmndi:BPMNLabel> <dc:Bounds x=\"279\" y=\"170\" width=\"90\" height=\"20\" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id=\"SequenceFlow_0bdkahu_di\" bpmnElement=\"SequenceFlow_0bdkahu\"> <di:waypoint xsi:type=\"dc:Point\" x=\"492\" y=\"180\" /> <di:waypoint xsi:type=\"dc:Point\" x=\"603\" y=\"180\" /> <bpmndi:BPMNLabel> <dc:Bounds x=\"502.5\" y=\"170\" width=\"90\" height=\"20\" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id=\"SequenceFlow_039geog_di\" bpmnElement=\"SequenceFlow_039geog\"> <di:waypoint xsi:type=\"dc:Point\" x=\"723\" y=\"180\" /> <di:waypoint xsi:type=\"dc:Point\" x=\"874\" y=\"180\" /> <bpmndi:BPMNLabel> <dc:Bounds x=\"753.5\" y=\"170\" width=\"90\" height=\"20\" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram></bpmn:definitions>", - "propText": "{\"global\":[{\"name\":\"service\",\"value\":[\"tosca_definitions_version: cloudify_dsl_1_2\\r\\n\\r\\nimports:\\r\\n- http://www.getcloudify.org/spec/cloudify/3.3.1/types.yaml\\r\\n- http://135.207.127.211/1607_prod/type_files/cdap_app.yaml\\r\\n\\r\\nnode_templates:\\r\\n MTCA:\\r\\n type: dcae.nodes.cdap_app\\r\\n properties:\\r\\n service_name: \\\"cdap-mtca-central\\\"\\r\\n deployment_JSON: |-\\r\\n {\\r\\n \\\"clusterService\\\": {\\\"$ref\\\": \\\"/services/vm-cdap-cluster-central/instances/rdm2c\\\"},\\r\\n \\\"namespace\\\": \\\"MTCA\\\",\\r\\n \\\"appNames\\\": [ \\\"cdap-mtca\\\" ],\\r\\n \\\"flowNames\\\": [ \\\"cdap-mtca.TCAVESCollectorFlow\\\" ],\\r\\n \\\"workerNames\\\": [\\\"cdap-mtca.TCADMaaPMRSubscriberWorker\\\", \\\"cdap-mtca.TCADMaaPMRPublisherWorker\\\"],\\r\\n \\\"serviceNames\\\" : [],\\r\\n \\\"apps\\\": {\\r\\n \\\"cdap-mtca\\\": {\\r\\n \\\"jarFile\\\": \\\"/opt/app/cdap-apps/dcae-analytics-mtca-1.0.0.jar\\\",\\r\\n \\\"artifactName\\\": \\\"dcae-analytics-mtca\\\",\\r\\n \\\"version\\\": \\\"1.0.0\\\",\\r\\n \\\"appConfigFileContent\\\": \\\"{config:{ \\\\\\\"appName\\\\\\\":\\\\\\\"cdap-mtca\\\\\\\", \\\\\\\"appDescription\\\\\\\":\\\\\\\"DCAE Analytics Threshold Crossing Alert Application\\\\\\\", \\\\\\\"tcaSubscriberOutputStreamName\\\\\\\":\\\\\\\"TCASubscriberOutputStream\\\\\\\", \\\\\\\"thresholdCalculatorFlowletInstances\\\\\\\":2, \\\\\\\"tcaVESMessageStatusTableName\\\\\\\":\\\\\\\"TCAVESMessageStatusTable\\\\\\\", \\\\\\\"tcaVESMessageStatusTableTTLSeconds\\\\\\\":864000, \\\\\\\"tcaVESAlertsTableName\\\\\\\":\\\\\\\"TCAVESAlertsTable\\\\\\\", \\\\\\\"tcaVESAlertsTableTTLSeconds\\\\\\\":1728000 }}\\\"\\r\\n }\\r\\n },\\r\\n \\r\\n \\\"configuration\\\": {\\r\\n \\\"$class\\\": \\\"com.att.ecomp.dcae.clamp.common.MThresholdCrossingConfiguration\\\",\\r\\n \\\"subscriberContentType\\\": \\\"\\\",\\r\\n \\\"subscriberConsumerId\\\": \\\"c12\\\",\\r\\n \\\"subscriberConsumerGroup\\\": \\\"OpenDCAE-c12\\\",\\r\\n \\\"subscriberTimeoutMS\\\": \\\"-1\\\",\\r\\n \\\"subscriberMessageLimit\\\": \\\"-1\\\",\\r\\n \\\"subscriberPollingInterval\\\": \\\"20000\\\",\\r\\n \\\"publisherContentType\\\": \\\"application/json\\\",\\r\\n \\\"publisherMaxBatchSize\\\": \\\"10\\\",\\r\\n \\\"publisherMaxRecoveryQueueSize\\\": \\\"100000\\\",\\r\\n \\\"publisherPollingInterval\\\": \\\"20000\\\",\\r\\n \\\"publisherAlertWindowingTime\\\": \\\"86400\\\",\\r\\n \\\"policyName\\\": \\\"policy.dcae.configuration\\\",\\r\\n \\\"policyScope\\\": \\\"pnf=eNodeB;type=configuration\\\",\\r\\n \\\"policyVersion\\\": \\\"1.0.0\\\",\\r\\n \\\"domain\\\" : \\\"measurementsForVfScaling\\\",\\r\\n \\r\\n \\\"signatures\\\" : {\\r\\n \\t }\\r\\n\\r\\n }\\r\\n }\"]}]}", + "propText": "{\"global\":[{\"name\":\"service\",\"value\":[\"tosca_definitions_version: cloudify_dsl_1_2\\r\\n\\r\\nimports:\\r\\n- http://www.getcloudify.org/spec/cloudify/3.3.1/types.yaml\\r\\n- http://127.0.0.1/1607_prod/type_files/cdap_app.yaml\\r\\n\\r\\nnode_templates:\\r\\n MTCA:\\r\\n type: dcae.nodes.cdap_app\\r\\n properties:\\r\\n service_name: \\\"cdap-mtca-central\\\"\\r\\n deployment_JSON: |-\\r\\n {\\r\\n \\\"clusterService\\\": {\\\"$ref\\\": \\\"/services/vm-cdap-cluster-central/instances/rdm2c\\\"},\\r\\n \\\"namespace\\\": \\\"MTCA\\\",\\r\\n \\\"appNames\\\": [ \\\"cdap-mtca\\\" ],\\r\\n \\\"flowNames\\\": [ \\\"cdap-mtca.TCAVESCollectorFlow\\\" ],\\r\\n \\\"workerNames\\\": [\\\"cdap-mtca.TCADMaaPMRSubscriberWorker\\\", \\\"cdap-mtca.TCADMaaPMRPublisherWorker\\\"],\\r\\n \\\"serviceNames\\\" : [],\\r\\n \\\"apps\\\": {\\r\\n \\\"cdap-mtca\\\": {\\r\\n \\\"jarFile\\\": \\\"/opt/app/cdap-apps/dcae-analytics-mtca-1.0.0.jar\\\",\\r\\n \\\"artifactName\\\": \\\"dcae-analytics-mtca\\\",\\r\\n \\\"version\\\": \\\"1.0.0\\\",\\r\\n \\\"appConfigFileContent\\\": \\\"{config:{ \\\\\\\"appName\\\\\\\":\\\\\\\"cdap-mtca\\\\\\\", \\\\\\\"appDescription\\\\\\\":\\\\\\\"DCAE Analytics Threshold Crossing Alert Application\\\\\\\", \\\\\\\"tcaSubscriberOutputStreamName\\\\\\\":\\\\\\\"TCASubscriberOutputStream\\\\\\\", \\\\\\\"thresholdCalculatorFlowletInstances\\\\\\\":2, \\\\\\\"tcaVESMessageStatusTableName\\\\\\\":\\\\\\\"TCAVESMessageStatusTable\\\\\\\", \\\\\\\"tcaVESMessageStatusTableTTLSeconds\\\\\\\":864000, \\\\\\\"tcaVESAlertsTableName\\\\\\\":\\\\\\\"TCAVESAlertsTable\\\\\\\", \\\\\\\"tcaVESAlertsTableTTLSeconds\\\\\\\":1728000 }}\\\"\\r\\n }\\r\\n },\\r\\n \\r\\n \\\"configuration\\\": {\\r\\n \\\"$class\\\": \\\"com.att.ecomp.dcae.clamp.common.MThresholdCrossingConfiguration\\\",\\r\\n \\\"subscriberContentType\\\": \\\"\\\",\\r\\n \\\"subscriberConsumerId\\\": \\\"c12\\\",\\r\\n \\\"subscriberConsumerGroup\\\": \\\"OpenDCAE-c12\\\",\\r\\n \\\"subscriberTimeoutMS\\\": \\\"-1\\\",\\r\\n \\\"subscriberMessageLimit\\\": \\\"-1\\\",\\r\\n \\\"subscriberPollingInterval\\\": \\\"20000\\\",\\r\\n \\\"publisherContentType\\\": \\\"application/json\\\",\\r\\n \\\"publisherMaxBatchSize\\\": \\\"10\\\",\\r\\n \\\"publisherMaxRecoveryQueueSize\\\": \\\"100000\\\",\\r\\n \\\"publisherPollingInterval\\\": \\\"20000\\\",\\r\\n \\\"publisherAlertWindowingTime\\\": \\\"86400\\\",\\r\\n \\\"policyName\\\": \\\"policy.dcae.configuration\\\",\\r\\n \\\"policyScope\\\": \\\"pnf=eNodeB;type=configuration\\\",\\r\\n \\\"policyVersion\\\": \\\"1.0.0\\\",\\r\\n \\\"domain\\\" : \\\"measurementsForVfScaling\\\",\\r\\n \\r\\n \\\"signatures\\\" : {\\r\\n \\t }\\r\\n\\r\\n }\\r\\n }\"]}]}", "imageText":"<?xml version=\"1.0\" encoding=\"utf-8\"?><!-- created with bpmn-js / http://bpmn.io --><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"873\" height=\"92\" viewBox=\"44 134 873 92\" version=\"1.1\"><defs><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"11\" refY=\"10\" id=\"markerSj6f0mkekx\"><path d=\"M 1 5 L 11 10 L 1 15 Z\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#000000\"/></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"20\" markerHeight=\"20\" orient=\"auto\" refX=\"6\" refY=\"6\" id=\"markerSj6f0mkekz\"><circle cx=\"6\" cy=\"6\" r=\"3.5\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"/></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"20\" markerHeight=\"20\" orient=\"auto\" refX=\"8.5\" refY=\"5\" id=\"markerSj6f0mkek11\"><path d=\"m 1 5 l 0 -3 l 7 3 l -7 3 z\" style=\"stroke-width: 1; stroke-linecap: butt; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"/></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"11\" refY=\"10\" id=\"markerSj6f0mkek13\"><path d=\"M 1 5 L 11 10 L 1 15\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"/></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"-1\" refY=\"10\" id=\"markerSj6f0mkek15\"><path d=\"M 0 10 L 8 6 L 16 10 L 8 14 Z\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"/></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"-5\" refY=\"10\" id=\"markerSj6f0mkek17\"><path d=\"M 1 4 L 5 16\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#000000\" stroke=\"#000000\"/></marker></defs><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"StartEvent_1\" transform=\"matrix(1,0,0,1,50,162)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"48\" height=\"48\"></rect><g class=\"djs-visual\"><circle cx=\"18\" cy=\"18\" r=\"18\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></circle></g><rect x=\"0\" y=\"0\" width=\"36\" height=\"36\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"StartEvent_1_label\" transform=\"matrix(1,0,0,1,23,198)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"Collector_04kan6k\" transform=\"matrix(1,0,0,1,156,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><polyline points=\"120,80 120,20 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><polyline points=\"20,0 20,80 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"35.5\" y=\"43.5\">Collector</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"TCA_0laok3g\" transform=\"matrix(1,0,0,1,372,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><polyline points=\"0,60 120,60 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"48\" y=\"43.5\">TCA</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"Policy_1u1q61z\" transform=\"matrix(1,0,0,1,603,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><polyline points=\"0,40 60,0 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"43.5\" y=\"43.5\">Policy</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape selected\" data-element-id=\"EndEvent_1jhpt6o\" transform=\"matrix(1,0,0,1,874,162)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"48\" height=\"48\"></rect><g class=\"djs-visual\"><circle cx=\"18\" cy=\"18\" r=\"18\" style=\"stroke-width: 4;\" stroke=\"#000000\" fill=\"#ffffff\"></circle></g><rect x=\"0\" y=\"0\" width=\"36\" height=\"36\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect><g class=\" djs-resizer djs-resizer-nw\" transform=\"matrix(1,0,0,1,0,0)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-ne\" transform=\"matrix(0,1,-1,0,36,0)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-se\" transform=\"matrix(-1,0,0,-1,36,36)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-sw\" transform=\"matrix(0,-1,1,0,0,36)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"EndEvent_1jhpt6o_label\" transform=\"matrix(1,0,0,1,847,198)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_0wokvsg\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"80\" y=\"174\" width=\"82\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 86,180L156,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSj6f0mkekx");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"86,180 156,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_0wokvsg_label\" transform=\"matrix(1,0,0,1,76,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_0w8129u\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"270\" y=\"174\" width=\"108\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 276,180L372,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSj6f0mkekx");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"276,180 372,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_0w8129u_label\" transform=\"matrix(1,0,0,1,279,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_0bdkahu\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"486\" y=\"174\" width=\"123\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 492,180L603,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSj6f0mkekx");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"492,180 603,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_0bdkahu_label\" transform=\"matrix(1,0,0,1,502.5,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_039geog\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"717\" y=\"174\" width=\"163\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 723,180L874,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSj6f0mkekx");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"723,180 874,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_039geog_label\" transform=\"matrix(1,0,0,1,753.5,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g></svg>" }
\ No newline at end of file diff --git a/test/csit/tests/clamp/UIs/01__Create_template.robot b/test/csit/tests/clamp/UIs/01__Create_template.robot new file mode 100644 index 000000000..d740ac987 --- /dev/null +++ b/test/csit/tests/clamp/UIs/01__Create_template.robot @@ -0,0 +1,81 @@ +*** Settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json +Library Selenium2Library +Library XvfbRobot + + +*** Test Cases *** +Get Requests health check ok + CreateSession clamp http://localhost:8080 + ${resp}= Get Request clamp /restservices/clds/v1/clds/healthcheck + Should Be Equal As Strings ${resp.status_code} 200 + +Open Browser +# Next line is to be enabled for Headless tests only (jenkins?). To see the tests desable the line. + Start Virtual Display 1920 1080 + Open Browser http://localhost:8080/designer/index.html browser=firefox + Set Selenium Speed .2 seconds + Set Window Size 1920 1080 + ${title}= Get Title + Should Be Equal CLDS ${title} + +Bad Login to Clamp UI and Verify not logged in + Input Text locator=username text=bad_login + Input Text locator=password text=This_is_bad_password + Press Key locator=password key=\\13 + Wait Until Element Is Visible locator=username timeout=5 + Page Should Not Contain Element xpath=//*[@class="navbar-brand logo_name ng-binding"] expected=*Hello:admin* + +Good Login to Clamp UI and Verify logged in + Input Text locator=username text=admin + Input Text locator=password text=password + Press Key locator=password key=\\13 + Wait Until Element Is Visible xpath=//*[@class="navbar-brand logo_name ng-binding"] timeout=60 + Element Text Should Be xpath=//*[@class="navbar-brand logo_name ng-binding"] expected=Hello:admin + +Create Template from Menu + Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[1]/a timeout=60 + Click Element xpath=//*[@id="navbar"]/ul/li[1]/a + Wait Until Element Is Visible locator=Create Template timeout=60 + Click Element locator=Create Template + Input Text locator=modelName text=template + Click Button locator=OK + +Drag and Drop Boxes for template + Wait Until Element Is Visible xpath=//*[@class="entry icon-collector-node"] timeout=60 + Drag And Drop By Offset xpath=//*[@class="entry icon-collector-node"] 280 280 + Drag And Drop By Offset xpath=//*[@class="entry icon-tca-node"] 550 280 + Drag And Drop By Offset xpath=//*[@class="entry icon-policy-node"] 800 280 + Drag And Drop By Offset xpath=//*[@class="entry icon-end-event-none"] 1000 280 + +Drag and Drop Connectors for template + Click Element xpath=//*[starts-with(@data-element-id, "StartEvent_")] + Wait Until Element Is Enabled xpath=//*[@id="js-canvas"]/div/div/div[2]/div[5]/div/div/div[2]/div + Drag And Drop xpath=//*[@id="js-canvas"]/div/div/div[2]/div[5]/div/div/div[2]/div xpath=//*[starts-with(@data-element-id, "Collector_")] + Wait Until Element Is Enabled xpath=//*[@id="js-canvas"]/div/div/div[2]/div[1]/div/div/div[3]/div + Drag And Drop xpath=//*[@id="js-canvas"]/div/div/div[2]/div[1]/div/div/div[3]/div xpath=//*[starts-with(@data-element-id, "TCA_")] + Wait Until Element Is Enabled xpath=//*[@id="js-canvas"]/div/div/div[2]/div[2]/div/div/div[3]/div + Drag And Drop xpath=//*[@id="js-canvas"]/div/div/div[2]/div[2]/div/div/div[3]/div xpath=//*[starts-with(@data-element-id, "Policy_")] + Wait Until Element Is Enabled xpath=//*[@id="js-canvas"]/div/div/div[2]/div[3]/div/div/div[3]/div + Drag And Drop xpath=//*[@id="js-canvas"]/div/div/div[2]/div[3]/div/div/div[3]/div xpath=//*[starts-with(@data-element-id, "EndEvent_")] + +Add Template properties yaml from Menu + Click Element xpath=//*[@id="navbar"]/ul/li[1]/a + Wait Until Element Is Visible locator=Template Properties timeout=60 + Click Element locator=Template Properties + ${data}= Get Binary File ${CURDIR}${/}data${/}TCA_template_properties.yml + Input Text locator=service text=${data} + Click Button locator=Close + +Save Template from Menu + Click Element xpath=//*[@id="navbar"]/ul/li[1]/a + Wait Until Element Is Visible locator=Save Template timeout=60 + Click Element locator=Save Template + Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 + Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful:SAVE + +Close Browser + Close Browser
\ No newline at end of file diff --git a/test/csit/tests/clamp/UIs/test1.robot b/test/csit/tests/clamp/UIs/02__Create_model.robot index fafb00042..979a9802e 100644 --- a/test/csit/tests/clamp/UIs/test1.robot +++ b/test/csit/tests/clamp/UIs/02__Create_model.robot @@ -3,7 +3,6 @@ Library Collections Library RequestsLibrary Library OperatingSystem Library json -Library HttpLibrary.HTTP Library Selenium2Library Library XvfbRobot @@ -18,17 +17,11 @@ Open Browser # Next line is to be enabled for Headless tests only (jenkins?). To see the tests desable the line. Start Virtual Display 1920 1080 Open Browser http://localhost:8080/designer/index.html browser=firefox + Set Selenium Speed .2 seconds Set Window Size 1920 1080 ${title}= Get Title Should Be Equal CLDS ${title} -Bad Login to Clamp UI and Verify not logged in - Input Text locator=username text=bad_login - Input Text locator=password text=This_is_bad_password - Press Key locator=password key=\\13 - Wait Until Element Is Visible locator=username timeout=5 - Page Should Not Contain Element xpath=//*[@class="navbar-brand logo_name ng-binding"] expected=*Hello:admin* - Good Login to Clamp UI and Verify logged in Input Text locator=username text=admin Input Text locator=password text=password @@ -36,13 +29,20 @@ Good Login to Clamp UI and Verify logged in Wait Until Element Is Visible xpath=//*[@class="navbar-brand logo_name ng-binding"] timeout=60 Element Text Should Be xpath=//*[@class="navbar-brand logo_name ng-binding"] expected=Hello:admin -Create Template from Menu - Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[1]/a timeout=60 - Click Element xpath=//*[@id="navbar"]/ul/li[1]/a - Wait Until Element Is Visible locator=Create Template timeout=60 - Click Element locator=Create Template - Input Text locator=modelName text=template1 - Click Button locator=OK +Create Model from Menu + Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 + Click Element xpath=//*[@id="navbar"]/ul/li[2]/a + Wait Until Element Is Visible locator=Create CL timeout=60 + Click Element locator=Create CL + Input Text locator=modelName text=model1 + Click Button locator=Create + +Save Model from Menu + Click Element xpath=//*[@id="navbar"]/ul/li[2]/a + Wait Until Element Is Visible locator=Save CL timeout=60 + Click Element locator=Save CL + Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 + Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful:SAVE Close Browser - Close Browser
\ No newline at end of file + Close Browser diff --git a/test/csit/tests/clamp/UIs/data/TCA_template_properties.yml b/test/csit/tests/clamp/UIs/data/TCA_template_properties.yml new file mode 100644 index 000000000..3e09fdad5 --- /dev/null +++ b/test/csit/tests/clamp/UIs/data/TCA_template_properties.yml @@ -0,0 +1,51 @@ +tosca_definitions_version: cloudify_dsl_1_2 + +imports: +- http://www.getcloudify.org/spec/cloudify/3.3.1/types.yaml +- http://127.0.0.1/1607_prod/type_files/cdap_app.yaml + +node_templates: + MTCA: + type: dcae.nodes.cdap_app + properties: + service_name: "cdap-mtca-central" + deployment_JSON: |- + { + "clusterService": {"$ref": "/services/vm-cdap-cluster-central/instances/rdm2c"}, + "namespace": "MTCA", + "appNames": [ "cdap-mtca" ], + "flowNames": [ "cdap-mtca.TCAVESCollectorFlow" ], + "workerNames": ["cdap-mtca.TCADMaaPMRSubscriberWorker", "cdap-mtca.TCADMaaPMRPublisherWorker"], + "serviceNames" : [], + "apps": { + "cdap-mtca": { + "jarFile": "/opt/app/cdap-apps/dcae-analytics-mtca-1.0.0.jar", + "artifactName": "dcae-analytics-mtca", + "version": "1.0.0", + "appConfigFileContent": "{config:{ \"appName\":\"cdap-mtca\", \"appDescription\":\"DCAE Analytics Threshold Crossing Alert Application\", \"tcaSubscriberOutputStreamName\":\"TCASubscriberOutputStream\", \"thresholdCalculatorFlowletInstances\":2, \"tcaVESMessageStatusTableName\":\"TCAVESMessageStatusTable\", \"tcaVESMessageStatusTableTTLSeconds\":864000, \"tcaVESAlertsTableName\":\"TCAVESAlertsTable\", \"tcaVESAlertsTableTTLSeconds\":1728000 }}" + } + }, + + "configuration": { + "$class": "com.att.ecomp.dcae.clamp.common.MThresholdCrossingConfiguration", + "subscriberContentType": "", + "subscriberConsumerId": "c12", + "subscriberConsumerGroup": "OpenDCAE-c12", + "subscriberTimeoutMS": "-1", + "subscriberMessageLimit": "-1", + "subscriberPollingInterval": "20000", + "publisherContentType": "application/json", + "publisherMaxBatchSize": "10", + "publisherMaxRecoveryQueueSize": "100000", + "publisherPollingInterval": "20000", + "publisherAlertWindowingTime": "86400", + "policyName": "policy.dcae.configuration", + "policyScope": "pnf=eNodeB;type=configuration", + "policyVersion": "1.0.0", + "domain" : "measurementsForVfScaling", + + "signatures" : { + } + + } + } diff --git a/test/csit/tests/cli/startup/__init__.robot b/test/csit/tests/cli/startup/__init__.robot new file mode 100644 index 000000000..9eca6917a --- /dev/null +++ b/test/csit/tests/cli/startup/__init__.robot @@ -0,0 +1,2 @@ +*** Settings *** +Documentation cli - Startup diff --git a/test/csit/tests/cli/startup/startup_check.robot b/test/csit/tests/cli/startup/startup_check.robot new file mode 100644 index 000000000..053a6d115 --- /dev/null +++ b/test/csit/tests/cli/startup/startup_check.robot @@ -0,0 +1,70 @@ +*** Settings *** +Library RequestsLibrary +Library Process + +*** Variables *** + +${cli_exec} docker exec cli onap +${cli_exec_onap_11} docker exec -e CLI_PRODUCT_VERSION=onap-1.1 onap +${cli_exec_onap_10} docker exec -e CLI_PRODUCT_VERSION=onap-1.0 onap +${cli_exec_cli_10} docker exec -e CLI_PRODUCT_VERSION=cli-1.0 onap + +*** Test Cases *** +Liveness Test + [Documentation] Check cli liveness check + Create Session cli http://${CLI_IP}:8080 + CheckUrl cli / + +Check Cli help + [Documentation] check cli help command + ${cli_cmd_output}= Run Process ${cli_exec} --help shell=yes + Log ${cli_cmd_output.stdout} + Should Be Equal As Strings ${cli_cmd_output.rc} 0 + Should Contain ${cli_cmd_output.stdout} CLI version + +Check Cli Version Default + [Documentation] check cli default version + ${cli_cmd_output}= Run Process ${cli_exec} --version shell=yes + Log ${cli_cmd_output.stdout} + Should Be Equal As Strings ${cli_cmd_output.rc} 0 + Should Contain ${cli_cmd_output.stdout} : cli-1.0 + +Check Cli Scheam Refresh + [Documentation] check cli schema-refresh command + ${cli_cmd_output}= Run Process ${cli_exec} schema-refresh shell=yes + Log ${cli_cmd_output.stdout} + Should Be Equal As Strings ${cli_cmd_output.rc} 0 + Should Contain ${cli_cmd_output.stdout} sl-no + Should Contain ${cli_cmd_output.stdout} command + Should Contain ${cli_cmd_output.stdout} product-version + Should Contain ${cli_cmd_output.stdout} schema + Should Contain ${cli_cmd_output.stdout} version + +Check Cli Schema Validate With Valid Path + [Documentation] check cli schema-validate command with valid path + ${cli_cmd_output}= Run Process ${cli_exec} schema-validate -i -l schema-refresh.yaml shell=yes + Log ${cli_cmd_output.stdout} + Should Be Equal As Strings ${cli_cmd_output.rc} 0 + Should Contain ${cli_cmd_output.stdout} sl-no + Should Contain ${cli_cmd_output.stdout} error + +Check Cli Scheam Validate With Invalid Path + [Documentation] check cli version + ${cli_cmd_output}= Run Process ${cli_exec} schema-validate -i -l invalid-yaml-path.yaml shell=yes + Log ${cli_cmd_output.stdout} + Should Be Equal As Strings ${cli_cmd_output.rc} 1 + Should Contain ${cli_cmd_output.stdout} 0x0007 + +Check Cli Scheam Validate Empty Argument + [Documentation] check cli schema validate with empty argument + ${cli_cmd_output}= Run Process ${cli_exec} schema-validate shell=yes + Log ${cli_cmd_output.stdout} + Should Be Equal As Strings ${cli_cmd_output.rc} 1 + Should Contain ${cli_cmd_output.stdout} 0x0015 + + +*** Keywords *** +CheckUrl + [Arguments] ${session} ${path} + ${resp}= Get Request ${session} ${path} + Should Be Equal As Integers ${resp.status_code} 200 diff --git a/test/csit/tests/common.robot b/test/csit/tests/common.robot new file mode 100644 index 000000000..944be6b9f --- /dev/null +++ b/test/csit/tests/common.robot @@ -0,0 +1,22 @@ +#Robot functions that will be shared also with other tests + +*** Keywords *** +json_from_file +#Robot function to extract the json object from a file + [Arguments] ${file_path} + ${json_file}= Get file ${file_path} + ${json_object}= Evaluate json.loads('''${json_file}''') json + [return] ${json_object} + +string_from_json +#Robot function to transform the json object to a string + [Arguments] ${json_value} + ${json_string}= Stringify Json ${json_value} + [return] ${json_string} + +random_ip +#Robot function to generate a random IP + [Arguments] + ${numbers}= Evaluate random.sample([x for x in range(1, 256)], 4) random + ${generated_ip}= Catenate ${numbers[0]}.${numbers[1]}.${numbers[2]}.${numbers[3]} + [return] ${generated_ip}
\ No newline at end of file diff --git a/test/csit/tests/integration/vCPE/__init__.robot b/test/csit/tests/integration/vCPE/__init__.robot new file mode 100644 index 000000000..b2057b0d1 --- /dev/null +++ b/test/csit/tests/integration/vCPE/__init__.robot @@ -0,0 +1,2 @@ +*** Settings *** +Documentation Integration - vCPE diff --git a/test/csit/tests/integration/vCPE/test1.robot b/test/csit/tests/integration/vCPE/test1.robot new file mode 100644 index 000000000..1dd7c1bbc --- /dev/null +++ b/test/csit/tests/integration/vCPE/test1.robot @@ -0,0 +1,60 @@ +*** Settings *** +Suite Setup Suite Setup +Suite Teardown Suite Teardown +Library OperatingSystem +Library RequestsLibrary +Library Process +Library eteutils/UUID.py + +*** Variables *** +${GLOBAL_APPLICATION_ID} csit-vCPE +${GLOBAL_MSO_USERNAME} InfraPortalClient +${GLOBAL_MSO_PASSWORD} password1$ + +*** Test Cases *** +SO ServiceInstance health check + ${auth}= Create List ${GLOBAL_MSO_USERNAME} ${GLOBAL_MSO_PASSWORD} + ${session}= Create Session so http://${SO_IP}:8080 + ${uuid}= Generate UUID + ${headers}= Create Dictionary Accept=text/html Content-Type=text/html X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} + ${resp}= Get Request so /ecomp/mso/infra/globalhealthcheck headers=${headers} + &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json + ${resp}= Get Request so /ecomp/mso/infra/orchestrationRequests/v2 headers=${headers} + Should Not Contain ${resp.content} null + +*** Keywords *** +Run Docker + [Arguments] ${image} ${name} ${parameters}=${EMPTY} + ${result}= Run Process docker run --name ${name} ${parameters} -d ${image} shell=True + Should Be Equal As Integers ${result.rc} 0 + Log ${result.stdout} + ${result}= Run Process docker inspect --format '{{ .NetworkSettings.IPAddress }}' ${name} shell=True + Should Be Equal As Integers ${result.rc} 0 + Log ${result.stdout} + [Return] ${result.stdout} + +Kill Docker + [Arguments] ${name} + ${result}= Run Process docker logs ${name} shell=True + Should Be Equal As Integers ${result.rc} 0 + Log ${result.stdout} + ${result}= Run Process docker kill ${name} shell=True + Should Be Equal As Integers ${result.rc} 0 + Log ${result.stdout} + ${result}= Run Process docker rm ${name} shell=True + Should Be Equal As Integers ${result.rc} 0 + Log ${result.stdout} + +CheckUrl + [Arguments] ${url} + Create Session session ${url} disable_warnings=True + ${resp}= Get Request session / + Should Be Equal As Integers ${resp.status_code} 200 + +Suite Setup + ${SO_IP}= Run Docker nexus3.onap.org:10001/openecomp/mso i-so + Wait Until Keyword Succeeds 1 min 5 sec CheckUrl http://${SO_IP}:8080 + Set Suite Variable ${SO_IP} + +Suite Teardown + Kill Docker i-so diff --git a/test/csit/tests/msb/rest-service-api-gateway/__init__.robot b/test/csit/tests/msb/rest-service-api-gateway/__init__.robot new file mode 100644 index 000000000..efd2221f2 --- /dev/null +++ b/test/csit/tests/msb/rest-service-api-gateway/__init__.robot @@ -0,0 +1,2 @@ +*** Settings *** +Documentation Microservices Service Bus - Messag Broker diff --git a/test/csit/tests/msb/rest-service-api-gateway/test1.robot b/test/csit/tests/msb/rest-service-api-gateway/test1.robot new file mode 100644 index 000000000..8a15bf2be --- /dev/null +++ b/test/csit/tests/msb/rest-service-api-gateway/test1.robot @@ -0,0 +1,9 @@ +*** Settings *** +Library Collections +Library requests + +*** Test Cases *** +REST service Test1 + [Documentation] Check if test rest service can be accessed via aip gateway + ${result} = get http://${MSB_IAG_IP}/api/test/v1/people + Should Be Equal ${result.status_code} ${200} diff --git a/test/csit/tests/msb/rest-service-discovery/__init__.robot b/test/csit/tests/msb/rest-service-discovery/__init__.robot new file mode 100644 index 000000000..efd2221f2 --- /dev/null +++ b/test/csit/tests/msb/rest-service-discovery/__init__.robot @@ -0,0 +1,2 @@ +*** Settings *** +Documentation Microservices Service Bus - Messag Broker diff --git a/test/csit/tests/msb/rest-service-discovery/test1.robot b/test/csit/tests/msb/rest-service-discovery/test1.robot new file mode 100644 index 000000000..bb48d3fdc --- /dev/null +++ b/test/csit/tests/msb/rest-service-discovery/test1.robot @@ -0,0 +1,14 @@ +*** Settings *** +Library Collections +Library requests + +*** Test Cases *** +Messag Broker Test + [Documentation] Check if the test service enpoint can be get from MSB + ${result} = get http://${MSB_DISCOVERY_IP}:10081/api/microservices/v1/services/test/version/v1 + Should Be Equal ${result.status_code} ${200} + ${json} = Set Variable ${result.json()} + ${serviceName} = Get From Dictionary ${json} serviceName + ${protocol} = Get From Dictionary ${json} protocol + Should Be Equal ${serviceName} test + Should Be Equal ${protocol} REST
\ No newline at end of file diff --git a/test/csit/tests/msb/startup/__init__.robot b/test/csit/tests/msb/startup/__init__.robot new file mode 100644 index 000000000..2f6452622 --- /dev/null +++ b/test/csit/tests/msb/startup/__init__.robot @@ -0,0 +1,2 @@ +*** Settings *** +Documentation Microservices Service Bus - Startup diff --git a/test/csit/tests/msb/startup/test1.robot b/test/csit/tests/msb/startup/test1.robot new file mode 100644 index 000000000..99ad603c7 --- /dev/null +++ b/test/csit/tests/msb/startup/test1.robot @@ -0,0 +1,16 @@ +*** Settings *** +Library RequestsLibrary + +*** Test Cases *** +Liveness Test + [Documentation] Check various endpoints for basic liveness check + Create Session msb http://${MSB_IAG_IP}:80 + CheckUrl msb /msb + CheckUrl msb /iui/microservices/default.html + +*** Keywords *** +CheckUrl + [Arguments] ${session} ${path} + ${resp}= Get Request ${session} ${path} + Should Be Equal As Integers ${resp.status_code} 200 + diff --git a/test/csit/tests/msb/tcp-service-access/__init__.robot b/test/csit/tests/msb/tcp-service-access/__init__.robot new file mode 100644 index 000000000..efd2221f2 --- /dev/null +++ b/test/csit/tests/msb/tcp-service-access/__init__.robot @@ -0,0 +1,2 @@ +*** Settings *** +Documentation Microservices Service Bus - Messag Broker diff --git a/test/csit/tests/msb/tcp-service-access/test1.robot b/test/csit/tests/msb/tcp-service-access/test1.robot new file mode 100644 index 000000000..e84c7e1a3 --- /dev/null +++ b/test/csit/tests/msb/tcp-service-access/test1.robot @@ -0,0 +1,16 @@ +*** Settings *** +Library Collections +Library requests + +*** Test Cases *** +Messag Broker Test1 + [Documentation] Check if ActiveMQ index page can be accessed + ${result} = get http://${MSB_DISCOVERY_IP}:10081/api/microservices/v1/services/ActiveMQ/version/null + Should Be Equal ${result.status_code} ${200} + ${json} = Set Variable ${result.json()} + ${activeMQ_ip} = Set Variable ${json["nodes"][0]["ip"]} + ${activeMQ_port} = Set Variable ${json["nodes"][0]["port"]} + + ${result} = get http://${activeMQ_ip}:8161 + Should Be Equal ${result.status_code} ${200} + diff --git a/test/csit/tests/msb/tcp-service-access/test2.robot b/test/csit/tests/msb/tcp-service-access/test2.robot new file mode 100644 index 000000000..58e5471b7 --- /dev/null +++ b/test/csit/tests/msb/tcp-service-access/test2.robot @@ -0,0 +1,15 @@ +*** Settings *** +Library Collections +Library requests +Library Telnet + +*** Test Cases *** +Messag Broker Test2 + [Documentation] Check if ActiveMQ listening port can be accessed + ${result} = get http://${MSB_DISCOVERY_IP}:10081/api/microservices/v1/services/ActiveMQ/version/null + Should Be Equal ${result.status_code} ${200} + ${json} = Set Variable ${result.json()} + ${activeMQ_ip} = Set Variable ${json["nodes"][0]["ip"]} + ${activeMQ_port} = Set Variable ${json["nodes"][0]["port"]} + + Open Connection ${activeMQ_ip} port=${activeMQ_port} diff --git a/test/csit/tests/msb/tcp-service-discovery/__init__.robot b/test/csit/tests/msb/tcp-service-discovery/__init__.robot new file mode 100644 index 000000000..efd2221f2 --- /dev/null +++ b/test/csit/tests/msb/tcp-service-discovery/__init__.robot @@ -0,0 +1,2 @@ +*** Settings *** +Documentation Microservices Service Bus - Messag Broker diff --git a/test/csit/tests/msb/tcp-service-discovery/test1.robot b/test/csit/tests/msb/tcp-service-discovery/test1.robot new file mode 100644 index 000000000..da6cb3efa --- /dev/null +++ b/test/csit/tests/msb/tcp-service-discovery/test1.robot @@ -0,0 +1,14 @@ +*** Settings *** +Library Collections +Library requests + +*** Test Cases *** +Messag Broker Test + [Documentation] Check if the message broker enpoint can be get from MSB + ${result} = get http://${MSB_DISCOVERY_IP}:10081/api/microservices/v1/services/ActiveMQ/version/null + Should Be Equal ${result.status_code} ${200} + ${json} = Set Variable ${result.json()} + ${serviceName} = Get From Dictionary ${json} serviceName + ${protocol} = Get From Dictionary ${json} protocol + Should Be Equal ${serviceName} ActiveMQ + Should Be Equal ${protocol} TCP
\ No newline at end of file diff --git a/test/csit/tests/multicloud-ocata/provision/sanity_test_multicloud.robot b/test/csit/tests/multicloud-ocata/provision/sanity_test_multicloud.robot new file mode 100644 index 000000000..f9f19820c --- /dev/null +++ b/test/csit/tests/multicloud-ocata/provision/sanity_test_multicloud.robot @@ -0,0 +1,22 @@ +*** settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json + +*** Variables *** +@{return_ok_list}= 200 201 202 +${queryswagger_ocata_url} /api/multicloud-ocata/v0/swagger.json + + +*** Test Cases *** +OcataSwaggerTest + [Documentation] query swagger info rest test + ${headers} Create Dictionary Content-Type=application/json Accept=application/json + Create Session web_session http://${SERVICE_IP}:${SERVICE_PORT} headers=${headers} + ${resp}= Get Request web_session ${queryswagger_ocata_url} + ${responese_code}= Convert To String ${resp.status_code} + List Should Contain Value ${return_ok_list} ${responese_code} + ${response_json} json.loads ${resp.content} + ${swagger_version}= Convert To String ${response_json['swagger']} + Should Be Equal ${swagger_version} 2.0 diff --git a/test/csit/tests/multicloud/provision/sanity_test_multivim.robot b/test/csit/tests/multicloud/provision/sanity_test_multivim.robot index 6dc57cc42..2c1ec3f9f 100644 --- a/test/csit/tests/multicloud/provision/sanity_test_multivim.robot +++ b/test/csit/tests/multicloud/provision/sanity_test_multivim.robot @@ -6,14 +6,14 @@ Library json *** Variables *** @{return_ok_list}= 200 201 202 -${queryswagger_broker_url} /openoapi/multivim/v1/swagger.json +${queryswagger_broker_url} /api/multicloud/v0/swagger.json *** Test Cases *** BrokerSwaggerTest [Documentation] query swagger info rest test ${headers} Create Dictionary Content-Type=application/json Accept=application/json - Create Session web_session http://${MSB_IP} headers=${headers} + Create Session web_session http://${BROKER_IP}:9001 headers=${headers} ${resp}= Get Request web_session ${queryswagger_broker_url} ${responese_code}= Convert To String ${resp.status_code} List Should Contain Value ${return_ok_list} ${responese_code} diff --git a/test/csit/tests/portal/testsuites/__init__.robot b/test/csit/tests/portal/testsuites/__init__.robot new file mode 100644 index 000000000..3b8528dff --- /dev/null +++ b/test/csit/tests/portal/testsuites/__init__.robot @@ -0,0 +1,2 @@ +*** Settings *** +Documentation APPC - healthcheck diff --git a/test/csit/tests/portal/testsuites/browser_setup.robot b/test/csit/tests/portal/testsuites/browser_setup.robot new file mode 100644 index 000000000..6ef4f7268 --- /dev/null +++ b/test/csit/tests/portal/testsuites/browser_setup.robot @@ -0,0 +1,43 @@ +*** Settings *** +Documentation The main interface for interacting with VID. It handles low level stuff like managing the selenium request library and VID required steps +Library Collections +Library OSUtils +Library OperatingSystem +Library ExtendedSelenium2Library +Resource global_properties.robot + +*** Variables *** + +*** 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/csit/tests/portal/testsuites/integration_robot_properties.py b/test/csit/tests/portal/testsuites/integration_robot_properties.py new file mode 100644 index 000000000..cc0558fc7 --- /dev/null +++ b/test/csit/tests/portal/testsuites/integration_robot_properties.py @@ -0,0 +1,83 @@ +# aaf info - everything is from the private oam network (also called ecomp private network) +GLOBAL_AAF_SERVER = "http://10.0.12.1:8101" +GLOBAL_AAF_USERNAME = "dgl@openecomp.org" +GLOBAL_AAF_PASSWORD = "ecomp_admin" +# aai info - everything is from the private oam network (also called ecomp private network) +GLOBAL_AAI_SERVER_URL = "https://104.239.249.183:8443" +GLOBAL_AAI_USERNAME = "AAI" +GLOBAL_AAI_PASSWORD = "AAI" +# appc info - everything is from the private oam network (also called ecomp private network) +GLOBAL_APPC_SERVER = "http://172.99.68.171:8282" +GLOBAL_APPC_USERNAME = "admin" +GLOBAL_APPC_PASSWORD = "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U" +# sdc info - everything is from the private oam network (also called ecomp private network) +GLOBAL_ASDC_SERVER = "http://104.239.249.58" +GLOBAL_ASDC_FE_PORT = "8181" +GLOBAL_ASDC_BE_PORT = "8080" +GLOBAL_ASDC_BE_USERNAME = "beep" +GLOBAL_ASDC_BE_PASSWORD = "boop" +# dcae info - everything is from the private oam network (also called ecomp private network) +GLOBAL_DCAE_SERVER = "http://146.20.110.86:9998" +GLOBAL_DCAE_USERNAME = "console" +GLOBAL_DCAE_PASSWORD = "ZjJkYjllMjljMTI2M2Iz" +# message router info - everything is from the private oam network (also called ecomp private network) +GLOBAL_MR_SERVER = "http://162.209.124.141:3904" +# mso info - everything is from the private oam network (also called ecomp private network) +GLOBAL_MSO_SERVER = "http://172.99.67.208:8080" +GLOBAL_MSO_USERNAME = "InfraPortalClient" +GLOBAL_MSO_PASSWORD = "password1$" +# openstack info - info to select right info in environment +GLOBAL_OPENSTACK_KEYSTONE_SERVER = "https://identity.api.rackspacecloud.com" +# packet generate vnf info - everything is from the private oam network (also called ecomp private network) +GLOBAL_PACKET_GENERATOR_PORT = "8183" +GLOBAL_PACKET_GENERATOR_USERNAME = "admin" +GLOBAL_PACKET_GENERATOR_PASSWORD = "admin" +GLOBAL_PGN_PORT = "2831" +# policy info - everything is from the private oam network (also called ecomp private network) +GLOBAL_POLICY_SERVER_URL = "http://104.239.249.76:8480" +GLOBAL_POLICY_AUTH = "dGVzdHJlc3Q6M2MwbXBVI2gwMUBOMWMz" +GLOBAL_POLICY_CLIENTAUTH = "cHl0aG9uOnRlc3Q=" +GLOBAL_POLICY_HEALTHCHECK_URL = "http://104.239.249.76:6969" +GLOBAL_POLICY_USERNAME = "healthcheck" +GLOBAL_POLICY_PASSWORD = "zb!XztG34" +# portal info - everything is from the private oam network (also called ecomp private network) +GLOBAL_PORTAL_SERVER = "http://104.130.31.32:8989" +GLOBAL_PORTAL_USERNAME = "demo" +GLOBAL_PORTAL_PASSWORD = "demo123456!" +# portal information +#GLOBAL_PORTAL_URL = "http://vm-ep-dev2.client.research.att.com:8989" +GLOBAL_PORTAL_URL = "http://vm-ep-dev3.client.research.att.com:8989" +#GLOBAL_PORTAL_URL = "http://portal.api.simpledemo.openecomp.org:8989" +GLOBAL_PORTAL_ADMIN_USER = "demo" +GLOBAL_PORTAL_ADMIN_PWD = "demo123456!" +GLOBAL_APP_ADMIN_USER = "appdemo" +GLOBAL_APP_ADMIN_PWD = "appdemo123456!" +GLOBAL_STA_USER_USER = "stademo" +GLOBAL_STA_USER_PWD = "stademo123456!" +#First_Name = "Test20" +#Last_Name = "Demo20" +#Email_Address = "Test20@att.com" +#LoginID = "TestUser20" +#Loginpwd = "Demo1234!" +#LoginPwdCheck = "Demo1234!" +#Existing_User = "Portal" +# sdngc info - everything is from the private oam network (also called ecomp private network) +GLOBAL_SDNGC_SERVER = "http://172.99.69.190" +GLOBAL_SDNGC_REST_PORT = "8282" +GLOBAL_SDNGC_ADMIN_PORT = "8843" +GLOBAL_SDNGC_USERNAME = "admin" +GLOBAL_SDNGC_PASSWORD = "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U" +# vid info - everything is from the private oam network (also called ecomp private network) +GLOBAL_VID_USERNAME = "demo" +GLOBAL_VID_PASSWORD = "Kp8bJ4SXszM0WX" +GLOBAL_VID_HEALTH_USERNAME = "Default" +GLOBAL_VID_HEALTH_PASSWORD = "AppPassword!1" +GLOBAL_VID_SERVER = "http://104.130.12.222:8080" +#global selenium info +GLOBAL_PROXY_WARNING_TITLE="Notice - Uncategorized Site" +GLOBAL_PROXY_WARNING_CONTINUE_XPATH="//a[contains(@href, 'accepted-Notify-Uncategorized')]" +# settings for vm to attach vvg too +GLOBAL_VVGSERVER_IMAGE = "Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)" +GLOBAL_VVGSERVER_FLAVOR = "4 GB General Purpose v1" +# dns info +GLOBAL_DNS_TRAFFIC_DURATION = "600"
\ No newline at end of file diff --git a/test/csit/tests/portal/testsuites/portal_VID.robot b/test/csit/tests/portal/testsuites/portal_VID.robot new file mode 100644 index 000000000..473a0464f --- /dev/null +++ b/test/csit/tests/portal/testsuites/portal_VID.robot @@ -0,0 +1,741 @@ +*** Settings *** +Documentation The main interface for interacting with Portal. It handles low level stuff like managing the selenium request library and Portal required steps +Library ExtendedSelenium2Library +Library RequestsClientCert +Library RequestsLibrary +Library UUID +Library DateTime +Resource ../global_properties.robot +Resource ../browser_setup.robot + +*** Variables *** +${PORTAL_ENV} /ECOMPPORTAL +${PORTAL_LOGIN_URL} ${GLOBAL_PORTAL_URL}${PORTAL_ENV}/login.htm +${PORTAL_HOME_PAGE} ${GLOBAL_PORTAL_URL}${PORTAL_ENV}/applicationsHome +${PORTAL_MICRO_ENDPOINT} ${GLOBAL_PORTAL_URL}${PORTAL_ENV}/commonWidgets +${PORTAL_HOME_URL} ${GLOBAL_PORTAL_URL}${PORTAL_ENV}/applicationsHome +${App_First_Name} appdemo +${App_Last_Name} demo +${App_Email_Address} appdemo@onap.com +${App_LoginID} appdemo +${App_Loginpwd} demo123456! +${App_LoginPwdCheck} demo123456! +${Sta_First_Name} stademo +${Sta_Last_Name} demo +${Sta_Email_Address} stademo@onap.com +${Sta_LoginID} stademo +${Sta_Loginpwd} demo123456! +${Sta_LoginPwdCheck} demo123456! +${Existing_User} portal +${PORTAL_HEALTH_CHECK_PATH} /ECOMPPORTAL/portalApi/healthCheck +#${Application} 'Virtual Infrastructure Deployment' +#${Application_tab} 'select-app-Virtual-Infrastructure-Deployment' +#${Application_dropdown} 'div-app-name-dropdown-Virtual-Infrastructure-Deployment' +#${Application_dropdown_select} 'div-app-name-Virtual-Infrastructure-Deployment' +${APPC_LOGIN_URL} http://104.130.74.99:8282/apidoc/explorer/index.html +${PORTAL_ASSETS_DIRECTORY} C:\\Users\\kk707x\\Downloads + + + + + +*** Keywords *** + +Run Portal Health Check + [Documentation] Runs Portal Health check + ${resp}= Run Portal Get Request ${PORTAL_HEALTH_CHECK_PATH} + Should Be Equal As Strings ${resp.status_code} 200 + Should Be Equal As Strings ${resp.json()['statusCode']} 200 +Run Portal Get Request + [Documentation] Runs Portal Get request + [Arguments] ${data_path} + ${session}= Create Session portal ${GLOBAL_PORTAL_URL} + ${uuid}= Generate UUID + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} + ${resp}= Get Request portal ${data_path} headers=${headers} + Log Received response from portal ${resp.text} + [Return] ${resp} + + +Portal admin Login To Portal GUI + [Documentation] Logs into Portal GUI + # Setup Browser Now being managed by test case + ##Setup Browser + Go To ${PORTAL_LOGIN_URL} + Maximize Browser Window + Set Selenium Speed ${GLOBAL_SELENIUM_DELAY} + Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} + Log Logging in to ${GLOBAL_PORTAL_SERVER}${PORTAL_ENV} + # Handle Proxy Warning + Title Should Be Login + Input Text xpath=//input[@ng-model='loginId'] ${GLOBAL_PORTAL_ADMIN_USER} + Input Password xpath=//input[@ng-model='password'] ${GLOBAL_PORTAL_ADMIN_PWD} + Click Link xpath=//a[@id='loginBtn'] + Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Log Logged in to ${GLOBAL_PORTAL_SERVER}${PORTAL_ENV} + +Portal admin Go To Portal HOME + [Documentation] Naviage to Portal Home + Go To ${PORTAL_HOME_URL} + Wait Until Page Contains Element xpath=//div[@class='applicationWindow'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + +Portal admin User Notifications + [Documentation] Naviage to User notification tab + Click Link xpath=//a[@id='parent-item-User-Notifications'] + Wait Until Element Is Visible xpath=//h1[@class='heading-page'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Click Button xpath=//button[@id='button-openAddNewApp'] + Click Button xpath=(//button[@id='undefined'])[1] + #Click Button xpath=//input[@id='datepicker-start'] + +Portal admin Add Application Admin New User + [Documentation] Naviage to Admins tab + Click Link xpath=//a[@title='Admins'] + Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Page Should Contain Admins + Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()'] + Click Button xpath=//button[@id='Create-New-User-button'] + Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${First_Name} + Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${Last_Name} + Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${Email_Address} + Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${LoginID} + Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${Loginpwd} + Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${LoginPwdCheck} + Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()'] + Click Button xpath=//button[@id='search-users-button-next'] + Click Button xpath=//input[@value='Select application'] + Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'Virtual Infrastructure Deployment')])[1] + #Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'Virtual Infrastructure Deployment')])[1] + Click Element xpath=(//li[contains(.,'Virtual Infrastructure Deployment')])[2] + Click Button xpath=//button[@id='div-updateAdminAppsRoles'] + Click Element xpath=//button[@id='admin-div-ok-button'] + Click Element xpath=//button[@id='div-confirm-ok-button'] + Click Link xpath=//a[@aria-label='Admins'] + Click Button xpath=//input[@id='dropdown1'] + Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')] + Input Text xpath=//input[@id='input-table-search'] ${First_Name} + Element Text Should Be xpath=(//span[contains(.,'Test')] )[1] ${First_Name} + + + + +Portal admin Add Application Admin Exiting User + [Documentation] Naviage to Admins tab + Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Click Link xpath=//a[@title='Admins'] + Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Page Should Contain Admins + Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()'] + Input Text xpath=//input[@id='input-user-search'] ${Existing_User} + Click Button xpath=//button[@id='button-search-users'] + Click Element xpath=//span[@id='result-uuid-0'] + Click Button xpath=//button[@id='search-users-button-next'] + Click Button xpath=//input[@value='Select application'] + Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'Virtual Infrastructure Deployment' )])[1] + + Click Element xpath=(//li[contains(.,'Virtual Infrastructure Deployment' )])[2] + #Select From List xpath=(//input[@value='Select application']/following::*[contains(text(),'Virtual Infrastructure Deployment')])[1] Virtual Infrastructure Deployment + Click Button xpath=//button[@id='div-updateAdminAppsRoles'] + Click Element xpath=//button[@id='admin-div-ok-button'] + Click Element xpath=//button[@id='div-confirm-ok-button'] + Get Selenium Implicit Wait + Click Link xpath=//a[@aria-label='Admins'] + Click Element xpath=//input[@id='dropdown1'] + Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment' )] + Input Text xpath=//input[@id='input-table-search'] ${Existing_User} + Element Text Should Be xpath=(//span[contains(.,'portal')])[1] ${Existing_User} + + +Portal admin Delete Application Admin Existing User + [Documentation] Naviage to Admins tab + Click Element xpath=(//span[contains(.,'portal')] )[1] + Click Element xpath=//*[@id='select-app-Virtual-Infrastructure-Deployment']/following::i[@id='i-delete-application'] + Click Element xpath=//button[@id='div-confirm-ok-button'] + Click Button xpath=//button[@id='div-updateAdminAppsRoles'] + Click Element xpath=//button[@id='admin-div-ok-button'] + #Is Element Visible xpath=(//span[contains(.,'Portal')] )[2] + #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2] + Element Should Not Contain xpath=//*[@table-data='admins.adminsTableData'] portal + + +Portal admin Add Application admin User New user + [Documentation] Naviage to Users tab + Click Link xpath=//a[@title='Users'] + Page Should Contain Users + Click Button xpath=//button[@ng-click='users.openAddNewUserModal()'] + Click Button xpath=//button[@id='Create-New-User-button'] + Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${App_First_Name} + Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${App_Last_Name} + Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${App_Email_Address} + Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${App_LoginID} + Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${App_Loginpwd} + Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${App_LoginPwdCheck} + Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()'] + Click Button xpath=//button[@id='next-button'] + #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-Virtual-Infrastructure-Deployment'] + Click Element xpath=//*[@id='div-app-name-dropdown-Virtual-Infrastructure-Deployment'] + Click Element xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::input[@id='Standard-User-checkbox'] + Set Selenium Implicit Wait 3000 + Click Button xpath=//button[@id='new-user-save-button'] + Set Selenium Implicit Wait 3000 + Go To ${PORTAL_HOME_PAGE} + Click Link xpath=//a[@title='Users'] + Click Element xpath=//input[@id='dropdown1'] + Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')] + Input Text xpath=//input[@id='input-table-search'] ${App_First_Name} + Element Text Should Be xpath=(//span[contains(.,'appdemo')] )[1] ${App_First_Name} + + +Portal admin Add Standard User New user + [Documentation] Naviage to Users tab + Click Link xpath=//a[@title='Users'] + Page Should Contain Users + Click Button xpath=//button[@ng-click='users.openAddNewUserModal()'] + Click Button xpath=//button[@id='Create-New-User-button'] + Input Text xpath=//input[@ng-model='searchUsers.newUser.firstName'] ${Sta_First_Name} + Input Text xpath=//input[@ng-model='searchUsers.newUser.lastName'] ${Sta_Last_Name} + Input Text xpath=//input[@ng-model='searchUsers.newUser.emailAddress'] ${Sta_Email_Address} + Input Text xpath=//input[@ng-model='searchUsers.newUser.loginId'] ${Sta_LoginID} + Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwd'] ${Sta_Loginpwd} + Input Text xpath=//input[@ng-model='searchUsers.newUser.loginPwdCheck'] ${Sta_LoginPwdCheck} + Click Button xpath=//button[@ng-click='searchUsers.addNewUserFun()'] + Click Button xpath=//button[@id='next-button'] + #Scroll Element Into View xpath=//div[@id='div-app-name-dropdown-Virtual-Infrastructure-Deployment'] + Click Element xpath=//*[@id='div-app-name-dropdown-Virtual-Infrastructure-Deployment'] + Click Element xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::input[@id='Standard-User-checkbox'] + Set Selenium Implicit Wait 3000 + Click Button xpath=//button[@id='new-user-save-button'] + Set Selenium Implicit Wait 3000 + Go To ${PORTAL_HOME_PAGE} + Click Link xpath=//a[@title='Users'] + Click Element xpath=//input[@id='dropdown1'] + Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')] + Input Text xpath=//input[@id='input-table-search'] ${Sta_First_Name} + Element Text Should Be xpath=(//span[contains(.,'appdemo')] )[1] ${Sta_First_Name} + + + +Portal admin Add Application Admin Exiting User -APPDEMO + [Documentation] Naviage to Admins tab + Wait Until Element Is Visible xpath=//a[@title='Admins'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Click Link xpath=//a[@title='Admins'] + Wait Until Element Is Visible xpath=//h1[contains(.,'Admins')] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Page Should Contain Admins + Click Button xpath=//button[@ng-click='admins.openAddNewAdminModal()'] + Input Text xpath=//input[@id='input-user-search'] ${App_First_Name} + Click Button xpath=//button[@id='button-search-users'] + Click Element xpath=//span[@id='result-uuid-0'] + Click Button xpath=//button[@id='search-users-button-next'] + Click Button xpath=//input[@value='Select application'] + Scroll Element Into View xpath=(//input[@value='Select application']/following::*[contains(text(),'Virtual Infrastructure Deployment' )])[1] + + Click Element xpath=(//li[contains(.,'Virtual Infrastructure Deployment' )])[2] + #Select From List xpath=(//input[@value='Select application']/following::*[contains(text(),'Virtual Infrastructure Deployment')])[1] Virtual Infrastructure Deployment + Click Button xpath=//button[@id='div-updateAdminAppsRoles'] + Click Element xpath=//button[@id='admin-div-ok-button'] + Click Element xpath=//button[@id='div-confirm-ok-button'] + Get Selenium Implicit Wait + Click Link xpath=//a[@aria-label='Admins'] + Click Element xpath=//input[@id='dropdown1'] + Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment' )] + Input Text xpath=//input[@id='input-table-search'] ${App_First_Name} + Element Text Should Be xpath=(//span[contains(.,'appdemo')])[1] ${App_First_Name} + + + +Portal admin Add Standard User Existing user + [Documentation] Naviage to Users tab + Click Link xpath=//a[@title='Users'] + Page Should Contain Users + Click Button xpath=//button[@ng-click='users.openAddNewUserModal()'] + Input Text xpath=//input[@id='input-user-search'] ${Existing_User} + Click Button xpath=//button[@id='button-search-users'] + Click Element xpath=//span[@id='result-uuid-0'] + Click Button xpath=//button[@id='next-button'] + Click Element xpath=//*[@id='div-app-name-dropdown-Virtual-Infrastructure-Deployment'] + Click Element xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::input[@id='Standard-User-checkbox'] + #Click Element xpath=//div[@id='div-app-name-dropdown-xDemo-App'] + #Click Element xpath=//div[@id='div-app-name-xDemo-App']/following::input[@id='Standard-User-checkbox'] + + Set Selenium Implicit Wait 3000 + Click Button xpath=//button[@id='new-user-save-button'] + Set Selenium Implicit Wait 3000 + #Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} + #Select From List xpath=//input[@value='Select application'] Virtual Infrastructure Deployment + #Click Link xpath=//a[@title='Users'] + #Page Should Contain Users + #Focus xpath=//input[@name='dropdown1'] + + Go To ${PORTAL_HOME_PAGE} + Click Link xpath=//a[@title='Users'] + Click Element xpath=//input[@id='dropdown1'] + Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')] + #Click Element xpath=//li[contains(.,'XDemo App')] + Input Text xpath=//input[@id='input-table-search'] ${Existing_User} + Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User + + +Portal admin Edit Standard User Existing user + [Documentation] Naviage to Users tab + Click Element xpath=(.//*[@id='rowheader_t1_0'])[2] + Click Element xpath=//*[@id='div-app-name-dropdown-Virtual-Infrastructure-Deployment'] + Click Element xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::input[@id='Standard-User-checkbox'] + Click Element xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::input[@id='System-Administrator-checkbox'] + Set Selenium Implicit Wait 3000 + Click Button xpath=//button[@id='new-user-save-button'] + Set Selenium Implicit Wait 3000 + Page Should Contain Users + #Click Button xpath=//input[@id='dropdown1'] + #Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')] + Input Text xpath=//input[@id='input-table-search'] ${Existing_User} + Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] System Administrator + + + Portal admin Delete Standard User Existing user + [Documentation] Naviage to Users tab + Click Element xpath=(.//*[@id='rowheader_t1_0'])[2] + Scroll Element Into View xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::*[@id='app-item-delete'][1] + Click Element xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::*[@id='app-item-delete'][1] + Click Element xpath=//button[@id='div-confirm-ok-button'] + Click Button xpath=//button[@id='new-user-save-button'] + #Input Text xpath=//input[@id='input-table-search'] ${Existing_User} + #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2] + Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] portal + + + + +Functional Top Menu Get Access + [Documentation] Naviage to Support tab + Click Link xpath=//a[contains(.,'Support')] + Mouse Over xpath=//*[contains(text(),'Get Access')] + Click Link xpath=//a[contains(.,'Get Access')] + Element Text Should Be xpath=//h1[contains(.,'Get Access')] Get Access + + +Functional Top Menu Contact Us + [Documentation] Naviage to Support tab + Click Link xpath=//a[contains(.,'Support')] + Mouse Over xpath=//*[contains(text(),'Contact Us')] + Click Link xpath=//a[contains(.,'Contact Us')] + Element Text Should Be xpath=//h1[contains(.,'Contact Us')] Contact Us + Click Image xpath=//img[@alt='Onap Logo'] + + +Portal admin Edit Functional menu + [Documentation] Naviage to Edit Functional menu tab + Click Link xpath=//a[@title='Edit Functional Menu'] + Click Link xpath=.//*[@id='Manage']/div/a + Click Link xpath=.//*[@id='Design']/div/a + Click Link xpath=.//*[@id='Product_Design']/div/a + Open Context Menu xpath=//*[@id='Product_Design']/div/span + Click Link xpath=//a[@href='#add'] + Input Text xpath=//input[@id='input-title'] ONAP Test + #Input Text xpath=//input[@id='input-url'] http://google.com + Click Element xpath=//input[@id='select-app'] + Scroll Element Into View xpath=//li[contains(.,'Virtual Infrastructure Deployment')] + Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')] + Input Text xpath=//input[@id='input-url'] http://google.com + Click Button xpath=//button[@id='button-save-continue'] + #Click Button xpath=//div[@title='Select Roles'] + Click Element xpath=//*[@id='app-select-Select Roles'] + Click Element xpath=//input[@id='Standard-User-checkbox'] + Click Element xpath=//button[@id='button-save-add'] + Click Image xpath=//img[@alt='Onap Logo'] + Set Selenium Implicit Wait 3000 + Click Link xpath=//a[contains(.,'Manage')] + Mouse Over xpath=//*[contains(text(),'Design')] + Set Selenium Implicit Wait 3000 + Element Text Should Be xpath=//a[contains(.,'ONAP Test')] ONAP Test + Set Selenium Implicit Wait 3000 + Click Link xpath=//a[@title='Edit Functional Menu'] + Click Link xpath=.//*[@id='Manage']/div/a + Click Link xpath=.//*[@id='Design']/div/a + Click Link xpath=.//*[@id='Product_Design']/div/a + Open Context Menu xpath=//*[@id='ONAP_Test'] + Click Link xpath=//a[@href='#delete'] + Set Selenium Implicit Wait 3000 + Click Element xpath=//button[@id='div-confirm-ok-button'] + Click Image xpath=//img[@alt='Onap Logo'] + Set Selenium Implicit Wait 3000 + Click Link xpath=//a[contains(.,'Manage')] + Mouse Over xpath=//*[contains(text(),'Design')] + Set Selenium Implicit Wait 3000 + Element Should Not Contain xpath=(.//*[contains(.,'Design')]/following::ul[1])[1] ONAP Test + + + + + + + + +Portal admin Microservice Onboarding + [Documentation] Naviage to Edit Functional menu tab + Click Link xpath=//a[@title='Microservice Onboarding'] + Click Button xpath=//button[@id='microservice-onboarding-button-add'] + Input Text xpath=//input[@name='name'] Test Microservice + Input Text xpath=//*[@name='desc'] Test + Click Element xpath=//input[@id='microservice-details-input-app'] + Scroll Element Into View xpath=//li[contains(.,'Virtual Infrastructure Deployment')] + Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')] + Click Element xpath=//*[@name='desc'] + Input Text xpath=//input[@name='url'] ${PORTAL_MICRO_ENDPOINT} + Click Element xpath=//input[@id='microservice-details-input-security-type'] + Scroll Element Into View xpath=//li[contains(.,'Basic Authentication')] + Click Element xpath=//li[contains(.,'Basic Authentication')] + Input Text xpath=//input[@name='username'] ${GLOBAL_PORTAL_ADMIN_USER} + Input Text xpath=//input[@name='password'] ${GLOBAL_PORTAL_ADMIN_PWD} + Click Button xpath=//button[@id='microservice-details-save-button'] + #Table Column Should Contain xpath=//*[@table-data='serviceList'] 0 Test Microservice + Element Text Should Be xpath=//*[@table-data='serviceList'] Test Microservice + + + +Portal Admin Create Widget for All users + [Documentation] Naviage to Create Widget menu tab + ${WidgetAttachment}= Catenate ${PORTAL_ASSETS_DIRECTORY}\\widget_news.zip + Click Link xpath=//a[@title='Widget Onboarding'] + Click Button xpath=//button[@id='widget-onboarding-button-add'] + Input Text xpath=//*[@name='name'] ONAP-VID + Input Text xpath=//*[@name='desc'] ONAP VID + Click Element xpath=//*[@id='widgets-details-input-endpoint-url'] + Scroll Element Into View xpath=//li[contains(.,'Test Microservice')] + Click Element xpath=//li[contains(.,'Test Microservice')] + Click Element xpath=//*[contains(text(),'Allow all user access')]/preceding::input[@ng-model='widgetOnboardingDetails.widget.allUser'][1] + Choose File xpath=//input[@id='widget-onboarding-details-upload-file'] ${WidgetAttachment} + Click Button xpath=//button[@id='widgets-details-save-button'] + Wait Until Page Contains ONAP-VID ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Page Should Contain ONAP-VID + Set Selenium Implicit Wait 3000 + GO TO ${PORTAL_HOME_PAGE} + + +Portal Admin Delete Widget for All users + [Documentation] Naviage to delete Widget menu tab + #Wait Until Page Contains ONAP-VID ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + #Page Should Contain ONAP-VID + #Click Image xpath=//img[@alt='Onap Logo'] + Click Link xpath=//a[@title='Widget Onboarding'] + Click Element xpath=//input[@id='dropdown1'] + Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')] + #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-VID')]/followi + #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-VID')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Click Element xpath=(.//*[contains(text(),'ONAP-VID')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1] + Click Element xpath=//button[@id='div-confirm-ok-button'] + Set Selenium Implicit Wait 3000 + Element Should Not Contain xpath=//*[@table-data='portalAdmin.portalAdminsTableData'] ONAP-VID + #Is Element Visible xpath=//*[@table-data='portalAdmin.portalAdminsTableData'] + #Table Column Should Contain .//*[@table-data='portalAdmin.portalAdminsTableData'] 0 ONAP-VID + #Set Selenium Implicit Wait 3000 + + +Portal Admin Create Widget for Application Roles + [Documentation] Naviage to Create Widget menu tab + ${WidgetAttachment}= Catenate ${PORTAL_ASSETS_DIRECTORY}\\widget_news.zip + Click Link xpath=//a[@title='Widget Onboarding'] + Click Button xpath=//button[@id='widget-onboarding-button-add'] + Input Text xpath=//*[@name='name'] ONAP-VID + Input Text xpath=//*[@name='desc'] ONAP VID + Click Element xpath=//*[@id='widgets-details-input-endpoint-url'] + Scroll Element Into View xpath=//li[contains(.,'Test Microservice')] + Click Element xpath=//li[contains(.,'Test Microservice')] + Click element xpath=//*[@id="app-select-Select Applications"] + click element xpath=//*[@id="Virtual-Infrastructure-Deployment-checkbox"] + Click element xpath=//*[@name='desc'] + click element xpath=//*[@id="app-select-Select Roles"] + click element xpath=//*[@id="Standard-User-checkbox"] + Click element xpath=//*[@name='desc'] + Scroll Element Into View xpath=//input[@id='widget-onboarding-details-upload-file'] + Choose File xpath=//input[@id='widget-onboarding-details-upload-file'] ${WidgetAttachment} + Click Button xpath=//button[@id='widgets-details-save-button'] + Click Image xpath=//img[@alt='Onap Logo'] + Set Selenium Implicit Wait 3000 + #Wait Until Page Contains ONAP-VID ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Click Link xpath=//a[@title='Widget Onboarding'] + Click Element xpath=//input[@id='dropdown1'] + Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')] + Page Should Contain ONAP-VID + Set Selenium Implicit Wait 3000 + GO TO ${PORTAL_HOME_PAGE} + + + + + Portal Admin Delete Widget for Application Roles + [Documentation] Naviage to delete Widget menu tab + #Wait Until Page Contains ONAP-VID ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + #Page Should Contain ONAP-VID + #Click Image xpath=//img[@alt='Onap Logo'] + Click Link xpath=//a[@title='Widget Onboarding'] + Click Element xpath=//input[@id='dropdown1'] + Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')] + #Wait Until Page Contains xpath=(.//*[contains(text(),'ONAP-VID')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Click Element xpath=(.//*[contains(text(),'ONAP-VID')]/following::*[@ng-click='widgetOnboarding.deleteWidget(rowData)'])[1] + Click Element xpath=//button[@id='div-confirm-ok-button'] + Set Selenium Implicit Wait 3000 + Element Should Not Contain xpath=//*[@table-data='portalAdmin.portalAdminsTableData'] ONAP-VID + #Is Element Visible xpath=//*[@table-data='portalAdmin.portalAdminsTableData'] + #Table Column Should Contain .//*[@table-data='portalAdmin.portalAdminsTableData'] 0 ONAP-VID + #Set Selenium Implicit Wait 3000 + + + +Portal Admin Edit Widget + [Documentation] Naviage to Home tab + #Mouse Over xpath=(//h3[contains(text(),'News')]/following::span[1])[1] + Click Element xpath=(//h3[contains(text(),'News')]/following::span[1])[1] + Set Browser Implicit Wait 8000 + #Wait Until Element Is Visible xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1] 60 + Mouse Over xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1] + Click Link xpath=(//h3[contains(text(),'News')]/following::span[1]/following::a[contains(text(),'Edit')])[1] + Input Text xpath=//input[@name='title'] ONAP_VID + Input Text xpath=//input[@name='url'] http://about.att.com/news/international.html + Input Text xpath=//input[@id='widget-input-add-order'] 5 + Click Link xpath=//a[contains(.,'Add New')] + Click Element xpath=//div[@id='close-button'] + Element Should Contain xpath=//*[@table-data='ignoredTableData'] ONAP_VID + Click Element xpath=.//div[contains(text(),'ONAP_VID')]/following::*[contains(text(),'5')][1]/following::div[@ng-click='remove($index);'][1] + Click Element xpath=//div[@id='confirmation-button-next'] + Element Should Not Contain xpath=//*[@table-data='ignoredTableData'] ONAP_VID + Click Link xpath=//a[@id='close-button'] + + + + +Portal Admin Broadcast Notifications + [Documentation] Portal Test Admin Broadcast Notifications + ${CurrentDay}= Get Current Date result_format=%m/%d/%Y + ${NextDay}= Get Current Date increment=24:00:00 result_format=%m/%d/%Y + ${CurrentDate}= Get Current Date result_format=%m%d%y%H%M + ${AdminBroadCastMsg}= catenate ONAP VID Broadcast Automation${CurrentDate} + Click Image xpath=//img[@alt='Onap Logo'] + Set Selenium Implicit Wait 3000 + Click Link xpath=//*[@id="parent-item-User-Notifications"] + Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10 + Click button xpath=//*[@id="button-openAddNewApp"] + Input Text xpath=//input[@id='datepicker-start'] ${CurrentDay} + Input Text xpath=//input[@id='datepicker-end'] ${NextDay} + Input Text xpath=//*[@id="add-notification-input-title"] ONAP VID Broadcast Automation + Input Text xpath=//*[@id="user-notif-input-message"] ${AdminBroadCastMsg} + click element xpath=//*[@id="button-notification-save"] + Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10 + click element xpath=//*[@id="megamenu-notification-button"] + click element xpath=//*[@id="notification-history-link"] + Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10 + Table Column Should Contain xpath=//*[@id="notification-history-table"] 2 ${AdminBroadCastMsg} + log ${AdminBroadCastMsg} + [Return] ${AdminBroadCastMsg} + +Portal Admin Category Notifications + [Documentation] Portal Admin Broadcast Notifications + ${CurrentDay}= Get Current Date result_format=%m/%d/%Y + ${NextDay}= Get Current Date increment=24:00:00 result_format=%m/%d/%Y + ${CurrentDate}= Get Current Date result_format=%m%d%y%H%M + ${AdminCategoryMsg}= catenate ONAP VID Category Automation${CurrentDate} + Click Link xpath=//a[@id='parent-item-Home'] + Click Link xpath=//*[@id="parent-item-User-Notifications"] + Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10 + Click button xpath=//*[@id="button-openAddNewApp"] + #Select Radio Button NO radio-button-no + Click Element //*[contains(text(),'Broadcast to All Categories')]/following::*[contains(text(),'No')][1] + #Select Radio Button //label[@class='radio'] radio-button-approles + Click Element xpath=//*[contains(text(),'Categories')]/following::*[contains(text(),'Application Roles')][1] + Click Element xpath=//*[contains(text(),'Virtual Infrastructure Deployment')]/preceding::input[@ng-model='member.isSelected'][1] + Input Text xpath=//input[@id='datepicker-start'] ${CurrentDay} + Input Text xpath=//input[@id='datepicker-end'] ${NextDay} + Input Text xpath=//*[@id="add-notification-input-title"] ONAP VID Category Automation + Input Text xpath=//*[@id='user-notif-input-message'] ${AdminCategoryMsg} + click element xpath=//*[@id="button-notification-save"] + Wait until Element is visible xpath=//*[@id="button-openAddNewApp"] timeout=10 + click element xpath=//*[@id="megamenu-notification-button"] + click element xpath=//*[@id="notification-history-link"] + Wait until Element is visible xpath=//*[@id="notification-history-table"] timeout=10 + Table Column Should Contain xpath=//*[@id="notification-history-table"] 2 ${AdminCategoryMsg} + log ${AdminCategoryMsg} + [Return] ${AdminCategoryMsg} + + + Portal admin Logout from Portal GUI + [Documentation] Logout from Portal GUI + Click Element xpath=//div[@id='header-user-icon'] + Click Button xpath=//button[contains(.,'Log out')] + Title Should Be Login + + + +Application admin Login To Portal GUI + [Documentation] Logs into Portal GUI + # Setup Browser Now being managed by test case + ##Setup Browser + Go To ${PORTAL_LOGIN_URL} + Maximize Browser Window + Set Selenium Speed ${GLOBAL_SELENIUM_DELAY} + Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} + Log Logging in to ${GLOBAL_PORTAL_SERVER}${PORTAL_ENV} + # Handle Proxy Warning + Title Should Be Login + Input Text xpath=//input[@ng-model='loginId'] ${GLOBAL_APP_ADMIN_USER} + Input Password xpath=//input[@ng-model='password'] ${GLOBAL_APP_ADMIN_PWD} + Click Link xpath=//a[@id='loginBtn'] + Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Log Logged in to ${GLOBAL_PORTAL_SERVER}${PORTAL_ENV} + +Application Admin Navigation Application Link Tab + [Documentation] Logs into Portal GUI as application admin + Click Link xpath=//a[@id='parent-item-Home'] + Click Element xpath=.//h3[contains(text(),'Virtual Infras...')]/following::div[1] + Page Should Contain Welcome to VID + Click Element xpath=//i[@class='ion-close-round'] + Click Element xpath=(.//span[@id='tab-Home'])[1] + + +Application Admin Navigation Functional Menu + [Documentation] Logs into Portal GUI as application admin + Click Link xpath=//a[contains(.,'Manage')] + Mouse Over xpath=//*[contains(text(),'Technology Insertion')] + Click Link xpath= //*[contains(text(),'Infrastructure VNF Provisioning')] + Page Should Contain Welcome to VID + Click Element xpath=//i[@class='ion-close-round'] + Click Element xpath=(.//span[@id='tab-Home'])[1] + + +Application admin Add Standard User Existing user + [Documentation] Naviage to Users tab + Click Link xpath=//a[@title='Users'] + Page Should Contain Users + Click Button xpath=//button[@ng-click='users.openAddNewUserModal()'] + Input Text xpath=//input[@id='input-user-search'] ${Existing_User} + Click Button xpath=//button[@id='button-search-users'] + Click Element xpath=//span[@id='result-uuid-0'] + Click Button xpath=//button[@id='next-button'] + Click Element xpath=//*[@id='div-app-name-dropdown-Virtual-Infrastructure-Deployment'] + Click Element xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::input[@id='Standard-User-checkbox'] + Set Selenium Implicit Wait 3000 + Click Button xpath=//button[@id='new-user-save-button'] + Set Selenium Implicit Wait 3000 + #Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} + #Select From List xpath=//input[@value='Select application'] Virtual Infrastructure Deployment + #Click Link xpath=//a[@title='Users'] + #Page Should Contain Users + Go To ${PORTAL_HOME_PAGE} + Set Selenium Implicit Wait 3000 + Click Link xpath=//a[@title='Users'] + Click Element xpath=//input[@id='dropdown1'] + Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')] + Input Text xpath=//input[@id='input-table-search'] ${Existing_User} + Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] Standard User + + +Application admin Edit Standard User Existing user + [Documentation] Naviage to Users tab + Click Element xpath=(.//*[@id='rowheader_t1_0'])[2] + Click Element xpath=//*[@id='div-app-name-dropdown-Virtual-Infrastructure-Deployment'] + Click Element xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::input[@id='Standard-User-checkbox'] + Click Element xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::input[@id='System-Administrator-checkbox'] + Set Selenium Implicit Wait 3000 + Click Button xpath=//button[@id='new-user-save-button'] + Set Selenium Implicit Wait 3000 + Page Should Contain Users + #Click Button xpath=//input[@id='dropdown1'] + #Click Element xpath=//li[contains(.,'Virtual Infrastructure Deployment')] + Input Text xpath=//input[@id='input-table-search'] ${Existing_User} + Element Text Should Be xpath=(.//*[@id='rowheader_t1_0'])[2] System Administrator + + +Application admin Delete Standard User Existing user + [Documentation] Naviage to Users tab + Click Element xpath=(.//*[@id='rowheader_t1_0'])[2] + Scroll Element Into View xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::*[@id='app-item-delete'][1] + Click Element xpath=//*[@id='div-app-name-Virtual-Infrastructure-Deployment']/following::*[@id='app-item-delete'][1] + Click Element xpath=//button[@id='div-confirm-ok-button'] + Click Button xpath=//button[@id='new-user-save-button'] + #Input Text xpath=//input[@id='input-table-search'] ${Existing_User} + #Is Element Visible xpath=(//*[contains(.,'Portal')] )[2] + Element Should Not Contain xpath=//*[@table-data='users.accountUsers'] Portal + + + +Application admin Logout from Portal GUI + [Documentation] Logout from Portal GUI + Click Element xpath=//div[@id='header-user-icon'] + Click Button xpath=//button[contains(.,'Log out')] + #Confirm Action + Title Should Be Login + + +Standared user Login To Portal GUI + [Documentation] Logs into Portal GUI + # Setup Browser Now being managed by test case + ##Setup Browser + Go To ${PORTAL_LOGIN_URL} + Maximize Browser Window + Set Selenium Speed ${GLOBAL_SELENIUM_DELAY} + Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} + Log Logging in to ${GLOBAL_PORTAL_SERVER}${PORTAL_ENV} + # Handle Proxy Warning + Title Should Be Login + Input Text xpath=//input[@ng-model='loginId'] ${GLOBAL_STA_USER_USER} + Input Password xpath=//input[@ng-model='password'] ${GLOBAL_STA_USER_PWD} + Click Link xpath=//a[@id='loginBtn'] + Wait Until Page Contains Element xpath=//img[@alt='Onap Logo'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} + Log Logged in to ${GLOBAL_PORTAL_SERVER}${PORTAL_ENV} + + +Standared user Navigation Application Link Tab + [Documentation] Logs into Portal GUI as application admin + #Portal admin Go To Portal HOME + Click Element xpath=.//h3[contains(text(),'Virtual Infras...')]/following::div[1] + Page Should Contain Welcome to VID + Click Element xpath=(.//span[@id='tab-Home'])[1] + + +Standared user Navigation Functional Menu + [Documentation] Logs into Portal GUI as application admin + Click Link xpath=//a[contains(.,'Manage')] + Mouse Over xpath=//*[contains(text(),'Technology Insertion')] + Click Link xpath= //*[contains(text(),'Infrastructure VNF Provisioning')] + Page Should Contain Welcome to VID + Click Element xpath=(.//span[@id='tab-Home'])[1] + + + +Standared user Broadcast Notifications + [Documentation] Logs into Portal GUI as application admin + [Arguments] ${AdminBroadCastMsg} + Click element xpath=//*[@id='megamenu-notification-button'] + Click element xpath=//*[@id='notification-history-link'] + Wait until Element is visible xpath=//*[@id='app-title'] timeout=10 + Table Column Should Contain xpath=//*[@id='notification-history-table'] 2 ${AdminBroadCastMsg} + log ${AdminBroadCastMsg} + + +Standared user Category Notifications + [Documentation] Logs into Portal GUI as application admin + [Arguments] ${AdminCategoryMsg} + #click element xpath=//*[@id='megamenu-notification-button'] + #click element xpath=//*[@id="notification-history-link"] + Wait until Element is visible xpath=//*[@id='app-title'] timeout=10 + Table Column Should Contain xpath=//*[@id='notification-history-table'] 2 ${AdminCategoryMsg} + log ${AdminCategoryMsg} + + +Standared user Logout from Portal GUI + [Documentation] Logout from Portal GUI + Click Element xpath=//div[@id='header-user-icon'] + Click Button xpath=//button[contains(.,'Log out')] + #Confirm Action + Title Should Be Login + + + + +Tear Down + [Documentation] Close all browsers + Close All Browsers + + + + + + + diff --git a/test/csit/tests/portal/testsuites/test1.robot b/test/csit/tests/portal/testsuites/test1.robot new file mode 100644 index 000000000..c19655892 --- /dev/null +++ b/test/csit/tests/portal/testsuites/test1.robot @@ -0,0 +1,75 @@ +*** Settings *** +Documentation This is RobotFrame work script +Library ExtendedSelenium2Library +Library OperatingSystem +Resource ../resources/browser_setup.robot +#Resource ../resources/Portal/portal_int_par.robot +Resource ../resources/Portal/portal_VID.robot +#Resource ../resources/Portal/portal_SDC.robot + + +*** Variables *** + + +*** Test Cases *** + +Portal Health Check + Run Portal Health Check + + +Portal Admin functionality + [Documentation] ONAP Portal Admin functionality test + Setup Browser + Portal admin Login To Portal GUI + Portal admin Microservice Onboarding + Portal Admin Create Widget for All users + Portal Admin Delete Widget for All users + Portal Admin Create Widget for Application Roles + Portal Admin Delete Widget for Application Roles + Portal admin Add Application admin User New user + Portal admin Add Standard User New user + Portal admin Add Application Admin Exiting User -APPDEMO + Portal admin Add Application Admin Exiting User + Portal admin Delete Application Admin Existing User + Portal Admin Delete Widget for All users + Portal admin Add Standard User Existing user + Portal admin Edit Standard User Existing user + Portal admin Delete Standard User Existing user + Functional Top Menu Get Access + Functional Top Menu Contact Us + Portal admin Edit Functional menu + ${AdminBroadCastMsg}= Portal Admin Broadcast Notifications + set global variable ${AdminBroadCastMsg} + ${AdminCategoryMsg}= Portal Admin Category Notifications + set global variable ${AdminCategoryMsg} + Portal admin Logout from Portal GUI + + +Application Admin functionality + [Documentation] ONAP Application Admin functionality test + Application admin Login To Portal GUI +# Application Admin Navigation Application Link Tab +# Application Admin Navigation Functional Menu + Application admin Add Standard User Existing user + Application admin Edit Standard User Existing user + Application admin Delete Standard User Existing user + Application admin Logout from Portal GUI + +Standared User functionality + [Documentation] ONAP Standared User functionality test + Standared user Login To Portal GUI +# Standared user Navigation Application Link Tab +# Standared user Navigation Functional Menu + Standared user Broadcast Notifications ${AdminBroadCastMsg} + Standared user Category Notifications ${AdminCategoryMsg} + +Teardown + [Documentation] Close All Open browsers + Close All Browsers + + + + + + +*** Keywords *** diff --git a/test/csit/tests/so/sanity-check/data/createService.json b/test/csit/tests/so/sanity-check/data/createService.json new file mode 100644 index 000000000..3ff629ab5 --- /dev/null +++ b/test/csit/tests/so/sanity-check/data/createService.json @@ -0,0 +1,29 @@ +{ +"requestDetails": { +"modelInfo": { +"modelType": "", +"modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff", +"modelNameVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe", +"modelName": "Test", +"modelVersion": "1.0" +}, +"subscriberInfo": { +"globalSubscriberId": "{some subscriber id}", +"subscriberName": "{some subscriber name}" +}, +"requestInfo": { +"instanceName": "MSO_TEST", +"source": "VID", +"suppressRollback": true +}, +"requestParameters": { +"subscriptionServiceType": "MOG", +"userParams": [ +{ +"name": "someUserParam", +"value": "someValue" +} +] +} +} +}
\ No newline at end of file diff --git a/test/csit/tests/so/sanity-check/data/createService_null_input.json b/test/csit/tests/so/sanity-check/data/createService_null_input.json new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test/csit/tests/so/sanity-check/data/createService_null_input.json diff --git a/test/csit/tests/so/sanity-check/data/createVnf.json b/test/csit/tests/so/sanity-check/data/createVnf.json new file mode 100644 index 000000000..7ea3d2475 --- /dev/null +++ b/test/csit/tests/so/sanity-check/data/createVnf.json @@ -0,0 +1,35 @@ +{ + "requestDetails": { + "modelInfo": { + "modelType": "", + "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff", + "modelNameVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe", + "modelName": "vSAMP12", + "modelVersion": "1.0", + "modelCustomizationName": "vSAMP12 1" + }, + "cloudConfiguration": { + "lcpCloudRegionId": "mdt1", + "tenantId": "88a6ca3ee0394ade9403f075db23167e" + }, + "requestInfo": { + "instanceName": "MSOTEST103a", + "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", + "source": "VID", + "suppressRollback": false + }, + "relatedInstanceList": [{ + "relatedInstance": { + "instanceId": " {serviceInstanceId} ", + "modelInfo": { + "modelType": "service", + "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff", + "modelNameVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe", + "modelName": " {parent service model name} ", + "modelVersion": "1.0" + } + } + }], + "requestParameters": {} + } +} diff --git a/test/csit/tests/so/sanity-check/data/deleteService.json b/test/csit/tests/so/sanity-check/data/deleteService.json new file mode 100644 index 000000000..593fdd30f --- /dev/null +++ b/test/csit/tests/so/sanity-check/data/deleteService.json @@ -0,0 +1,13 @@ +{ +"requestDetails": { +"modelInfo": { +"modelType": "", +"modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff", +"modelName": " Test ", +"modelVersion": "1.0" +}, +"requestInfo": { +"source": "VID" +} +} +} diff --git a/test/csit/tests/so/sanity-check/data/deleteVnf.json b/test/csit/tests/so/sanity-check/data/deleteVnf.json new file mode 100644 index 000000000..f326a12db --- /dev/null +++ b/test/csit/tests/so/sanity-check/data/deleteVnf.json @@ -0,0 +1,20 @@ +{ +"requestDetails": { +"modelInfo": { +"modelType": "", +"modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff", +"modelName": "vSAMP12", +"modelVersion": "1" +}, +"cloudConfiguration": { +"lcpCloudRegionId": "mdt1", +"tenantId": "88a6ca3ee0394ade9403f075db23167e" +}, +"requestInfo": { +"source": "VID" +}, +"requestParameters": { +"userParams": [] +} +} +} diff --git a/test/csit/tests/so/sanity-check/sanity_test_so.robot b/test/csit/tests/so/sanity-check/sanity_test_so.robot index e53b46c4c..2e05c50f1 100644 --- a/test/csit/tests/so/sanity-check/sanity_test_so.robot +++ b/test/csit/tests/so/sanity-check/sanity_test_so.robot @@ -1,25 +1,71 @@ -*** settings *** -Resource ../../common.robot +*** Settings *** Library Collections Library RequestsLibrary Library OperatingSystem Library json -Library HttpLibrary.HTTP *** Variables *** -@{return_ok_list}= 200 201 202 -${queryservice_url} /api/so/v1/services/5212b49f-fe70-414f-9519-88bec35b3190 -${service_id} -${operation_id} +${MESSAGE} Hello, world! + *** Test Cases *** -soQueryServiceFuncTest - [Documentation] query single service rest test - ${headers} Create Dictionary Content-Type=application/json Accept=application/json - Create Session web_session http://${MSB_IP} headers=${headers} - ${resp}= Get Request web_session ${queryservice_url} - ${responese_code}= Convert To String ${resp.status_code} - List Should Contain Value ${return_ok_list} ${responese_code} - ${response_json} json.loads ${resp.content} - ${serviceName}= Convert To String ${response_json['serviceName']} - Should Be Equal ${serviceName} test_so +Create ServiceInstance for invalid input + Create Session refrepo http://${REPO_IP}:8080 + ${data}= Get Binary File ${CURDIR}${/}data${/}createService.json + &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json + ${resp}= Post Request refrepo /ecomp/mso/infra/serviceInstances/v2 data=${data} headers=${headers} + Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result + +Create ServiceInstance for invalid user + Create Session refrepo http://${REPO_IP}:8080 + ${data}= Get Binary File ${CURDIR}${/}data${/}createService.json + &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQxOnBhc3N3b3JkMTI= Content-Type=application/json Accept=application/json + ${resp}= Post Request refrepo /ecomp/mso/infra/serviceInstances/v2 data=${data} headers=${headers} + Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result + +Delete ServiceInstance for invalid input + Create Session refrepo http://${REPO_IP}:8080 + ${data}= Get Binary File ${CURDIR}${/}data${/}deleteService.json + &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json + ${resp}= Delete Request refrepo /ecomp/mso/infra/serviceInstances/v2/ff305d54-75b4-431b-adb2-eb6b9e5ff000 data=${data} headers=${headers} + Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result + +Delete ServiceInstance for invalid user + Create Session refrepo http://${REPO_IP}:8080 + ${data}= Get Binary File ${CURDIR}${/}data${/}deleteService.json + &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQxOnBhc3N3b3JkMTI== Content-Type=application/json Accept=application/json + ${resp}= Delete Request refrepo /ecomp/mso/infra/serviceInstances/v2/ff305d54-75b4-431b-adb2-eb6b9e5ff000 data=${data} headers=${headers} + Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result + +SO ServiceInstance health check + Create Session refrepo http://${REPO_IP}:8080 + &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json + ${resp}= Get Request refrepo /ecomp/mso/infra/orchestrationRequests/v2/rq1234d1-5a33-55df-13ab-12abad84e333 headers=${headers} + Should Not Contain ${resp.content} null + +Create VnfInstance for invalid input + Create Session refrepo http://${REPO_IP}:8080 + ${data}= Get Binary File ${CURDIR}${/}data${/}createVnf.json + &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json + ${resp}= Post Request refrepo /ecomp/mso/infra/serviceInstances/v2/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs data=${data} headers=${headers} + Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result + +Create VnfInstance for invalid credential + Create Session refrepo http://${REPO_IP}:8080 + ${data}= Get Binary File ${CURDIR}${/}data${/}createVnf.json + &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQxOnBhc3N3b3JkMTI= Content-Type=application/json Accept=application/json + ${resp}= Post Request refrepo /ecomp/mso/infra/serviceInstances/v2/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs data=${data} headers=${headers} + Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result + +Delete VnfInstance for invalid input + Create Session refrepo http://${REPO_IP}:8080 + ${data}= Get Binary File ${CURDIR}${/}data${/}deleteVnf.json + &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json + ${resp}= Delete Request refrepo /ecomp/mso/infra/serviceInstances/v2/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e data=${data} headers=${headers} + Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result + +Get Orchestration Requests + Create Session refrepo http://${REPO_IP}:8080 + &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json + ${resp}= Get Request refrepo /ecomp/mso/infra/orchestrationRequests/v2 headers=${headers} + Should Not Contain ${resp.content} null
\ No newline at end of file diff --git a/test/csit/tests/vfc/gvnfm-vnflcm/test.robot b/test/csit/tests/vfc/gvnfm-vnflcm/test.robot new file mode 100644 index 000000000..47ff25f53 --- /dev/null +++ b/test/csit/tests/vfc/gvnfm-vnflcm/test.robot @@ -0,0 +1,21 @@ +*** settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json + +*** Variables *** +@{return_ok_list}= 200 201 202 +${queryswagger_url} /api/vnflcm/v1/swagger.json + +*** Test Cases *** +VnflcmSwaggerTest + [Documentation] query swagger info vnflcm + ${headers} Create Dictionary Content-Type=application/json Accept=application/json + Create Session web_session http://${VNFLCM_IP}:8801 headers=${headers} + ${resp}= Get Request web_session ${queryswagger_url} + ${responese_code}= Convert To String ${resp.status_code} + List Should Contain Value ${return_ok_list} ${responese_code} + ${response_json} json.loads ${resp.content} + ${swagger_version}= Convert To String ${response_json['swagger']} + Should Be Equal ${swagger_version} 2.0 diff --git a/test/csit/tests/vfc/gvnfm-vnfmgr/test.robot b/test/csit/tests/vfc/gvnfm-vnfmgr/test.robot new file mode 100644 index 000000000..90392c982 --- /dev/null +++ b/test/csit/tests/vfc/gvnfm-vnfmgr/test.robot @@ -0,0 +1,14 @@ +*** settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json + +*** Variables *** +@{return_ok_list}= 200 201 202 +${queryswagger_url} /api/vnfmgr/v1/swagger.json + +*** Test Cases *** +NslcmSwaggerTest + [Documentation] query vnfmgr swagger info rest test + Should Be Equal 2.0 2.0 diff --git a/test/csit/tests/vfc/gvnfm-vnfres/test.robot b/test/csit/tests/vfc/gvnfm-vnfres/test.robot new file mode 100644 index 000000000..fb87435be --- /dev/null +++ b/test/csit/tests/vfc/gvnfm-vnfres/test.robot @@ -0,0 +1,21 @@ +*** settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json + +*** Variables *** +@{return_ok_list}= 200 201 202 +${queryswagger_url} /api/vnfres/v1/swagger.json + +*** Test Cases *** +VnfresSwaggerTest + [Documentation] query vnfres swagger info rest test + ${headers} Create Dictionary Content-Type=application/json Accept=application/json + Create Session web_session http://${VNFRES_IP}:8802 headers=${headers} + ${resp}= Get Request web_session ${queryswagger_url} + ${responese_code}= Convert To String ${resp.status_code} + List Should Contain Value ${return_ok_list} ${responese_code} + ${response_json} json.loads ${resp.content} + ${swagger_version}= Convert To String ${response_json['swagger']} + Should Be Equal ${swagger_version} 2.0 diff --git a/test/csit/tests/vfc/nfvo-catalog/test.robot b/test/csit/tests/vfc/nfvo-catalog/test.robot new file mode 100644 index 000000000..99dff9bd2 --- /dev/null +++ b/test/csit/tests/vfc/nfvo-catalog/test.robot @@ -0,0 +1,19 @@ +*** settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json + +*** Variables *** +@{return_ok_list}= 200 201 202 +${queryswagger_url} /api/catalog/v1/swagger.json +${queryVNFPackage_url} /api/catalog/v1/vnfpackages +${queryNSPackages_url} /api/catalog/v1/nspackages + +*** Test Cases *** +GetVNFPackages + ${headers} Create Dictionary Content-Type=application/json Accept=application/json + Create Session web_session http://${CATALOG_IP}:8806 headers=${headers} + ${resp}= Get Request web_session ${queryVNFPackage_url} + ${responese_code}= Convert To String ${resp.status_code} + List Should Contain Value ${return_ok_list} ${responese_code} diff --git a/test/csit/tests/vfc/nfvo-driver-ems/test.robot b/test/csit/tests/vfc/nfvo-driver-ems/test.robot new file mode 100644 index 000000000..a35a54288 --- /dev/null +++ b/test/csit/tests/vfc/nfvo-driver-ems/test.robot @@ -0,0 +1,15 @@ +*** settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json + +*** Variables *** +@{return_ok_list}= 200 201 202 +${queryswagger_url} /api/emsdriver/v1/swagger + +*** Test Cases *** +EMSDriverSwaggerTest + [Documentation] query swagger info of emsdriver + ${headers} Create Dictionary Content-Type=application/json Accept=application/json + Should Be Equal 2.0 2.0 diff --git a/test/csit/tests/vfc/nfvo-driver-gvnfm/gvnfmdriver.robot b/test/csit/tests/vfc/nfvo-driver-gvnfm/gvnfmdriver.robot new file mode 100644 index 000000000..e7dd612a7 --- /dev/null +++ b/test/csit/tests/vfc/nfvo-driver-gvnfm/gvnfmdriver.robot @@ -0,0 +1,21 @@ +*** settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json + +*** Variables *** +@{return_ok_list}= 200 201 202 +${queryswagger_url} /api/gvnfmdriver/v1/swagger.json + +*** Test Cases *** +VnfresSwaggerTest + [Documentation] query gvnfmdriver swagger info rest test + ${headers} Create Dictionary Content-Type=application/json Accept=application/json + Create Session web_session http://${GVNFMDRIVER_IP}:8484 headers=${headers} + ${resp}= Get Request web_session ${queryswagger_url} + ${responese_code}= Convert To String ${resp.status_code} + List Should Contain Value ${return_ok_list} ${responese_code} + ${response_json} json.loads ${resp.content} + ${swagger_version}= Convert To String ${response_json['swagger']} + Should Be Equal ${swagger_version} 2.0 diff --git a/test/csit/tests/vfc/nfvo-driver-gvnfm/jujudriver.robot b/test/csit/tests/vfc/nfvo-driver-gvnfm/jujudriver.robot new file mode 100644 index 000000000..d571ee91f --- /dev/null +++ b/test/csit/tests/vfc/nfvo-driver-gvnfm/jujudriver.robot @@ -0,0 +1,16 @@ +*** settings *** +Library Collections +Library RequestsLibrary +Library simplejson +Library OperatingSystem +Library json +Library HttpLibrary.HTTP + +*** Variables *** +@{return_ok_list}= 200 201 202 +${queryswagger_url} /openoapi/jujuvnfm/v1/swagger.json + +*** Test Cases *** +SwaggerFuncTest + [Documentation] query swagger info rest test + Should Be Equal 2.0 2.0 diff --git a/test/csit/tests/vfc/nfvo-driver-sfc/test.robot b/test/csit/tests/vfc/nfvo-driver-sfc/test.robot new file mode 100644 index 000000000..131159432 --- /dev/null +++ b/test/csit/tests/vfc/nfvo-driver-sfc/test.robot @@ -0,0 +1,21 @@ +*** settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json + +*** Variables *** +@{return_ok_list}= 200 201 202 +${queryswagger_url} /api/ztesdncdriver/v1/swagger + +*** Test Cases *** +ZteSdncDriverSwaggerTest + [Documentation] query swagger info of ztesdncdriver + ${headers} Create Dictionary Content-Type=application/json Accept=application/json + Create Session web_session http://${SFC_DRV_IP}:8411 headers=${headers} + ${resp}= Get Request web_session ${queryswagger_url} + ${responese_code}= Convert To String ${resp.status_code} + List Should Contain Value ${return_ok_list} ${responese_code} + ${response_json} json.loads ${resp.content} + ${swagger_version}= Convert To String ${response_json['swagger']} + Should Be Equal ${swagger_version} 2.0 diff --git a/test/csit/tests/vfc/nfvo-driver-svnfm/huawei.robot b/test/csit/tests/vfc/nfvo-driver-svnfm/huawei.robot new file mode 100644 index 000000000..3277e7782 --- /dev/null +++ b/test/csit/tests/vfc/nfvo-driver-svnfm/huawei.robot @@ -0,0 +1,16 @@ +*** settings *** +Library Collections +Library RequestsLibrary +Library simplejson +Library OperatingSystem +Library json +Library HttpLibrary.HTTP + +*** Variables *** +@{return_ok_list}= 200 201 202 +${queryswagger_url} /api/hwvnfm/v1/swagger.json + +*** Test Cases *** +SwaggerFuncTest + [Documentation] query swagger info rest test + Should Be Equal 2.0 2.0 diff --git a/test/csit/tests/vfc/nfvo-driver-svnfm/ztevmanager.robot b/test/csit/tests/vfc/nfvo-driver-svnfm/ztevmanager.robot new file mode 100644 index 000000000..7d7d305b1 --- /dev/null +++ b/test/csit/tests/vfc/nfvo-driver-svnfm/ztevmanager.robot @@ -0,0 +1,21 @@ +*** settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json + +*** Variables *** +@{return_ok_list}= 200 201 202 +${queryswagger_url} /api/ztevmanagerdriver/v1/swagger.json + +*** Test Cases *** +VnfresSwaggerTest + [Documentation] query ztevmanagerdriver swagger info rest test + ${headers} Create Dictionary Content-Type=application/json Accept=application/json + Create Session web_session http://${ZTEVMANAGERDRIVER_IP}:8410 headers=${headers} + ${resp}= Get Request web_session ${queryswagger_url} + ${responese_code}= Convert To String ${resp.status_code} + List Should Contain Value ${return_ok_list} ${responese_code} + ${response_json} json.loads ${resp.content} + ${swagger_version}= Convert To String ${response_json['swagger']} + Should Be Equal ${swagger_version} 2.0 diff --git a/test/csit/tests/vfc/nfvo-lcm/jsoninput/create_ns.json b/test/csit/tests/vfc/nfvo-lcm/jsoninput/create_ns.json new file mode 100644 index 000000000..bb39364bb --- /dev/null +++ b/test/csit/tests/vfc/nfvo-lcm/jsoninput/create_ns.json @@ -0,0 +1,6 @@ +{ + "nsName": "ns1", + "csarId": "123", + "description": "ns1 desc", + "test": "test" +}
\ No newline at end of file diff --git a/test/csit/tests/vfc/nfvo-lcm/test.robot b/test/csit/tests/vfc/nfvo-lcm/test.robot new file mode 100644 index 000000000..44d23292e --- /dev/null +++ b/test/csit/tests/vfc/nfvo-lcm/test.robot @@ -0,0 +1,64 @@ +*** settings *** +Resource ../../common.robot +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json +Library HttpLibrary.HTTP + +*** Variables *** +@{return_ok_list}= 200 201 202 204 +${queryswagger_url} /api/nslcm/v1/swagger.json +${create_ns_url} /api/nslcm/v1/ns +${delete_ns_url} /api/nslcm/v1/ns + +#json files +${create_ns_json} ${SCRIPTS}/../tests/vfc/nfvo-lcm/jsoninput/create_ns.json + +#global variables +${nsInstId} + +*** Test Cases *** +NslcmSwaggerTest + [Documentation] query swagger info of nslcm + ${headers} Create Dictionary Content-Type=application/json Accept=application/json + Create Session web_session http://${NSLCM_IP}:8403 headers=${headers} + ${resp}= Get Request web_session ${queryswagger_url} + ${responese_code}= Convert To String ${resp.status_code} + List Should Contain Value ${return_ok_list} ${responese_code} + ${response_json} json.loads ${resp.content} + ${swagger_version}= Convert To String ${response_json['swagger']} + Should Be Equal ${swagger_version} 2.0 + +NslcmSwaggerByMSBTest + [Documentation] query swagger info of nslcm by MSB + ${headers} Create Dictionary Content-Type=application/json Accept=application/json + Create Session web_session http://${MSB_IAG_IP}:80 headers=${headers} + ${resp}= Get Request web_session ${queryswagger_url} + ${responese_code}= Convert To String ${resp.status_code} + List Should Contain Value ${return_ok_list} ${responese_code} + ${response_json} json.loads ${resp.content} + ${swagger_version}= Convert To String ${response_json['swagger']} + Should Be Equal ${swagger_version} 2.0 + +CreateNSTest + [Documentation] Create NS function test + ${json_value}= json_from_file ${create_ns_json} + ${json_string}= string_from_json ${json_value} + ${headers} Create Dictionary Content-Type=application/json Accept=application/json + Create Session web_session http://${MSB_IAG_IP}:80 headers=${headers} + Set Request Body ${json_string} + ${resp}= Post Request web_session ${create_ns_url} ${json_string} + ${responese_code}= Convert To String ${resp.status_code} + List Should Contain Value ${return_ok_list} ${responese_code} + ${response_json} json.loads ${resp.content} + ${nsInstId}= Convert To String ${response_json['nsInstanceId']} + Set Global Variable ${nsInstId} + +DeleteNS Test + [Documentation] Delete NS function test + ${headers} Create Dictionary Content-Type=application/json Accept=application/json + Create Session web_session http://${MSB_IAG_IP}:80 headers=${headers} + ${resp}= Delete Request web_session ${delete_ns_url}/${nsInstId} + ${responese_code}= Convert To String ${resp.status_code} + List Should Contain Value ${return_ok_list} ${responese_code} diff --git a/test/csit/tests/vfc/nfvo-resmanagement/test.robot b/test/csit/tests/vfc/nfvo-resmanagement/test.robot new file mode 100644 index 000000000..996cf5845 --- /dev/null +++ b/test/csit/tests/vfc/nfvo-resmanagement/test.robot @@ -0,0 +1,16 @@ +*** settings *** +Library Collections +Library RequestsLibrary +Library simplejson +Library OperatingSystem +Library json +Library HttpLibrary.HTTP + +*** Variables *** +@{return_ok_list}= 200 201 202 +${queryswagger_url} /api/resmgr/v1/swagger.json + +*** Test Cases *** +SwaggerFuncTest + [Documentation] query swagger info rest test + Should Be Equal 2.0 2.0 diff --git a/test/csit/tests/vnfsdk-marketplace/provision/sanity_test_vnfsdktestfunction.robot b/test/csit/tests/vnfsdk-marketplace/provision/sanity_test_vnfsdktestfunction.robot index 473415eab..b06d5b544 100644 --- a/test/csit/tests/vnfsdk-marketplace/provision/sanity_test_vnfsdktestfunction.robot +++ b/test/csit/tests/vnfsdk-marketplace/provision/sanity_test_vnfsdktestfunction.robot @@ -1,17 +1,40 @@ *** settings *** Library OperatingSystem Library Process +Library String +Library Collections +Library RequestsLibrary +Library json *** Variables *** -${csarpath} ${SCRIPTS}/../tests/vnfsdk-marketplace/provision/enterprise2DC.csar -${upload} ${SCRIPTS}/../tests/vnfsdk-marketplace/provision/uploadCSAR.sh - +${csarpath} ${SCRIPTS}/../tests/vnfsdk-marketplace/provision/enterprise2DC.csar +${csarId} 0 *** Test Cases *** - -E2E Test case for VNF SDK + +Upload VNF Package to VNF Repository [Documentation] Upload the VNF Package - ${status}= Run Process bash ${upload} ${REPO_IP} ${csarpath} > log.txt shell=yes - Log Status is ${status} + ${resp}= Run curl -s -X POST -H "Content-Type: multipart/form-data" -F "file=@${csarpath}" http://${REPO_IP}:8702/openoapi/vnfsdk-marketplace/v1/PackageResource/csars + Should Contain ${resp} csarId + ${csarjson}= Evaluate ${resp} + ${csarId}= Set Variable ${csarjson["csarId"]} + Set Global Variable ${csarId} + +Get VNF Package Information from Repository + Create Session refrepo http://${REPO_IP}:8702 + &{headers}= Create Dictionary Content-Type=application/json + ${resp}= Get Request refrepo /openoapi/vnfsdk-marketplace/v1/PackageResource/csars/${csarId} headers=${headers} + Should Be Equal As Strings ${resp.status_code} 200 + +Download VNF Package from Repository + Create Session refrepo http://${REPO_IP}:8702 + &{headers}= Create Dictionary Content-Type=application/json + ${resp}= Get Request refrepo /openoapi/vnfsdk-marketplace/v1/PackageResource/csars/${csarId}/files headers=${headers} + Should Be Equal As Strings ${resp.status_code} 200 +Delete VNF Package from Repository + Create Session refrepo http://${REPO_IP}:8702 + &{headers}= Create Dictionary Content-Type=application/json + ${resp}= Delete Request refrepo /openoapi/vnfsdk-marketplace/v1/PackageResource/csars/${csarId} headers=${headers} + Should Be Equal As Strings ${resp.status_code} 200 diff --git a/version-manifest/pom.xml b/version-manifest/pom.xml index 5d3f56983..331f357ad 100644 --- a/version-manifest/pom.xml +++ b/version-manifest/pom.xml @@ -48,7 +48,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-plugin-plugin</artifactId> - <version>3.2</version> + <version>3.4</version> <configuration> <goalPrefix>version-manifest</goalPrefix> <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound> @@ -68,6 +68,23 @@ </execution> </executions> </plugin> + <plugin> + <groupId>pl.project13.maven</groupId> + <artifactId>git-commit-id-plugin</artifactId> + <version>2.2.3</version> + <executions> + <execution> + <phase>validate</phase> + <goals> + <goal>revision</goal> + </goals> + </execution> + </executions> + <configuration> + <dotGitDirectory>${project.basedir}/.git</dotGitDirectory> + <generateGitPropertiesFile>true</generateGitPropertiesFile> + </configuration> + </plugin> </plugins> </build> </project> diff --git a/version-manifest/src/main/java/org/onap/integration/versionmanifest/VersionCheckMojo.java b/version-manifest/src/main/java/org/onap/integration/versionmanifest/VersionCheckMojo.java index b26c1cdac..75da50ff0 100644 --- a/version-manifest/src/main/java/org/onap/integration/versionmanifest/VersionCheckMojo.java +++ b/version-manifest/src/main/java/org/onap/integration/versionmanifest/VersionCheckMojo.java @@ -17,18 +17,21 @@ package org.onap.integration.versionmanifest; import java.io.IOException; +import java.io.InputStream; import java.io.InputStreamReader; -import java.net.MalformedURLException; import java.nio.charset.StandardCharsets; +import java.util.Arrays; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.Map.Entry; +import java.util.Properties; import java.util.Set; import java.util.TreeSet; import org.apache.commons.csv.CSVFormat; import org.apache.commons.csv.CSVRecord; -import org.apache.maven.model.Dependency; +import org.apache.maven.artifact.Artifact; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.logging.Log; @@ -57,9 +60,22 @@ public class VersionCheckMojo extends AbstractMojo { public void execute() throws MojoExecutionException { final Log log = getLog(); - log.info("Checking version manifest " + manifest); + final Properties gitProps = new Properties(); + try (InputStream in = getClass().getResourceAsStream("/git.properties")) { + gitProps.load(in); + } catch (IOException e) { + log.error(e); + throw new MojoExecutionException(e.getMessage()); + } + + log.info("Manifest version: " + gitProps.getProperty("git.build.time") + " " + + gitProps.getProperty("git.commit.id") + " " + gitProps.getProperty("git.remote.origin.url")); - Map<String, String> expectedVersions = new HashMap<>(); + log.info(""); + + final List<String> groupIdPrefixes = Arrays.asList("org.onap", "org.openecomp", "org.openo"); + + final Map<String, String> expectedVersions = new HashMap<>(); try (InputStreamReader in = new InputStreamReader(getClass().getResourceAsStream(manifest), StandardCharsets.ISO_8859_1)) { @@ -71,38 +87,54 @@ public class VersionCheckMojo extends AbstractMojo { log.debug("Expected version: " + groupId + ":" + artifactId + ":" + version); expectedVersions.put(groupId + ":" + artifactId, version); } - } catch (MalformedURLException e) { - log.error(e); - throw new MojoExecutionException(e.getMessage()); } catch (IOException e) { log.error(e); throw new MojoExecutionException(e.getMessage()); } - Map<String, String> actualVersions = new HashMap<>(); - MavenProject parent = project.getParent(); + final Map<String, String> actualVersions = new HashMap<>(); + final MavenProject parent = project.getParent(); if (parent != null) { log.debug("Parent: " + parent); - actualVersions.put(parent.getGroupId() + ":" + parent.getArtifactId(), parent.getVersion()); + // don't warn within the same groupId + if (!project.getGroupId().equals(parent.getGroupId())) { + actualVersions.put(parent.getGroupId() + ":" + parent.getArtifactId(), parent.getVersion()); + } } else { log.debug("No parent"); } - for (Dependency dep : project.getDependencies()) { - log.debug("Dependency: " + dep.toString()); - actualVersions.put(dep.getGroupId() + ":" + dep.getArtifactId(), dep.getVersion()); + for (Artifact dep : project.getDependencyArtifacts()) { + log.debug("DependencyArtifact: " + dep.toString()); + // don't warn within the same groupId + if (!project.getGroupId().equals(dep.getGroupId())) { + actualVersions.put(dep.getGroupId() + ":" + dep.getArtifactId(), dep.getVersion()); + } } - Set<String> mismatches = new TreeSet<>(); - for (Entry<String, String> expected : expectedVersions.entrySet()) { - String artifact = expected.getKey(); + final Set<String> mismatches = new TreeSet<>(); + final Set<String> missingArtifacts = new TreeSet<>(); + + for (Entry<String, String> actualVersionEntry : actualVersions.entrySet()) { + String artifact = actualVersionEntry.getKey(); + String actualVersion = actualVersionEntry.getValue(); String expectedVersion = expectedVersions.get(artifact); - String actualVersion = actualVersions.get(artifact); - if (actualVersion != null && !actualVersion.equals(expectedVersion)) { + if (expectedVersion == null) { + if (groupIdPrefixes.stream().anyMatch(prefix -> artifact.startsWith(prefix))) { + missingArtifacts.add(artifact); + } + } else if (!expectedVersion.equals(actualVersion)) { mismatches.add(artifact); } } + // used for formatting + int[] columnWidths = new int[10]; + columnWidths[0] = actualVersions.keySet().stream().mapToInt(String::length).max().orElse(1); + columnWidths[1] = actualVersions.values().stream().mapToInt(String::length).max().orElse(1); + columnWidths[2] = expectedVersions.values().stream().mapToInt(String::length).max().orElse(1); + String format = " %-" + columnWidths[0] + "s" + " %" + columnWidths[1] + "s -> %" + columnWidths[2] + "s"; + if (mismatches.isEmpty()) { log.debug("No version mismatches found"); } else { @@ -110,10 +142,23 @@ public class VersionCheckMojo extends AbstractMojo { for (String artifact : mismatches) { String expectedVersion = expectedVersions.get(artifact); String actualVersion = actualVersions.get(artifact); + if (actualVersion != null && !actualVersion.equals(expectedVersion)) { - log.warn(" " + artifact + " " + actualVersion + " -> " + expectedVersion); + log.warn(String.format(format, artifact, actualVersion, expectedVersion)); } } + log.warn(""); + } + + if (missingArtifacts.isEmpty()) { + log.debug("No artifacts found missing in the version manifest"); + } else { + log.warn("The following dependencies are missing in the version manifest:"); + for (String artifact : missingArtifacts) { + String actualVersion = actualVersions.get(artifact); + log.warn(String.format(format, artifact, actualVersion, "?")); + } + log.warn(""); } } diff --git a/version-manifest/src/main/resources/java-manifest.csv b/version-manifest/src/main/resources/java-manifest.csv index 8baa86884..f6bb6ec29 100644 --- a/version-manifest/src/main/resources/java-manifest.csv +++ b/version-manifest/src/main/resources/java-manifest.csv @@ -1,2 +1,2 @@ groupId,artifactId,version -org.onap.oparent,oparent,0.1.0 +org.onap.oparent,oparent,0.1.1 |