aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docker/vnf/Dockerfile9
-rw-r--r--functest/ci/config_functest.yaml1
-rw-r--r--functest/opnfv_tests/vnf/epc/juju_epc.py21
3 files changed, 10 insertions, 21 deletions
diff --git a/docker/vnf/Dockerfile b/docker/vnf/Dockerfile
index 6d96d98a..c52f6bc4 100644
--- a/docker/vnf/Dockerfile
+++ b/docker/vnf/Dockerfile
@@ -3,6 +3,11 @@ FROM opnfv/functest-core
ARG BRANCH=master
ARG OPENSTACK_TAG=stable/pike
ARG VIMS_TAG=stable
+ARG JUJU_TAG=tags/juju-2.2.5
+
+ENV GOPATH /src/epc-requirements/go
+ENV GOBIN /src/epc-requirements/go/bin
+ENV PATH $GOBIN:$PATH
RUN apk --no-cache add --update \
ruby ruby-bundler ruby-irb ruby-rdoc dnsmasq \
@@ -18,6 +23,10 @@ RUN apk --no-cache add --update \
-chttps://git.opnfv.org/functest/plain/upper-constraints.txt?h=$BRANCH \
juju-wait && \
go get github.com/rogpeppe/godeps && \
+ go get -d -v github.com/juju/juju/... || true && \
+ (cd $GOPATH/src/github.com/juju/juju && git checkout $JUJU_TAG && godeps -u dependencies.tsv) && \
+ go install -v github.com/juju/juju/... && \
+ rm -rf $GOPATH/go/src/ $GOPATH/pkg && \
(cd /src/vims-test && bundle config build.nokogiri --use-system-libraries && bundle install --system) && \
rm -r upper-constraints.txt /src/vims-test/.git /src/epc-requirements/abot_charm/.git && \
apk del .build-deps
diff --git a/functest/ci/config_functest.yaml b/functest/ci/config_functest.yaml
index ebaccc0c..54e8d08c 100644
--- a/functest/ci/config_functest.yaml
+++ b/functest/ci/config_functest.yaml
@@ -153,7 +153,6 @@ vnf:
private_subnet_cidr: 172.16.0.0/24
private_subnet_name: abot-subnet
external_router: abot-router
- external_network_name: ext-net
dns_nameserver: ['8.8.8.8']
cloudify_ims:
diff --git a/functest/opnfv_tests/vnf/epc/juju_epc.py b/functest/opnfv_tests/vnf/epc/juju_epc.py
index ada11c3a..052efd3f 100644
--- a/functest/opnfv_tests/vnf/epc/juju_epc.py
+++ b/functest/opnfv_tests/vnf/epc/juju_epc.py
@@ -9,7 +9,6 @@
"""Juju testcase implementation."""
import logging
-import shutil
import os
import time
import json
@@ -17,7 +16,7 @@ import sys
from copy import deepcopy
from urlparse import urljoin
-import functest.core.vnf as vnf
+from functest.core import vnf
from functest.opnfv_tests.openstack.snaps import snaps_utils
from functest.utils.constants import CONST
import functest.utils.openstack_utils as os_utils
@@ -170,8 +169,6 @@ class JujuEpc(vnf.VnfOnBoarding):
'vnf_{}_external_router'.format(self.case_name))
dns_nameserver = CONST.__getattribute__(
'vnf_{}_dns_nameserver'.format(self.case_name))
- ext_net_name = CONST.__getattribute__(
- 'vnf_{}_external_network_name'.format(self.case_name))
self.__logger.info("Creating full network ...")
subnet_settings = SubnetConfig(name=private_subnet_name,
@@ -203,22 +200,6 @@ class JujuEpc(vnf.VnfOnBoarding):
self.__logger.info("Juju Bootstrap: Skip creation of flavors")
flavor_creator.create()
self.created_object.append(flavor_creator)
- self.__logger.info("Installing Dependency Packages .......")
- source_dir = "/src/epc-requirements/juju_bin_build"
- if os.path.exists(source_dir):
- shutil.rmtree(source_dir)
- os.makedirs(source_dir)
- os.environ['GOPATH'] = str(source_dir)
- os.environ['GOBIN'] = str(source_dir) + "/bin"
- os.environ['PATH'] = ((os.path.expandvars('$GOPATH')) + ":" +
- (os.path.expandvars('$GOBIN')) + ":" +
- (os.path.expandvars('$PATH')))
- os.system('go get -d -v github.com/juju/juju/...')
- os.chdir(source_dir + "/src" + "/github.com" + "/juju" + "/juju")
- os.system('git checkout tags/juju-2.2.5')
- os.system('go get github.com/rogpeppe/godeps')
- os.system('godeps -u dependencies.tsv')
- os.system('go install -v github.com/juju/juju/...')
self.__logger.info("Creating Cloud for Abot-epc .....")
os.system('juju add-cloud abot-epc -f {}'.format(self.filename))
os.system('juju add-credential abot-epc -f {}'.format(self.filename))