projects
/
osm
/
NBI.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
allow with kwargs (option override) to create nested objects
[osm/NBI.git]
/
osm_nbi
/
instance_topics.py
diff --git
a/osm_nbi/instance_topics.py
b/osm_nbi/instance_topics.py
index
b73d85f
..
d58fc3d
100644
(file)
--- a/
osm_nbi/instance_topics.py
+++ b/
osm_nbi/instance_topics.py
@@
-34,6
+34,7
@@
__author__ = "Alfonso Tierno <alfonso.tiernosepulveda@telefonica.com>"
class NsrTopic(BaseTopic):
topic = "nsrs"
topic_msg = "ns"
class NsrTopic(BaseTopic):
topic = "nsrs"
topic_msg = "ns"
+ quota_name = "ns_instances"
schema_new = ns_instantiate
def __init__(self, db, fs, msg, auth):
schema_new = ns_instantiate
def __init__(self, db, fs, msg, auth):
@@
-596,7
+597,7
@@
class NsLcmOpTopic(BaseTopic):
for in_ivld in get_iterable(in_vnfd.get("internal-vld")):
for ivld in get_iterable(vnfd.get("internal-vld")):
for in_ivld in get_iterable(in_vnfd.get("internal-vld")):
for ivld in get_iterable(vnfd.get("internal-vld")):
- if in_ivld["name"]
== ivld["name"] or in_ivld["name"] == ivld["id"]
:
+ if in_ivld["name"]
in (ivld["id"], ivld.get("name"))
:
for in_icp in get_iterable(in_ivld.get("internal-connection-point")):
for icp in ivld["internal-connection-point"]:
if in_icp["id-ref"] == icp["id-ref"]:
for in_icp in get_iterable(in_ivld.get("internal-connection-point")):
for icp in ivld["internal-connection-point"]:
if in_icp["id-ref"] == icp["id-ref"]:
@@
-1070,6
+1071,7
@@
class NsLcmOpTopic(BaseTopic):
class NsiTopic(BaseTopic):
topic = "nsis"
topic_msg = "nsi"
class NsiTopic(BaseTopic):
topic = "nsis"
topic_msg = "nsi"
+ quota_name = "slice_instances"
def __init__(self, db, fs, msg, auth):
BaseTopic.__init__(self, db, fs, msg, auth)
def __init__(self, db, fs, msg, auth):
BaseTopic.__init__(self, db, fs, msg, auth)
@@
-1420,7
+1422,9
@@
class NsiLcmOpTopic(BaseTopic):
if nstId == netslice_subnet["id"]:
nsd_id = netslice_subnet["nsd-ref"]
if nsd_id not in nsds:
if nstId == netslice_subnet["id"]:
nsd_id = netslice_subnet["nsd-ref"]
if nsd_id not in nsds:
- nsds[nsd_id] = self.db.get_one("nsds", {"id": nsd_id})
+ _filter = self._get_project_filter(session)
+ _filter["id"] = nsd_id
+ nsds[nsd_id] = self.db.get_one("nsds", _filter)
return nsds[nsd_id]
else:
raise EngineException("Invalid parameter nstId='{}' is not one of the "
return nsds[nsd_id]
else:
raise EngineException("Invalid parameter nstId='{}' is not one of the "