projects
/
osm
/
SO.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug 240 - NS Scaling Scale out
[osm/SO.git]
/
models
/
openmano
/
python
/
rift
/
openmano
/
rift2openmano.py
diff --git
a/models/openmano/python/rift/openmano/rift2openmano.py
b/models/openmano/python/rift/openmano/rift2openmano.py
index
5b9faeb
..
7c6dfc2
100755
(executable)
--- a/
models/openmano/python/rift/openmano/rift2openmano.py
+++ b/
models/openmano/python/rift/openmano/rift2openmano.py
@@
-73,6
+73,10
@@
class RiftNSD(object):
def constituent_vnfds(self):
return self._nsd.constituent_vnfd
def constituent_vnfds(self):
return self._nsd.constituent_vnfd
+ @property
+ def scaling_group_descriptor(self):
+ return self._nsd.scaling_group_descriptor
+
@property
def vlds(self):
return self._nsd.vld
@property
def vlds(self):
return self._nsd.vld
@@
-230,7
+234,8
@@
def rift2openmano_nsd(rift_nsd, rift_vnfds, openmano_vnfd_ids, rift_vnfd_id=None
openmano = {}
openmano["name"] = rift_nsd.name
if rift_vnfd_id is not None:
openmano = {}
openmano["name"] = rift_nsd.name
if rift_vnfd_id is not None:
- openmano["name"] += "scale1"
+ for scaling_groups in rift_nsd.scaling_group_descriptor:
+ openmano["name"] += scaling_groups.name
openmano["description"] = rift_nsd.description
topology = {}
openmano["topology"] = topology
openmano["description"] = rift_nsd.description
topology = {}
openmano["topology"] = topology
@@
-319,13
+324,12
@@
def rift2openmano_nsd(rift_nsd, rift_vnfds, openmano_vnfd_ids, rift_vnfd_id=None
def rift2openmano_vnfd_nsd(rift_nsd, rift_vnfds, openmano_vnfd_ids,rift_vnfd_id=None):
def rift2openmano_vnfd_nsd(rift_nsd, rift_vnfds, openmano_vnfd_ids,rift_vnfd_id=None):
-
if rift_vnfd_id not in rift_vnfds:
if rift_vnfd_id not in rift_vnfds:
- print ("IDS", rift_vnfds)
raise VNFNotFoundError("VNF id %s not provided" % rift_vnfd_id)
openmano_vnfd_nsd = {}
raise VNFNotFoundError("VNF id %s not provided" % rift_vnfd_id)
openmano_vnfd_nsd = {}
- openmano_vnfd_nsd["name"] = rift_vnfd_id+'__'+'scaling_group'
+ for groups in rift_nsd.scaling_group_descriptor:
+ openmano_vnfd_nsd["name"] = rift_vnfd_id+'__'+'scaling_group'+'__'+groups.name
openmano_vnfd_nsd["description"] = "Scaling Group"
topology = {}
openmano_vnfd_nsd["topology"] = topology
openmano_vnfd_nsd["description"] = "Scaling Group"
topology = {}
openmano_vnfd_nsd["topology"] = topology