From: Mike Marchetti Date: Thu, 5 Oct 2017 17:28:33 +0000 (-0400) Subject: test fixups, remove MON from repo list X-Git-Tag: v3.0.0rc6~3 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F31%2F5531%2F2;p=osm%2Fdevops.git test fixups, remove MON from repo list - update install to point to rel-three README Signed-off-by: Mike Marchetti Change-Id: Ibe87a1401ce41af004e3589eecb7b6841489671d --- diff --git a/descriptor-packages/mk/pkg.mk b/descriptor-packages/mk/pkg.mk index 350af35e..02646026 100644 --- a/descriptor-packages/mk/pkg.mk +++ b/descriptor-packages/mk/pkg.mk @@ -24,6 +24,7 @@ CHARM_DIR := $(TOPDIR)/juju-charms CHARM_SRC_DIR := $(CHARM_DIR)/layers CHARM_DOCKER_TAG := charm-tools CHARM_BUILD_DIR := $(CHARM_DIR)/builds +DOCKER_BUILD ?= $(shell which docker) Q=@ @@ -57,9 +58,14 @@ $(BUILD_DIR)/$(PKG_NAME): $(BUILD_DIR)/$(PKG_BASE_NAME) $(Q)$(GEN_PKG) --no-remove-files -d $(BUILD_DIR) $(BUILD_DIR)/$(PKG_BASE_NAME) endif +ifdef DOCKER_BUILD $(CHARM_BUILD_DIR)/%: $(CHARM_SRC_DIR)/% $(Q)docker build -q -t $(CHARM_DOCKER_TAG) $(CHARM_DIR)/. - $(Q)docker run -u $$(id -u):$$(id -g) -v$(CHARM_DIR):$(CHARM_DIR) -w$(CHARM_DIR) $(CHARM_DOCKER_TAG) charm-build -o $(CHARM_DIR) $< + $(CHARM_DIR) $(CHARM_DOCKER_TAG) charm-build -o $(CHARM_DIR) $< +else +$(CHARM_BUILD_DIR)/%: $(CHARM_SRC_DIR)/% + $(Q)charm-build -o $(CHARM_DIR) $< +endif clean: $(Q)rm -rf $(BUILD_DIR) diff --git a/installers/export_ips b/installers/export_ips index a345a4b9..a41e1efc 100644 --- a/installers/export_ips +++ b/installers/export_ips @@ -22,4 +22,4 @@ export DEFAULT_IP=`ip -o -4 a |grep ${DEFAULT_IF}|awk '{split($4,a,"/"); print a export VCA_CONTAINER_IP=`lxc list VCA -c 4|grep eth0 |awk '{print $2}'` export SO_CONTAINER_IP=`lxc list SO-ub -c 4|grep eth0 |awk '{print $2}'` export RO_CONTAINER_IP=`lxc list RO -c 4|grep eth0 |awk '{print $2}'` -export MON_CONTAINER_IP=`lxc list MON -c 4|grep eth0|awk '{print $2}'` +#export MON_CONTAINER_IP=`lxc list MON -c 4|grep eth0|awk '{print $2}'` diff --git a/installers/install_osm.sh b/installers/install_osm.sh index 9d10308c..4046cfb2 100755 --- a/installers/install_osm.sh +++ b/installers/install_osm.sh @@ -405,7 +405,7 @@ echo -e "Checking required packages: lxd" lxd --version &>/dev/null || FATAL "lxd not present, exiting." [ -n "$LXD" ] && echo -e "\nConfiguring lxd" && install_lxd -wget -q -O- https://osm-download.etsi.org/ftp/osm-2.0-two/README.txt &> /dev/null +wget -q -O- https://osm-download.etsi.org/ftp/osm-3.0-three/README.txt &> /dev/null # use local devops for containers export OSM_USE_LOCAL_DEVOPS=true @@ -429,5 +429,5 @@ nat #Configure components configure -wget -q -O- https://osm-download.etsi.org/ftp/osm-2.0-two/README2.txt &> /dev/null +wget -q -O- https://osm-download.etsi.org/ftp/osm-3.0-three/README2.txt &> /dev/null echo -e "\nDONE" diff --git a/jenkins/common/install_common b/jenkins/common/install_common index 71eb1623..4a7c3529 100755 --- a/jenkins/common/install_common +++ b/jenkins/common/install_common @@ -46,4 +46,4 @@ echo $key_location curl $key_location | apt-key add - -apt-get update && add-apt-repository -y "deb $REPOSITORY_BASE/$RELEASE $REPOSITORY SO UI RO IM MON osmclient openvim" +apt-get update && add-apt-repository -y "deb $REPOSITORY_BASE/$RELEASE $REPOSITORY SO UI RO IM osmclient openvim" diff --git a/systest/Makefile b/systest/Makefile index 7f5a542f..ce5c68a6 100644 --- a/systest/Makefile +++ b/systest/Makefile @@ -28,6 +28,8 @@ OS_USERNAME ?= OS_PASSWORD_NAME ?= OS_PROJECT_NAME ?= +TOPDIR=$(shell readlink -f .|sed -e 's/systest.*//') + ifdef OS_AUTH_URL OPTION_OS_AUTH_URL=--os-url $(OS_AUTH_URL) endif @@ -48,10 +50,7 @@ ifdef TEST_NSD_DESCRIPTORS OPTION_TEST_NSD_DESCRIPTORS=--osm-nsd-descriptor-packages $(TEST_NSD_DESCRIPTORS) endif -DESCRIPTOR_REPO_NAME = descriptor-packages -DESCRIPTOR_REPO_DIR ?= $(shell pwd)/descriptor-packages -DESCRIPTOR_BUILD_DIR := $(DESCRIPTOR_REPO_DIR)/build -OPTION_DESCRIPTOR_BUILD_DIR=--osm-descriptor-packages $(DESCRIPTOR_BUILD_DIR) +DESCRIPTOR_DIR ?= $(TOPDIR)/descriptor-packages TEST_OSM_NS_NAME_PREFIX=pytest-$(shell date +%D-%T)- OPTION_TEST_OSM_NS_NAME_PREFIX=--osm-ns-name-prefix $(TEST_OSM_NS_NAME_PREFIX) @@ -63,9 +62,6 @@ JUNITXML ?= pytest-output.xml PYTEST_OPTIONS= Q=@ -DESCRIPTOR_REPO ?= https://osm.etsi.org/gerrit/osm/$(DESCRIPTOR_REPO_NAME) - - TEST_VNFD_DESCRIPTORS ?= None TEST_NSD_DESCRIPTORS ?= None @@ -87,10 +83,6 @@ check_openstack_env: .PHONY: check_openstack_env check_OSM_HOSTNAME -descriptors: - test -e $(DESCRIPTOR_REPO_NAME) || git clone $(DESCRIPTOR_REPO) - $(MAKE) -C $(DESCRIPTOR_REPO_NAME) - report_dir: @mkdir -p reports @@ -108,17 +100,27 @@ _run_test: report_dir --junitxml $(JUNITXML_DIR)/$(JUNITXML) \ $(PYTEST_OPTIONS) -cirros: check_OSM_HOSTNAME check_openstack_env +$(DESCRIPTOR_DIR)/vnfd/cirros_vnf/build/%.tar.gz: + $(MAKE) -C $(DESCRIPTOR_DIR)/vnfd/cirros_vnf + +$(DESCRIPTOR_DIR)/nsd/cirros_ns/build/%.tar.gz: + $(MAKE) -C $(DESCRIPTOR_DIR)/nsd/cirros_ns + +cirros: check_OSM_HOSTNAME check_openstack_env \ + $(DESCRIPTOR_DIR)/vnfd/cirros_vnf/build/cirros_vnf.tar.gz \ + $(DESCRIPTOR_DIR)/nsd/cirros_ns/build/cirros_ns.tar.gz $(Q)$(MAKE) \ - TEST_VNFD_DESCRIPTORS=$(DESCRIPTOR_BUILD_DIR)/vnfd_pkgs/cirros_vnf.tar.gz \ - TEST_NSD_DESCRIPTORS=$(DESCRIPTOR_BUILD_DIR)/nsd_pkgs/cirros_ns.tar.gz \ + TEST_VNFD_DESCRIPTORS=$(DESCRIPTOR_DIR)/vnfd/cirros_vnf/build/cirros_vnf.tar.gz \ + TEST_NSD_DESCRIPTORS=$(DESCRIPTOR_DIR)/nsd/cirros_ns/build/cirros_ns.tar.gz \ JUNITXML=pytest-$@.xml \ PYTEST_OPTIONS="$(PYTEST_OPTIONS) -m vnf" _run_test -ns_scale: check_OSM_HOSTNAME check_openstack_env +ns_scale: check_OSM_HOSTNAME check_openstack_env \ + $(DESCRIPTOR_DIR)/vnfd/cirros_vnf/build/cirros_vnf.tar.gz \ + $(DESCRIPTOR_DIR)/nsd/cirros_ns/build/cirros_ns.tar.gz $(Q)$(MAKE) \ - TEST_VNFD_DESCRIPTORS=$(DESCRIPTOR_BUILD_DIR)/vnfd_pkgs/cirros_vnf.tar.gz \ - TEST_NSD_DESCRIPTORS=$(DESCRIPTOR_BUILD_DIR)/nsd_pkgs/cirros_ns.tar.gz \ + TEST_VNFD_DESCRIPTORS=$(DESCRIPTOR_DIR)/vnfd/cirros_vnf/build/cirros_vnf.tar.gz \ + TEST_NSD_DESCRIPTORS=$(DESCRIPTOR_DIR)/nsd/cirros_ns/build/cirros_ns.tar.gz \ JUNITXML=pytest-$@.xml \ PYTEST_OPTIONS="$(PYTEST_OPTIONS) -m ns_scale" _run_test @@ -132,10 +134,19 @@ vim: check_OSM_HOSTNAME check_openstack_env JUNITXML=pytest-$@.xml \ PYTEST_OPTIONS="$(PYTEST_OPTIONS) -m vim" _run_test +$(DESCRIPTOR_DIR)/vnfd/ping_vnf/build/%.tar.gz: + $(MAKE) -C $(DESCRIPTOR_DIR)/vnfd/ping_vnf + +$(DESCRIPTOR_DIR)/vnfd/pong_vnf/build/%.tar.gz: + $(MAKE) -C $(DESCRIPTOR_DIR)/vnfd/pong_vnf + +$(DESCRIPTOR_DIR)/vnfd/ping_pong_ns/build/%.tar.gz: + $(MAKE) -C $(DESCRIPTOR_DIR)/nsd/ping_pong_ns + ping_pong: check_OSM_HOSTNAME check_openstack_env $(Q)$(MAKE) \ - TEST_VNFD_DESCRIPTORS="$(DESCRIPTOR_BUILD_DIR)/vnfd_pkgs/ping_vnf.tar.gz,$(DESCRIPTOR_BUILD_DIR)/vnfd_pkgs/pong_vnf.tar.gz" \ - TEST_NSD_DESCRIPTORS="$(DESCRIPTOR_BUILD_DIR)/nsd_pkgs/ping_pong_ns.tar.gz" \ + TEST_VNFD_DESCRIPTORS="$(DESCRIPTOR_DIR)/vnfd/ping_vnf/build/ping_vnf.tar.gz $(DESCRIPTOR_DIR)/vnfd/pong_vnf/build/pong_vnf.tar.gz" \ + TEST_NSD_DESCRIPTORS=$(DESCRIPTOR_DIR)/nsd/ping_pong_ns/build/ping_pong_ns.tar.gz \ JUNITXML=pytest-$@.xml \ PYTEST_OPTIONS="$(PYTEST_OPTIONS) -m vnf" _run_test diff --git a/systest/testcases/vnfs/test_vnfs.py b/systest/testcases/vnfs/test_vnfs.py index efbfb101..d8727155 100644 --- a/systest/testcases/vnfs/test_vnfs.py +++ b/systest/testcases/vnfs/test_vnfs.py @@ -86,7 +86,7 @@ class TestClass(object): assert not osm.get_api().ns.create(nsd_desc['name'],ns_name,vim.vim_name) - assert utils.wait_for_value(lambda: osm.get_api().ns.get_field(ns_name,'operational-status'),result='init') + assert utils.wait_for_value(lambda: osm.get_api().ns.get_field(ns_name,'operational-status'),result='vnf-init-phase') # make sure ns is running assert utils.wait_for_value(lambda: osm.get_api().ns.get_field(ns_name,'operational-status'),result='running',wait_time=120)