Merge changes Ib5727c51,I18510f66 into v1.1
authorvelandy <rajesh.velandy@riftio.com>
Thu, 26 Jan 2017 20:11:55 +0000 (21:11 +0100)
committerGerrit Code Review <root@osm.etsi.org>
Thu, 26 Jan 2017 20:11:55 +0000 (21:11 +0100)
* changes:
  Fix interface ordering for bridge interfaces in translation layer
  Fix internal connection type in rift2openmano

models/openmano/python/rift/openmano/rift2openmano.py

index 37b2f06..28eb483 100755 (executable)
@@ -417,7 +417,7 @@ def rift2openmano_vnfd(rift_vnfd, rift_nsd):
         connection = {
             "name": vld.name,
             "description": vld.description,
-            "type": "data",
+            "type": "bridge",
             "elements": [],
             }
 
@@ -579,6 +579,9 @@ def rift2openmano_vnfd(rift_vnfd, rift_nsd):
                         if bps/x[1] >= 1:
                             intf["bandwidth"] = "{} {}bps".format(math.ceil(bps/x[1]), x[0])
 
+        # Sort bridge-ifaces-list TODO sort others
+        newlist = sorted(vnfc["bridge-ifaces"], key=lambda k: k['name'])
+        vnfc["bridge-ifaces"] = newlist
 
     return openmano_vnf