aboutsummaryrefslogtreecommitdiffstats
path: root/lcm/ns/biz/ns_get.py
diff options
context:
space:
mode:
Diffstat (limited to 'lcm/ns/biz/ns_get.py')
-rw-r--r--lcm/ns/biz/ns_get.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/lcm/ns/biz/ns_get.py b/lcm/ns/biz/ns_get.py
index 1839bf0e..697d7c42 100644
--- a/lcm/ns/biz/ns_get.py
+++ b/lcm/ns/biz/ns_get.py
@@ -17,8 +17,12 @@ import logging
from lcm.ns.const import NS_INSTANCE_BASE_URI
from lcm.ns.enum import OWNER_TYPE
-from lcm.pub.utils import restcall
-from lcm.pub.database.models import NSInstModel, NfInstModel, VLInstModel, CPInstModel, VNFFGInstModel
+from lcm.pub.database.models import NSInstModel
+from lcm.pub.database.models import NfInstModel
+from lcm.pub.database.models import VLInstModel
+from lcm.pub.database.models import CPInstModel
+from lcm.pub.database.models import VNFFGInstModel
+from lcm.pub.database.models import PNFInstModel
logger = logging.getLogger(__name__)
@@ -167,9 +171,5 @@ class GetNSInfoService(object):
@staticmethod
def get_pnf_infos(ns_instance_id):
- uri = "api/nslcm/v1/pnfs?nsInstanceId=%s" % ns_instance_id
- ret = restcall.req_by_msb(uri, "GET")
- if ret[0] == 0:
- return json.loads(ret[1])
- else:
- return []
+ pnfs = PNFInstModel.objects.filter(nsInstances__contains=ns_instance_id)
+ return [pnf.__dict__ for pnf in pnfs]