summaryrefslogtreecommitdiffstats
path: root/mgr
diff options
context:
space:
mode:
authorying.yunlong <ying.yunlong@zte.com.cn>2017-12-20 14:38:13 +0800
committerying.yunlong <ying.yunlong@zte.com.cn>2017-12-20 14:38:13 +0800
commite48c3155c40d1bab7a6413eb86359245a1f45470 (patch)
treeb2df9a3bbe6bec685bb77e16779a6194aeb40ffc /mgr
parent41ad5ef102ef8ec581fc0d9f59ab01ca84846241 (diff)
Fix vfc-vnfmgr master download url
Change-Id: I187eb341243c5ea59dfd5691127a6f6abfb01e61 Issue-ID: VFC-625 Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
Diffstat (limited to 'mgr')
-rw-r--r--mgr/docker/Dockerfile4
-rw-r--r--mgr/mgr/vnfreg/views.py3
2 files changed, 5 insertions, 2 deletions
diff --git a/mgr/docker/Dockerfile b/mgr/docker/Dockerfile
index b20a7d2..82f8cef 100644
--- a/mgr/docker/Dockerfile
+++ b/mgr/docker/Dockerfile
@@ -30,12 +30,12 @@ ADD . /service
WORKDIR /service
# get binary zip from nexus - vfc-gvnfm-vnfmgr
-RUN wget -q -O vfc-gvnfm-vnfmgr.zip 'https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.vfc.gvnfm.vnfmgr.mgr&a=vfc-gvnfm-vnfmgr-mgr&v=LATEST&e=zip' && \
+RUN wget -q -O vfc-gvnfm-vnfmgr.zip 'https://nexus.onap.org/service/local/artifact/maven/redirect?r=staging&g=org.onap.vfc.gvnfm.vnfmgr.mgr&a=vfc-gvnfm-vnfmgr-mgr&v=LATEST&e=zip' && \
unzip vfc-gvnfm-vnfmgr.zip && \
rm -rf vfc-gvnfm-vnfmgr.zip
# get db scripts from nexus
-RUN wget -q -O vfc-gvnfm-vnfres-res.zip 'https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.vfc.gvnfm.vnfres.res&a=vfc-gvnfm-vnfres-res&v=LATEST&e=zip' && \
+RUN wget -q -O vfc-gvnfm-vnfres-res.zip 'https://nexus.onap.org/service/local/artifact/maven/redirect?r=staging&g=org.onap.vfc.gvnfm.vnfres.res&a=vfc-gvnfm-vnfres-res&v=LATEST&e=zip' && \
unzip vfc-gvnfm-vnfres-res.zip vfc/gvnfm/vnfres/res/assembly/*.* && \
mv ./vfc/gvnfm/vnfres/res/assembly/bin ./bin && \
mv ./vfc/gvnfm/vnfres/res/assembly/dbscripts ./dbscripts && \
diff --git a/mgr/mgr/vnfreg/views.py b/mgr/mgr/vnfreg/views.py
index 15abe62..2319db7 100644
--- a/mgr/mgr/vnfreg/views.py
+++ b/mgr/mgr/vnfreg/views.py
@@ -41,6 +41,7 @@ def add_vnf(request, *args, **kwargs):
username=ignore_case_get(request.data, "username"),
password=ignore_case_get(request.data, "password")).save()
except Exception as e:
+ logger.error(e.message)
return Response(data={'error': e.message}, status=status.HTTP_500_INTERNAL_SERVER_ERROR)
return Response(data={"vnfInstId": vnf_inst_id}, status=status.HTTP_201_CREATED)
@@ -86,6 +87,7 @@ def access_vnf(request, *args, **kwargs):
ret = {}
normal_status = status.HTTP_204_NO_CONTENT
except Exception as e:
+ logger.error(e.message)
return Response(data={'error': e.message}, status=status.HTTP_500_INTERNAL_SERVER_ERROR)
return Response(data=ret, status=normal_status)
@@ -109,5 +111,6 @@ def vnf_config(request, *args, **kwargs):
if ret[0] != 0:
raise Exception("Failed to config Vnf(%s): %s" % (vnf_inst_id, ret[1]))
except Exception as e:
+ logger.error(e.message)
return Response(data={'error': e.message}, status=status.HTTP_500_INTERNAL_SERVER_ERROR)
return Response(data={}, status=status.HTTP_202_ACCEPTED)