1. fix the url of links in VNF
[modeling/etsicatalog.git] / catalog / packages / biz / vnf_package.py
index 1073879..20741a5 100644 (file)
@@ -15,7 +15,6 @@
 import json
 import logging
 import os
 import json
 import logging
 import os
-
 import threading
 import traceback
 import urllib
 import threading
 import traceback
 import urllib
@@ -25,7 +24,7 @@ import zipfile
 from catalog.packages import const
 from catalog.packages.biz.common import parse_file_range, read, save
 from catalog.packages.biz.notificationsutil import PkgNotifications
 from catalog.packages import const
 from catalog.packages.biz.common import parse_file_range, read, save
 from catalog.packages.biz.notificationsutil import PkgNotifications
-from catalog.pub.config.config import CATALOG_ROOT_PATH, MSB_SERVICE_IP, MSB_SERVICE_PORT
+from catalog.pub.config.config import CATALOG_ROOT_PATH, MSB_SERVICE_IP, MSB_SERVICE_PORT, MSB_SERVICE_PROTOCOL
 from catalog.pub.database.models import VnfPackageModel, NSPackageModel
 from catalog.pub.exceptions import CatalogException, ResourceNotFoundException
 from catalog.pub.utils import fileutil, toscaparser
 from catalog.pub.database.models import VnfPackageModel, NSPackageModel
 from catalog.pub.exceptions import CatalogException, ResourceNotFoundException
 from catalog.pub.utils import fileutil, toscaparser
@@ -280,7 +279,8 @@ def fill_artifacts_data(vnf_pkg_id):
 
 
 def fill_links(pkg_id, is_onboarded=False):
 
 
 def fill_links(pkg_id, is_onboarded=False):
-    self_href = "http://%s:%s/api/vnfpkgm/v1/vnf_packages/%s" % (
+    self_href = "%s://%s:%s/api/vnfpkgm/v1/vnf_packages/%s" % (
+        MSB_SERVICE_PROTOCOL,
         MSB_SERVICE_IP,
         MSB_SERVICE_PORT,
         pkg_id)
         MSB_SERVICE_IP,
         MSB_SERVICE_PORT,
         pkg_id)